From 1f2acde5e9523f3d0e2953b22928e41328fff036 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 22 Nov 2023 08:15:18 +0000 Subject: [PATCH] CodeGen from PR 26491 in Azure/azure-rest-api-specs Merge 1fead771fdafa41ccaa1e43750bab608b951ca80 into 7ae8d80917d262746790f86c98c5191bd0ce8eff --- .../CHANGELOG.md | 4 +- .../README.md | 43 +- .../SAMPLE.md | 1536 ++++----- .../pom.xml | 3 +- .../dataprotection/DataProtectionManager.java | 199 +- .../fluent/BackupInstancesClient.java | 440 ++- .../fluent/BackupPoliciesClient.java | 40 +- .../BackupVaultOperationResultsClient.java | 12 +- .../fluent/BackupVaultsClient.java | 80 +- .../fluent/DataProtectionClient.java | 71 +- .../DataProtectionOperationsClient.java | 8 +- .../fluent/DataProtectionsClient.java | 12 +- .../fluent/DeletedBackupInstancesClient.java | 32 +- .../fluent/DppResourceGuardProxiesClient.java | 67 +- .../fluent/ExportJobsClient.java | 12 +- .../ExportJobsOperationResultsClient.java | 12 +- .../FetchCrossRegionRestoreJobsClient.java | 47 + ...rossRegionRestoreJobsOperationsClient.java | 50 + .../FetchSecondaryRecoveryPointsClient.java | 52 + .../dataprotection/fluent/JobsClient.java | 16 +- .../fluent/OperationResultsClient.java | 16 +- ...rationStatusBackupVaultContextsClient.java | 8 +- .../fluent/OperationStatusClient.java | 8 +- ...tionStatusResourceGroupContextsClient.java | 8 +- .../fluent/RecoveryPointsClient.java | 33 +- .../fluent/ResourceGuardsClient.java | 188 +- .../fluent/RestorableTimeRangesClient.java | 22 +- ...orableTimeRangesResponseResourceInner.java | 18 +- .../models/AzureBackupJobResourceInner.java | 14 +- ...AzureBackupRecoveryPointResourceInner.java | 24 +- .../models/BackupInstanceResourceInner.java | 18 +- .../models/BackupVaultResourceInner.java | 46 +- .../models/BaseBackupPolicyResourceInner.java | 24 +- .../CheckNameAvailabilityResultInner.java | 22 +- ...ClientDiscoveryValueForSingleApiInner.java | 50 +- .../DeletedBackupInstanceResourceInner.java | 14 +- .../fluent/models/DppBaseResourceInner.java | 16 +- .../fluent/models/ExportJobsResultInner.java | 18 +- .../FeatureValidationResponseBaseInner.java | 12 +- .../models/OperationJobExtendedInfoInner.java | 20 +- .../fluent/models/OperationResourceInner.java | 56 +- .../ResourceGuardProxyBaseResourceInner.java | 14 +- .../models/ResourceGuardResourceInner.java | 26 +- .../models/UnlockDeleteResponseInner.java | 14 +- .../fluent/models/package-info.java | 4 +- .../dataprotection/fluent/package-info.java | 4 +- .../AzureBackupJobResourceImpl.java | 3 +- .../AzureBackupRecoveryPointResourceImpl.java | 3 +- .../BackupInstanceResourceImpl.java | 96 +- .../BackupInstancesClientImpl.java | 2964 ++++++++--------- .../implementation/BackupInstancesImpl.java | 282 +- .../BackupPoliciesClientImpl.java | 510 +-- .../implementation/BackupPoliciesImpl.java | 104 +- ...BackupVaultOperationResultsClientImpl.java | 112 +- .../BackupVaultOperationResultsImpl.java | 16 +- .../BackupVaultResourceImpl.java | 51 +- .../BackupVaultsClientImpl.java | 942 ++---- .../implementation/BackupVaultsImpl.java | 94 +- .../BaseBackupPolicyResourceImpl.java | 61 +- .../CheckNameAvailabilityResultImpl.java | 3 +- .../ClientDiscoveryValueForSingleApiImpl.java | 3 +- .../DataProtectionClientBuilder.java | 46 +- .../DataProtectionClientImpl.java | 247 +- .../DataProtectionOperationsClientImpl.java | 148 +- .../DataProtectionOperationsImpl.java | 3 +- .../DataProtectionsClientImpl.java | 120 +- .../implementation/DataProtectionsImpl.java | 16 +- .../DeletedBackupInstanceResourceImpl.java | 3 +- .../DeletedBackupInstancesClientImpl.java | 461 +-- .../DeletedBackupInstancesImpl.java | 32 +- .../implementation/DppBaseResourceImpl.java | 3 +- .../DppResourceGuardProxiesClientImpl.java | 685 ++-- .../DppResourceGuardProxiesImpl.java | 155 +- .../implementation/ExportJobsClientImpl.java | 131 +- .../implementation/ExportJobsImpl.java | 4 +- .../ExportJobsOperationResultsClientImpl.java | 116 +- .../ExportJobsOperationResultsImpl.java | 16 +- .../implementation/ExportJobsResultImpl.java | 3 +- .../FeatureValidationResponseBaseImpl.java | 3 +- ...FetchCrossRegionRestoreJobsClientImpl.java | 207 ++ .../FetchCrossRegionRestoreJobsImpl.java | 59 + ...RegionRestoreJobsOperationsClientImpl.java | 332 ++ ...hCrossRegionRestoreJobsOperationsImpl.java | 50 + ...etchSecondaryRecoveryPointsClientImpl.java | 348 ++ .../FetchSecondaryRecoveryPointsImpl.java | 50 + .../implementation/JobsClientImpl.java | 305 +- .../implementation/JobsImpl.java | 21 +- .../OperationJobExtendedInfoImpl.java | 3 +- .../implementation/OperationResourceImpl.java | 3 +- .../OperationResultsClientImpl.java | 119 +- .../implementation/OperationResultsImpl.java | 8 +- ...onStatusBackupVaultContextsClientImpl.java | 117 +- ...perationStatusBackupVaultContextsImpl.java | 16 +- .../OperationStatusClientImpl.java | 99 +- .../implementation/OperationStatusImpl.java | 8 +- ...StatusResourceGroupContextsClientImpl.java | 115 +- ...rationStatusResourceGroupContextsImpl.java | 16 +- .../RecoveryPointsClientImpl.java | 372 +-- .../implementation/RecoveryPointsImpl.java | 51 +- .../ResourceGuardProxyBaseResourceImpl.java | 79 +- .../ResourceGuardResourceImpl.java | 55 +- .../ResourceGuardsClientImpl.java | 2613 +++++---------- .../implementation/ResourceGuardsImpl.java | 338 +- .../RestorableTimeRangesClientImpl.java | 130 +- .../RestorableTimeRangesImpl.java | 32 +- .../UnlockDeleteResponseImpl.java | 3 +- .../dataprotection/implementation/Utils.java | 43 +- .../implementation/package-info.java | 4 +- .../models/AbsoluteDeleteOption.java | 14 +- .../dataprotection/models/AbsoluteMarker.java | 30 +- .../models/AdHocBackupRuleOptions.java | 39 +- .../models/AdhocBackupTriggerOption.java | 14 +- .../models/AdhocBasedTaggingCriteria.java | 24 +- .../models/AdhocBasedTriggerContext.java | 30 +- .../dataprotection/models/AlertsState.java | 18 +- .../models/AuthCredentials.java | 13 +- .../AzureBackupDiscreteRecoveryPoint.java | 87 +- ...BackupFindRestorableTimeRangesRequest.java | 33 +- ...ndRestorableTimeRangesRequestResource.java | 50 +- ...ackupFindRestorableTimeRangesResponse.java | 22 +- ...dRestorableTimeRangesResponseResource.java | 16 +- .../dataprotection/models/AzureBackupJob.java | 196 +- .../models/AzureBackupJobResource.java | 16 +- .../models/AzureBackupJobResourceList.java | 18 +- .../models/AzureBackupParams.java | 19 +- .../models/AzureBackupRecoveryPoint.java | 13 +- ...ackupRecoveryPointBasedRestoreRequest.java | 44 +- .../AzureBackupRecoveryPointResource.java | 20 +- .../AzureBackupRecoveryPointResourceList.java | 18 +- ...BackupRecoveryTimeBasedRestoreRequest.java | 37 +- .../models/AzureBackupRehydrationRequest.java | 35 +- .../models/AzureBackupRestoreRequest.java | 49 +- ...reBackupRestoreWithRehydrationRequest.java | 56 +- .../models/AzureBackupRule.java | 66 +- .../models/AzureMonitorAlertSettings.java | 14 +- .../AzureOperationalStoreParameters.java | 18 +- .../models/AzureRetentionRule.java | 27 +- .../dataprotection/models/BackupCriteria.java | 12 +- .../models/BackupDatasourceParameters.java | 13 +- .../dataprotection/models/BackupInstance.java | 109 +- .../models/BackupInstanceResource.java | 128 +- .../models/BackupInstanceResourceList.java | 18 +- .../models/BackupInstances.java | 217 +- .../models/BackupParameters.java | 12 +- .../dataprotection/models/BackupPolicies.java | 34 +- .../dataprotection/models/BackupPolicy.java | 23 +- .../dataprotection/models/BackupSchedule.java | 24 +- .../dataprotection/models/BackupVault.java | 67 +- .../models/BackupVaultOperationResults.java | 12 +- ...BackupVaultOperationResultsGetHeaders.java | 20 +- ...ackupVaultOperationResultsGetResponse.java | 16 +- .../models/BackupVaultResource.java | 157 +- .../models/BackupVaultResourceList.java | 18 +- .../dataprotection/models/BackupVaults.java | 46 +- .../models/BaseBackupPolicy.java | 22 +- .../models/BaseBackupPolicyResource.java | 88 +- .../models/BaseBackupPolicyResourceList.java | 18 +- .../dataprotection/models/BasePolicyRule.java | 22 +- .../models/BaseResourceProperties.java | 20 +- .../BlobBackupDatasourceParameters.java | 20 +- .../models/CheckNameAvailabilityRequest.java | 18 +- .../models/CheckNameAvailabilityResult.java | 12 +- .../models/ClientDiscoveryDisplay.java | 26 +- .../ClientDiscoveryForLogSpecification.java | 22 +- .../models/ClientDiscoveryForProperties.java | 28 +- ...lientDiscoveryForServiceSpecification.java | 18 +- .../models/ClientDiscoveryResponse.java | 18 +- .../ClientDiscoveryValueForSingleApi.java | 24 +- .../models/CopyOnExpiryOption.java | 10 +- .../dataprotection/models/CopyOption.java | 13 +- .../models/CrossRegionRestoreDetails.java | 91 + .../models/CrossRegionRestoreJobRequest.java | 121 + .../models/CrossRegionRestoreJobsRequest.java | 91 + .../CrossRegionRestoreRequestObject.java | 102 + .../models/CrossRegionRestoreSettings.java | 14 +- .../models/CrossRegionRestoreState.java | 18 +- .../CrossSubscriptionRestoreSettings.java | 14 +- .../models/CrossSubscriptionRestoreState.java | 22 +- .../models/CurrentProtectionState.java | 66 +- .../models/CustomCopyOption.java | 14 +- .../models/DataProtectionOperations.java | 8 +- .../models/DataProtections.java | 12 +- .../models/DataStoreInfoBase.java | 28 +- .../models/DataStoreParameters.java | 23 +- .../dataprotection/models/DataStoreTypes.java | 22 +- .../dataprotection/models/Datasource.java | 47 +- .../dataprotection/models/DatasourceSet.java | 47 +- .../dataprotection/models/Day.java | 18 +- .../dataprotection/models/DayOfWeek.java | 38 +- .../models/DefaultResourceProperties.java | 33 + .../dataprotection/models/DeleteOption.java | 21 +- .../models/DeletedBackupInstance.java | 44 +- .../models/DeletedBackupInstanceResource.java | 16 +- .../DeletedBackupInstanceResourceList.java | 18 +- .../models/DeletedBackupInstances.java | 20 +- .../dataprotection/models/DeletionInfo.java | 18 +- .../models/DppBaseResource.java | 12 +- .../models/DppBaseResourceList.java | 18 +- .../models/DppBaseTrackedResource.java | 24 +- .../models/DppIdentityDetails.java | 39 +- .../models/DppProxyResource.java | 16 +- .../dataprotection/models/DppResource.java | 12 +- .../models/DppResourceGuardProxies.java | 56 +- .../models/DppResourceList.java | 14 +- .../models/DppTrackedResource.java | 36 +- .../models/DppTrackedResourceList.java | 14 +- .../models/DppWorkerRequest.java | 38 +- .../models/ExistingResourcePolicy.java | 18 +- .../dataprotection/models/ExportJobs.java | 8 +- .../models/ExportJobsOperationResults.java | 12 +- .../models/ExportJobsResult.java | 14 +- .../models/FeatureSettings.java | 22 +- .../models/FeatureSupportStatus.java | 34 +- .../dataprotection/models/FeatureType.java | 18 +- .../models/FeatureValidationRequest.java | 18 +- .../models/FeatureValidationRequestBase.java | 12 +- .../models/FeatureValidationResponse.java | 18 +- .../models/FeatureValidationResponseBase.java | 6 +- .../models/FetchCrossRegionRestoreJobs.java | 41 + ...FetchCrossRegionRestoreJobsOperations.java | 43 + .../FetchSecondaryRPsRequestParameters.java | 82 + .../models/FetchSecondaryRecoveryPoints.java | 46 + .../models/IdentityDetails.java | 18 +- .../models/ImmediateCopyOption.java | 10 +- .../models/ImmutabilitySettings.java | 14 +- .../models/ImmutabilityState.java | 22 +- .../dataprotection/models/InnerError.java | 34 +- .../models/ItemLevelRestoreCriteria.java | 16 +- .../models/ItemLevelRestoreTargetInfo.java | 66 +- .../models/ItemPathBasedRestoreCriteria.java | 42 +- .../models/JobExtendedInfo.java | 44 +- .../dataprotection/models/JobSubTask.java | 38 +- .../dataprotection/models/Jobs.java | 16 +- ...etesClusterBackupDatasourceParameters.java | 58 +- .../KubernetesClusterRestoreCriteria.java | 82 +- ...rnetesClusterVaultTierRestoreCriteria.java | 391 +++ .../models/KubernetesPVRestoreCriteria.java | 18 +- ...KubernetesStorageClassRestoreCriteria.java | 18 +- .../models/MonitoringSettings.java | 14 +- .../dataprotection/models/Month.java | 58 +- .../models/NamespacedNameResource.java | 18 +- .../models/OperationExtendedInfo.java | 12 +- .../models/OperationJobExtendedInfo.java | 10 +- .../models/OperationResource.java | 28 +- .../models/OperationResults.java | 16 +- .../models/OperationResultsGetHeaders.java | 20 +- .../models/OperationResultsGetResponse.java | 16 +- .../models/OperationStatus.java | 8 +- .../OperationStatusBackupVaultContexts.java | 12 +- .../OperationStatusResourceGroupContexts.java | 12 +- .../models/PatchBackupVaultInput.java | 22 +- .../models/PatchResourceGuardInput.java | 14 +- .../models/PatchResourceRequestInput.java | 32 +- .../models/PersistentVolumeRestoreMode.java | 18 +- .../dataprotection/models/PolicyInfo.java | 25 +- .../models/PolicyParameters.java | 22 +- .../models/ProtectionStatusDetails.java | 18 +- .../models/ProvisioningState.java | 30 +- .../RangeBasedItemLevelRestoreCriteria.java | 18 +- .../dataprotection/models/RecoveryOption.java | 14 +- .../models/RecoveryPointCompletionState.java | 54 + .../models/RecoveryPointDataStoreDetails.java | 42 +- .../dataprotection/models/RecoveryPoints.java | 33 +- .../models/RehydrationPriority.java | 22 +- .../models/RehydrationStatus.java | 30 +- .../dataprotection/models/ResourceGuard.java | 30 +- .../models/ResourceGuardOperation.java | 14 +- .../models/ResourceGuardOperationDetail.java | 18 +- .../models/ResourceGuardProxyBase.java | 30 +- .../ResourceGuardProxyBaseResource.java | 74 +- .../ResourceGuardProxyBaseResourceList.java | 18 +- .../models/ResourceGuardResource.java | 107 +- .../models/ResourceGuardResourceList.java | 18 +- .../dataprotection/models/ResourceGuards.java | 182 +- .../models/ResourceMoveDetails.java | 30 +- .../models/ResourceMoveState.java | 50 +- .../models/ResourcePropertiesObjectType.java | 49 + .../models/RestorableTimeRange.java | 32 +- .../models/RestorableTimeRanges.java | 22 +- .../models/RestoreFilesTargetInfo.java | 28 +- .../RestoreJobRecoveryPointDetails.java | 18 +- .../models/RestoreSourceDataStoreType.java | 22 +- .../models/RestoreTargetInfo.java | 56 +- .../models/RestoreTargetInfoBase.java | 27 +- .../models/RestoreTargetLocationType.java | 22 +- .../dataprotection/models/RetentionTag.java | 23 +- .../models/ScheduleBasedBackupCriteria.java | 46 +- .../models/ScheduleBasedTriggerContext.java | 40 +- .../SecretStoreBasedAuthCredentials.java | 14 +- .../models/SecretStoreResource.java | 28 +- .../models/SecretStoreType.java | 18 +- .../models/SecureScoreLevel.java | 30 +- .../models/SecuritySettings.java | 18 +- .../models/SoftDeleteSettings.java | 18 +- .../models/SoftDeleteState.java | 22 +- .../models/SourceDataStoreType.java | 26 +- .../models/SourceLifeCycle.java | 52 +- .../dataprotection/models/Status.java | 34 +- .../dataprotection/models/StorageSetting.java | 18 +- .../models/StorageSettingStoreTypes.java | 22 +- .../models/StorageSettingTypes.java | 22 +- .../models/SupportedFeature.java | 22 +- .../models/SyncBackupInstanceRequest.java | 14 +- .../dataprotection/models/SyncType.java | 18 +- .../models/TaggingCriteria.java | 41 +- .../models/TargetCopySetting.java | 48 +- .../dataprotection/models/TargetDetails.java | 66 +- .../models/TriggerBackupRequest.java | 30 +- .../dataprotection/models/TriggerContext.java | 13 +- .../models/UnlockDeleteRequest.java | 18 +- .../models/UnlockDeleteResponse.java | 8 +- .../models/UserAssignedIdentity.java | 14 +- .../models/UserFacingError.java | 56 +- .../models/UserFacingWarningDetail.java | 89 + ...lidateCrossRegionRestoreRequestObject.java | 103 + .../models/ValidateForBackupRequest.java | 20 +- .../models/ValidateRestoreRequestObject.java | 30 +- .../dataprotection/models/ValidationType.java | 14 +- .../dataprotection/models/WeekNumber.java | 30 +- .../dataprotection/models/package-info.java | 3 +- .../dataprotection/package-info.java | 5 +- .../src/main/java/module-info.java | 8 +- .../proxy-config.json | 1 + .../reflect-config.json | 941 ++++++ .../BackupInstancesAdhocBackupSamples.java | 26 +- .../BackupInstancesCreateOrUpdateSamples.java | 81 +- .../BackupInstancesDeleteSamples.java | 15 +- ...tBackupInstanceOperationResultSamples.java | 26 +- .../generated/BackupInstancesGetSamples.java | 16 +- .../generated/BackupInstancesListSamples.java | 14 +- .../BackupInstancesResumeBackupsSamples.java | 10 +- ...ackupInstancesResumeProtectionSamples.java | 10 +- .../BackupInstancesStopProtectionSamples.java | 10 +- .../BackupInstancesSuspendBackupsSamples.java | 10 +- ...kupInstancesSyncBackupInstanceSamples.java | 20 +- ...ancesTriggerCrossRegionRestoreSamples.java | 64 + ...ackupInstancesTriggerRehydrateSamples.java | 25 +- .../BackupInstancesTriggerRestoreSamples.java | 179 +- ...ncesValidateCrossRegionRestoreSamples.java | 64 + ...ckupInstancesValidateForBackupSamples.java | 70 +- ...kupInstancesValidateForRestoreSamples.java | 79 +- .../BackupPoliciesCreateOrUpdateSamples.java | 101 +- .../BackupPoliciesDeleteSamples.java | 15 +- .../generated/BackupPoliciesGetSamples.java | 15 +- .../generated/BackupPoliciesListSamples.java | 10 +- ...BackupVaultOperationResultsGetSamples.java | 20 +- ...kupVaultsCheckNameAvailabilitySamples.java | 25 +- .../BackupVaultsCreateOrUpdateSamples.java | 101 +- .../generated/BackupVaultsDeleteSamples.java | 10 +- ...BackupVaultsGetByResourceGroupSamples.java | 26 +- ...ackupVaultsListByResourceGroupSamples.java | 14 +- .../generated/BackupVaultsListSamples.java | 14 +- .../generated/BackupVaultsUpdateSamples.java | 33 +- ...aProtectionCheckFeatureSupportSamples.java | 23 +- .../DataProtectionOperationsListSamples.java | 10 +- .../DeletedBackupInstancesGetSamples.java | 20 +- .../DeletedBackupInstancesListSamples.java | 19 +- ...DeletedBackupInstancesUndeleteSamples.java | 14 +- ...sourceGuardProxyCreateOrUpdateSamples.java | 24 +- .../DppResourceGuardProxyDeleteSamples.java | 20 +- .../DppResourceGuardProxyGetSamples.java | 15 +- .../DppResourceGuardProxyListSamples.java | 10 +- ...ResourceGuardProxyUnlockDeleteSamples.java | 35 +- .../ExportJobsOperationResultGetSamples.java | 23 +- .../generated/ExportJobsTriggerSamples.java | 10 +- .../FetchCrossRegionRestoreJobGetSamples.java | 31 + ...RegionRestoreJobsOperationListSamples.java | 30 + ...tchSecondaryRecoveryPointsListSamples.java | 29 + .../generated/JobsGetSamples.java | 19 +- .../generated/JobsListSamples.java | 10 +- .../generated/OperationResultGetSamples.java | 19 +- ...ionStatusBackupVaultContextGetSamples.java | 20 +- .../generated/OperationStatusGetSamples.java | 19 +- ...GroupContextGetByResourceGroupSamples.java | 19 +- .../generated/RecoveryPointsGetSamples.java | 20 +- .../generated/RecoveryPointsListSamples.java | 25 +- .../ResourceGuardsDeleteSamples.java | 16 +- ...ckupSecurityPinRequestsObjectsSamples.java | 20 +- ...sourceGuardsGetByResourceGroupSamples.java | 15 +- ...ackupSecurityPinRequestsObjectSamples.java | 20 +- ...eteProtectedItemRequestsObjectSamples.java | 20 +- ...sourceGuardProxyRequestsObjectSamples.java | 20 +- ...isableSoftDeleteRequestsObjectSamples.java | 20 +- ...ateProtectedItemRequestsObjectSamples.java | 20 +- ...ProtectionPolicyRequestsObjectSamples.java | 20 +- ...teProtectedItemRequestsObjectsSamples.java | 20 +- ...ourceGuardProxyRequestsObjectsSamples.java | 20 +- ...sableSoftDeleteRequestsObjectsSamples.java | 20 +- ...teProtectedItemRequestsObjectsSamples.java | 20 +- ...rotectionPolicyRequestsObjectsSamples.java | 20 +- ...ourceGuardsListByResourceGroupSamples.java | 14 +- .../generated/ResourceGuardsListSamples.java | 14 +- .../generated/ResourceGuardsPatchSamples.java | 20 +- .../generated/ResourceGuardsPutSamples.java | 20 +- .../RestorableTimeRangesFindSamples.java | 30 +- .../generated/AbsoluteDeleteOptionTests.java | 27 - .../AdHocBackupRuleOptionsTests.java | 33 - .../AdhocBackupTriggerOptionTests.java | 25 - .../AdhocBasedTaggingCriteriaTests.java | 29 - .../AdhocBasedTriggerContextTests.java | 33 - .../generated/AuthCredentialsTests.java | 22 - ...AzureBackupDiscreteRecoveryPointTests.java | 107 - ...torableTimeRangesRequestResourceTests.java | 82 - ...pFindRestorableTimeRangesRequestTests.java | 36 - ...eTimeRangesResponseResourceInnerTests.java | 52 - ...FindRestorableTimeRangesResponseTests.java | 57 - .../generated/AzureBackupParamsTests.java | 27 - ...RecoveryPointBasedRestoreRequestTests.java | 56 - ...BackupRecoveryPointResourceInnerTests.java | 27 - ...eBackupRecoveryPointResourceListTests.java | 39 - .../AzureBackupRecoveryPointTests.java | 24 - ...pRecoveryTimeBasedRestoreRequestTests.java | 56 - .../AzureBackupRehydrationRequestTests.java | 37 - .../AzureBackupRestoreRequestTests.java | 53 - ...kupRestoreWithRehydrationRequestTests.java | 61 - .../generated/AzureBackupRuleTests.java | 44 - .../AzureMonitorAlertSettingsTests.java | 29 - .../AzureOperationalStoreParametersTests.java | 34 - .../generated/AzureRetentionRuleTests.java | 101 - .../generated/BackupCriteriaTests.java | 22 - .../BackupDatasourceParametersTests.java | 24 - .../BackupInstancesAdhocBackupMockTests.java | 81 - .../BackupInstancesDeleteMockTests.java | 61 - ...BackupInstancesResumeBackupsMockTests.java | 61 - ...kupInstancesResumeProtectionMockTests.java | 61 - ...ackupInstancesStopProtectionMockTests.java | 63 - ...ackupInstancesSuspendBackupsMockTests.java | 61 - ...pInstancesSyncBackupInstanceMockTests.java | 70 - ...ackupInstancesTriggerRestoreMockTests.java | 88 - ...pInstancesValidateForRestoreMockTests.java | 91 - .../generated/BackupParametersTests.java | 22 - ...esCreateOrUpdateWithResponseMockTests.java | 74 - ...upPoliciesDeleteWithResponseMockTests.java | 61 - ...ackupPoliciesGetWithResponseMockTests.java | 70 - .../BackupPoliciesListMockTests.java | 68 - .../generated/BackupPolicyTests.java | 41 - .../generated/BackupScheduleTests.java | 33 - ...rationResultsGetWithResponseMockTests.java | 106 - .../BackupVaultResourceInnerTests.java | 156 - .../BackupVaultResourceListTests.java | 277 -- .../generated/BackupVaultTests.java | 100 - ...NameAvailabilityWithResponseMockTests.java | 76 - .../BackupVaultsCreateOrUpdateMockTests.java | 181 - .../BackupVaultsDeleteMockTests.java | 61 - ...tByResourceGroupWithResponseMockTests.java | 107 - ...kupVaultsListByResourceGroupMockTests.java | 122 - .../generated/BackupVaultsListMockTests.java | 121 - .../BaseBackupPolicyResourceInnerTests.java | 32 - .../BaseBackupPolicyResourceListTests.java | 43 - .../generated/BaseBackupPolicyTests.java | 31 - .../generated/BasePolicyRuleTests.java | 27 - .../BaseResourcePropertiesTests.java | 22 - .../BlobBackupDatasourceParametersTests.java | 31 - .../CheckNameAvailabilityRequestTests.java | 30 - ...CheckNameAvailabilityResultInnerTests.java | 32 - .../ClientDiscoveryDisplayTests.java | 39 - ...ientDiscoveryForLogSpecificationTests.java | 35 - .../ClientDiscoveryForPropertiesTests.java | 45 - ...DiscoveryForServiceSpecificationTests.java | 54 - .../ClientDiscoveryResponseTests.java | 131 - ...tDiscoveryValueForSingleApiInnerTests.java | 84 - .../generated/CopyOnExpiryOptionTests.java | 22 - .../generated/CopyOptionTests.java | 21 - .../CrossRegionRestoreSettingsTests.java | 26 - ...CrossSubscriptionRestoreSettingsTests.java | 29 - .../generated/CustomCopyOptionTests.java | 27 - ...DataProtectionOperationsListMockTests.java | 100 - ...ckFeatureSupportWithResponseMockTests.java | 68 - .../generated/DataStoreInfoBaseTests.java | 31 - .../generated/DataStoreParametersTests.java | 28 - .../generated/DatasourceSetTests.java | 50 - .../generated/DatasourceTests.java | 50 - .../dataprotection/generated/DayTests.java | 26 - .../generated/DeleteOptionTests.java | 27 - ...letedBackupInstancesUndeleteMockTests.java | 63 - .../generated/DeletionInfoTests.java | 25 - .../generated/DppBaseResourceInnerTests.java | 24 - .../generated/DppBaseResourceListTests.java | 33 - .../DppBaseTrackedResourceTests.java | 58 - .../generated/DppIdentityDetailsTests.java | 54 - .../generated/DppProxyResourceTests.java | 41 - ...esCreateOrUpdateWithResponseMockTests.java | 92 - ...ardProxiesDeleteWithResponseMockTests.java | 63 - ...eGuardProxiesGetWithResponseMockTests.java | 78 - .../DppResourceGuardProxiesListMockTests.java | 90 - ...xiesUnlockDeleteWithResponseMockTests.java | 78 - .../generated/DppResourceListTests.java | 25 - .../generated/DppResourceTests.java | 24 - .../DppTrackedResourceListTests.java | 25 - .../generated/DppTrackedResourceTests.java | 66 - .../generated/DppWorkerRequestTests.java | 62 - .../generated/FeatureSettingsTests.java | 44 - .../FeatureValidationRequestBaseTests.java | 24 - .../FeatureValidationRequestTests.java | 32 - ...atureValidationResponseBaseInnerTests.java | 24 - .../FeatureValidationResponseTests.java | 56 - .../generated/IdentityDetailsTests.java | 32 - .../generated/ImmediateCopyOptionTests.java | 22 - .../generated/ImmutabilitySettingsTests.java | 26 - .../ItemLevelRestoreCriteriaTests.java | 24 - .../ItemPathBasedRestoreCriteriaTests.java | 37 - .../generated/JobExtendedInfoTests.java | 44 - .../generated/JobSubTaskTests.java | 52 - ...lusterBackupDatasourceParametersTests.java | 56 - ...KubernetesClusterRestoreCriteriaTests.java | 83 - .../KubernetesPVRestoreCriteriaTests.java | 31 - ...netesStorageClassRestoreCriteriaTests.java | 33 - .../generated/MonitoringSettingsTests.java | 32 - .../NamespacedNameResourceTests.java | 27 - .../generated/OperationExtendedInfoTests.java | 22 - .../OperationJobExtendedInfoInnerTests.java | 27 - .../OperationResourceInnerTests.java | 45 - ...rationResultsGetWithResponseMockTests.java | 66 - ...VaultContextsGetWithResponseMockTests.java | 74 - ...erationStatusGetWithResponseMockTests.java | 74 - ...tByResourceGroupWithResponseMockTests.java | 74 - .../generated/PatchBackupVaultInputTests.java | 85 - .../PatchResourceGuardInputTests.java | 41 - .../PatchResourceRequestInputTests.java | 139 - .../generated/PolicyInfoTests.java | 58 - .../generated/PolicyParametersTests.java | 48 - ...ngeBasedItemLevelRestoreCriteriaTests.java | 33 - .../RecoveryPointDataStoreDetailsTests.java | 49 - ...ecoveryPointsGetWithResponseMockTests.java | 68 - .../RecoveryPointsListMockTests.java | 67 - .../ResourceGuardOperationDetailTests.java | 32 - .../ResourceGuardOperationTests.java | 24 - ...ourceGuardProxyBaseResourceInnerTests.java | 62 - ...sourceGuardProxyBaseResourceListTests.java | 113 - .../ResourceGuardProxyBaseTests.java | 54 - .../ResourceGuardResourceInnerTests.java | 56 - .../ResourceGuardResourceListTests.java | 96 - .../generated/ResourceGuardTests.java | 29 - ...eByResourceGroupWithResponseMockTests.java | 63 - ...upSecurityPinRequestsObjectsMockTests.java | 66 - ...tByResourceGroupWithResponseMockTests.java | 73 - ...inRequestsObjectWithResponseMockTests.java | 67 - ...emRequestsObjectWithResponseMockTests.java | 67 - ...xyRequestsObjectWithResponseMockTests.java | 67 - ...teRequestsObjectWithResponseMockTests.java | 67 - ...emRequestsObjectWithResponseMockTests.java | 67 - ...cyRequestsObjectWithResponseMockTests.java | 67 - ...ProtectedItemRequestsObjectsMockTests.java | 66 - ...rceGuardProxyRequestsObjectsMockTests.java | 66 - ...bleSoftDeleteRequestsObjectsMockTests.java | 66 - ...ProtectedItemRequestsObjectsMockTests.java | 66 - ...tectionPolicyRequestsObjectsMockTests.java | 67 - ...rceGuardsListByResourceGroupMockTests.java | 73 - .../ResourceGuardsListMockTests.java | 73 - ...esourceGuardsPutWithResponseMockTests.java | 93 - .../generated/ResourceMoveDetailsTests.java | 42 - .../generated/RestorableTimeRangeTests.java | 35 - ...leTimeRangesFindWithResponseMockTests.java | 83 - .../RestoreFilesTargetInfoTests.java | 50 - .../RestoreJobRecoveryPointDetailsTests.java | 33 - .../generated/RestoreTargetInfoBaseTests.java | 34 - .../generated/RetentionTagTests.java | 27 - .../ScheduleBasedBackupCriteriaTests.java | 60 - .../ScheduleBasedTriggerContextTests.java | 54 - .../generated/SecuritySettingsTests.java | 42 - .../generated/SoftDeleteSettingsTests.java | 31 - .../generated/SourceLifeCycleTests.java | 77 - .../generated/StorageSettingTests.java | 34 - .../generated/SupportedFeatureTests.java | 38 - .../SyncBackupInstanceRequestTests.java | 26 - .../generated/TaggingCriteriaTests.java | 42 - .../generated/TargetCopySettingTests.java | 37 - .../generated/TargetDetailsTests.java | 40 - .../generated/TriggerBackupRequestTests.java | 37 - .../generated/TriggerContextTests.java | 22 - .../generated/UnlockDeleteRequestTests.java | 34 - .../UnlockDeleteResponseInnerTests.java | 27 - .../generated/UserAssignedIdentityTests.java | 25 - .../ValidateRestoreRequestObjectTests.java | 64 - 574 files changed, 14307 insertions(+), 22222 deletions(-) create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/FetchCrossRegionRestoreJobsClient.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/FetchCrossRegionRestoreJobsOperationsClient.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/FetchSecondaryRecoveryPointsClient.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchCrossRegionRestoreJobsClientImpl.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchCrossRegionRestoreJobsImpl.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchCrossRegionRestoreJobsOperationsClientImpl.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchCrossRegionRestoreJobsOperationsImpl.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchSecondaryRecoveryPointsClientImpl.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchSecondaryRecoveryPointsImpl.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreDetails.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobRequest.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobsRequest.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreRequestObject.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DefaultResourceProperties.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchCrossRegionRestoreJobs.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchCrossRegionRestoreJobsOperations.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchSecondaryRPsRequestParameters.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchSecondaryRecoveryPoints.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterVaultTierRestoreCriteria.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryPointCompletionState.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourcePropertiesObjectType.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserFacingWarningDetail.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidateCrossRegionRestoreRequestObject.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dataprotection/proxy-config.json create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dataprotection/reflect-config.json create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerCrossRegionRestoreSamples.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateCrossRegionRestoreSamples.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/FetchCrossRegionRestoreJobGetSamples.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/FetchCrossRegionRestoreJobsOperationListSamples.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/FetchSecondaryRecoveryPointsListSamples.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AbsoluteDeleteOptionTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdHocBackupRuleOptionsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBackupTriggerOptionTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBasedTaggingCriteriaTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBasedTriggerContextTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AuthCredentialsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupDiscreteRecoveryPointTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesRequestResourceTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesRequestTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesResponseResourceInnerTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesResponseTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupParamsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointBasedRestoreRequestTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointResourceInnerTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointResourceListTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryTimeBasedRestoreRequestTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRehydrationRequestTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRestoreRequestTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRestoreWithRehydrationRequestTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRuleTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureMonitorAlertSettingsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureOperationalStoreParametersTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureRetentionRuleTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupCriteriaTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupDatasourceParametersTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupParametersTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPolicyTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupScheduleTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultResourceInnerTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultResourceListTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilityWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyResourceInnerTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyResourceListTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BasePolicyRuleTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseResourcePropertiesTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BlobBackupDatasourceParametersTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CheckNameAvailabilityRequestTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CheckNameAvailabilityResultInnerTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryDisplayTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForLogSpecificationTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForPropertiesTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForServiceSpecificationTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryResponseTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryValueForSingleApiInnerTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CopyOnExpiryOptionTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CopyOptionTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CrossRegionRestoreSettingsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CrossSubscriptionRestoreSettingsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CustomCopyOptionTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionsCheckFeatureSupportWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataStoreInfoBaseTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataStoreParametersTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DatasourceSetTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DatasourceTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DayTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeleteOptionTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeletionInfoTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseResourceInnerTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseResourceListTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseTrackedResourceTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppIdentityDetailsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppProxyResourceTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesDeleteWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesGetWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesListMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesUnlockDeleteWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceListTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppTrackedResourceListTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppTrackedResourceTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppWorkerRequestTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureSettingsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationRequestBaseTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationRequestTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationResponseBaseInnerTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationResponseTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/IdentityDetailsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ImmediateCopyOptionTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ImmutabilitySettingsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ItemLevelRestoreCriteriaTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ItemPathBasedRestoreCriteriaTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/JobExtendedInfoTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/JobSubTaskTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesClusterBackupDatasourceParametersTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesClusterRestoreCriteriaTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesPVRestoreCriteriaTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesStorageClassRestoreCriteriaTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/MonitoringSettingsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/NamespacedNameResourceTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationExtendedInfoTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationJobExtendedInfoInnerTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationResourceInnerTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationResultsGetWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextsGetWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchBackupVaultInputTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchResourceGuardInputTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchResourceRequestInputTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PolicyInfoTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PolicyParametersTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RangeBasedItemLevelRestoreCriteriaTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointDataStoreDetailsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsGetWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsListMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardOperationDetailTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardOperationTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardProxyBaseResourceInnerTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardProxyBaseResourceListTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardProxyBaseTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardResourceInnerTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardResourceListTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsDeleteByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetBackupSecurityPinRequestsObjectsMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteProtectedItemRequestsObjectsMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDisableSoftDeleteRequestsObjectsMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectedItemRequestsObjectsMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListByResourceGroupMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPutWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceMoveDetailsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangeTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangesFindWithResponseMockTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestoreFilesTargetInfoTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestoreJobRecoveryPointDetailsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestoreTargetInfoBaseTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RetentionTagTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ScheduleBasedBackupCriteriaTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ScheduleBasedTriggerContextTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SecuritySettingsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SoftDeleteSettingsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SourceLifeCycleTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/StorageSettingTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SupportedFeatureTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SyncBackupInstanceRequestTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TaggingCriteriaTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TargetCopySettingTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TargetDetailsTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TriggerBackupRequestTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TriggerContextTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/UnlockDeleteRequestTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/UnlockDeleteResponseInnerTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/UserAssignedIdentityTests.java delete mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ValidateRestoreRequestObjectTests.java diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md index 811c821cddda..55bc00c6037c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2023-11-22) + +- 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-2023-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md index 37e6d95c4bed..4a0dbbd7a886 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-2023-05. 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-2023-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-dataprotection - 1.1.0 + 1.2.0-beta.1 ``` [//]: # ({x-version-update-end}) @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. @@ -74,6 +74,41 @@ See [API design][design] for general introduction on design and key concepts on ## Examples +```java +resource = dataProtectionManager + .backupVaults() + .define(vaultName) + .withRegion(REGION) + .withExistingResourceGroup(resourceGroupName) + .withProperties( + new BackupVault() + .withMonitoringSettings( + new MonitoringSettings() + .withAzureMonitorAlertSettings( + new AzureMonitorAlertSettings() + .withAlertsForAllJobFailures(AlertsState.ENABLED))) + .withSecuritySettings( + new SecuritySettings() + .withSoftDeleteSettings( + new SoftDeleteSettings() + .withState(SoftDeleteState.ALWAYS_ON) + .withRetentionDurationInDays(14.0D)) + .withImmutabilitySettings( + new ImmutabilitySettings() + .withState(ImmutabilityState.LOCKED))) + .withStorageSettings( + Collections.singletonList( + new StorageSetting() + .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) + .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) + .withFeatureSettings( + new FeatureSettings() + .withCrossSubscriptionRestoreSettings( + new CrossSubscriptionRestoreSettings() + .withState(CrossSubscriptionRestoreState.ENABLED)))) + .withIdentity(new DppIdentityDetails().withType("systemAssigned")) + .create(); +``` [Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md) @@ -94,7 +129,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS [docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md index dfc1a3532af2..ae6e451e7d8d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md @@ -14,8 +14,10 @@ - [StopProtection](#backupinstances_stopprotection) - [SuspendBackups](#backupinstances_suspendbackups) - [SyncBackupInstance](#backupinstances_syncbackupinstance) +- [TriggerCrossRegionRestore](#backupinstances_triggercrossregionrestore) - [TriggerRehydrate](#backupinstances_triggerrehydrate) - [TriggerRestore](#backupinstances_triggerrestore) +- [ValidateCrossRegionRestore](#backupinstances_validatecrossregionrestore) - [ValidateForBackup](#backupinstances_validateforbackup) - [ValidateForRestore](#backupinstances_validateforrestore) @@ -70,6 +72,18 @@ - [Get](#exportjobsoperationresult_get) +## FetchCrossRegionRestoreJob + +- [Get](#fetchcrossregionrestorejob_get) + +## FetchCrossRegionRestoreJobsOperation + +- [List](#fetchcrossregionrestorejobsoperation_list) + +## FetchSecondaryRecoveryPoints + +- [List](#fetchsecondaryrecoverypoints_list) + ## Jobs - [Get](#jobs_get) @@ -127,29 +141,20 @@ import com.azure.resourcemanager.dataprotection.models.AdHocBackupRuleOptions; import com.azure.resourcemanager.dataprotection.models.AdhocBackupTriggerOption; import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest; -/** Samples for BackupInstances AdhocBackup. */ +/** + * Samples for BackupInstances AdhocBackup. + */ public final class BackupInstancesAdhocBackupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerBackup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/TriggerBackup.json */ /** * Sample code: Trigger Adhoc Backup. - * + * * @param manager Entry point to DataProtectionManager. */ public static void triggerAdhocBackup(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .adhocBackup( - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - new TriggerBackupRequest() - .withBackupRuleOptions( - new AdHocBackupRuleOptions() - .withRuleName("BackupWeekly") - .withTriggerOption(new AdhocBackupTriggerOption().withRetentionTagOverride("yearly"))), - com.azure.core.util.Context.NONE); + manager.backupInstances().adhocBackup("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", new TriggerBackupRequest().withBackupRuleOptions(new AdHocBackupRuleOptions().withRuleName("BackupWeekly").withTriggerOption(new AdhocBackupTriggerOption().withRetentionTagOverride("yearly"))), com.azure.core.util.Context.NONE); } } ``` @@ -159,9 +164,9 @@ public final class BackupInstancesAdhocBackupSamples { ```java import com.azure.resourcemanager.dataprotection.models.AzureOperationalStoreParameters; import com.azure.resourcemanager.dataprotection.models.BackupInstance; -import com.azure.resourcemanager.dataprotection.models.DataStoreTypes; import com.azure.resourcemanager.dataprotection.models.Datasource; import com.azure.resourcemanager.dataprotection.models.DatasourceSet; +import com.azure.resourcemanager.dataprotection.models.DataStoreTypes; import com.azure.resourcemanager.dataprotection.models.PolicyInfo; import com.azure.resourcemanager.dataprotection.models.PolicyParameters; import com.azure.resourcemanager.dataprotection.models.SecretStoreBasedAuthCredentials; @@ -171,70 +176,25 @@ import com.azure.resourcemanager.dataprotection.models.ValidationType; import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import java.util.stream.Collectors; -/** Samples for BackupInstances CreateOrUpdate. */ +/** + * Samples for BackupInstances CreateOrUpdate. + */ public final class BackupInstancesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/PutBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/PutBackupInstance.json */ /** * Sample code: Create BackupInstance. - * + * * @param manager Entry point to DataProtectionManager. */ public static void createBackupInstance(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .define("testInstance1") - .withExistingBackupVault("000pikumar", "PratikPrivatePreviewVault1") - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .withProperties( - new BackupInstance() - .withFriendlyName("harshitbi2") - .withDataSourceInfo( - new Datasource() - .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withObjectType("Datasource") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") - .withResourceLocation("") - .withResourceName("testdb") - .withResourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withResourceUri("")) - .withDataSourceSetInfo( - new DatasourceSet() - .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withObjectType("DatasourceSet") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") - .withResourceLocation("") - .withResourceName("viveksipgtest") - .withResourceType("Microsoft.DBforPostgreSQL/servers") - .withResourceUri("")) - .withPolicyInfo( - new PolicyInfo() - .withPolicyId( - "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/Backupvaults/PratikPrivatePreviewVault1/backupPolicies/PratikPolicy1") - .withPolicyParameters( - new PolicyParameters() - .withDataStoreParametersList( - Arrays - .asList( - new AzureOperationalStoreParameters() - .withDataStoreType(DataStoreTypes.OPERATIONAL_STORE) - .withResourceGroupId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest"))))) - .withDatasourceAuthCredentials( - new SecretStoreBasedAuthCredentials() - .withSecretStoreResource( - new SecretStoreResource() - .withUri("https://samplevault.vault.azure.net/secrets/credentials") - .withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT))) - .withValidationType(ValidationType.SHALLOW_VALIDATION) - .withObjectType("BackupInstance")) - .create(); + manager.backupInstances().define("testInstance1").withExistingBackupVault("000pikumar", "PratikPrivatePreviewVault1").withTags(mapOf("key1", "fakeTokenPlaceholder")).withProperties(new BackupInstance().withFriendlyName("harshitbi2").withDataSourceInfo(new Datasource().withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases").withObjectType("Datasource").withResourceId("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb").withResourceLocation("").withResourceName("testdb").withResourceType("Microsoft.DBforPostgreSQL/servers/databases").withResourceUri("")).withDataSourceSetInfo(new DatasourceSet().withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases").withObjectType("DatasourceSet").withResourceId("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest").withResourceLocation("").withResourceName("viveksipgtest").withResourceType("Microsoft.DBforPostgreSQL/servers").withResourceUri("")).withPolicyInfo(new PolicyInfo().withPolicyId("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/Backupvaults/PratikPrivatePreviewVault1/backupPolicies/PratikPolicy1").withPolicyParameters(new PolicyParameters().withDataStoreParametersList(Arrays.asList(new AzureOperationalStoreParameters().withDataStoreType(DataStoreTypes.OPERATIONAL_STORE).withResourceGroupId("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest"))))).withDatasourceAuthCredentials(new SecretStoreBasedAuthCredentials().withSecretStoreResource(new SecretStoreResource().withUri("https://samplevault.vault.azure.net/secrets/credentials").withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT))).withValidationType(ValidationType.SHALLOW_VALIDATION).withObjectType("BackupInstance")).create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -251,20 +211,20 @@ public final class BackupInstancesCreateOrUpdateSamples { ### BackupInstances_Delete ```java -/** Samples for BackupInstances Delete. */ +/** + * Samples for BackupInstances Delete. + */ public final class BackupInstancesDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/DeleteBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/DeleteBackupInstance.json */ /** * Sample code: Delete BackupInstance. - * + * * @param manager Entry point to DataProtectionManager. */ public static void deleteBackupInstance(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .delete("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", com.azure.core.util.Context.NONE); + manager.backupInstances().delete("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", com.azure.core.util.Context.NONE); } } ``` @@ -272,21 +232,20 @@ public final class BackupInstancesDeleteSamples { ### BackupInstances_Get ```java -/** Samples for BackupInstances Get. */ +/** + * Samples for BackupInstances Get. + */ public final class BackupInstancesGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/GetBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/GetBackupInstance.json */ /** * Sample code: Get BackupInstance. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getBackupInstance(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .getWithResponse( - "000pikumar", "PratikPrivatePreviewVault1", "testInstance1", com.azure.core.util.Context.NONE); + manager.backupInstances().getWithResponse("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", com.azure.core.util.Context.NONE); } } ``` @@ -294,26 +253,20 @@ public final class BackupInstancesGetSamples { ### BackupInstances_GetBackupInstanceOperationResult ```java -/** Samples for BackupInstances GetBackupInstanceOperationResult. */ +/** + * Samples for BackupInstances GetBackupInstanceOperationResult. + */ public final class BackupInstancesGetBackupInstanceOperationResultSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/GetBackupInstanceOperationResult.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/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==", - com.azure.core.util.Context.NONE); + public static void getBackupInstanceOperationResult(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupInstances().getBackupInstanceOperationResultWithResponse("SampleResourceGroup", "swaggerExample", "testInstance1", "YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==", com.azure.core.util.Context.NONE); } } ``` @@ -321,18 +274,19 @@ public final class BackupInstancesGetBackupInstanceOperationResultSamples { ### BackupInstances_List ```java -/** Samples for BackupInstances List. */ +/** + * Samples for BackupInstances List. + */ public final class BackupInstancesListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ListBackupInstances.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/ListBackupInstances.json */ /** * Sample code: List BackupInstances in a Vault. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listBackupInstancesInAVault( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + public static void listBackupInstancesInAVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager.backupInstances().list("000pikumar", "PratikPrivatePreviewVault1", com.azure.core.util.Context.NONE); } } @@ -341,14 +295,16 @@ public final class BackupInstancesListSamples { ### BackupInstances_ResumeBackups ```java -/** Samples for BackupInstances ResumeBackups. */ +/** + * Samples for BackupInstances ResumeBackups. + */ public final class BackupInstancesResumeBackupsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ResumeBackups.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/ResumeBackups.json */ /** * Sample code: ResumeBackups. - * + * * @param manager Entry point to DataProtectionManager. */ public static void resumeBackups(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { @@ -360,14 +316,16 @@ public final class BackupInstancesResumeBackupsSamples { ### BackupInstances_ResumeProtection ```java -/** Samples for BackupInstances ResumeProtection. */ +/** + * Samples for BackupInstances ResumeProtection. + */ public final class BackupInstancesResumeProtectionSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ResumeProtection.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/ResumeProtection.json */ /** * Sample code: ResumeProtection. - * + * * @param manager Entry point to DataProtectionManager. */ public static void resumeProtection(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { @@ -379,14 +337,16 @@ public final class BackupInstancesResumeProtectionSamples { ### BackupInstances_StopProtection ```java -/** Samples for BackupInstances StopProtection. */ +/** + * Samples for BackupInstances StopProtection. + */ public final class BackupInstancesStopProtectionSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/StopProtection.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/StopProtection.json */ /** * Sample code: StopProtection. - * + * * @param manager Entry point to DataProtectionManager. */ public static void stopProtection(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { @@ -398,14 +358,16 @@ public final class BackupInstancesStopProtectionSamples { ### BackupInstances_SuspendBackups ```java -/** Samples for BackupInstances SuspendBackups. */ +/** + * Samples for BackupInstances SuspendBackups. + */ public final class BackupInstancesSuspendBackupsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/SuspendBackups.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/SuspendBackups.json */ /** * Sample code: SuspendBackups. - * + * * @param manager Entry point to DataProtectionManager. */ public static void suspendBackups(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { @@ -419,26 +381,56 @@ public final class BackupInstancesSuspendBackupsSamples { ```java import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest; import com.azure.resourcemanager.dataprotection.models.SyncType; +import java.util.stream.Collectors; -/** Samples for BackupInstances SyncBackupInstance. */ +/** + * Samples for BackupInstances SyncBackupInstance. + */ public final class BackupInstancesSyncBackupInstanceSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/SyncBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/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), - com.azure.core.util.Context.NONE); + manager.backupInstances().syncBackupInstance("testrg", "testvault", "testbi", new SyncBackupInstanceRequest().withSyncType(SyncType.DEFAULT), com.azure.core.util.Context.NONE); + } +} +``` + +### BackupInstances_TriggerCrossRegionRestore + +```java +import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointBasedRestoreRequest; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreDetails; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreRequestObject; +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.RestoreTargetInfo; +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.SourceDataStoreType; +import java.util.stream.Collectors; + +/** + * Samples for BackupInstances TriggerCrossRegionRestore. + */ +public final class BackupInstancesTriggerCrossRegionRestoreSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/CrossRegionRestore/TriggerCrossRegionRestore.json + */ + /** + * Sample code: Trigger Cross Region Restore. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void triggerCrossRegionRestore(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupInstances().triggerCrossRegionRestore("000pikumar", "EastAsia", new CrossRegionRestoreRequestObject().withRestoreRequestObject(new AzureBackupRecoveryPointBasedRestoreRequest().withRestoreTargetInfo(new RestoreTargetInfo().withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS).withRestoreLocation("southeastasia").withDatasourceInfo(new Datasource().withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases").withObjectType("Datasource").withResourceId("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb").withResourceLocation("").withResourceName("targetdb").withResourceType("Microsoft.DBforPostgreSQL/servers/databases").withResourceUri("")).withDatasourceSetInfo(new DatasourceSet().withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases").withObjectType("DatasourceSet").withResourceId("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest").withResourceLocation("").withResourceName("viveksipgtest").withResourceType("Microsoft.DBforPostgreSQL/servers").withResourceUri("")).withDatasourceAuthCredentials(new SecretStoreBasedAuthCredentials().withSecretStoreResource(new SecretStoreResource().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")).withCrossRegionRestoreDetails(new CrossRegionRestoreDetails().withSourceRegion("east asia").withSourceBackupInstanceId("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/backupVaults/PratikPrivatePreviewVault1/BackupInstances/harshitbi1")), com.azure.core.util.Context.NONE); } } ``` @@ -448,29 +440,22 @@ public final class BackupInstancesSyncBackupInstanceSamples { ```java import com.azure.resourcemanager.dataprotection.models.AzureBackupRehydrationRequest; import com.azure.resourcemanager.dataprotection.models.RehydrationPriority; +import java.util.stream.Collectors; -/** Samples for BackupInstances TriggerRehydrate. */ +/** + * Samples for BackupInstances TriggerRehydrate. + */ public final class BackupInstancesTriggerRehydrateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRehydrate.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/TriggerRehydrate.json */ /** * Sample code: Trigger Rehydrate. - * + * * @param manager Entry point to DataProtectionManager. */ public static void triggerRehydrate(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .triggerRehydrate( - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - new AzureBackupRehydrationRequest() - .withRecoveryPointId("hardcodedRP") - .withRehydrationPriority(RehydrationPriority.HIGH) - .withRehydrationRetentionDuration("7D"), - com.azure.core.util.Context.NONE); + manager.backupInstances().triggerRehydrate("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", new AzureBackupRehydrationRequest().withRecoveryPointId("hardcodedRP").withRehydrationPriority(RehydrationPriority.HIGH).withRehydrationRetentionDuration("7D"), com.azure.core.util.Context.NONE); } } ``` @@ -492,142 +477,80 @@ import com.azure.resourcemanager.dataprotection.models.SecretStoreResource; import com.azure.resourcemanager.dataprotection.models.SecretStoreType; import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType; import com.azure.resourcemanager.dataprotection.models.TargetDetails; +import java.util.stream.Collectors; -/** Samples for BackupInstances TriggerRestore. */ +/** + * Samples for BackupInstances TriggerRestore. + */ public final class BackupInstancesTriggerRestoreSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRestoreAsFiles.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/TriggerRestoreAsFiles.json */ /** * Sample code: Trigger Restore As Files. - * + * * @param manager Entry point to DataProtectionManager. */ public static void triggerRestoreAsFiles(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .triggerRestore( - "000pikumar", - "PrivatePreviewVault1", - "testInstance1", - new AzureBackupRecoveryPointBasedRestoreRequest() - .withRestoreTargetInfo( - new RestoreFilesTargetInfo() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("southeastasia") - .withTargetDetails( - new TargetDetails() - .withFilePrefix("restoredblob") - .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"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRestoreWithRehydration.json + manager.backupInstances().triggerRestore("000pikumar", "PrivatePreviewVault1", "testInstance1", new AzureBackupRecoveryPointBasedRestoreRequest().withRestoreTargetInfo(new RestoreFilesTargetInfo().withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS).withRestoreLocation("southeastasia").withTargetDetails(new TargetDetails().withFilePrefix("restoredblob").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"), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/TriggerRestoreWithRehydration.json */ /** * Sample code: Trigger Restore With Rehydration. - * - * @param manager Entry point to DataProtectionManager. - */ - public static void triggerRestoreWithRehydration( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .triggerRestore( - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - new AzureBackupRestoreWithRehydrationRequest() - .withRestoreTargetInfo( - new RestoreTargetInfo() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("southeastasia") - .withDatasourceInfo( - new Datasource() - .withDatasourceType("OssDB") - .withObjectType("Datasource") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") - .withResourceLocation("") - .withResourceName("testdb") - .withResourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withResourceUri("")) - .withDatasourceSetInfo( - new DatasourceSet() - .withDatasourceType("OssDB") - .withObjectType("DatasourceSet") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") - .withResourceLocation("") - .withResourceName("viveksipgtest") - .withResourceType("Microsoft.DBforPostgreSQL/servers") - .withResourceUri(""))) - .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"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRestore.json + * + * @param manager Entry point to DataProtectionManager. + */ + public static void triggerRestoreWithRehydration(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupInstances().triggerRestore("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", new AzureBackupRestoreWithRehydrationRequest().withRestoreTargetInfo(new RestoreTargetInfo().withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS).withRestoreLocation("southeastasia").withDatasourceInfo(new Datasource().withDatasourceType("OssDB").withObjectType("Datasource").withResourceId("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb").withResourceLocation("").withResourceName("testdb").withResourceType("Microsoft.DBforPostgreSQL/servers/databases").withResourceUri("")).withDatasourceSetInfo(new DatasourceSet().withDatasourceType("OssDB").withObjectType("DatasourceSet").withResourceId("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest").withResourceLocation("").withResourceName("viveksipgtest").withResourceType("Microsoft.DBforPostgreSQL/servers").withResourceUri(""))).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"), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/TriggerRestore.json */ /** * Sample code: Trigger Restore. - * + * * @param manager Entry point to DataProtectionManager. */ public static void triggerRestore(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .triggerRestore( - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - new AzureBackupRecoveryPointBasedRestoreRequest() - .withRestoreTargetInfo( - new RestoreTargetInfo() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("southeastasia") - .withDatasourceInfo( - new Datasource() - .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withObjectType("Datasource") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb") - .withResourceLocation("") - .withResourceName("targetdb") - .withResourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withResourceUri("")) - .withDatasourceSetInfo( - new DatasourceSet() - .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withObjectType("DatasourceSet") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") - .withResourceLocation("") - .withResourceName("viveksipgtest") - .withResourceType("Microsoft.DBforPostgreSQL/servers") - .withResourceUri("")) - .withDatasourceAuthCredentials( - new SecretStoreBasedAuthCredentials() - .withSecretStoreResource( - new SecretStoreResource() - .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"), - com.azure.core.util.Context.NONE); + manager.backupInstances().triggerRestore("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", new AzureBackupRecoveryPointBasedRestoreRequest().withRestoreTargetInfo(new RestoreTargetInfo().withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS).withRestoreLocation("southeastasia").withDatasourceInfo(new Datasource().withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases").withObjectType("Datasource").withResourceId("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb").withResourceLocation("").withResourceName("targetdb").withResourceType("Microsoft.DBforPostgreSQL/servers/databases").withResourceUri("")).withDatasourceSetInfo(new DatasourceSet().withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases").withObjectType("DatasourceSet").withResourceId("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest").withResourceLocation("").withResourceName("viveksipgtest").withResourceType("Microsoft.DBforPostgreSQL/servers").withResourceUri("")).withDatasourceAuthCredentials(new SecretStoreBasedAuthCredentials().withSecretStoreResource(new SecretStoreResource().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"), com.azure.core.util.Context.NONE); + } +} +``` + +### BackupInstances_ValidateCrossRegionRestore + +```java +import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointBasedRestoreRequest; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreDetails; +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.RestoreTargetInfo; +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.SourceDataStoreType; +import com.azure.resourcemanager.dataprotection.models.ValidateCrossRegionRestoreRequestObject; +import java.util.stream.Collectors; + +/** + * Samples for BackupInstances ValidateCrossRegionRestore. + */ +public final class BackupInstancesValidateCrossRegionRestoreSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/CrossRegionRestore/ValidateCrossRegionRestore.json + */ + /** + * Sample code: Validate Cross Region Restore. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void validateCrossRegionRestore(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupInstances().validateCrossRegionRestore("000pikumar", "EastAsia", new ValidateCrossRegionRestoreRequestObject().withRestoreRequestObject(new AzureBackupRecoveryPointBasedRestoreRequest().withRestoreTargetInfo(new RestoreTargetInfo().withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS).withRestoreLocation("southeastasia").withDatasourceInfo(new Datasource().withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases").withObjectType("Datasource").withResourceId("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb").withResourceLocation("").withResourceName("targetdb").withResourceType("Microsoft.DBforPostgreSQL/servers/databases").withResourceUri("")).withDatasourceSetInfo(new DatasourceSet().withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases").withObjectType("DatasourceSet").withResourceId("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest").withResourceLocation("").withResourceName("viveksipgtest").withResourceType("Microsoft.DBforPostgreSQL/servers").withResourceUri("")).withDatasourceAuthCredentials(new SecretStoreBasedAuthCredentials().withSecretStoreResource(new SecretStoreResource().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")).withCrossRegionRestoreDetails(new CrossRegionRestoreDetails().withSourceRegion("east asia").withSourceBackupInstanceId("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/backupVaults/PratikPrivatePreviewVault1/BackupInstances/harshitbi1")), com.azure.core.util.Context.NONE); } } ``` @@ -643,59 +566,22 @@ import com.azure.resourcemanager.dataprotection.models.SecretStoreBasedAuthCrede import com.azure.resourcemanager.dataprotection.models.SecretStoreResource; import com.azure.resourcemanager.dataprotection.models.SecretStoreType; import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest; +import java.util.stream.Collectors; -/** Samples for BackupInstances ValidateForBackup. */ +/** + * Samples for BackupInstances ValidateForBackup. + */ public final class BackupInstancesValidateForBackupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ValidateForBackup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/ValidateForBackup.json */ /** * Sample code: Validate For Backup. - * + * * @param manager Entry point to DataProtectionManager. */ public static void validateForBackup(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .validateForBackup( - "000pikumar", - "PratikPrivatePreviewVault1", - new ValidateForBackupRequest() - .withBackupInstance( - new BackupInstance() - .withFriendlyName("harshitbi2") - .withDataSourceInfo( - new Datasource() - .withDatasourceType("OssDB") - .withObjectType("Datasource") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") - .withResourceLocation("") - .withResourceName("testdb") - .withResourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withResourceUri("")) - .withDataSourceSetInfo( - new DatasourceSet() - .withDatasourceType("OssDB") - .withObjectType("DatasourceSet") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") - .withResourceLocation("") - .withResourceName("viveksipgtest") - .withResourceType("Microsoft.DBforPostgreSQL/servers") - .withResourceUri("")) - .withPolicyInfo( - new PolicyInfo() - .withPolicyId( - "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/Backupvaults/PratikPrivatePreviewVault1/backupPolicies/PratikPolicy1")) - .withDatasourceAuthCredentials( - new SecretStoreBasedAuthCredentials() - .withSecretStoreResource( - new SecretStoreResource() - .withUri("https://samplevault.vault.azure.net/secrets/credentials") - .withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT))) - .withObjectType("BackupInstance")), - com.azure.core.util.Context.NONE); + manager.backupInstances().validateForBackup("000pikumar", "PratikPrivatePreviewVault1", new ValidateForBackupRequest().withBackupInstance(new BackupInstance().withFriendlyName("harshitbi2").withDataSourceInfo(new Datasource().withDatasourceType("OssDB").withObjectType("Datasource").withResourceId("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb").withResourceLocation("").withResourceName("testdb").withResourceType("Microsoft.DBforPostgreSQL/servers/databases").withResourceUri("")).withDataSourceSetInfo(new DatasourceSet().withDatasourceType("OssDB").withObjectType("DatasourceSet").withResourceId("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest").withResourceLocation("").withResourceName("viveksipgtest").withResourceType("Microsoft.DBforPostgreSQL/servers").withResourceUri("")).withPolicyInfo(new PolicyInfo().withPolicyId("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/Backupvaults/PratikPrivatePreviewVault1/backupPolicies/PratikPolicy1")).withDatasourceAuthCredentials(new SecretStoreBasedAuthCredentials().withSecretStoreResource(new SecretStoreResource().withUri("https://samplevault.vault.azure.net/secrets/credentials").withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT))).withObjectType("BackupInstance")), com.azure.core.util.Context.NONE); } } ``` @@ -713,62 +599,22 @@ import com.azure.resourcemanager.dataprotection.models.SecretStoreResource; import com.azure.resourcemanager.dataprotection.models.SecretStoreType; import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType; import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject; +import java.util.stream.Collectors; -/** Samples for BackupInstances ValidateForRestore. */ +/** + * Samples for BackupInstances ValidateForRestore. + */ public final class BackupInstancesValidateForRestoreSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ValidateRestore.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/ValidateRestore.json */ /** * Sample code: Validate Restore. - * + * * @param manager Entry point to DataProtectionManager. */ public static void validateRestore(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .validateForRestore( - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - new ValidateRestoreRequestObject() - .withRestoreRequestObject( - new AzureBackupRecoveryPointBasedRestoreRequest() - .withRestoreTargetInfo( - new RestoreTargetInfo() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("southeastasia") - .withDatasourceInfo( - new Datasource() - .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withObjectType("Datasource") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb") - .withResourceLocation("") - .withResourceName("targetdb") - .withResourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withResourceUri("")) - .withDatasourceSetInfo( - new DatasourceSet() - .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withObjectType("DatasourceSet") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") - .withResourceLocation("") - .withResourceName("viveksipgtest") - .withResourceType("Microsoft.DBforPostgreSQL/servers") - .withResourceUri("")) - .withDatasourceAuthCredentials( - new SecretStoreBasedAuthCredentials() - .withSecretStoreResource( - new SecretStoreResource() - .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")), - com.azure.core.util.Context.NONE); + manager.backupInstances().validateForRestore("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", new ValidateRestoreRequestObject().withRestoreRequestObject(new AzureBackupRecoveryPointBasedRestoreRequest().withRestoreTargetInfo(new RestoreTargetInfo().withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS).withRestoreLocation("southeastasia").withDatasourceInfo(new Datasource().withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases").withObjectType("Datasource").withResourceId("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb").withResourceLocation("").withResourceName("targetdb").withResourceType("Microsoft.DBforPostgreSQL/servers/databases").withResourceUri("")).withDatasourceSetInfo(new DatasourceSet().withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases").withObjectType("DatasourceSet").withResourceId("/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest").withResourceLocation("").withResourceName("viveksipgtest").withResourceType("Microsoft.DBforPostgreSQL/servers").withResourceUri("")).withDatasourceAuthCredentials(new SecretStoreBasedAuthCredentials().withSecretStoreResource(new SecretStoreResource().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")), com.azure.core.util.Context.NONE); } } ``` @@ -792,90 +638,22 @@ import com.azure.resourcemanager.dataprotection.models.SourceLifeCycle; import com.azure.resourcemanager.dataprotection.models.TaggingCriteria; import java.time.OffsetDateTime; import java.util.Arrays; +import java.util.stream.Collectors; -/** Samples for BackupPolicies CreateOrUpdate. */ +/** + * Samples for BackupPolicies CreateOrUpdate. + */ public final class BackupPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/CreateOrUpdateBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/PolicyCRUD/CreateOrUpdateBackupPolicy.json */ /** * Sample code: CreateOrUpdate BackupPolicy. - * - * @param manager Entry point to DataProtectionManager. - */ - public static void createOrUpdateBackupPolicy( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupPolicies() - .define("OSSDBPolicy") - .withExistingBackupVault("000pikumar", "PrivatePreviewVault") - .withProperties( - new BackupPolicy() - .withDatasourceTypes(Arrays.asList("OssDB")) - .withPolicyRules( - Arrays - .asList( - new AzureBackupRule() - .withName("BackupWeekly") - .withBackupParameters(new AzureBackupParams().withBackupType("Full")) - .withDataStore( - new DataStoreInfoBase() - .withDataStoreType(DataStoreTypes.VAULT_STORE) - .withObjectType("DataStoreInfoBase")) - .withTrigger( - new ScheduleBasedTriggerContext() - .withSchedule( - new BackupSchedule() - .withRepeatingTimeIntervals( - Arrays.asList("R/2019-11-20T08:00:00-08:00/P1W"))) - .withTaggingCriteria( - Arrays - .asList( - new TaggingCriteria() - .withIsDefault(true) - .withTaggingPriority(99L) - .withTagInfo(new RetentionTag().withTagName("Default")), - new TaggingCriteria() - .withCriteria( - Arrays - .asList( - new ScheduleBasedBackupCriteria() - .withDaysOfTheWeek( - Arrays.asList(DayOfWeek.SUNDAY)) - .withScheduleTimes( - Arrays - .asList( - OffsetDateTime - .parse( - "2019-03-01T13:00:00Z"))))) - .withIsDefault(false) - .withTaggingPriority(20L) - .withTagInfo(new RetentionTag().withTagName("Weekly"))))), - new AzureRetentionRule() - .withName("Default") - .withIsDefault(true) - .withLifecycles( - Arrays - .asList( - new SourceLifeCycle() - .withDeleteAfter(new AbsoluteDeleteOption().withDuration("P1W")) - .withSourceDataStore( - new DataStoreInfoBase() - .withDataStoreType(DataStoreTypes.VAULT_STORE) - .withObjectType("DataStoreInfoBase")))), - new AzureRetentionRule() - .withName("Weekly") - .withIsDefault(false) - .withLifecycles( - Arrays - .asList( - new SourceLifeCycle() - .withDeleteAfter(new AbsoluteDeleteOption().withDuration("P12W")) - .withSourceDataStore( - new DataStoreInfoBase() - .withDataStoreType(DataStoreTypes.VAULT_STORE) - .withObjectType("DataStoreInfoBase"))))))) - .create(); + * + * @param manager Entry point to DataProtectionManager. + */ + public static void createOrUpdateBackupPolicy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupPolicies().define("OSSDBPolicy").withExistingBackupVault("000pikumar", "PrivatePreviewVault").withProperties(new BackupPolicy().withDatasourceTypes(Arrays.asList("OssDB")).withPolicyRules(Arrays.asList(new AzureBackupRule().withName("BackupWeekly").withBackupParameters(new AzureBackupParams().withBackupType("Full")).withDataStore(new DataStoreInfoBase().withDataStoreType(DataStoreTypes.VAULT_STORE).withObjectType("DataStoreInfoBase")).withTrigger(new ScheduleBasedTriggerContext().withSchedule(new BackupSchedule().withRepeatingTimeIntervals(Arrays.asList("R/2019-11-20T08:00:00-08:00/P1W"))).withTaggingCriteria(Arrays.asList(new TaggingCriteria().withIsDefault(true).withTaggingPriority(99L).withTagInfo(new RetentionTag().withTagName("Default")), new TaggingCriteria().withCriteria(Arrays.asList(new ScheduleBasedBackupCriteria().withDaysOfTheWeek(Arrays.asList(DayOfWeek.SUNDAY)).withScheduleTimes(Arrays.asList(OffsetDateTime.parse("2019-03-01T13:00:00Z"))))).withIsDefault(false).withTaggingPriority(20L).withTagInfo(new RetentionTag().withTagName("Weekly"))))), new AzureRetentionRule().withName("Default").withIsDefault(true).withLifecycles(Arrays.asList(new SourceLifeCycle().withDeleteAfter(new AbsoluteDeleteOption().withDuration("P1W")).withSourceDataStore(new DataStoreInfoBase().withDataStoreType(DataStoreTypes.VAULT_STORE).withObjectType("DataStoreInfoBase")))), new AzureRetentionRule().withName("Weekly").withIsDefault(false).withLifecycles(Arrays.asList(new SourceLifeCycle().withDeleteAfter(new AbsoluteDeleteOption().withDuration("P12W")).withSourceDataStore(new DataStoreInfoBase().withDataStoreType(DataStoreTypes.VAULT_STORE).withObjectType("DataStoreInfoBase"))))))).create(); } } ``` @@ -883,20 +661,20 @@ public final class BackupPoliciesCreateOrUpdateSamples { ### BackupPolicies_Delete ```java -/** Samples for BackupPolicies Delete. */ +/** + * Samples for BackupPolicies Delete. + */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/DeleteBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/PolicyCRUD/DeleteBackupPolicy.json */ /** * Sample code: Delete BackupPolicy. - * + * * @param manager Entry point to DataProtectionManager. */ public static void deleteBackupPolicy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupPolicies() - .deleteWithResponse("000pikumar", "PrivatePreviewVault", "OSSDBPolicy", com.azure.core.util.Context.NONE); + manager.backupPolicies().deleteWithResponse("000pikumar", "PrivatePreviewVault", "OSSDBPolicy", com.azure.core.util.Context.NONE); } } ``` @@ -904,20 +682,20 @@ public final class BackupPoliciesDeleteSamples { ### BackupPolicies_Get ```java -/** Samples for BackupPolicies Get. */ +/** + * Samples for BackupPolicies Get. + */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/GetBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/PolicyCRUD/GetBackupPolicy.json */ /** * Sample code: Get BackupPolicy. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getBackupPolicy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupPolicies() - .getWithResponse("000pikumar", "PrivatePreviewVault", "OSSDBPolicy", com.azure.core.util.Context.NONE); + manager.backupPolicies().getWithResponse("000pikumar", "PrivatePreviewVault", "OSSDBPolicy", com.azure.core.util.Context.NONE); } } ``` @@ -925,14 +703,16 @@ public final class BackupPoliciesGetSamples { ### BackupPolicies_List ```java -/** Samples for BackupPolicies List. */ +/** + * Samples for BackupPolicies List. + */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/ListBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/PolicyCRUD/ListBackupPolicy.json */ /** * Sample code: List BackupPolicy. - * + * * @param manager Entry point to DataProtectionManager. */ public static void listBackupPolicy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { @@ -944,24 +724,20 @@ public final class BackupPoliciesListSamples { ### BackupVaultOperationResults_Get ```java -/** Samples for BackupVaultOperationResults Get. */ +/** + * Samples for BackupVaultOperationResults Get. + */ public final class BackupVaultOperationResultsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetOperationResultPatch.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/GetOperationResultPatch.json */ /** * Sample code: GetOperationResult Patch. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getOperationResultPatch(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupVaultOperationResults() - .getWithResponse( - "SampleResourceGroup", - "swaggerExample", - "YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==", - com.azure.core.util.Context.NONE); + manager.backupVaultOperationResults().getWithResponse("SampleResourceGroup", "swaggerExample", "YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==", com.azure.core.util.Context.NONE); } } ``` @@ -971,27 +747,20 @@ public final class BackupVaultOperationResultsGetSamples { ```java import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityRequest; -/** Samples for BackupVaults CheckNameAvailability. */ +/** + * Samples for BackupVaults CheckNameAvailability. + */ public final class BackupVaultsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/CheckBackupVaultsNameAvailability.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/CheckBackupVaultsNameAvailability.json */ /** * Sample code: Check BackupVaults name availability. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void checkBackupVaultsNameAvailability( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupVaults() - .checkNameAvailabilityWithResponse( - "SampleResourceGroup", - "westus", - new CheckNameAvailabilityRequest() - .withName("swaggerExample") - .withType("Microsoft.DataProtection/BackupVaults"), - com.azure.core.util.Context.NONE); + public static void checkBackupVaultsNameAvailability(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupVaults().checkNameAvailabilityWithResponse("SampleResourceGroup", "westus", new CheckNameAvailabilityRequest().withName("swaggerExample").withType("Microsoft.DataProtection/BackupVaults"), com.azure.core.util.Context.NONE); } } ``` @@ -1016,92 +785,37 @@ import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes; import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import java.util.stream.Collectors; -/** Samples for BackupVaults CreateOrUpdate. */ +/** + * Samples for BackupVaults CreateOrUpdate. + */ public final class BackupVaultsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/PutBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/PutBackupVault.json */ /** * Sample code: Create BackupVault. - * + * * @param manager Entry point to DataProtectionManager. */ public static void createBackupVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupVaults() - .define("swaggerExample") - .withRegion("WestUS") - .withExistingResourceGroup("SampleResourceGroup") - .withProperties( - new BackupVault() - .withMonitoringSettings( - new MonitoringSettings() - .withAzureMonitorAlertSettings( - new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED))) - .withSecuritySettings( - new SecuritySettings() - .withSoftDeleteSettings( - new SoftDeleteSettings() - .withState(SoftDeleteState.fromString("Enabled")) - .withRetentionDurationInDays(14.0D))) - .withStorageSettings( - Arrays - .asList( - new StorageSetting() - .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) - .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) - .withFeatureSettings( - new FeatureSettings() - .withCrossRegionRestoreSettings( - new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED)))) - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .withIdentity(new DppIdentityDetails().withType("None")) - .create(); - } - - /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/PutBackupVaultWithMSI.json + manager.backupVaults().define("swaggerExample").withRegion("WestUS").withExistingResourceGroup("SampleResourceGroup").withProperties(new BackupVault().withMonitoringSettings(new MonitoringSettings().withAzureMonitorAlertSettings(new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED))).withSecuritySettings(new SecuritySettings().withSoftDeleteSettings(new SoftDeleteSettings().withState(SoftDeleteState.fromString("Enabled")).withRetentionDurationInDays(14.0D))).withStorageSettings(Arrays.asList(new StorageSetting().withDatastoreType(StorageSettingStoreTypes.VAULT_STORE).withType(StorageSettingTypes.LOCALLY_REDUNDANT))).withFeatureSettings(new FeatureSettings().withCrossRegionRestoreSettings(new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED)))).withTags(mapOf("key1", "fakeTokenPlaceholder")).withIdentity(new DppIdentityDetails().withType("None")).create(); + } + + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/PutBackupVaultWithMSI.json */ /** * Sample code: Create BackupVault With MSI. - * - * @param manager Entry point to DataProtectionManager. - */ - public static void createBackupVaultWithMSI( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupVaults() - .define("swaggerExample") - .withRegion("WestUS") - .withExistingResourceGroup("SampleResourceGroup") - .withProperties( - new BackupVault() - .withMonitoringSettings( - new MonitoringSettings() - .withAzureMonitorAlertSettings( - new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED))) - .withSecuritySettings( - new SecuritySettings() - .withSoftDeleteSettings( - new SoftDeleteSettings() - .withState(SoftDeleteState.fromString("Enabled")) - .withRetentionDurationInDays(14.0D))) - .withStorageSettings( - Arrays - .asList( - new StorageSetting() - .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) - .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) - .withFeatureSettings( - new FeatureSettings() - .withCrossRegionRestoreSettings( - new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED)))) - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .withIdentity(new DppIdentityDetails().withType("systemAssigned")) - .create(); + * + * @param manager Entry point to DataProtectionManager. + */ + public static void createBackupVaultWithMSI(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupVaults().define("swaggerExample").withRegion("WestUS").withExistingResourceGroup("SampleResourceGroup").withProperties(new BackupVault().withMonitoringSettings(new MonitoringSettings().withAzureMonitorAlertSettings(new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED))).withSecuritySettings(new SecuritySettings().withSoftDeleteSettings(new SoftDeleteSettings().withState(SoftDeleteState.fromString("Enabled")).withRetentionDurationInDays(14.0D))).withStorageSettings(Arrays.asList(new StorageSetting().withDatastoreType(StorageSettingStoreTypes.VAULT_STORE).withType(StorageSettingTypes.LOCALLY_REDUNDANT))).withFeatureSettings(new FeatureSettings().withCrossRegionRestoreSettings(new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED)))).withTags(mapOf("key1", "fakeTokenPlaceholder")).withIdentity(new DppIdentityDetails().withType("systemAssigned")).create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1118,14 +832,16 @@ public final class BackupVaultsCreateOrUpdateSamples { ### BackupVaults_Delete ```java -/** Samples for BackupVaults Delete. */ +/** + * Samples for BackupVaults Delete. + */ public final class BackupVaultsDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/DeleteBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/DeleteBackupVault.json */ /** * Sample code: Delete BackupVault. - * + * * @param manager Entry point to DataProtectionManager. */ public static void deleteBackupVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { @@ -1137,34 +853,32 @@ public final class BackupVaultsDeleteSamples { ### BackupVaults_GetByResourceGroup ```java -/** Samples for BackupVaults GetByResourceGroup. */ +/** + * Samples for BackupVaults GetByResourceGroup. + */ public final class BackupVaultsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/GetBackupVault.json */ /** * Sample code: Get BackupVault. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getBackupVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupVaults() - .getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + manager.backupVaults().getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVaultWithMSI.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/GetBackupVaultWithMSI.json */ /** * Sample code: Get BackupVault With MSI. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getBackupVaultWithMSI(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupVaults() - .getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + manager.backupVaults().getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); } } ``` @@ -1172,18 +886,19 @@ public final class BackupVaultsGetByResourceGroupSamples { ### BackupVaults_List ```java -/** Samples for BackupVaults List. */ +/** + * Samples for BackupVaults List. + */ public final class BackupVaultsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVaultsInSubscription.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/GetBackupVaultsInSubscription.json */ /** * Sample code: Get BackupVaults in Subscription. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getBackupVaultsInSubscription( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + public static void getBackupVaultsInSubscription(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager.backupVaults().list(com.azure.core.util.Context.NONE); } } @@ -1192,18 +907,19 @@ public final class BackupVaultsListSamples { ### BackupVaults_ListByResourceGroup ```java -/** Samples for BackupVaults ListByResourceGroup. */ +/** + * Samples for BackupVaults ListByResourceGroup. + */ public final class BackupVaultsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVaultsInResourceGroup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/GetBackupVaultsInResourceGroup.json */ /** * Sample code: Get BackupVaults in ResourceGroup. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getBackupVaultsInResourceGroup( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + public static void getBackupVaultsInResourceGroup(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager.backupVaults().listByResourceGroup("SampleResourceGroup", com.azure.core.util.Context.NONE); } } @@ -1219,36 +935,26 @@ import com.azure.resourcemanager.dataprotection.models.MonitoringSettings; import com.azure.resourcemanager.dataprotection.models.PatchBackupVaultInput; import java.util.HashMap; import java.util.Map; +import java.util.stream.Collectors; -/** Samples for BackupVaults Update. */ +/** + * Samples for BackupVaults Update. + */ public final class BackupVaultsUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/PatchBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/PatchBackupVault.json */ /** * Sample code: Patch BackupVault. - * + * * @param manager Entry point to DataProtectionManager. */ public static void patchBackupVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - BackupVaultResource resource = - manager - .backupVaults() - .getByResourceGroupWithResponse( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf("newKey", "fakeTokenPlaceholder")) - .withProperties( - new PatchBackupVaultInput() - .withMonitoringSettings( - new MonitoringSettings() - .withAzureMonitorAlertSettings( - new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED)))) - .apply(); + BackupVaultResource resource = manager.backupVaults().getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf("newKey", "fakeTokenPlaceholder")).withProperties(new PatchBackupVaultInput().withMonitoringSettings(new MonitoringSettings().withAzureMonitorAlertSettings(new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED)))).apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1267,25 +973,22 @@ public final class BackupVaultsUpdateSamples { ```java import com.azure.resourcemanager.dataprotection.models.FeatureType; import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequest; +import java.util.stream.Collectors; -/** Samples for DataProtection CheckFeatureSupport. */ +/** + * Samples for DataProtection CheckFeatureSupport. + */ public final class DataProtectionCheckFeatureSupportSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/CheckfeatureSupport.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/CheckfeatureSupport.json */ /** * Sample code: Check Azure Vm Backup Feature Support. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void checkAzureVmBackupFeatureSupport( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .dataProtections() - .checkFeatureSupportWithResponse( - "WestUS", - new FeatureValidationRequest().withFeatureType(FeatureType.DATA_SOURCE_TYPE), - com.azure.core.util.Context.NONE); + public static void checkAzureVmBackupFeatureSupport(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.dataProtections().checkFeatureSupportWithResponse("WestUS", new FeatureValidationRequest().withFeatureType(FeatureType.DATA_SOURCE_TYPE), com.azure.core.util.Context.NONE); } } ``` @@ -1293,18 +996,19 @@ public final class DataProtectionCheckFeatureSupportSamples { ### DataProtectionOperations_List ```java -/** Samples for DataProtectionOperations List. */ +/** + * Samples for DataProtectionOperations List. + */ public final class DataProtectionOperationsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/Operations/List.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/Operations/List.json */ /** * Sample code: Returns the list of supported REST operations. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void returnsTheListOfSupportedRESTOperations( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + public static void returnsTheListOfSupportedRESTOperations(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager.dataProtectionOperations().list(com.azure.core.util.Context.NONE); } } @@ -1313,22 +1017,20 @@ public final class DataProtectionOperationsListSamples { ### DeletedBackupInstances_Get ```java -/** Samples for DeletedBackupInstances Get. */ +/** + * Samples for DeletedBackupInstances Get. + */ public final class DeletedBackupInstancesGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json */ /** * Sample code: Get DeletedBackupInstance. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getDeletedBackupInstance( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .deletedBackupInstances() - .getWithResponse( - "000pikumar", "PratikPrivatePreviewVault1", "testInstance1", com.azure.core.util.Context.NONE); + public static void getDeletedBackupInstance(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.deletedBackupInstances().getWithResponse("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", com.azure.core.util.Context.NONE); } } ``` @@ -1336,21 +1038,20 @@ public final class DeletedBackupInstancesGetSamples { ### DeletedBackupInstances_List ```java -/** Samples for DeletedBackupInstances List. */ +/** + * Samples for DeletedBackupInstances List. + */ public final class DeletedBackupInstancesListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json */ /** * Sample code: List DeletedBackupInstances in a Vault. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listDeletedBackupInstancesInAVault( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .deletedBackupInstances() - .list("000pikumar", "PratikPrivatePreviewVault1", com.azure.core.util.Context.NONE); + public static void listDeletedBackupInstancesInAVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.deletedBackupInstances().list("000pikumar", "PratikPrivatePreviewVault1", com.azure.core.util.Context.NONE); } } ``` @@ -1358,18 +1059,19 @@ public final class DeletedBackupInstancesListSamples { ### DeletedBackupInstances_Undelete ```java -/** Samples for DeletedBackupInstances Undelete. */ +/** + * Samples for DeletedBackupInstances Undelete. + */ public final class DeletedBackupInstancesUndeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json */ /** * Sample code: Undelete Deleted BackupInstance. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void undeleteDeletedBackupInstance( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + public static void undeleteDeletedBackupInstance(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager.deletedBackupInstances().undelete("testrg", "testvault", "testbi", com.azure.core.util.Context.NONE); } } @@ -1380,27 +1082,20 @@ public final class DeletedBackupInstancesUndeleteSamples { ```java import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase; -/** Samples for DppResourceGuardProxy CreateOrUpdate. */ +/** + * Samples for DppResourceGuardProxy CreateOrUpdate. + */ public final class DppResourceGuardProxyCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json */ /** * Sample code: Create ResourceGuardProxy. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void createResourceGuardProxy( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .dppResourceGuardProxies() - .define("swaggerExample") - .withExistingBackupVault("SampleResourceGroup", "sampleVault") - .withProperties( - new ResourceGuardProxyBase() - .withResourceGuardResourceId( - "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource")) - .create(); + public static void createResourceGuardProxy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.dppResourceGuardProxies().define("swaggerExample").withExistingBackupVault("SampleResourceGroup", "sampleVault").withProperties(new ResourceGuardProxyBase().withResourceGuardResourceId("/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource")).create(); } } ``` @@ -1408,22 +1103,20 @@ public final class DppResourceGuardProxyCreateOrUpdateSamples { ### DppResourceGuardProxy_Delete ```java -/** Samples for DppResourceGuardProxy Delete. */ +/** + * Samples for DppResourceGuardProxy Delete. + */ public final class DppResourceGuardProxyDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json */ /** * Sample code: Delete ResourceGuardProxy. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void deleteResourceGuardProxy( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .dppResourceGuardProxies() - .deleteWithResponse( - "SampleResourceGroup", "sampleVault", "swaggerExample", com.azure.core.util.Context.NONE); + public static void deleteResourceGuardProxy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.dppResourceGuardProxies().deleteWithResponse("SampleResourceGroup", "sampleVault", "swaggerExample", com.azure.core.util.Context.NONE); } } ``` @@ -1431,20 +1124,20 @@ public final class DppResourceGuardProxyDeleteSamples { ### DppResourceGuardProxy_Get ```java -/** Samples for DppResourceGuardProxy Get. */ +/** + * Samples for DppResourceGuardProxy Get. + */ public final class DppResourceGuardProxyGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json */ /** * Sample code: Get ResourceGuardProxy. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getResourceGuardProxy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .dppResourceGuardProxies() - .getWithResponse("SampleResourceGroup", "sampleVault", "swaggerExample", com.azure.core.util.Context.NONE); + manager.dppResourceGuardProxies().getWithResponse("SampleResourceGroup", "sampleVault", "swaggerExample", com.azure.core.util.Context.NONE); } } ``` @@ -1452,14 +1145,16 @@ public final class DppResourceGuardProxyGetSamples { ### DppResourceGuardProxy_List ```java -/** Samples for DppResourceGuardProxy List. */ +/** + * Samples for DppResourceGuardProxy List. + */ public final class DppResourceGuardProxyListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json */ /** * Sample code: Get ResourceGuardProxies. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getResourceGuardProxies(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { @@ -1474,32 +1169,20 @@ public final class DppResourceGuardProxyListSamples { import com.azure.resourcemanager.dataprotection.models.UnlockDeleteRequest; import java.util.Arrays; -/** Samples for DppResourceGuardProxy UnlockDelete. */ +/** + * Samples for DppResourceGuardProxy UnlockDelete. + */ public final class DppResourceGuardProxyUnlockDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json */ /** * Sample code: UnlockDelete ResourceGuardProxy. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void unlockDeleteResourceGuardProxy( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .dppResourceGuardProxies() - .unlockDeleteWithResponse( - "SampleResourceGroup", - "sampleVault", - "swaggerExample", - new UnlockDeleteRequest() - .withResourceGuardOperationRequests( - Arrays - .asList( - "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource/deleteBackupInstanceRequests/default")) - .withResourceToBeDeleted( - "/subscriptions/5e13b949-1218-4d18-8b99-7e12155ec4f7/resourceGroups/SampleResourceGroup/providers/Microsoft.DataProtection/backupVaults/sampleVault/backupInstances/TestBI9779f4de"), - com.azure.core.util.Context.NONE); + public static void unlockDeleteResourceGuardProxy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.dppResourceGuardProxies().unlockDeleteWithResponse("SampleResourceGroup", "sampleVault", "swaggerExample", new UnlockDeleteRequest().withResourceGuardOperationRequests(Arrays.asList("/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource/deleteBackupInstanceRequests/default")).withResourceToBeDeleted("/subscriptions/5e13b949-1218-4d18-8b99-7e12155ec4f7/resourceGroups/SampleResourceGroup/providers/Microsoft.DataProtection/backupVaults/sampleVault/backupInstances/TestBI9779f4de"), com.azure.core.util.Context.NONE); } } ``` @@ -1507,14 +1190,16 @@ public final class DppResourceGuardProxyUnlockDeleteSamples { ### ExportJobs_Trigger ```java -/** Samples for ExportJobs Trigger. */ +/** + * Samples for ExportJobs Trigger. + */ public final class ExportJobsTriggerSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/TriggerExportJobs.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/JobCRUD/TriggerExportJobs.json */ /** * Sample code: Trigger Export Jobs. - * + * * @param manager Entry point to DataProtectionManager. */ public static void triggerExportJobs(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { @@ -1526,25 +1211,89 @@ public final class ExportJobsTriggerSamples { ### ExportJobsOperationResult_Get ```java -/** Samples for ExportJobsOperationResult Get. */ +/** + * Samples for ExportJobsOperationResult Get. + */ public final class ExportJobsOperationResultGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/GetExportJobsOperationResult.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/JobCRUD/GetExportJobsOperationResult.json */ /** * Sample code: Get Export Jobs Operation Result. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getExportJobsOperationResult( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .exportJobsOperationResults() - .getWithResponse( - "SwaggerTestRg", - "NetSDKTestRsVault", - "00000000-0000-0000-0000-000000000000", - com.azure.core.util.Context.NONE); + public static void getExportJobsOperationResult(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.exportJobsOperationResults().getWithResponse("SwaggerTestRg", "NetSDKTestRsVault", "00000000-0000-0000-0000-000000000000", com.azure.core.util.Context.NONE); + } +} +``` + +### FetchCrossRegionRestoreJob_Get + +```java +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobRequest; + +/** + * Samples for FetchCrossRegionRestoreJob Get. + */ +public final class FetchCrossRegionRestoreJobGetSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/CrossRegionRestore/FetchCrossRegionRestoreJob.json + */ + /** + * Sample code: Get Cross Region Restore Job. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void getCrossRegionRestoreJob(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.fetchCrossRegionRestoreJobs().getWithResponse("BugBash1", "west us", new CrossRegionRestoreJobRequest().withSourceRegion("east us").withSourceBackupVaultId("/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/BugBash1/providers/Microsoft.DataProtection/backupVaults/BugBashVaultForCCYv11").withJobId("3c60cb49-63e8-4b21-b9bd-26277b3fdfae"), com.azure.core.util.Context.NONE); + } +} +``` + +### FetchCrossRegionRestoreJobsOperation_List + +```java +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobsRequest; + +/** + * Samples for FetchCrossRegionRestoreJobsOperation List. + */ +public final class FetchCrossRegionRestoreJobsOperationListSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/CrossRegionRestore/FetchCrossRegionRestoreJobs.json + */ + /** + * Sample code: List Cross Region Restore Jobs. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void listCrossRegionRestoreJobs(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.fetchCrossRegionRestoreJobsOperations().list("BugBash1", "east us", new CrossRegionRestoreJobsRequest().withSourceRegion("east us").withSourceBackupVaultId("/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/BugBash1/providers/Microsoft.DataProtection/backupVaults/BugBashVaultForCCYv11"), null, com.azure.core.util.Context.NONE); + } +} +``` + +### FetchSecondaryRecoveryPoints_List + +```java +import com.azure.resourcemanager.dataprotection.models.FetchSecondaryRPsRequestParameters; + +/** + * Samples for FetchSecondaryRecoveryPoints List. + */ +public final class FetchSecondaryRecoveryPointsListSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/CrossRegionRestore/FetchSecondaryRPs.json + */ + /** + * Sample code: Fetch SecondaryRPs. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void fetchSecondaryRPs(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.fetchSecondaryRecoveryPoints().list("000pikumar", "WestUS", new FetchSecondaryRPsRequestParameters().withSourceRegion("EastUS").withSourceBackupInstanceId("/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/HelloTest/providers/Microsoft.DataProtection/backupVaults/HelloTestVault/backupInstances/653213d-c5b3-44f6-a0d9-db3c4f9d8e34"), null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1552,24 +1301,20 @@ public final class ExportJobsOperationResultGetSamples { ### Jobs_Get ```java -/** Samples for Jobs Get. */ +/** + * Samples for Jobs Get. + */ public final class JobsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/GetJob.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/JobCRUD/GetJob.json */ /** * Sample code: Get Job. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getJob(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .jobs() - .getWithResponse( - "BugBash1", - "BugBashVaultForCCYv11", - "3c60cb49-63e8-4b21-b9bd-26277b3fdfae", - com.azure.core.util.Context.NONE); + manager.jobs().getWithResponse("BugBash1", "BugBashVaultForCCYv11", "3c60cb49-63e8-4b21-b9bd-26277b3fdfae", com.azure.core.util.Context.NONE); } } ``` @@ -1577,14 +1322,16 @@ public final class JobsGetSamples { ### Jobs_List ```java -/** Samples for Jobs List. */ +/** + * Samples for Jobs List. + */ public final class JobsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/ListJobs.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/JobCRUD/ListJobs.json */ /** * Sample code: Get Jobs. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getJobs(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { @@ -1596,23 +1343,20 @@ public final class JobsListSamples { ### OperationResult_Get ```java -/** Samples for OperationResult Get. */ +/** + * Samples for OperationResult Get. + */ public final class OperationResultGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationResult.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/GetOperationResult.json */ /** * Sample code: Get OperationResult. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getOperationResult(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .operationResults() - .getWithResponse( - "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", - "WestUS", - com.azure.core.util.Context.NONE); + manager.operationResults().getWithResponse("MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", "WestUS", com.azure.core.util.Context.NONE); } } ``` @@ -1620,23 +1364,20 @@ public final class OperationResultGetSamples { ### OperationStatus_Get ```java -/** Samples for OperationStatus Get. */ +/** + * Samples for OperationStatus Get. + */ public final class OperationStatusGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationStatus.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/GetOperationStatus.json */ /** * Sample code: Get OperationStatus. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getOperationStatus(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .operationStatus() - .getWithResponse( - "WestUS", - "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", - com.azure.core.util.Context.NONE); + manager.operationStatus().getWithResponse("WestUS", "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", com.azure.core.util.Context.NONE); } } ``` @@ -1644,24 +1385,20 @@ public final class OperationStatusGetSamples { ### OperationStatusBackupVaultContext_Get ```java -/** Samples for OperationStatusBackupVaultContext Get. */ +/** + * Samples for OperationStatusBackupVaultContext Get. + */ public final class OperationStatusBackupVaultContextGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationStatusVaultContext.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/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==", - com.azure.core.util.Context.NONE); + manager.operationStatusBackupVaultContexts().getWithResponse("SampleResourceGroup", "swaggerExample", "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", com.azure.core.util.Context.NONE); } } ``` @@ -1669,23 +1406,20 @@ public final class OperationStatusBackupVaultContextGetSamples { ### OperationStatusResourceGroupContext_GetByResourceGroup ```java -/** Samples for OperationStatusResourceGroupContext GetByResourceGroup. */ +/** + * Samples for OperationStatusResourceGroupContext GetByResourceGroup. + */ public final class OperationStatusResourceGroupContextGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationStatusRGContext.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/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==", - com.azure.core.util.Context.NONE); + manager.operationStatusResourceGroupContexts().getByResourceGroupWithResponse("SampleResourceGroup", "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", com.azure.core.util.Context.NONE); } } ``` @@ -1693,25 +1427,20 @@ public final class OperationStatusResourceGroupContextGetByResourceGroupSamples ### RecoveryPoints_Get ```java -/** Samples for RecoveryPoints Get. */ +/** + * Samples for RecoveryPoints Get. + */ public final class RecoveryPointsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/GetRecoveryPoint.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/GetRecoveryPoint.json */ /** * Sample code: Get Recovery Point. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getRecoveryPoint(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .recoveryPoints() - .getWithResponse( - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - "7fb2cddd-c5b3-44f6-a0d9-db3c4f9d5f25", - com.azure.core.util.Context.NONE); + manager.recoveryPoints().getWithResponse("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", "7fb2cddd-c5b3-44f6-a0d9-db3c4f9d5f25", com.azure.core.util.Context.NONE); } } ``` @@ -1719,27 +1448,20 @@ public final class RecoveryPointsGetSamples { ### RecoveryPoints_List ```java -/** Samples for RecoveryPoints List. */ +/** + * Samples for RecoveryPoints List. + */ public final class RecoveryPointsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ListRecoveryPoints.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/ListRecoveryPoints.json */ /** * Sample code: List Recovery Points in a Vault. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listRecoveryPointsInAVault( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .recoveryPoints() - .list( - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - null, - null, - com.azure.core.util.Context.NONE); + public static void listRecoveryPointsInAVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.recoveryPoints().list("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1747,21 +1469,20 @@ public final class RecoveryPointsListSamples { ### ResourceGuards_Delete ```java -/** Samples for ResourceGuards Delete. */ +/** + * Samples for ResourceGuards Delete. + */ public final class ResourceGuardsDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/DeleteResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/DeleteResourceGuard.json */ /** * Sample code: Delete ResourceGuard. - * + * * @param manager Entry point to DataProtectionManager. */ public static void deleteResourceGuard(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .deleteByResourceGroupWithResponse( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + manager.resourceGuards().deleteByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); } } ``` @@ -1769,22 +1490,20 @@ public final class ResourceGuardsDeleteSamples { ### ResourceGuards_GetBackupSecurityPinRequestsObjects ```java -/** Samples for ResourceGuards GetBackupSecurityPinRequestsObjects. */ +/** + * Samples for ResourceGuards GetBackupSecurityPinRequestsObjects. + */ public final class ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListBackupSecurityPINRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/ListBackupSecurityPINRequests.json */ /** * Sample code: List OperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getBackupSecurityPinRequestsObjects( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + public static void listOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getBackupSecurityPinRequestsObjects("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); } } ``` @@ -1792,20 +1511,20 @@ public final class ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples { ### ResourceGuards_GetByResourceGroup ```java -/** Samples for ResourceGuards GetByResourceGroup. */ +/** + * Samples for ResourceGuards GetByResourceGroup. + */ public final class ResourceGuardsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetResourceGuard.json */ /** * Sample code: Get ResourceGuard. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getResourceGuard(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + manager.resourceGuards().getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); } } ``` @@ -1813,22 +1532,20 @@ public final class ResourceGuardsGetByResourceGroupSamples { ### ResourceGuards_GetDefaultBackupSecurityPinRequestsObject ```java -/** Samples for ResourceGuards GetDefaultBackupSecurityPinRequestsObject. */ +/** + * Samples for ResourceGuards GetDefaultBackupSecurityPinRequestsObject. + */ public final class ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getDefaultOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDefaultBackupSecurityPinRequestsObjectWithResponse( - "SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); + public static void getDefaultOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDefaultBackupSecurityPinRequestsObjectWithResponse("SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); } } ``` @@ -1836,22 +1553,20 @@ public final class ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSample ### ResourceGuards_GetDefaultDeleteProtectedItemRequestsObject ```java -/** Samples for ResourceGuards GetDefaultDeleteProtectedItemRequestsObject. */ +/** + * Samples for ResourceGuards GetDefaultDeleteProtectedItemRequestsObject. + */ public final class ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getDefaultOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDefaultDeleteProtectedItemRequestsObjectWithResponse( - "SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); + public static void getDefaultOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDefaultDeleteProtectedItemRequestsObjectWithResponse("SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); } } ``` @@ -1859,22 +1574,20 @@ public final class ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamp ### ResourceGuards_GetDefaultDeleteResourceGuardProxyRequestsObject ```java -/** Samples for ResourceGuards GetDefaultDeleteResourceGuardProxyRequestsObject. */ +/** + * Samples for ResourceGuards GetDefaultDeleteResourceGuardProxyRequestsObject. + */ public final class ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getDefaultOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse( - "SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); + public static void getDefaultOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse("SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); } } ``` @@ -1882,22 +1595,20 @@ public final class ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjec ### ResourceGuards_GetDefaultDisableSoftDeleteRequestsObject ```java -/** Samples for ResourceGuards GetDefaultDisableSoftDeleteRequestsObject. */ +/** + * Samples for ResourceGuards GetDefaultDisableSoftDeleteRequestsObject. + */ public final class ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getDefaultOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDefaultDisableSoftDeleteRequestsObjectWithResponse( - "SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); + public static void getDefaultOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDefaultDisableSoftDeleteRequestsObjectWithResponse("SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); } } ``` @@ -1905,22 +1616,20 @@ public final class ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSample ### ResourceGuards_GetDefaultUpdateProtectedItemRequestsObject ```java -/** Samples for ResourceGuards GetDefaultUpdateProtectedItemRequestsObject. */ +/** + * Samples for ResourceGuards GetDefaultUpdateProtectedItemRequestsObject. + */ public final class ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getDefaultOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDefaultUpdateProtectedItemRequestsObjectWithResponse( - "SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); + public static void getDefaultOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDefaultUpdateProtectedItemRequestsObjectWithResponse("SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); } } ``` @@ -1928,22 +1637,20 @@ public final class ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamp ### ResourceGuards_GetDefaultUpdateProtectionPolicyRequestsObject ```java -/** Samples for ResourceGuards GetDefaultUpdateProtectionPolicyRequestsObject. */ +/** + * Samples for ResourceGuards GetDefaultUpdateProtectionPolicyRequestsObject. + */ public final class ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getDefaultOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDefaultUpdateProtectionPolicyRequestsObjectWithResponse( - "SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); + public static void getDefaultOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDefaultUpdateProtectionPolicyRequestsObjectWithResponse("SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); } } ``` @@ -1951,22 +1658,20 @@ public final class ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectS ### ResourceGuards_GetDeleteProtectedItemRequestsObjects ```java -/** Samples for ResourceGuards GetDeleteProtectedItemRequestsObjects. */ +/** + * Samples for ResourceGuards GetDeleteProtectedItemRequestsObjects. + */ public final class ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json */ /** * Sample code: List OperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDeleteProtectedItemRequestsObjects( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + public static void listOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDeleteProtectedItemRequestsObjects("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); } } ``` @@ -1974,22 +1679,20 @@ public final class ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples { ### ResourceGuards_GetDeleteResourceGuardProxyRequestsObjects ```java -/** Samples for ResourceGuards GetDeleteResourceGuardProxyRequestsObjects. */ +/** + * Samples for ResourceGuards GetDeleteResourceGuardProxyRequestsObjects. + */ public final class ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json */ /** * Sample code: List OperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDeleteResourceGuardProxyRequestsObjects( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + public static void listOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDeleteResourceGuardProxyRequestsObjects("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); } } ``` @@ -1997,22 +1700,20 @@ public final class ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSampl ### ResourceGuards_GetDisableSoftDeleteRequestsObjects ```java -/** Samples for ResourceGuards GetDisableSoftDeleteRequestsObjects. */ +/** + * Samples for ResourceGuards GetDisableSoftDeleteRequestsObjects. + */ public final class ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json */ /** * Sample code: List OperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDisableSoftDeleteRequestsObjects( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + public static void listOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDisableSoftDeleteRequestsObjects("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); } } ``` @@ -2020,22 +1721,20 @@ public final class ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples { ### ResourceGuards_GetUpdateProtectedItemRequestsObjects ```java -/** Samples for ResourceGuards GetUpdateProtectedItemRequestsObjects. */ +/** + * Samples for ResourceGuards GetUpdateProtectedItemRequestsObjects. + */ public final class ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json */ /** * Sample code: List OperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getUpdateProtectedItemRequestsObjects( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + public static void listOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getUpdateProtectedItemRequestsObjects("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); } } ``` @@ -2043,22 +1742,20 @@ public final class ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples { ### ResourceGuards_GetUpdateProtectionPolicyRequestsObjects ```java -/** Samples for ResourceGuards GetUpdateProtectionPolicyRequestsObjects. */ +/** + * Samples for ResourceGuards GetUpdateProtectionPolicyRequestsObjects. + */ public final class ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json */ /** * Sample code: List OperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getUpdateProtectionPolicyRequestsObjects( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + public static void listOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getUpdateProtectionPolicyRequestsObjects("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); } } ``` @@ -2066,18 +1763,19 @@ public final class ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples ### ResourceGuards_List ```java -/** Samples for ResourceGuards List. */ +/** + * Samples for ResourceGuards List. + */ public final class ResourceGuardsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetResourceGuardsInSubscription.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetResourceGuardsInSubscription.json */ /** * Sample code: Get ResourceGuards in Subscription. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getResourceGuardsInSubscription( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + public static void getResourceGuardsInSubscription(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager.resourceGuards().list(com.azure.core.util.Context.NONE); } } @@ -2086,18 +1784,19 @@ public final class ResourceGuardsListSamples { ### ResourceGuards_ListByResourceGroup ```java -/** Samples for ResourceGuards ListByResourceGroup. */ +/** + * Samples for ResourceGuards ListByResourceGroup. + */ public final class ResourceGuardsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json */ /** * Sample code: Get ResourceGuards in ResourceGroup. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getResourceGuardsInResourceGroup( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + public static void getResourceGuardsInResourceGroup(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager.resourceGuards().listByResourceGroup("SampleResourceGroup", com.azure.core.util.Context.NONE); } } @@ -2110,26 +1809,24 @@ import com.azure.resourcemanager.dataprotection.models.ResourceGuardResource; import java.util.HashMap; import java.util.Map; -/** Samples for ResourceGuards Patch. */ +/** + * Samples for ResourceGuards Patch. + */ public final class ResourceGuardsPatchSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/PatchResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/PatchResourceGuard.json */ /** * Sample code: Patch ResourceGuard. - * + * * @param manager Entry point to DataProtectionManager. */ public static void patchResourceGuard(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - ResourceGuardResource resource = - manager - .resourceGuards() - .getByResourceGroupWithResponse( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE) - .getValue(); + ResourceGuardResource resource = manager.resourceGuards().getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE).getValue(); resource.update().withTags(mapOf("newKey", "fakeTokenPlaceholder")).apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -2149,26 +1846,23 @@ public final class ResourceGuardsPatchSamples { import java.util.HashMap; import java.util.Map; -/** Samples for ResourceGuards Put. */ +/** + * Samples for ResourceGuards Put. + */ public final class ResourceGuardsPutSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/PutResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/PutResourceGuard.json */ /** * Sample code: Create ResourceGuard. - * + * * @param manager Entry point to DataProtectionManager. */ public static void createResourceGuard(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .define("swaggerExample") - .withRegion("WestUS") - .withExistingResourceGroup("SampleResourceGroup") - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .create(); + manager.resourceGuards().define("swaggerExample").withRegion("WestUS").withExistingResourceGroup("SampleResourceGroup").withTags(mapOf("key1", "fakeTokenPlaceholder")).create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -2187,30 +1881,22 @@ public final class ResourceGuardsPutSamples { ```java import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest; import com.azure.resourcemanager.dataprotection.models.RestoreSourceDataStoreType; +import java.util.stream.Collectors; -/** Samples for RestorableTimeRanges Find. */ +/** + * Samples for RestorableTimeRanges Find. + */ public final class RestorableTimeRangesFindSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/FindRestorableTimeRanges.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/FindRestorableTimeRanges.json */ /** * Sample code: Find Restorable Time Ranges. - * - * @param manager Entry point to DataProtectionManager. - */ - public static void findRestorableTimeRanges( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .restorableTimeRanges() - .findWithResponse( - "Blob-Backup", - "ZBlobBackupVaultBVTD3", - "zblobbackuptestsa58", - new AzureBackupFindRestorableTimeRangesRequest() - .withSourceDataStoreType(RestoreSourceDataStoreType.OPERATIONAL_STORE) - .withStartTime("2020-10-17T23:28:17.6829685Z") - .withEndTime("2021-02-24T00:35:17.6829685Z"), - com.azure.core.util.Context.NONE); + * + * @param manager Entry point to DataProtectionManager. + */ + public static void findRestorableTimeRanges(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.restorableTimeRanges().findWithResponse("Blob-Backup", "ZBlobBackupVaultBVTD3", "zblobbackuptestsa58", new AzureBackupFindRestorableTimeRangesRequest().withSourceDataStoreType(RestoreSourceDataStoreType.OPERATIONAL_STORE).withStartTime("2020-10-17T23:28:17.6829685Z").withEndTime("2021-02-24T00:35:17.6829685Z"), com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml b/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml index f9d24634d5fd..111f9ff524ab 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml @@ -18,7 +18,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-2023-05. + 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-2023-11. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true 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 32b99e7e607c..ae6a9795e131 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 @@ -35,6 +35,9 @@ import com.azure.resourcemanager.dataprotection.implementation.DppResourceGuardProxiesImpl; import com.azure.resourcemanager.dataprotection.implementation.ExportJobsImpl; import com.azure.resourcemanager.dataprotection.implementation.ExportJobsOperationResultsImpl; +import com.azure.resourcemanager.dataprotection.implementation.FetchCrossRegionRestoreJobsImpl; +import com.azure.resourcemanager.dataprotection.implementation.FetchCrossRegionRestoreJobsOperationsImpl; +import com.azure.resourcemanager.dataprotection.implementation.FetchSecondaryRecoveryPointsImpl; import com.azure.resourcemanager.dataprotection.implementation.JobsImpl; import com.azure.resourcemanager.dataprotection.implementation.OperationResultsImpl; import com.azure.resourcemanager.dataprotection.implementation.OperationStatusBackupVaultContextsImpl; @@ -53,6 +56,9 @@ import com.azure.resourcemanager.dataprotection.models.DppResourceGuardProxies; import com.azure.resourcemanager.dataprotection.models.ExportJobs; import com.azure.resourcemanager.dataprotection.models.ExportJobsOperationResults; +import com.azure.resourcemanager.dataprotection.models.FetchCrossRegionRestoreJobs; +import com.azure.resourcemanager.dataprotection.models.FetchCrossRegionRestoreJobsOperations; +import com.azure.resourcemanager.dataprotection.models.FetchSecondaryRecoveryPoints; import com.azure.resourcemanager.dataprotection.models.Jobs; import com.azure.resourcemanager.dataprotection.models.OperationResults; import com.azure.resourcemanager.dataprotection.models.OperationStatus; @@ -68,7 +74,10 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to DataProtectionManager. Open API 2.0 Specs for Azure Data Protection service. */ +/** + * Entry point to DataProtectionManager. + * Open API 2.0 Specs for Azure Data Protection service. + */ public final class DataProtectionManager { private BackupVaults backupVaults; @@ -92,6 +101,12 @@ public final class DataProtectionManager { private RecoveryPoints recoveryPoints; + private FetchSecondaryRecoveryPoints fetchSecondaryRecoveryPoints; + + private FetchCrossRegionRestoreJobs fetchCrossRegionRestoreJobs; + + private FetchCrossRegionRestoreJobsOperations fetchCrossRegionRestoreJobsOperations; + private Jobs jobs; private RestorableTimeRanges restorableTimeRanges; @@ -111,18 +126,14 @@ public final class DataProtectionManager { private DataProtectionManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new DataProtectionClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new DataProtectionClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval).buildClient(); } /** * Creates an instance of DataProtection service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the DataProtection service API instance. @@ -135,7 +146,7 @@ public static DataProtectionManager authenticate(TokenCredential credential, Azu /** * 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. @@ -148,14 +159,16 @@ public static DataProtectionManager authenticate(HttpPipeline httpPipeline, Azur /** * Gets a Configurable instance that can be used to create DataProtectionManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new DataProtectionManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -227,8 +240,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * 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. @@ -245,8 +258,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -266,21 +279,12 @@ public DataProtectionManager authenticate(TokenCredential credential, AzureProfi Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.dataprotection") - .append("/") - .append("1.1.0"); + userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.dataprotection") + .append("/").append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); + userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -299,38 +303,25 @@ public DataProtectionManager authenticate(TokenCredential credential, AzureProfi policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); return new DataProtectionManager(httpPipeline, profile, defaultPollInterval); } } /** * Gets the resource collection API of BackupVaults. It manages BackupVaultResource. - * + * * @return Resource collection API of BackupVaults. */ public BackupVaults backupVaults() { @@ -342,7 +333,7 @@ public BackupVaults backupVaults() { /** * Gets the resource collection API of OperationResults. - * + * * @return Resource collection API of OperationResults. */ public OperationResults operationResults() { @@ -354,7 +345,7 @@ public OperationResults operationResults() { /** * Gets the resource collection API of OperationStatus. - * + * * @return Resource collection API of OperationStatus. */ public OperationStatus operationStatus() { @@ -366,47 +357,46 @@ public OperationStatus operationStatus() { /** * Gets the resource collection API of OperationStatusBackupVaultContexts. - * + * * @return Resource collection API of OperationStatusBackupVaultContexts. */ public OperationStatusBackupVaultContexts operationStatusBackupVaultContexts() { if (this.operationStatusBackupVaultContexts == null) { - this.operationStatusBackupVaultContexts = - new OperationStatusBackupVaultContextsImpl(clientObject.getOperationStatusBackupVaultContexts(), this); + this.operationStatusBackupVaultContexts = new OperationStatusBackupVaultContextsImpl( + clientObject.getOperationStatusBackupVaultContexts(), this); } return operationStatusBackupVaultContexts; } /** * Gets the resource collection API of OperationStatusResourceGroupContexts. - * + * * @return Resource collection API of OperationStatusResourceGroupContexts. */ public OperationStatusResourceGroupContexts operationStatusResourceGroupContexts() { if (this.operationStatusResourceGroupContexts == null) { - this.operationStatusResourceGroupContexts = - new OperationStatusResourceGroupContextsImpl( - clientObject.getOperationStatusResourceGroupContexts(), this); + this.operationStatusResourceGroupContexts = new OperationStatusResourceGroupContextsImpl( + clientObject.getOperationStatusResourceGroupContexts(), this); } return operationStatusResourceGroupContexts; } /** * Gets the resource collection API of BackupVaultOperationResults. - * + * * @return Resource collection API of BackupVaultOperationResults. */ public BackupVaultOperationResults backupVaultOperationResults() { if (this.backupVaultOperationResults == null) { - this.backupVaultOperationResults = - new BackupVaultOperationResultsImpl(clientObject.getBackupVaultOperationResults(), this); + this.backupVaultOperationResults + = new BackupVaultOperationResultsImpl(clientObject.getBackupVaultOperationResults(), this); } return backupVaultOperationResults; } /** * Gets the resource collection API of DataProtections. - * + * * @return Resource collection API of DataProtections. */ public DataProtections dataProtections() { @@ -418,20 +408,20 @@ public DataProtections dataProtections() { /** * Gets the resource collection API of DataProtectionOperations. - * + * * @return Resource collection API of DataProtectionOperations. */ public DataProtectionOperations dataProtectionOperations() { if (this.dataProtectionOperations == null) { - this.dataProtectionOperations = - new DataProtectionOperationsImpl(clientObject.getDataProtectionOperations(), this); + this.dataProtectionOperations + = new DataProtectionOperationsImpl(clientObject.getDataProtectionOperations(), this); } return dataProtectionOperations; } /** * Gets the resource collection API of BackupPolicies. It manages BaseBackupPolicyResource. - * + * * @return Resource collection API of BackupPolicies. */ public BackupPolicies backupPolicies() { @@ -443,7 +433,7 @@ public BackupPolicies backupPolicies() { /** * Gets the resource collection API of BackupInstances. It manages BackupInstanceResource. - * + * * @return Resource collection API of BackupInstances. */ public BackupInstances backupInstances() { @@ -455,7 +445,7 @@ public BackupInstances backupInstances() { /** * Gets the resource collection API of RecoveryPoints. - * + * * @return Resource collection API of RecoveryPoints. */ public RecoveryPoints recoveryPoints() { @@ -465,9 +455,48 @@ public RecoveryPoints recoveryPoints() { return recoveryPoints; } + /** + * Gets the resource collection API of FetchSecondaryRecoveryPoints. + * + * @return Resource collection API of FetchSecondaryRecoveryPoints. + */ + public FetchSecondaryRecoveryPoints fetchSecondaryRecoveryPoints() { + if (this.fetchSecondaryRecoveryPoints == null) { + this.fetchSecondaryRecoveryPoints + = new FetchSecondaryRecoveryPointsImpl(clientObject.getFetchSecondaryRecoveryPoints(), this); + } + return fetchSecondaryRecoveryPoints; + } + + /** + * Gets the resource collection API of FetchCrossRegionRestoreJobs. + * + * @return Resource collection API of FetchCrossRegionRestoreJobs. + */ + public FetchCrossRegionRestoreJobs fetchCrossRegionRestoreJobs() { + if (this.fetchCrossRegionRestoreJobs == null) { + this.fetchCrossRegionRestoreJobs + = new FetchCrossRegionRestoreJobsImpl(clientObject.getFetchCrossRegionRestoreJobs(), this); + } + return fetchCrossRegionRestoreJobs; + } + + /** + * Gets the resource collection API of FetchCrossRegionRestoreJobsOperations. + * + * @return Resource collection API of FetchCrossRegionRestoreJobsOperations. + */ + public FetchCrossRegionRestoreJobsOperations fetchCrossRegionRestoreJobsOperations() { + if (this.fetchCrossRegionRestoreJobsOperations == null) { + this.fetchCrossRegionRestoreJobsOperations = new FetchCrossRegionRestoreJobsOperationsImpl( + clientObject.getFetchCrossRegionRestoreJobsOperations(), this); + } + return fetchCrossRegionRestoreJobsOperations; + } + /** * Gets the resource collection API of Jobs. - * + * * @return Resource collection API of Jobs. */ public Jobs jobs() { @@ -479,7 +508,7 @@ public Jobs jobs() { /** * Gets the resource collection API of RestorableTimeRanges. - * + * * @return Resource collection API of RestorableTimeRanges. */ public RestorableTimeRanges restorableTimeRanges() { @@ -491,7 +520,7 @@ public RestorableTimeRanges restorableTimeRanges() { /** * Gets the resource collection API of ExportJobs. - * + * * @return Resource collection API of ExportJobs. */ public ExportJobs exportJobs() { @@ -503,33 +532,33 @@ public ExportJobs exportJobs() { /** * Gets the resource collection API of ExportJobsOperationResults. - * + * * @return Resource collection API of ExportJobsOperationResults. */ public ExportJobsOperationResults exportJobsOperationResults() { if (this.exportJobsOperationResults == null) { - this.exportJobsOperationResults = - new ExportJobsOperationResultsImpl(clientObject.getExportJobsOperationResults(), this); + this.exportJobsOperationResults + = new ExportJobsOperationResultsImpl(clientObject.getExportJobsOperationResults(), this); } return exportJobsOperationResults; } /** * Gets the resource collection API of DeletedBackupInstances. - * + * * @return Resource collection API of DeletedBackupInstances. */ public DeletedBackupInstances deletedBackupInstances() { if (this.deletedBackupInstances == null) { - this.deletedBackupInstances = - new DeletedBackupInstancesImpl(clientObject.getDeletedBackupInstances(), this); + this.deletedBackupInstances + = new DeletedBackupInstancesImpl(clientObject.getDeletedBackupInstances(), this); } return deletedBackupInstances; } /** * Gets the resource collection API of ResourceGuards. It manages ResourceGuardResource. - * + * * @return Resource collection API of ResourceGuards. */ public ResourceGuards resourceGuards() { @@ -541,20 +570,22 @@ public ResourceGuards resourceGuards() { /** * Gets the resource collection API of DppResourceGuardProxies. It manages ResourceGuardProxyBaseResource. - * + * * @return Resource collection API of DppResourceGuardProxies. */ public DppResourceGuardProxies dppResourceGuardProxies() { if (this.dppResourceGuardProxies == null) { - this.dppResourceGuardProxies = - new DppResourceGuardProxiesImpl(clientObject.getDppResourceGuardProxies(), this); + this.dppResourceGuardProxies + = new DppResourceGuardProxiesImpl(clientObject.getDppResourceGuardProxies(), this); } return dppResourceGuardProxies; } /** - * @return Wrapped service client DataProtectionClient providing direct access to the underlying auto-generated API - * implementation, based on Azure REST API. + * Gets wrapped service client DataProtectionClient providing direct access to the underlying auto-generated API + * implementation, based on Azure REST API. + * + * @return Wrapped service client DataProtectionClient. */ public DataProtectionClient serviceClient() { return this.clientObject; 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 b2b97c863eb4..e5bbb8de7e8d 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,16 +15,20 @@ 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.CrossRegionRestoreRequestObject; import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest; import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest; +import com.azure.resourcemanager.dataprotection.models.ValidateCrossRegionRestoreRequestObject; import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest; import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject; -/** An instance of this class provides access to all the operations defined in BackupInstancesClient. */ +/** + * An instance of this class provides access to all the operations defined in BackupInstancesClient. + */ public interface BackupInstancesClient { /** * Gets a backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -37,7 +41,7 @@ public interface BackupInstancesClient { /** * Gets a backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -51,7 +55,7 @@ public interface BackupInstancesClient { /** * Gets a backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -62,12 +66,12 @@ public interface BackupInstancesClient { * @return a backup instance with name in a backup vault along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String vaultName, String backupInstanceName, Context context); + Response getWithResponse(String resourceGroupName, String vaultName, + String backupInstanceName, Context context); /** * Gets a backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -81,7 +85,7 @@ Response getWithResponse( /** * Create or update a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -97,7 +101,7 @@ SyncPoller, BackupInstanceResourceInner> /** * Create or update a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -110,15 +114,12 @@ SyncPoller, BackupInstanceResourceInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BackupInstanceResourceInner> beginCreateOrUpdate( - String resourceGroupName, - String vaultName, - String backupInstanceName, - BackupInstanceResourceInner parameters, + String resourceGroupName, String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters, Context context); /** * Create or update a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -129,12 +130,12 @@ SyncPoller, BackupInstanceResourceInner> * @return backupInstanceResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupInstanceResourceInner createOrUpdate( - String resourceGroupName, String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters); + BackupInstanceResourceInner createOrUpdate(String resourceGroupName, String vaultName, String backupInstanceName, + BackupInstanceResourceInner parameters); /** * Create or update a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -146,16 +147,12 @@ BackupInstanceResourceInner createOrUpdate( * @return backupInstanceResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupInstanceResourceInner createOrUpdate( - String resourceGroupName, - String vaultName, - String backupInstanceName, - BackupInstanceResourceInner parameters, - Context context); + BackupInstanceResourceInner createOrUpdate(String resourceGroupName, String vaultName, String backupInstanceName, + BackupInstanceResourceInner parameters, Context context); /** * Delete a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -165,12 +162,12 @@ BackupInstanceResourceInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String vaultName, String backupInstanceName); + SyncPoller, Void> beginDelete(String resourceGroupName, String vaultName, + String backupInstanceName); /** * Delete a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -181,12 +178,12 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String vaultName, String backupInstanceName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String vaultName, + String backupInstanceName, Context context); /** * Delete a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -199,7 +196,7 @@ SyncPoller, Void> beginDelete( /** * Delete a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -213,7 +210,7 @@ SyncPoller, Void> beginDelete( /** * Trigger adhoc backup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -229,7 +226,7 @@ SyncPoller, OperationJobExtendedInfoIn /** * Trigger adhoc backup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -242,15 +239,12 @@ SyncPoller, OperationJobExtendedInfoIn */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationJobExtendedInfoInner> beginAdhocBackup( - String resourceGroupName, - String vaultName, - String backupInstanceName, - TriggerBackupRequest parameters, + String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters, Context context); /** * Trigger adhoc backup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -261,12 +255,12 @@ SyncPoller, OperationJobExtendedInfoIn * @return operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationJobExtendedInfoInner adhocBackup( - String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters); + OperationJobExtendedInfoInner adhocBackup(String resourceGroupName, String vaultName, String backupInstanceName, + TriggerBackupRequest parameters); /** * Trigger adhoc backup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -278,16 +272,12 @@ OperationJobExtendedInfoInner adhocBackup( * @return operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationJobExtendedInfoInner adhocBackup( - String resourceGroupName, - String vaultName, - String backupInstanceName, - TriggerBackupRequest parameters, - Context context); + OperationJobExtendedInfoInner adhocBackup(String resourceGroupName, String vaultName, String backupInstanceName, + TriggerBackupRequest parameters, Context context); /** * Validate whether adhoc backup will be successful or not. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -297,12 +287,12 @@ OperationJobExtendedInfoInner adhocBackup( * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OperationJobExtendedInfoInner> beginValidateForBackup( - String resourceGroupName, String vaultName, ValidateForBackupRequest parameters); + SyncPoller, OperationJobExtendedInfoInner> + beginValidateForBackup(String resourceGroupName, String vaultName, ValidateForBackupRequest parameters); /** * Validate whether adhoc backup will be successful or not. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -318,7 +308,7 @@ SyncPoller, OperationJobExtendedInfoIn /** * Validate whether adhoc backup will be successful or not. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -328,12 +318,12 @@ SyncPoller, OperationJobExtendedInfoIn * @return operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationJobExtendedInfoInner validateForBackup( - String resourceGroupName, String vaultName, ValidateForBackupRequest parameters); + OperationJobExtendedInfoInner validateForBackup(String resourceGroupName, String vaultName, + ValidateForBackupRequest parameters); /** * Validate whether adhoc backup will be successful or not. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -344,12 +334,12 @@ OperationJobExtendedInfoInner validateForBackup( * @return operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationJobExtendedInfoInner validateForBackup( - String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, Context context); + OperationJobExtendedInfoInner validateForBackup(String resourceGroupName, String vaultName, + ValidateForBackupRequest parameters, Context context); /** * Get result of backup instance creation operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -361,12 +351,12 @@ OperationJobExtendedInfoInner validateForBackup( * @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); + Response getBackupInstanceOperationResultWithResponse(String resourceGroupName, + String vaultName, String backupInstanceName, String operationId, Context context); /** * Get result of backup instance creation operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -377,12 +367,138 @@ Response getBackupInstanceOperationResultWithRespon * @return result of backup instance creation operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupInstanceResourceInner getBackupInstanceOperationResult( - String resourceGroupName, String vaultName, String backupInstanceName, String operationId); + BackupInstanceResourceInner getBackupInstanceOperationResult(String resourceGroupName, String vaultName, + String backupInstanceName, String operationId); + + /** + * Triggers Cross Region Restore for BackupInstance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for trigger CRR operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 operationJobExtendedInfo. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationJobExtendedInfoInner> beginTriggerCrossRegionRestore( + String resourceGroupName, String location, CrossRegionRestoreRequestObject parameters); + + /** + * Triggers Cross Region Restore for BackupInstance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for trigger CRR 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 operationJobExtendedInfo. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationJobExtendedInfoInner> beginTriggerCrossRegionRestore( + String resourceGroupName, String location, CrossRegionRestoreRequestObject parameters, Context context); + + /** + * Triggers Cross Region Restore for BackupInstance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for trigger CRR operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationJobExtendedInfoInner triggerCrossRegionRestore(String resourceGroupName, String location, + CrossRegionRestoreRequestObject parameters); + + /** + * Triggers Cross Region Restore for BackupInstance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for trigger CRR 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationJobExtendedInfoInner triggerCrossRegionRestore(String resourceGroupName, String location, + CrossRegionRestoreRequestObject parameters, Context context); + + /** + * Validates whether Cross Region Restore can be triggered for DataSource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 operationJobExtendedInfo. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationJobExtendedInfoInner> + beginValidateCrossRegionRestore(String resourceGroupName, String location, + ValidateCrossRegionRestoreRequestObject parameters); + + /** + * Validates whether Cross Region Restore can be triggered for DataSource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 operationJobExtendedInfo. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationJobExtendedInfoInner> + beginValidateCrossRegionRestore(String resourceGroupName, String location, + ValidateCrossRegionRestoreRequestObject parameters, Context context); + + /** + * Validates whether Cross Region Restore can be triggered for DataSource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationJobExtendedInfoInner validateCrossRegionRestore(String resourceGroupName, String location, + ValidateCrossRegionRestoreRequestObject parameters); + + /** + * Validates whether Cross Region Restore can be triggered for DataSource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationJobExtendedInfoInner validateCrossRegionRestore(String resourceGroupName, String location, + ValidateCrossRegionRestoreRequestObject parameters, Context context); /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -393,15 +509,12 @@ BackupInstanceResourceInner getBackupInstanceOperationResult( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginTriggerRehydrate( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRehydrationRequest parameters); + SyncPoller, Void> beginTriggerRehydrate(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupRehydrationRequest parameters); /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -413,16 +526,12 @@ SyncPoller, Void> beginTriggerRehydrate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginTriggerRehydrate( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRehydrationRequest parameters, - Context context); + SyncPoller, Void> beginTriggerRehydrate(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupRehydrationRequest parameters, Context context); /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -432,15 +541,12 @@ SyncPoller, Void> beginTriggerRehydrate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void triggerRehydrate( - String resourceGroupName, - String vaultName, - String backupInstanceName, + void triggerRehydrate(String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRehydrationRequest parameters); /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -451,16 +557,12 @@ void triggerRehydrate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void triggerRehydrate( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRehydrationRequest parameters, - Context context); + void triggerRehydrate(String resourceGroupName, String vaultName, String backupInstanceName, + AzureBackupRehydrationRequest parameters, Context context); /** * Triggers restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -476,7 +578,7 @@ SyncPoller, OperationJobExtendedInfoIn /** * Triggers restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -489,15 +591,12 @@ SyncPoller, OperationJobExtendedInfoIn */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationJobExtendedInfoInner> beginTriggerRestore( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRestoreRequest parameters, + String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters, Context context); /** * Triggers restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -508,12 +607,12 @@ SyncPoller, OperationJobExtendedInfoIn * @return operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationJobExtendedInfoInner triggerRestore( - String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters); + OperationJobExtendedInfoInner triggerRestore(String resourceGroupName, String vaultName, String backupInstanceName, + AzureBackupRestoreRequest parameters); /** * Triggers restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -525,16 +624,12 @@ OperationJobExtendedInfoInner triggerRestore( * @return operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationJobExtendedInfoInner triggerRestore( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRestoreRequest parameters, - Context context); + OperationJobExtendedInfoInner triggerRestore(String resourceGroupName, String vaultName, String backupInstanceName, + AzureBackupRestoreRequest parameters, Context context); /** * This operation will resume backups for backup instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -544,12 +639,12 @@ OperationJobExtendedInfoInner triggerRestore( * @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); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -560,12 +655,12 @@ SyncPoller, Void> beginResumeBackups( * @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); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -578,7 +673,7 @@ SyncPoller, Void> beginResumeBackups( /** * This operation will resume backups for backup instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -592,7 +687,7 @@ SyncPoller, Void> beginResumeBackups( /** * This operation will resume protection for a stopped backup instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -602,12 +697,12 @@ SyncPoller, Void> beginResumeBackups( * @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); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -618,12 +713,12 @@ SyncPoller, Void> beginResumeProtection( * @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); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -636,7 +731,7 @@ SyncPoller, Void> beginResumeProtection( /** * This operation will resume protection for a stopped backup instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -650,7 +745,7 @@ SyncPoller, Void> beginResumeProtection( /** * This operation will stop protection of a backup instance and data will be held forever. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -660,12 +755,12 @@ SyncPoller, Void> beginResumeProtection( * @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); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -676,12 +771,12 @@ SyncPoller, Void> beginStopProtection( * @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); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -694,7 +789,7 @@ SyncPoller, Void> beginStopProtection( /** * This operation will stop protection of a backup instance and data will be held forever. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -709,7 +804,7 @@ SyncPoller, Void> beginStopProtection( /** * This operation will stop backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained forever). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -719,13 +814,13 @@ SyncPoller, Void> beginStopProtection( * @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); + SyncPoller, Void> beginSuspendBackups(String resourceGroupName, String vaultName, + String backupInstanceName); /** * This operation will stop backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained forever). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -736,13 +831,13 @@ SyncPoller, Void> beginSuspendBackups( * @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); + SyncPoller, Void> beginSuspendBackups(String resourceGroupName, String vaultName, + String backupInstanceName, Context context); /** * This operation will stop backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained forever). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -756,7 +851,7 @@ SyncPoller, Void> beginSuspendBackups( /** * This operation will stop backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained forever). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -769,9 +864,9 @@ SyncPoller, Void> beginSuspendBackups( 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. - * + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -782,13 +877,13 @@ SyncPoller, Void> beginSuspendBackups( * @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); + 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. - * + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -800,17 +895,13 @@ SyncPoller, Void> beginSyncBackupInstance( * @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); + 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. - * + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -820,13 +911,13 @@ SyncPoller, Void> beginSyncBackupInstance( * @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); + 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. - * + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -837,16 +928,12 @@ void syncBackupInstance( * @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); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -862,7 +949,7 @@ SyncPoller, OperationJobExtendedInfoIn /** * Validates if Restore can be triggered for a DataSource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -875,15 +962,12 @@ SyncPoller, OperationJobExtendedInfoIn */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OperationJobExtendedInfoInner> beginValidateForRestore( - String resourceGroupName, - String vaultName, - String backupInstanceName, - ValidateRestoreRequestObject parameters, + String resourceGroupName, String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters, Context context); /** * Validates if Restore can be triggered for a DataSource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -894,12 +978,12 @@ SyncPoller, OperationJobExtendedInfoIn * @return operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationJobExtendedInfoInner validateForRestore( - String resourceGroupName, String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters); + OperationJobExtendedInfoInner validateForRestore(String resourceGroupName, String vaultName, + String backupInstanceName, ValidateRestoreRequestObject parameters); /** * Validates if Restore can be triggered for a DataSource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -911,10 +995,6 @@ OperationJobExtendedInfoInner validateForRestore( * @return operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationJobExtendedInfoInner validateForRestore( - String resourceGroupName, - String vaultName, - String backupInstanceName, - ValidateRestoreRequestObject parameters, - Context context); + OperationJobExtendedInfoInner validateForRestore(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/BackupPoliciesClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupPoliciesClient.java index 0a7dbeaa89cf..a38d67c9d8fd 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 @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.dataprotection.fluent.models.BaseBackupPolicyResourceInner; -/** An instance of this class provides access to all the operations defined in BackupPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in BackupPoliciesClient. + */ public interface BackupPoliciesClient { /** * Returns list of backup policies belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -28,7 +30,7 @@ public interface BackupPoliciesClient { /** * Returns list of backup policies belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -42,7 +44,7 @@ public interface BackupPoliciesClient { /** * Gets a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -53,12 +55,12 @@ public interface BackupPoliciesClient { * @return a backup policy belonging to a backup vault along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String vaultName, String backupPolicyName, Context context); + Response getWithResponse(String resourceGroupName, String vaultName, + String backupPolicyName, Context context); /** * Gets a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -72,7 +74,7 @@ Response getWithResponse( /** * Creates or Updates a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName Name of the policy. @@ -84,16 +86,12 @@ Response getWithResponse( * @return baseBackupPolicyResource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String vaultName, - String backupPolicyName, - BaseBackupPolicyResourceInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String vaultName, + String backupPolicyName, BaseBackupPolicyResourceInner parameters, Context context); /** * Creates or Updates a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName Name of the policy. @@ -104,12 +102,12 @@ Response createOrUpdateWithResponse( * @return baseBackupPolicyResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - BaseBackupPolicyResourceInner createOrUpdate( - String resourceGroupName, String vaultName, String backupPolicyName, BaseBackupPolicyResourceInner parameters); + BaseBackupPolicyResourceInner createOrUpdate(String resourceGroupName, String vaultName, String backupPolicyName, + BaseBackupPolicyResourceInner parameters); /** * Deletes a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -120,12 +118,12 @@ BaseBackupPolicyResourceInner createOrUpdate( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String vaultName, String backupPolicyName, Context context); + Response deleteWithResponse(String resourceGroupName, String vaultName, String backupPolicyName, + Context context); /** * Deletes a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. 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 7d574911deb4..976e633d4742 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 @@ -10,11 +10,13 @@ import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner; import com.azure.resourcemanager.dataprotection.models.BackupVaultOperationResultsGetResponse; -/** An instance of this class provides access to all the operations defined in BackupVaultOperationResultsClient. */ +/** + * An instance of this class provides access to all the operations defined in BackupVaultOperationResultsClient. + */ public interface BackupVaultOperationResultsClient { /** * The get operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. @@ -25,12 +27,12 @@ public interface BackupVaultOperationResultsClient { * @return backupVault Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupVaultOperationResultsGetResponse getWithResponse( - String resourceGroupName, String vaultName, String operationId, Context context); + BackupVaultOperationResultsGetResponse getWithResponse(String resourceGroupName, String vaultName, + String operationId, Context context); /** * The get operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. 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 fbaf0ba77f40..abee237e8694 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 @@ -16,11 +16,13 @@ import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityRequest; import com.azure.resourcemanager.dataprotection.models.PatchResourceRequestInput; -/** An instance of this class provides access to all the operations defined in BackupVaultsClient. */ +/** + * An instance of this class provides access to all the operations defined in BackupVaultsClient. + */ public interface BackupVaultsClient { /** * Returns resource collection belonging to a subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return backupVaultResourceList as paginated response with {@link PagedIterable}. @@ -30,7 +32,7 @@ public interface BackupVaultsClient { /** * Returns resource collection belonging to a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -42,7 +44,7 @@ public interface BackupVaultsClient { /** * Returns resource collection belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -54,7 +56,7 @@ public interface BackupVaultsClient { /** * Returns resource collection belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -67,7 +69,7 @@ public interface BackupVaultsClient { /** * Returns a resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -77,12 +79,12 @@ public interface BackupVaultsClient { * @return backupVault Resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String vaultName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String vaultName, + Context context); /** * Returns a resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -95,7 +97,7 @@ Response getByResourceGroupWithResponse( /** * Creates or updates a BackupVault resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -105,12 +107,12 @@ Response getByResourceGroupWithResponse( * @return the {@link SyncPoller} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupVaultResourceInner> beginCreateOrUpdate( - String resourceGroupName, String vaultName, BackupVaultResourceInner parameters); + SyncPoller, BackupVaultResourceInner> + beginCreateOrUpdate(String resourceGroupName, String vaultName, BackupVaultResourceInner parameters); /** * Creates or updates a BackupVault resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -126,7 +128,7 @@ SyncPoller, BackupVaultResourceInner> begin /** * Creates or updates a BackupVault resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -136,12 +138,12 @@ SyncPoller, BackupVaultResourceInner> begin * @return backupVault Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupVaultResourceInner createOrUpdate( - String resourceGroupName, String vaultName, BackupVaultResourceInner parameters); + BackupVaultResourceInner createOrUpdate(String resourceGroupName, String vaultName, + BackupVaultResourceInner parameters); /** * Creates or updates a BackupVault resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -152,12 +154,12 @@ BackupVaultResourceInner createOrUpdate( * @return backupVault Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupVaultResourceInner createOrUpdate( - String resourceGroupName, String vaultName, BackupVaultResourceInner parameters, Context context); + BackupVaultResourceInner createOrUpdate(String resourceGroupName, String vaultName, + BackupVaultResourceInner parameters, Context context); /** * Deletes a BackupVault resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -170,7 +172,7 @@ BackupVaultResourceInner createOrUpdate( /** * Deletes a BackupVault resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -184,7 +186,7 @@ BackupVaultResourceInner createOrUpdate( /** * Deletes a BackupVault resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -196,7 +198,7 @@ BackupVaultResourceInner createOrUpdate( /** * Deletes a BackupVault resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -209,7 +211,7 @@ BackupVaultResourceInner createOrUpdate( /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -219,12 +221,12 @@ BackupVaultResourceInner createOrUpdate( * @return the {@link SyncPoller} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupVaultResourceInner> beginUpdate( - String resourceGroupName, String vaultName, PatchResourceRequestInput parameters); + SyncPoller, BackupVaultResourceInner> beginUpdate(String resourceGroupName, + String vaultName, PatchResourceRequestInput parameters); /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -235,12 +237,12 @@ SyncPoller, BackupVaultResourceInner> begin * @return the {@link SyncPoller} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BackupVaultResourceInner> beginUpdate( - String resourceGroupName, String vaultName, PatchResourceRequestInput parameters, Context context); + SyncPoller, BackupVaultResourceInner> beginUpdate(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 resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -254,7 +256,7 @@ SyncPoller, BackupVaultResourceInner> begin /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -265,12 +267,12 @@ SyncPoller, BackupVaultResourceInner> begin * @return backupVault Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupVaultResourceInner update( - String resourceGroupName, String vaultName, PatchResourceRequestInput parameters, Context context); + BackupVaultResourceInner update(String resourceGroupName, String vaultName, PatchResourceRequestInput parameters, + Context context); /** * API to check for resource name availability. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param location The location in which uniqueness will be verified. * @param parameters Check name availability request. @@ -281,12 +283,12 @@ BackupVaultResourceInner update( * @return checkNameAvailabilityResult along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - String resourceGroupName, String location, CheckNameAvailabilityRequest parameters, Context context); + Response checkNameAvailabilityWithResponse(String resourceGroupName, + String location, CheckNameAvailabilityRequest parameters, Context context); /** * API to check for resource name availability. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param location The location in which uniqueness will be verified. * @param parameters Check name availability request. @@ -296,6 +298,6 @@ Response checkNameAvailabilityWithResponse( * @return checkNameAvailabilityResult. */ @ServiceMethod(returns = ReturnType.SINGLE) - CheckNameAvailabilityResultInner checkNameAvailability( - String resourceGroupName, String location, CheckNameAvailabilityRequest parameters); + CheckNameAvailabilityResultInner checkNameAvailability(String resourceGroupName, String location, + CheckNameAvailabilityRequest parameters); } 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 568fbae644c5..c5a234566f85 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 @@ -7,165 +7,188 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for DataProtectionClient class. */ +/** + * The interface for DataProtectionClient class. + */ public interface DataProtectionClient { /** * Gets The ID of the target subscription. The value must be an UUID. - * + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets Api Version. - * + * * @return the apiVersion value. */ String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); /** * Gets the BackupVaultsClient object to access its operations. - * + * * @return the BackupVaultsClient object. */ BackupVaultsClient getBackupVaults(); /** * Gets the OperationResultsClient object to access its operations. - * + * * @return the OperationResultsClient object. */ OperationResultsClient getOperationResults(); /** * Gets the OperationStatusClient object to access its operations. - * + * * @return the OperationStatusClient object. */ 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. - * + * * @return the BackupVaultOperationResultsClient object. */ BackupVaultOperationResultsClient getBackupVaultOperationResults(); /** * Gets the DataProtectionsClient object to access its operations. - * + * * @return the DataProtectionsClient object. */ DataProtectionsClient getDataProtections(); /** * Gets the DataProtectionOperationsClient object to access its operations. - * + * * @return the DataProtectionOperationsClient object. */ DataProtectionOperationsClient getDataProtectionOperations(); /** * Gets the BackupPoliciesClient object to access its operations. - * + * * @return the BackupPoliciesClient object. */ BackupPoliciesClient getBackupPolicies(); /** * Gets the BackupInstancesClient object to access its operations. - * + * * @return the BackupInstancesClient object. */ BackupInstancesClient getBackupInstances(); /** * Gets the RecoveryPointsClient object to access its operations. - * + * * @return the RecoveryPointsClient object. */ RecoveryPointsClient getRecoveryPoints(); + /** + * Gets the FetchSecondaryRecoveryPointsClient object to access its operations. + * + * @return the FetchSecondaryRecoveryPointsClient object. + */ + FetchSecondaryRecoveryPointsClient getFetchSecondaryRecoveryPoints(); + + /** + * Gets the FetchCrossRegionRestoreJobsClient object to access its operations. + * + * @return the FetchCrossRegionRestoreJobsClient object. + */ + FetchCrossRegionRestoreJobsClient getFetchCrossRegionRestoreJobs(); + + /** + * Gets the FetchCrossRegionRestoreJobsOperationsClient object to access its operations. + * + * @return the FetchCrossRegionRestoreJobsOperationsClient object. + */ + FetchCrossRegionRestoreJobsOperationsClient getFetchCrossRegionRestoreJobsOperations(); + /** * Gets the JobsClient object to access its operations. - * + * * @return the JobsClient object. */ JobsClient getJobs(); /** * Gets the RestorableTimeRangesClient object to access its operations. - * + * * @return the RestorableTimeRangesClient object. */ RestorableTimeRangesClient getRestorableTimeRanges(); /** * Gets the ExportJobsClient object to access its operations. - * + * * @return the ExportJobsClient object. */ ExportJobsClient getExportJobs(); /** * Gets the ExportJobsOperationResultsClient object to access its operations. - * + * * @return the ExportJobsOperationResultsClient object. */ ExportJobsOperationResultsClient getExportJobsOperationResults(); /** * Gets the DeletedBackupInstancesClient object to access its operations. - * + * * @return the DeletedBackupInstancesClient object. */ DeletedBackupInstancesClient getDeletedBackupInstances(); /** * Gets the ResourceGuardsClient object to access its operations. - * + * * @return the ResourceGuardsClient object. */ ResourceGuardsClient getResourceGuards(); /** * Gets the DppResourceGuardProxiesClient object to access its operations. - * + * * @return the DppResourceGuardProxiesClient object. */ DppResourceGuardProxiesClient getDppResourceGuardProxies(); 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 06f1443bbc4f..bbcbdffc96ee 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 @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.dataprotection.fluent.models.ClientDiscoveryValueForSingleApiInner; -/** An instance of this class provides access to all the operations defined in DataProtectionOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in DataProtectionOperationsClient. + */ public interface DataProtectionOperationsClient { /** * Returns the list of available operations. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return clientDiscoveryResponse as paginated response with {@link PagedIterable}. @@ -24,7 +26,7 @@ public interface DataProtectionOperationsClient { /** * Returns the list of available operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. 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 63984448d84a..5c7fa78acde9 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 @@ -11,11 +11,13 @@ import com.azure.resourcemanager.dataprotection.fluent.models.FeatureValidationResponseBaseInner; import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequestBase; -/** An instance of this class provides access to all the operations defined in DataProtectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in DataProtectionsClient. + */ public interface DataProtectionsClient { /** * Validates if a feature is supported. - * + * * @param location The location parameter. * @param parameters Feature support request object. * @param context The context to associate with this operation. @@ -25,12 +27,12 @@ public interface DataProtectionsClient { * @return base class for Backup Feature support along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkFeatureSupportWithResponse( - String location, FeatureValidationRequestBase parameters, Context context); + Response checkFeatureSupportWithResponse(String location, + FeatureValidationRequestBase parameters, Context context); /** * Validates if a feature is supported. - * + * * @param location The location parameter. * @param parameters Feature support request object. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DeletedBackupInstancesClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DeletedBackupInstancesClient.java index 3dc27dcf029d..211d0ca6d7ff 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DeletedBackupInstancesClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DeletedBackupInstancesClient.java @@ -13,11 +13,13 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dataprotection.fluent.models.DeletedBackupInstanceResourceInner; -/** An instance of this class provides access to all the operations defined in DeletedBackupInstancesClient. */ +/** + * An instance of this class provides access to all the operations defined in DeletedBackupInstancesClient. + */ public interface DeletedBackupInstancesClient { /** * Gets deleted backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,7 +32,7 @@ public interface DeletedBackupInstancesClient { /** * Gets deleted backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -44,7 +46,7 @@ public interface DeletedBackupInstancesClient { /** * Gets a deleted backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -55,12 +57,12 @@ public interface DeletedBackupInstancesClient { * @return a deleted backup instance with name in a backup vault along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String vaultName, String backupInstanceName, Context context); + Response getWithResponse(String resourceGroupName, String vaultName, + String backupInstanceName, Context context); /** * Gets a deleted backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -74,7 +76,7 @@ Response getWithResponse( /** * The undelete operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -84,12 +86,12 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUndelete( - String resourceGroupName, String vaultName, String backupInstanceName); + SyncPoller, Void> beginUndelete(String resourceGroupName, String vaultName, + String backupInstanceName); /** * The undelete operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -100,12 +102,12 @@ SyncPoller, Void> beginUndelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUndelete( - String resourceGroupName, String vaultName, String backupInstanceName, Context context); + SyncPoller, Void> beginUndelete(String resourceGroupName, String vaultName, + String backupInstanceName, Context context); /** * The undelete operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -118,7 +120,7 @@ SyncPoller, Void> beginUndelete( /** * The undelete operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DppResourceGuardProxiesClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DppResourceGuardProxiesClient.java index 0c65348d2f92..742e79684205 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DppResourceGuardProxiesClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DppResourceGuardProxiesClient.java @@ -13,11 +13,13 @@ import com.azure.resourcemanager.dataprotection.fluent.models.UnlockDeleteResponseInner; import com.azure.resourcemanager.dataprotection.models.UnlockDeleteRequest; -/** An instance of this class provides access to all the operations defined in DppResourceGuardProxiesClient. */ +/** + * An instance of this class provides access to all the operations defined in DppResourceGuardProxiesClient. + */ public interface DppResourceGuardProxiesClient { /** * Returns the list of ResourceGuardProxies associated with the vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,7 +32,7 @@ public interface DppResourceGuardProxiesClient { /** * Returns the list of ResourceGuardProxies associated with the vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -40,12 +42,12 @@ public interface DppResourceGuardProxiesClient { * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String vaultName, Context context); + PagedIterable list(String resourceGroupName, String vaultName, + Context context); /** * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -54,15 +56,15 @@ PagedIterable list( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs - * along with {@link Response}. + * along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context); + Response getWithResponse(String resourceGroupName, String vaultName, + String resourceGuardProxyName, Context context); /** * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -76,7 +78,7 @@ Response getWithResponse( /** * Creates or Updates a ResourceGuardProxy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -86,19 +88,15 @@ Response getWithResponse( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs - * along with {@link Response}. + * along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String vaultName, - String resourceGuardProxyName, - ResourceGuardProxyBaseResourceInner parameters, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String vaultName, + String resourceGuardProxyName, ResourceGuardProxyBaseResourceInner parameters, Context context); /** * Creates or Updates a ResourceGuardProxy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -109,15 +107,12 @@ Response createOrUpdateWithResponse( * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs. */ @ServiceMethod(returns = ReturnType.SINGLE) - ResourceGuardProxyBaseResourceInner createOrUpdate( - String resourceGroupName, - String vaultName, - String resourceGuardProxyName, - ResourceGuardProxyBaseResourceInner parameters); + ResourceGuardProxyBaseResourceInner createOrUpdate(String resourceGroupName, String vaultName, + String resourceGuardProxyName, ResourceGuardProxyBaseResourceInner parameters); /** * Deletes the ResourceGuardProxy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -128,12 +123,12 @@ ResourceGuardProxyBaseResourceInner createOrUpdate( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context); + Response deleteWithResponse(String resourceGroupName, String vaultName, String resourceGuardProxyName, + Context context); /** * Deletes the ResourceGuardProxy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -146,7 +141,7 @@ Response deleteWithResponse( /** * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -158,16 +153,12 @@ Response deleteWithResponse( * @return response of Unlock Delete API along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response unlockDeleteWithResponse( - String resourceGroupName, - String vaultName, - String resourceGuardProxyName, - UnlockDeleteRequest parameters, - Context context); + Response unlockDeleteWithResponse(String resourceGroupName, String vaultName, + String resourceGuardProxyName, UnlockDeleteRequest parameters, Context context); /** * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -178,6 +169,6 @@ Response unlockDeleteWithResponse( * @return response of Unlock Delete API. */ @ServiceMethod(returns = ReturnType.SINGLE) - UnlockDeleteResponseInner unlockDelete( - String resourceGroupName, String vaultName, String resourceGuardProxyName, UnlockDeleteRequest parameters); + UnlockDeleteResponseInner unlockDelete(String resourceGroupName, String vaultName, String resourceGuardProxyName, + UnlockDeleteRequest parameters); } 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 6ae9fd11a96c..03d2ff799d83 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 @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -/** An instance of this class provides access to all the operations defined in ExportJobsClient. */ +/** + * An instance of this class provides access to all the operations defined in ExportJobsClient. + */ public interface ExportJobsClient { /** * Triggers export of jobs and returns an OperationID to track. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -27,7 +29,7 @@ public interface ExportJobsClient { /** * Triggers export of jobs and returns an OperationID to track. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -41,7 +43,7 @@ public interface ExportJobsClient { /** * Triggers export of jobs and returns an OperationID to track. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -53,7 +55,7 @@ public interface ExportJobsClient { /** * Triggers export of jobs and returns an OperationID to track. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. 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 3fe6e43504ed..4285545ca431 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 @@ -10,13 +10,15 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.dataprotection.fluent.models.ExportJobsResultInner; -/** An instance of this class provides access to all the operations defined in ExportJobsOperationResultsClient. */ +/** + * An instance of this class provides access to all the operations defined in ExportJobsOperationResultsClient. + */ public interface ExportJobsOperationResultsClient { /** * Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId OperationID which represents the export job. @@ -27,14 +29,14 @@ public interface ExportJobsOperationResultsClient { * @return the operation result of operation triggered by Export Jobs API along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String vaultName, String operationId, Context context); + Response getWithResponse(String resourceGroupName, String vaultName, String operationId, + Context context); /** * Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId OperationID which represents the export job. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/FetchCrossRegionRestoreJobsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/FetchCrossRegionRestoreJobsClient.java new file mode 100644 index 000000000000..a7d006e21b06 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/FetchCrossRegionRestoreJobsClient.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.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.AzureBackupJobResourceInner; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobRequest; + +/** + * An instance of this class provides access to all the operations defined in FetchCrossRegionRestoreJobsClient. + */ +public interface FetchCrossRegionRestoreJobsClient { + /** + * Fetches the Cross Region Restore Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 azureBackup Job Resource Class along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String location, + CrossRegionRestoreJobRequest parameters, Context context); + + /** + * Fetches the Cross Region Restore Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 azureBackup Job Resource Class. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureBackupJobResourceInner get(String resourceGroupName, String location, CrossRegionRestoreJobRequest parameters); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/FetchCrossRegionRestoreJobsOperationsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/FetchCrossRegionRestoreJobsOperationsClient.java new file mode 100644 index 000000000000..80d90fb2a3fa --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/FetchCrossRegionRestoreJobsOperationsClient.java @@ -0,0 +1,50 @@ +// 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.AzureBackupJobResourceInner; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobsRequest; + +/** + * An instance of this class provides access to all the operations defined in + * FetchCrossRegionRestoreJobsOperationsClient. + */ +public interface FetchCrossRegionRestoreJobsOperationsClient { + /** + * Fetches list of Cross Region Restore job belonging to the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 list of AzureBackup Job resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String location, + CrossRegionRestoreJobsRequest parameters); + + /** + * Fetches list of Cross Region Restore job belonging to the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for operation. + * @param filter OData filter options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String location, + CrossRegionRestoreJobsRequest parameters, String filter, Context context); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/FetchSecondaryRecoveryPointsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/FetchSecondaryRecoveryPointsClient.java new file mode 100644 index 000000000000..fd37b095d21f --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/FetchSecondaryRecoveryPointsClient.java @@ -0,0 +1,52 @@ +// 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.AzureBackupRecoveryPointResourceInner; +import com.azure.resourcemanager.dataprotection.models.FetchSecondaryRPsRequestParameters; + +/** + * An instance of this class provides access to all the operations defined in FetchSecondaryRecoveryPointsClient. + */ +public interface FetchSecondaryRecoveryPointsClient { + /** + * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region + * Restore. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String location, + FetchSecondaryRPsRequestParameters parameters); + + /** + * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region + * Restore. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for operation. + * @param filter OData filter options. + * @param skipToken skipToken Filter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String location, + FetchSecondaryRPsRequestParameters parameters, String filter, String skipToken, Context context); +} 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 bcac471a3150..b23201dd55ed 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 @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner; -/** An instance of this class provides access to all the operations defined in JobsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobsClient. + */ public interface JobsClient { /** * Returns list of jobs belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -28,7 +30,7 @@ public interface JobsClient { /** * Returns list of jobs belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -42,7 +44,7 @@ public interface JobsClient { /** * Gets a job with id in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param jobId The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). @@ -53,12 +55,12 @@ public interface JobsClient { * @return a job with id in a backup vault along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String vaultName, String jobId, Context context); + Response getWithResponse(String resourceGroupName, String vaultName, String jobId, + Context context); /** * Gets a job with id in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param jobId The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationResultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationResultsClient.java index b9abb974daf8..e8a72c71cf6e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationResultsClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationResultsClient.java @@ -10,13 +10,15 @@ import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner; import com.azure.resourcemanager.dataprotection.models.OperationResultsGetResponse; -/** An instance of this class provides access to all the operations defined in OperationResultsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationResultsClient. + */ public interface OperationResultsClient { /** * Gets the operation status for a resource. - * - *

Gets the operation result for a resource. - * + * + * Gets the operation result for a resource. + * * @param operationId The operationId parameter. * @param location The location parameter. * @param context The context to associate with this operation. @@ -30,9 +32,9 @@ public interface OperationResultsClient { /** * Gets the operation status for a resource. - * - *

Gets the operation result for a resource. - * + * + * Gets the operation result for a resource. + * * @param operationId The operationId parameter. * @param location The location parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 index 2436b1a3b6e1..dc63b758f30f 100644 --- 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 @@ -16,7 +16,7 @@ public interface OperationStatusBackupVaultContextsClient { /** * Gets the operation status for an operation over a BackupVault's context. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. @@ -27,12 +27,12 @@ public interface OperationStatusBackupVaultContextsClient { * @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); + Response getWithResponse(String resourceGroupName, String vaultName, String operationId, + Context context); /** * Gets the operation status for an operation over a BackupVault's context. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. 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 9a726e19a266..c14fbc3fc2c4 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 @@ -10,11 +10,13 @@ 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 OperationStatusClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationStatusClient. + */ public interface OperationStatusClient { /** * Gets the operation status for a resource. - * + * * @param location The location parameter. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -28,7 +30,7 @@ public interface OperationStatusClient { /** * Gets the operation status for a resource. - * + * * @param location The location parameter. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 index fd2ad538c69d..9632c598ea35 100644 --- 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 @@ -17,7 +17,7 @@ public interface OperationStatusResourceGroupContextsClient { /** * Gets the operation status for an operation over a ResourceGroup's context. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -27,12 +27,12 @@ public interface OperationStatusResourceGroupContextsClient { * @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); + Response getByResourceGroupWithResponse(String resourceGroupName, String operationId, + Context context); /** * Gets the operation status for an operation over a ResourceGroup's context. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 e64aa095ffe8..8e0487d945ee 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 @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner; -/** An instance of this class provides access to all the operations defined in RecoveryPointsClient. */ +/** + * An instance of this class provides access to all the operations defined in RecoveryPointsClient. + */ public interface RecoveryPointsClient { /** * Returns a list of Recovery Points for a DataSource in a vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -25,12 +27,12 @@ public interface RecoveryPointsClient { * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String vaultName, String backupInstanceName); + PagedIterable list(String resourceGroupName, String vaultName, + String backupInstanceName); /** * Returns a list of Recovery Points for a DataSource in a vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -43,17 +45,12 @@ PagedIterable list( * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String vaultName, - String backupInstanceName, - String filter, - String skipToken, - Context context); + PagedIterable list(String resourceGroupName, String vaultName, + String backupInstanceName, String filter, String skipToken, Context context); /** * Gets a Recovery Point using recoveryPointId for a Datasource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -65,12 +62,12 @@ PagedIterable list( * @return a Recovery Point using recoveryPointId for a Datasource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String vaultName, String backupInstanceName, String recoveryPointId, Context context); + Response getWithResponse(String resourceGroupName, String vaultName, + String backupInstanceName, String recoveryPointId, Context context); /** * Gets a Recovery Point using recoveryPointId for a Datasource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -81,6 +78,6 @@ Response getWithResponse( * @return a Recovery Point using recoveryPointId for a Datasource. */ @ServiceMethod(returns = ReturnType.SINGLE) - AzureBackupRecoveryPointResourceInner get( - String resourceGroupName, String vaultName, String backupInstanceName, String recoveryPointId); + AzureBackupRecoveryPointResourceInner get(String resourceGroupName, String vaultName, String backupInstanceName, + String recoveryPointId); } 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 acd6878d9e87..57d350014f9d 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 @@ -13,11 +13,13 @@ import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardResourceInner; import com.azure.resourcemanager.dataprotection.models.PatchResourceGuardInput; -/** An instance of this class provides access to all the operations defined in ResourceGuardsClient. */ +/** + * An instance of this class provides access to all the operations defined in ResourceGuardsClient. + */ public interface ResourceGuardsClient { /** * Returns ResourceGuards collection belonging to a subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}. @@ -27,7 +29,7 @@ public interface ResourceGuardsClient { /** * Returns ResourceGuards collection belonging to a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -39,7 +41,7 @@ public interface ResourceGuardsClient { /** * Returns ResourceGuards collection belonging to a ResourceGroup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -51,7 +53,7 @@ public interface ResourceGuardsClient { /** * Returns ResourceGuards collection belonging to a ResourceGroup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -64,7 +66,7 @@ public interface ResourceGuardsClient { /** * Creates or updates a ResourceGuard resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param parameters Request body for operation. @@ -75,12 +77,12 @@ public interface ResourceGuardsClient { * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response putWithResponse( - String resourceGroupName, String resourceGuardsName, ResourceGuardResourceInner parameters, Context context); + Response putWithResponse(String resourceGroupName, String resourceGuardsName, + ResourceGuardResourceInner parameters, Context context); /** * Creates or updates a ResourceGuard resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param parameters Request body for operation. @@ -90,12 +92,12 @@ Response putWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ResourceGuardResourceInner put( - String resourceGroupName, String resourceGuardsName, ResourceGuardResourceInner parameters); + ResourceGuardResourceInner put(String resourceGroupName, String resourceGuardsName, + ResourceGuardResourceInner parameters); /** * Returns a ResourceGuard belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param context The context to associate with this operation. @@ -105,12 +107,12 @@ ResourceGuardResourceInner put( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceGuardsName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, + String resourceGuardsName, Context context); /** * Returns a ResourceGuard belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -123,7 +125,7 @@ Response getByResourceGroupWithResponse( /** * Deletes a ResourceGuard resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param context The context to associate with this operation. @@ -137,7 +139,7 @@ Response getByResourceGroupWithResponse( /** * Deletes a ResourceGuard resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -149,7 +151,7 @@ Response getByResourceGroupWithResponse( /** * Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param parameters Request body for operation. @@ -160,12 +162,12 @@ Response getByResourceGroupWithResponse( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response patchWithResponse( - String resourceGroupName, String resourceGuardsName, PatchResourceGuardInput parameters, Context context); + Response patchWithResponse(String resourceGroupName, String resourceGuardsName, + PatchResourceGuardInput parameters, Context context); /** * Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param parameters Request body for operation. @@ -175,13 +177,13 @@ Response patchWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ResourceGuardResourceInner patch( - String resourceGroupName, String resourceGuardsName, PatchResourceGuardInput parameters); + ResourceGuardResourceInner patch(String resourceGroupName, String resourceGuardsName, + PatchResourceGuardInput parameters); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -190,13 +192,13 @@ ResourceGuardResourceInner patch( * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable getDisableSoftDeleteRequestsObjects( - String resourceGroupName, String resourceGuardsName); + PagedIterable getDisableSoftDeleteRequestsObjects(String resourceGroupName, + String resourceGuardsName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -206,13 +208,13 @@ PagedIterable getDisableSoftDeleteRequestsObjects( * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable getDisableSoftDeleteRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context); + PagedIterable getDisableSoftDeleteRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -221,13 +223,13 @@ PagedIterable getDisableSoftDeleteRequestsObjects( * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable getDeleteResourceGuardProxyRequestsObjects( - String resourceGroupName, String resourceGuardsName); + PagedIterable getDeleteResourceGuardProxyRequestsObjects(String resourceGroupName, + String resourceGuardsName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -237,13 +239,13 @@ PagedIterable getDeleteResourceGuardProxyRequestsObjects( * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable getDeleteResourceGuardProxyRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context); + PagedIterable getDeleteResourceGuardProxyRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -252,13 +254,13 @@ PagedIterable getDeleteResourceGuardProxyRequestsObjects( * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable getBackupSecurityPinRequestsObjects( - String resourceGroupName, String resourceGuardsName); + PagedIterable getBackupSecurityPinRequestsObjects(String resourceGroupName, + String resourceGuardsName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -268,13 +270,13 @@ PagedIterable getBackupSecurityPinRequestsObjects( * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable getBackupSecurityPinRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context); + PagedIterable getBackupSecurityPinRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -283,13 +285,13 @@ PagedIterable getBackupSecurityPinRequestsObjects( * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable getDeleteProtectedItemRequestsObjects( - String resourceGroupName, String resourceGuardsName); + PagedIterable getDeleteProtectedItemRequestsObjects(String resourceGroupName, + String resourceGuardsName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -299,13 +301,13 @@ PagedIterable getDeleteProtectedItemRequestsObjects( * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable getDeleteProtectedItemRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context); + PagedIterable getDeleteProtectedItemRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -314,13 +316,13 @@ PagedIterable getDeleteProtectedItemRequestsObjects( * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable getUpdateProtectionPolicyRequestsObjects( - String resourceGroupName, String resourceGuardsName); + PagedIterable getUpdateProtectionPolicyRequestsObjects(String resourceGroupName, + String resourceGuardsName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -330,13 +332,13 @@ PagedIterable getUpdateProtectionPolicyRequestsObjects( * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable getUpdateProtectionPolicyRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context); + PagedIterable getUpdateProtectionPolicyRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -345,13 +347,13 @@ PagedIterable getUpdateProtectionPolicyRequestsObjects( * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable getUpdateProtectedItemRequestsObjects( - String resourceGroupName, String resourceGuardsName); + PagedIterable getUpdateProtectedItemRequestsObjects(String resourceGroupName, + String resourceGuardsName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -361,13 +363,13 @@ PagedIterable getUpdateProtectedItemRequestsObjects( * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable getUpdateProtectedItemRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context); + PagedIterable getUpdateProtectedItemRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -378,13 +380,13 @@ PagedIterable getUpdateProtectedItemRequestsObjects( * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDefaultDisableSoftDeleteRequestsObjectWithResponse( - String resourceGroupName, String resourceGuardsName, String requestName, Context context); + Response getDefaultDisableSoftDeleteRequestsObjectWithResponse(String resourceGroupName, + String resourceGuardsName, String requestName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -394,13 +396,13 @@ Response getDefaultDisableSoftDeleteRequestsObjectWithResp * @return base resource under Microsoft.DataProtection provider namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - DppBaseResourceInner getDefaultDisableSoftDeleteRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName); + DppBaseResourceInner getDefaultDisableSoftDeleteRequestsObject(String resourceGroupName, String resourceGuardsName, + String requestName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -417,7 +419,7 @@ Response getDefaultDeleteResourceGuardProxyRequestsObjectW /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -427,13 +429,13 @@ Response getDefaultDeleteResourceGuardProxyRequestsObjectW * @return base resource under Microsoft.DataProtection provider namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - DppBaseResourceInner getDefaultDeleteResourceGuardProxyRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName); + DppBaseResourceInner getDefaultDeleteResourceGuardProxyRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -444,13 +446,13 @@ DppBaseResourceInner getDefaultDeleteResourceGuardProxyRequestsObject( * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDefaultBackupSecurityPinRequestsObjectWithResponse( - String resourceGroupName, String resourceGuardsName, String requestName, Context context); + Response getDefaultBackupSecurityPinRequestsObjectWithResponse(String resourceGroupName, + String resourceGuardsName, String requestName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -460,13 +462,13 @@ Response getDefaultBackupSecurityPinRequestsObjectWithResp * @return base resource under Microsoft.DataProtection provider namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - DppBaseResourceInner getDefaultBackupSecurityPinRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName); + DppBaseResourceInner getDefaultBackupSecurityPinRequestsObject(String resourceGroupName, String resourceGuardsName, + String requestName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -477,13 +479,13 @@ DppBaseResourceInner getDefaultBackupSecurityPinRequestsObject( * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDefaultDeleteProtectedItemRequestsObjectWithResponse( - String resourceGroupName, String resourceGuardsName, String requestName, Context context); + Response getDefaultDeleteProtectedItemRequestsObjectWithResponse(String resourceGroupName, + String resourceGuardsName, String requestName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -493,13 +495,13 @@ Response getDefaultDeleteProtectedItemRequestsObjectWithRe * @return base resource under Microsoft.DataProtection provider namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - DppBaseResourceInner getDefaultDeleteProtectedItemRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName); + DppBaseResourceInner getDefaultDeleteProtectedItemRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -510,13 +512,13 @@ DppBaseResourceInner getDefaultDeleteProtectedItemRequestsObject( * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDefaultUpdateProtectionPolicyRequestsObjectWithResponse( - String resourceGroupName, String resourceGuardsName, String requestName, Context context); + Response getDefaultUpdateProtectionPolicyRequestsObjectWithResponse(String resourceGroupName, + String resourceGuardsName, String requestName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -526,13 +528,13 @@ Response getDefaultUpdateProtectionPolicyRequestsObjectWit * @return base resource under Microsoft.DataProtection provider namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - DppBaseResourceInner getDefaultUpdateProtectionPolicyRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName); + DppBaseResourceInner getDefaultUpdateProtectionPolicyRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -543,13 +545,13 @@ DppBaseResourceInner getDefaultUpdateProtectionPolicyRequestsObject( * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDefaultUpdateProtectedItemRequestsObjectWithResponse( - String resourceGroupName, String resourceGuardsName, String requestName, Context context); + Response getDefaultUpdateProtectedItemRequestsObjectWithResponse(String resourceGroupName, + String resourceGuardsName, String requestName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -559,6 +561,6 @@ Response getDefaultUpdateProtectedItemRequestsObjectWithRe * @return base resource under Microsoft.DataProtection provider namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName); + DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName); } 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 f23fcf6392b9..bd46e72b002a 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 @@ -11,11 +11,13 @@ import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupFindRestorableTimeRangesResponseResourceInner; import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest; -/** An instance of this class provides access to all the operations defined in RestorableTimeRangesClient. */ +/** + * An instance of this class provides access to all the operations defined in RestorableTimeRangesClient. + */ public interface RestorableTimeRangesClient { /** * The find operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -27,16 +29,13 @@ public interface RestorableTimeRangesClient { * @return list Restore Ranges Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response findWithResponse( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupFindRestorableTimeRangesRequest parameters, + Response findWithResponse(String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters, Context context); /** * The find operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -47,9 +46,6 @@ Response findWithRespo * @return list Restore Ranges Response. */ @ServiceMethod(returns = ReturnType.SINGLE) - AzureBackupFindRestorableTimeRangesResponseResourceInner find( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupFindRestorableTimeRangesRequest parameters); + AzureBackupFindRestorableTimeRangesResponseResourceInner find(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters); } 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 5d5189d4ce27..7f572e73ee62 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 @@ -9,7 +9,9 @@ import com.azure.resourcemanager.dataprotection.models.DppResource; import com.fasterxml.jackson.annotation.JsonProperty; -/** List Restore Ranges Response. */ +/** + * List Restore Ranges Response. + */ @Fluent public final class AzureBackupFindRestorableTimeRangesResponseResourceInner extends DppResource { /* @@ -18,13 +20,15 @@ public final class AzureBackupFindRestorableTimeRangesResponseResourceInner exte @JsonProperty(value = "properties") private AzureBackupFindRestorableTimeRangesResponse properties; - /** Creates an instance of AzureBackupFindRestorableTimeRangesResponseResourceInner class. */ + /** + * Creates an instance of AzureBackupFindRestorableTimeRangesResponseResourceInner class. + */ public AzureBackupFindRestorableTimeRangesResponseResourceInner() { } /** * Get the properties property: AzureBackupFindRestorableTimeRangesResponseResource properties. - * + * * @return the properties value. */ public AzureBackupFindRestorableTimeRangesResponse properties() { @@ -33,19 +37,19 @@ public AzureBackupFindRestorableTimeRangesResponse properties() { /** * Set the properties property: AzureBackupFindRestorableTimeRangesResponseResource properties. - * + * * @param properties the properties value to set. * @return the AzureBackupFindRestorableTimeRangesResponseResourceInner object itself. */ - public AzureBackupFindRestorableTimeRangesResponseResourceInner withProperties( - AzureBackupFindRestorableTimeRangesResponse properties) { + public AzureBackupFindRestorableTimeRangesResponseResourceInner + withProperties(AzureBackupFindRestorableTimeRangesResponse properties) { this.properties = properties; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 17d703c255ba..12fd5661e9a5 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 @@ -9,7 +9,9 @@ import com.azure.resourcemanager.dataprotection.models.DppResource; import com.fasterxml.jackson.annotation.JsonProperty; -/** AzureBackup Job Resource Class. */ +/** + * AzureBackup Job Resource Class. + */ @Fluent public final class AzureBackupJobResourceInner extends DppResource { /* @@ -18,13 +20,15 @@ public final class AzureBackupJobResourceInner extends DppResource { @JsonProperty(value = "properties") private AzureBackupJob properties; - /** Creates an instance of AzureBackupJobResourceInner class. */ + /** + * Creates an instance of AzureBackupJobResourceInner class. + */ public AzureBackupJobResourceInner() { } /** * Get the properties property: AzureBackupJobResource properties. - * + * * @return the properties value. */ public AzureBackupJob properties() { @@ -33,7 +37,7 @@ public AzureBackupJob properties() { /** * Set the properties property: AzureBackupJobResource properties. - * + * * @param properties the properties value to set. * @return the AzureBackupJobResourceInner object itself. */ @@ -44,7 +48,7 @@ public AzureBackupJobResourceInner withProperties(AzureBackupJob properties) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 8cb518ce0001..d88335e24416 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 @@ -11,28 +11,30 @@ /** * AzureBackupRecoveryPointResource - * - *

Azure backup recoveryPoint resource. + * + * Azure backup recoveryPoint resource. */ @Fluent public final class AzureBackupRecoveryPointResourceInner extends DppResource { /* * AzureBackupRecoveryPoint - * + * * AzureBackupRecoveryPointResource properties */ @JsonProperty(value = "properties") private AzureBackupRecoveryPoint properties; - /** Creates an instance of AzureBackupRecoveryPointResourceInner class. */ + /** + * Creates an instance of AzureBackupRecoveryPointResourceInner class. + */ public AzureBackupRecoveryPointResourceInner() { } /** * Get the properties property: AzureBackupRecoveryPoint - * - *

AzureBackupRecoveryPointResource properties. - * + * + * AzureBackupRecoveryPointResource properties. + * * @return the properties value. */ public AzureBackupRecoveryPoint properties() { @@ -41,9 +43,9 @@ public AzureBackupRecoveryPoint properties() { /** * Set the properties property: AzureBackupRecoveryPoint - * - *

AzureBackupRecoveryPointResource properties. - * + * + * AzureBackupRecoveryPointResource properties. + * * @param properties the properties value to set. * @return the AzureBackupRecoveryPointResourceInner object itself. */ @@ -54,7 +56,7 @@ public AzureBackupRecoveryPointResourceInner withProperties(AzureBackupRecoveryP /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 e02f5028b7d1..1af6152b81d0 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 @@ -12,8 +12,8 @@ /** * BackupInstanceResource - * - *

BackupInstance Resource. + * + * BackupInstance Resource. */ @Fluent public final class BackupInstanceResourceInner extends DppProxyResource { @@ -23,13 +23,15 @@ public final class BackupInstanceResourceInner extends DppProxyResource { @JsonProperty(value = "properties") private BackupInstance properties; - /** Creates an instance of BackupInstanceResourceInner class. */ + /** + * Creates an instance of BackupInstanceResourceInner class. + */ public BackupInstanceResourceInner() { } /** * Get the properties property: BackupInstanceResource properties. - * + * * @return the properties value. */ public BackupInstance properties() { @@ -38,7 +40,7 @@ public BackupInstance properties() { /** * Set the properties property: BackupInstanceResource properties. - * + * * @param properties the properties value to set. * @return the BackupInstanceResourceInner object itself. */ @@ -47,7 +49,9 @@ public BackupInstanceResourceInner withProperties(BackupInstance properties) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BackupInstanceResourceInner withTags(Map tags) { super.withTags(tags); @@ -56,7 +60,7 @@ public BackupInstanceResourceInner withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 4107c3fd2912..a4880884bf87 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 @@ -14,28 +14,30 @@ /** * BackupVault Resource - * - *

Backup Vault Resource. + * + * Backup Vault Resource. */ @Fluent public final class BackupVaultResourceInner extends DppTrackedResource { /* * BackupVault - * + * * BackupVaultResource properties */ @JsonProperty(value = "properties", required = true) private BackupVault properties; - /** Creates an instance of BackupVaultResourceInner class. */ + /** + * Creates an instance of BackupVaultResourceInner class. + */ public BackupVaultResourceInner() { } /** * Get the properties property: BackupVault - * - *

BackupVaultResource properties. - * + * + * BackupVaultResource properties. + * * @return the properties value. */ public BackupVault properties() { @@ -44,9 +46,9 @@ public BackupVault properties() { /** * Set the properties property: BackupVault - * - *

BackupVaultResource properties. - * + * + * BackupVaultResource properties. + * * @param properties the properties value to set. * @return the BackupVaultResourceInner object itself. */ @@ -55,28 +57,36 @@ public BackupVaultResourceInner withProperties(BackupVault properties) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BackupVaultResourceInner withIdentity(DppIdentityDetails identity) { super.withIdentity(identity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BackupVaultResourceInner withEtag(String etag) { super.withEtag(etag); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BackupVaultResourceInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BackupVaultResourceInner withTags(Map tags) { super.withTags(tags); @@ -85,17 +95,15 @@ public BackupVaultResourceInner withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model BackupVaultResourceInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model BackupVaultResourceInner")); } else { properties().validate(); } 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 2212727fe07e..5c83a1d54390 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 @@ -11,28 +11,30 @@ /** * BaseBackupPolicyResource - * - *

BaseBackupPolicy resource. + * + * BaseBackupPolicy resource. */ @Fluent public final class BaseBackupPolicyResourceInner extends DppResource { /* * BaseBackupPolicy - * + * * BaseBackupPolicyResource properties */ @JsonProperty(value = "properties") private BaseBackupPolicy properties; - /** Creates an instance of BaseBackupPolicyResourceInner class. */ + /** + * Creates an instance of BaseBackupPolicyResourceInner class. + */ public BaseBackupPolicyResourceInner() { } /** * Get the properties property: BaseBackupPolicy - * - *

BaseBackupPolicyResource properties. - * + * + * BaseBackupPolicyResource properties. + * * @return the properties value. */ public BaseBackupPolicy properties() { @@ -41,9 +43,9 @@ public BaseBackupPolicy properties() { /** * Set the properties property: BaseBackupPolicy - * - *

BaseBackupPolicyResource properties. - * + * + * BaseBackupPolicyResource properties. + * * @param properties the properties value to set. * @return the BaseBackupPolicyResourceInner object itself. */ @@ -54,7 +56,7 @@ public BaseBackupPolicyResourceInner withProperties(BaseBackupPolicy properties) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 7adeff1ad143..61c6713c9eaa 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 @@ -9,8 +9,8 @@ /** * CheckNameAvailabilityResult - * - *

CheckNameAvailability Result. + * + * CheckNameAvailability Result. */ @Fluent public final class CheckNameAvailabilityResultInner { @@ -32,13 +32,15 @@ public final class CheckNameAvailabilityResultInner { @JsonProperty(value = "reason") private String reason; - /** Creates an instance of CheckNameAvailabilityResultInner class. */ + /** + * Creates an instance of CheckNameAvailabilityResultInner class. + */ public CheckNameAvailabilityResultInner() { } /** * Get the message property: Gets or sets the message. - * + * * @return the message value. */ public String message() { @@ -47,7 +49,7 @@ public String message() { /** * Set the message property: Gets or sets the message. - * + * * @param message the message value to set. * @return the CheckNameAvailabilityResultInner object itself. */ @@ -58,7 +60,7 @@ public CheckNameAvailabilityResultInner withMessage(String message) { /** * Get the nameAvailable property: Gets or sets a value indicating whether [name available]. - * + * * @return the nameAvailable value. */ public Boolean nameAvailable() { @@ -67,7 +69,7 @@ public Boolean nameAvailable() { /** * Set the nameAvailable property: Gets or sets a value indicating whether [name available]. - * + * * @param nameAvailable the nameAvailable value to set. * @return the CheckNameAvailabilityResultInner object itself. */ @@ -78,7 +80,7 @@ public CheckNameAvailabilityResultInner withNameAvailable(Boolean nameAvailable) /** * Get the reason property: Gets or sets the reason. - * + * * @return the reason value. */ public String reason() { @@ -87,7 +89,7 @@ public String reason() { /** * Set the reason property: Gets or sets the reason. - * + * * @param reason the reason value to set. * @return the CheckNameAvailabilityResultInner object itself. */ @@ -98,7 +100,7 @@ public CheckNameAvailabilityResultInner withReason(String reason) { /** * 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/fluent/models/ClientDiscoveryValueForSingleApiInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ClientDiscoveryValueForSingleApiInner.java index b7177303fb6d..8f7f84778999 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 @@ -11,14 +11,14 @@ /** * ClientDiscoveryValueForSingleApi - * - *

Available operation details. + * + * Available operation details. */ @Fluent public final class ClientDiscoveryValueForSingleApiInner { /* * ClientDiscoveryDisplay - * + * * Contains the localized display information for this particular operation */ @JsonProperty(value = "display") @@ -44,21 +44,23 @@ public final class ClientDiscoveryValueForSingleApiInner { /* * ClientDiscoveryForProperties - * + * * Properties for the given operation. */ @JsonProperty(value = "properties") private ClientDiscoveryForProperties properties; - /** Creates an instance of ClientDiscoveryValueForSingleApiInner class. */ + /** + * Creates an instance of ClientDiscoveryValueForSingleApiInner class. + */ public ClientDiscoveryValueForSingleApiInner() { } /** * Get the display property: ClientDiscoveryDisplay - * - *

Contains the localized display information for this particular operation. - * + * + * Contains the localized display information for this particular operation. + * * @return the display value. */ public ClientDiscoveryDisplay display() { @@ -67,9 +69,9 @@ public ClientDiscoveryDisplay display() { /** * Set the display property: ClientDiscoveryDisplay - * - *

Contains the localized display information for this particular operation. - * + * + * Contains the localized display information for this particular operation. + * * @param display the display value to set. * @return the ClientDiscoveryValueForSingleApiInner object itself. */ @@ -80,7 +82,7 @@ public ClientDiscoveryValueForSingleApiInner withDisplay(ClientDiscoveryDisplay /** * Get the name property: Name of the Operation. - * + * * @return the name value. */ public String name() { @@ -89,7 +91,7 @@ public String name() { /** * Set the name property: Name of the Operation. - * + * * @param name the name value to set. * @return the ClientDiscoveryValueForSingleApiInner object itself. */ @@ -100,7 +102,7 @@ public ClientDiscoveryValueForSingleApiInner withName(String name) { /** * Get the isDataAction property: Indicates whether the operation is a data action. - * + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -109,7 +111,7 @@ public Boolean isDataAction() { /** * Set the isDataAction property: Indicates whether the operation is a data action. - * + * * @param isDataAction the isDataAction value to set. * @return the ClientDiscoveryValueForSingleApiInner object itself. */ @@ -121,7 +123,7 @@ public ClientDiscoveryValueForSingleApiInner withIsDataAction(Boolean isDataActi /** * Get the origin property: The intended executor of the operation;governs the display of the operation in the RBAC * UX and the audit logs UX. - * + * * @return the origin value. */ public String origin() { @@ -131,7 +133,7 @@ public String origin() { /** * Set the origin property: The intended executor of the operation;governs the display of the operation in the RBAC * UX and the audit logs UX. - * + * * @param origin the origin value to set. * @return the ClientDiscoveryValueForSingleApiInner object itself. */ @@ -142,9 +144,9 @@ public ClientDiscoveryValueForSingleApiInner withOrigin(String origin) { /** * Get the properties property: ClientDiscoveryForProperties - * - *

Properties for the given operation. - * + * + * Properties for the given operation. + * * @return the properties value. */ public ClientDiscoveryForProperties properties() { @@ -153,9 +155,9 @@ public ClientDiscoveryForProperties properties() { /** * Set the properties property: ClientDiscoveryForProperties - * - *

Properties for the given operation. - * + * + * Properties for the given operation. + * * @param properties the properties value to set. * @return the ClientDiscoveryValueForSingleApiInner object itself. */ @@ -166,7 +168,7 @@ public ClientDiscoveryValueForSingleApiInner withProperties(ClientDiscoveryForPr /** * 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/fluent/models/DeletedBackupInstanceResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/DeletedBackupInstanceResourceInner.java index d43cf4218284..0c69137e7a87 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/DeletedBackupInstanceResourceInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/DeletedBackupInstanceResourceInner.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.dataprotection.models.DppResource; import com.fasterxml.jackson.annotation.JsonProperty; -/** Deleted Backup Instance. */ +/** + * Deleted Backup Instance. + */ @Fluent public final class DeletedBackupInstanceResourceInner extends DppResource { /* @@ -18,13 +20,15 @@ public final class DeletedBackupInstanceResourceInner extends DppResource { @JsonProperty(value = "properties") private DeletedBackupInstance properties; - /** Creates an instance of DeletedBackupInstanceResourceInner class. */ + /** + * Creates an instance of DeletedBackupInstanceResourceInner class. + */ public DeletedBackupInstanceResourceInner() { } /** * Get the properties property: DeletedBackupInstanceResource properties. - * + * * @return the properties value. */ public DeletedBackupInstance properties() { @@ -33,7 +37,7 @@ public DeletedBackupInstance properties() { /** * Set the properties property: DeletedBackupInstanceResource properties. - * + * * @param properties the properties value to set. * @return the DeletedBackupInstanceResourceInner object itself. */ @@ -44,7 +48,7 @@ public DeletedBackupInstanceResourceInner withProperties(DeletedBackupInstance p /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 50dd4144fbc8..6ec8b07e0cec 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Base resource under Microsoft.DataProtection provider namespace. */ +/** + * Base resource under Microsoft.DataProtection provider namespace. + */ @Immutable public final class DppBaseResourceInner { /* @@ -28,13 +30,15 @@ public final class DppBaseResourceInner { @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private String type; - /** Creates an instance of DppBaseResourceInner class. */ + /** + * Creates an instance of DppBaseResourceInner class. + */ public DppBaseResourceInner() { } /** * Get the id property: Resource Id represents the complete path to the resource. - * + * * @return the id value. */ public String id() { @@ -43,7 +47,7 @@ public String id() { /** * Get the name property: Resource name associated with the resource. - * + * * @return the name value. */ public String name() { @@ -53,7 +57,7 @@ public String name() { /** * Get the type property: Resource type represents the complete path of the form * Namespace/ResourceType/ResourceType/... - * + * * @return the type value. */ public String type() { @@ -62,7 +66,7 @@ public String type() { /** * 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/fluent/models/ExportJobsResultInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ExportJobsResultInner.java index 2f302711c684..4d82a4e2e563 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 @@ -9,8 +9,8 @@ /** * ExportJobsResult - * - *

The result for export jobs containing blob details. + * + * The result for export jobs containing blob details. */ @Immutable public final class ExportJobsResultInner { @@ -38,13 +38,15 @@ public final class ExportJobsResultInner { @JsonProperty(value = "excelFileBlobSasKey", access = JsonProperty.Access.WRITE_ONLY) private String excelFileBlobSasKey; - /** Creates an instance of ExportJobsResultInner class. */ + /** + * Creates an instance of ExportJobsResultInner class. + */ public ExportJobsResultInner() { } /** * Get the blobUrl property: URL of the blob into which the serialized string of list of jobs is exported. - * + * * @return the blobUrl value. */ public String blobUrl() { @@ -53,7 +55,7 @@ public String blobUrl() { /** * Get the blobSasKey property: SAS key to access the blob. - * + * * @return the blobSasKey value. */ public String blobSasKey() { @@ -62,7 +64,7 @@ public String blobSasKey() { /** * Get the excelFileBlobUrl property: URL of the blob into which the ExcelFile is uploaded. - * + * * @return the excelFileBlobUrl value. */ public String excelFileBlobUrl() { @@ -71,7 +73,7 @@ public String excelFileBlobUrl() { /** * Get the excelFileBlobSasKey property: SAS key to access the ExcelFile blob. - * + * * @return the excelFileBlobSasKey value. */ public String excelFileBlobSasKey() { @@ -80,7 +82,7 @@ public String excelFileBlobSasKey() { /** * 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/fluent/models/FeatureValidationResponseBaseInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/FeatureValidationResponseBaseInner.java index adea05edb0ae..bcb953128ec5 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 @@ -10,23 +10,27 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Base class for Backup Feature support. */ +/** + * Base class for Backup Feature support. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType", defaultImpl = FeatureValidationResponseBaseInner.class) @JsonTypeName("FeatureValidationResponseBase") -@JsonSubTypes({@JsonSubTypes.Type(name = "FeatureValidationResponse", value = FeatureValidationResponse.class)}) +@JsonSubTypes({ @JsonSubTypes.Type(name = "FeatureValidationResponse", value = FeatureValidationResponse.class) }) @Immutable public class FeatureValidationResponseBaseInner { - /** Creates an instance of FeatureValidationResponseBaseInner class. */ + /** + * Creates an instance of FeatureValidationResponseBaseInner class. + */ public FeatureValidationResponseBaseInner() { } /** * 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/fluent/models/OperationJobExtendedInfoInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationJobExtendedInfoInner.java index 8fcec9539b9e..cc7b3b9ed375 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 @@ -12,26 +12,28 @@ /** * OperationJobExtendedInfo - * - *

Operation Job Extended Info. + * + * Operation Job Extended Info. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("OperationJobExtendedInfo") @Fluent public final class OperationJobExtendedInfoInner extends OperationExtendedInfo { /* - * Arm Id of the job created for this operation. + * Name or Arm Id of the job created for this operation. */ @JsonProperty(value = "jobId") private String jobId; - /** Creates an instance of OperationJobExtendedInfoInner class. */ + /** + * Creates an instance of OperationJobExtendedInfoInner class. + */ public OperationJobExtendedInfoInner() { } /** - * Get the jobId property: Arm Id of the job created for this operation. - * + * Get the jobId property: Name or Arm Id of the job created for this operation. + * * @return the jobId value. */ public String jobId() { @@ -39,8 +41,8 @@ public String jobId() { } /** - * Set the jobId property: Arm Id of the job created for this operation. - * + * Set the jobId property: Name or Arm Id of the job created for this operation. + * * @param jobId the jobId value to set. * @return the OperationJobExtendedInfoInner object itself. */ @@ -51,7 +53,7 @@ public OperationJobExtendedInfoInner withJobId(String jobId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 b4a756ef7ea3..fc60050308a5 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 @@ -12,8 +12,8 @@ /** * OperationResource - * - *

Operation Resource. + * + * Operation Resource. */ @Fluent public final class OperationResourceInner { @@ -45,7 +45,7 @@ public final class OperationResourceInner { /* * OperationExtendedInfo - * + * * End time of the operation */ @JsonProperty(value = "properties") @@ -63,13 +63,15 @@ public final class OperationResourceInner { @JsonProperty(value = "status") private String status; - /** Creates an instance of OperationResourceInner class. */ + /** + * Creates an instance of OperationResourceInner class. + */ public OperationResourceInner() { } /** * Get the endTime property: End time of the operation. - * + * * @return the endTime value. */ public OffsetDateTime endTime() { @@ -78,7 +80,7 @@ public OffsetDateTime endTime() { /** * Set the endTime property: End time of the operation. - * + * * @param endTime the endTime value to set. * @return the OperationResourceInner object itself. */ @@ -89,9 +91,9 @@ public OperationResourceInner withEndTime(OffsetDateTime endTime) { /** * Get the error property: Required if status == failed or status == canceled. This is the OData v4 error format, - * used by the RPC and will go into the v2.2 Azure REST API guidelines. The full set of optional properties (e.g. - * inner errors / details) can be found in the "Error Response" section. - * + * used by the RPC and will go into the v2.2 Azure REST API guidelines. + * The full set of optional properties (e.g. inner errors / details) can be found in the "Error Response" section. + * * @return the error value. */ public ManagementError error() { @@ -100,9 +102,9 @@ public ManagementError error() { /** * Set the error property: Required if status == failed or status == canceled. This is the OData v4 error format, - * used by the RPC and will go into the v2.2 Azure REST API guidelines. The full set of optional properties (e.g. - * inner errors / details) can be found in the "Error Response" section. - * + * used by the RPC and will go into the v2.2 Azure REST API guidelines. + * The full set of optional properties (e.g. inner errors / details) can be found in the "Error Response" section. + * * @param error the error value to set. * @return the OperationResourceInner object itself. */ @@ -113,7 +115,7 @@ public OperationResourceInner withError(ManagementError error) { /** * Get the id property: It should match what is used to GET the operation result. - * + * * @return the id value. */ public String id() { @@ -122,7 +124,7 @@ public String id() { /** * Set the id property: It should match what is used to GET the operation result. - * + * * @param id the id value to set. * @return the OperationResourceInner object itself. */ @@ -134,7 +136,7 @@ public OperationResourceInner withId(String id) { /** * Get the name property: It must match the last segment of the "id" field, and will typically be a GUID / system * generated value. - * + * * @return the name value. */ public String name() { @@ -144,7 +146,7 @@ public String name() { /** * Set the name property: It must match the last segment of the "id" field, and will typically be a GUID / system * generated value. - * + * * @param name the name value to set. * @return the OperationResourceInner object itself. */ @@ -155,9 +157,9 @@ public OperationResourceInner withName(String name) { /** * Get the properties property: OperationExtendedInfo - * - *

End time of the operation. - * + * + * End time of the operation. + * * @return the properties value. */ public OperationExtendedInfo properties() { @@ -166,9 +168,9 @@ public OperationExtendedInfo properties() { /** * Set the properties property: OperationExtendedInfo - * - *

End time of the operation. - * + * + * End time of the operation. + * * @param properties the properties value to set. * @return the OperationResourceInner object itself. */ @@ -179,7 +181,7 @@ public OperationResourceInner withProperties(OperationExtendedInfo properties) { /** * Get the startTime property: Start time of the operation. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -188,7 +190,7 @@ public OffsetDateTime startTime() { /** * Set the startTime property: Start time of the operation. - * + * * @param startTime the startTime value to set. * @return the OperationResourceInner object itself. */ @@ -199,7 +201,7 @@ public OperationResourceInner withStartTime(OffsetDateTime startTime) { /** * Get the status property: The status property. - * + * * @return the status value. */ public String status() { @@ -208,7 +210,7 @@ public String status() { /** * Set the status property: The status property. - * + * * @param status the status value to set. * @return the OperationResourceInner object itself. */ @@ -219,7 +221,7 @@ public OperationResourceInner withStatus(String status) { /** * 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/fluent/models/ResourceGuardProxyBaseResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ResourceGuardProxyBaseResourceInner.java index 74f1a3ed9c83..7ce0d4bb50cb 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ResourceGuardProxyBaseResourceInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ResourceGuardProxyBaseResourceInner.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase; import com.fasterxml.jackson.annotation.JsonProperty; -/** ResourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs. */ +/** + * ResourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs. + */ @Fluent public final class ResourceGuardProxyBaseResourceInner extends DppResource { /* @@ -18,13 +20,15 @@ public final class ResourceGuardProxyBaseResourceInner extends DppResource { @JsonProperty(value = "properties") private ResourceGuardProxyBase properties; - /** Creates an instance of ResourceGuardProxyBaseResourceInner class. */ + /** + * Creates an instance of ResourceGuardProxyBaseResourceInner class. + */ public ResourceGuardProxyBaseResourceInner() { } /** * Get the properties property: ResourceGuardProxyBaseResource properties. - * + * * @return the properties value. */ public ResourceGuardProxyBase properties() { @@ -33,7 +37,7 @@ public ResourceGuardProxyBase properties() { /** * Set the properties property: ResourceGuardProxyBaseResource properties. - * + * * @param properties the properties value to set. * @return the ResourceGuardProxyBaseResourceInner object itself. */ @@ -44,7 +48,7 @@ public ResourceGuardProxyBaseResourceInner withProperties(ResourceGuardProxyBase /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 fbacaff915a0..76df24be46b1 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 @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The ResourceGuardResource model. */ +/** + * The ResourceGuardResource model. + */ @Fluent public final class ResourceGuardResourceInner extends DppBaseTrackedResource { /* @@ -19,13 +21,15 @@ public final class ResourceGuardResourceInner extends DppBaseTrackedResource { @JsonProperty(value = "properties") private ResourceGuard properties; - /** Creates an instance of ResourceGuardResourceInner class. */ + /** + * Creates an instance of ResourceGuardResourceInner class. + */ public ResourceGuardResourceInner() { } /** * Get the properties property: ResourceGuardResource properties. - * + * * @return the properties value. */ public ResourceGuard properties() { @@ -34,7 +38,7 @@ public ResourceGuard properties() { /** * Set the properties property: ResourceGuardResource properties. - * + * * @param properties the properties value to set. * @return the ResourceGuardResourceInner object itself. */ @@ -43,21 +47,27 @@ public ResourceGuardResourceInner withProperties(ResourceGuard properties) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ResourceGuardResourceInner withEtag(String etag) { super.withEtag(etag); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ResourceGuardResourceInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ResourceGuardResourceInner withTags(Map tags) { super.withTags(tags); @@ -66,7 +76,7 @@ public ResourceGuardResourceInner withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/UnlockDeleteResponseInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/UnlockDeleteResponseInner.java index 3a18c252bb9a..d1410b89b150 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/UnlockDeleteResponseInner.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/UnlockDeleteResponseInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Response of Unlock Delete API. */ +/** + * Response of Unlock Delete API. + */ @Fluent public final class UnlockDeleteResponseInner { /* @@ -16,13 +18,15 @@ public final class UnlockDeleteResponseInner { @JsonProperty(value = "unlockDeleteExpiryTime") private String unlockDeleteExpiryTime; - /** Creates an instance of UnlockDeleteResponseInner class. */ + /** + * Creates an instance of UnlockDeleteResponseInner class. + */ public UnlockDeleteResponseInner() { } /** * Get the unlockDeleteExpiryTime property: This is the time when unlock delete privileges will get expired. - * + * * @return the unlockDeleteExpiryTime value. */ public String unlockDeleteExpiryTime() { @@ -31,7 +35,7 @@ public String unlockDeleteExpiryTime() { /** * Set the unlockDeleteExpiryTime property: This is the time when unlock delete privileges will get expired. - * + * * @param unlockDeleteExpiryTime the unlockDeleteExpiryTime value to set. * @return the UnlockDeleteResponseInner object itself. */ @@ -42,7 +46,7 @@ public UnlockDeleteResponseInner withUnlockDeleteExpiryTime(String unlockDeleteE /** * 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/fluent/models/package-info.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/package-info.java index a6a6163c4875..892ea3e85515 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/package-info.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for DataProtectionClient. Open API 2.0 Specs for Azure Data Protection - * service. + * Package containing the inner data models for DataProtectionClient. + * Open API 2.0 Specs for Azure Data Protection service. */ package com.azure.resourcemanager.dataprotection.fluent.models; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/package-info.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/package-info.java index 8494f21366f8..f434628e2658 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/package-info.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for DataProtectionClient. Open API 2.0 Specs for Azure Data Protection - * service. + * Package containing the service clients for DataProtectionClient. + * Open API 2.0 Specs for Azure Data Protection service. */ package com.azure.resourcemanager.dataprotection.fluent; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupJobResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupJobResourceImpl.java index 6ea2cf32c8c1..0e7e9e55e35a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupJobResourceImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupJobResourceImpl.java @@ -14,8 +14,7 @@ public final class AzureBackupJobResourceImpl implements AzureBackupJobResource private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - AzureBackupJobResourceImpl( - AzureBackupJobResourceInner innerObject, + AzureBackupJobResourceImpl(AzureBackupJobResourceInner innerObject, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupRecoveryPointResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupRecoveryPointResourceImpl.java index c6ec252b37df..7d9111fa9258 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupRecoveryPointResourceImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupRecoveryPointResourceImpl.java @@ -14,8 +14,7 @@ public final class AzureBackupRecoveryPointResourceImpl implements AzureBackupRe private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - AzureBackupRecoveryPointResourceImpl( - AzureBackupRecoveryPointResourceInner innerObject, + AzureBackupRecoveryPointResourceImpl(AzureBackupRecoveryPointResourceInner innerObject, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 e88d4d1159de..94b68eb17a5c 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 @@ -78,25 +78,19 @@ public BackupInstanceResourceImpl withExistingBackupVault(String resourceGroupNa } public BackupInstanceResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getBackupInstances() - .createOrUpdate(resourceGroupName, vaultName, backupInstanceName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getBackupInstances().createOrUpdate(resourceGroupName, + vaultName, backupInstanceName, this.innerModel(), Context.NONE); return this; } public BackupInstanceResource create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBackupInstances() - .createOrUpdate(resourceGroupName, vaultName, backupInstanceName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getBackupInstances().createOrUpdate(resourceGroupName, + vaultName, backupInstanceName, this.innerModel(), context); return this; } - BackupInstanceResourceImpl( - String name, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + BackupInstanceResourceImpl(String name, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = new BackupInstanceResourceInner(); this.serviceManager = serviceManager; this.backupInstanceName = name; @@ -107,25 +101,18 @@ public BackupInstanceResourceImpl update() { } public BackupInstanceResource apply() { - this.innerObject = - serviceManager - .serviceClient() - .getBackupInstances() - .createOrUpdate(resourceGroupName, vaultName, backupInstanceName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getBackupInstances().createOrUpdate(resourceGroupName, + vaultName, backupInstanceName, this.innerModel(), Context.NONE); return this; } public BackupInstanceResource apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBackupInstances() - .createOrUpdate(resourceGroupName, vaultName, backupInstanceName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getBackupInstances().createOrUpdate(resourceGroupName, + vaultName, backupInstanceName, this.innerModel(), context); return this; } - BackupInstanceResourceImpl( - BackupInstanceResourceInner innerObject, + BackupInstanceResourceImpl(BackupInstanceResourceInner innerObject, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -135,35 +122,25 @@ public BackupInstanceResource apply(Context context) { } public BackupInstanceResource refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getBackupInstances() - .getWithResponse(resourceGroupName, vaultName, backupInstanceName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getBackupInstances() + .getWithResponse(resourceGroupName, vaultName, backupInstanceName, Context.NONE).getValue(); return this; } public BackupInstanceResource refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBackupInstances() - .getWithResponse(resourceGroupName, vaultName, backupInstanceName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getBackupInstances() + .getWithResponse(resourceGroupName, vaultName, backupInstanceName, context).getValue(); return this; } public OperationJobExtendedInfo adhocBackup(TriggerBackupRequest parameters) { - return serviceManager - .backupInstances() - .adhocBackup(resourceGroupName, vaultName, backupInstanceName, parameters); + return serviceManager.backupInstances().adhocBackup(resourceGroupName, vaultName, backupInstanceName, + parameters); } public OperationJobExtendedInfo adhocBackup(TriggerBackupRequest parameters, Context context) { - return serviceManager - .backupInstances() - .adhocBackup(resourceGroupName, vaultName, backupInstanceName, parameters, context); + return serviceManager.backupInstances().adhocBackup(resourceGroupName, vaultName, backupInstanceName, + parameters, context); } public void triggerRehydrate(AzureBackupRehydrationRequest parameters) { @@ -171,21 +148,18 @@ public void triggerRehydrate(AzureBackupRehydrationRequest parameters) { } public void triggerRehydrate(AzureBackupRehydrationRequest parameters, Context context) { - serviceManager - .backupInstances() - .triggerRehydrate(resourceGroupName, vaultName, backupInstanceName, parameters, context); + serviceManager.backupInstances().triggerRehydrate(resourceGroupName, vaultName, backupInstanceName, parameters, + context); } public OperationJobExtendedInfo triggerRestore(AzureBackupRestoreRequest parameters) { - return serviceManager - .backupInstances() - .triggerRestore(resourceGroupName, vaultName, backupInstanceName, parameters); + return serviceManager.backupInstances().triggerRestore(resourceGroupName, vaultName, backupInstanceName, + parameters); } public OperationJobExtendedInfo triggerRestore(AzureBackupRestoreRequest parameters, Context context) { - return serviceManager - .backupInstances() - .triggerRestore(resourceGroupName, vaultName, backupInstanceName, parameters, context); + return serviceManager.backupInstances().triggerRestore(resourceGroupName, vaultName, backupInstanceName, + parameters, context); } public void resumeBackups() { @@ -221,27 +195,23 @@ public void suspendBackups(Context context) { } public void syncBackupInstance(SyncBackupInstanceRequest parameters) { - serviceManager - .backupInstances() - .syncBackupInstance(resourceGroupName, vaultName, backupInstanceName, parameters); + serviceManager.backupInstances().syncBackupInstance(resourceGroupName, vaultName, backupInstanceName, + parameters); } public void syncBackupInstance(SyncBackupInstanceRequest parameters, Context context) { - serviceManager - .backupInstances() - .syncBackupInstance(resourceGroupName, vaultName, backupInstanceName, parameters, context); + serviceManager.backupInstances().syncBackupInstance(resourceGroupName, vaultName, backupInstanceName, + parameters, context); } public OperationJobExtendedInfo validateForRestore(ValidateRestoreRequestObject parameters) { - return serviceManager - .backupInstances() - .validateForRestore(resourceGroupName, vaultName, backupInstanceName, parameters); + return serviceManager.backupInstances().validateForRestore(resourceGroupName, vaultName, backupInstanceName, + parameters); } public OperationJobExtendedInfo validateForRestore(ValidateRestoreRequestObject parameters, Context context) { - return serviceManager - .backupInstances() - .validateForRestore(resourceGroupName, vaultName, backupInstanceName, parameters, context); + return serviceManager.backupInstances().validateForRestore(resourceGroupName, vaultName, backupInstanceName, + parameters, context); } public BackupInstanceResourceImpl withTags(Map tags) { 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 46df3ed14a19..2f9edf2b0307 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 @@ -38,30 +38,38 @@ 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.CrossRegionRestoreRequestObject; import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest; import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest; +import com.azure.resourcemanager.dataprotection.models.ValidateCrossRegionRestoreRequestObject; import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest; import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in BackupInstancesClient. */ +/** + * An instance of this class provides access to all the operations defined in BackupInstancesClient. + */ public final class BackupInstancesClientImpl implements BackupInstancesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final BackupInstancesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DataProtectionClientImpl client; /** * Initializes an instance of BackupInstancesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ BackupInstancesClientImpl(DataProtectionClientImpl client) { - this.service = - RestProxy.create(BackupInstancesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(BackupInstancesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -72,273 +80,211 @@ public final class BackupInstancesClientImpl implements BackupInstancesClient { @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface BackupInstancesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}") - @ExpectedResponses({200}) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @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, - @HeaderParam("Accept") String accept, + Mono> get(@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, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}") - @ExpectedResponses({200, 201, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}") + @ExpectedResponses({ 200, 201, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, + Mono>> createOrUpdate(@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") BackupInstanceResourceInner parameters, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") BackupInstanceResourceInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @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, - @HeaderParam("Accept") String accept, + Mono>> delete(@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, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> adhocBackup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, + Mono>> adhocBackup(@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") TriggerBackupRequest parameters, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") TriggerBackupRequest parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/validateForBackup") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/validateForBackup") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validateForBackup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, - @BodyParam("application/json") ValidateForBackupRequest parameters, - @HeaderParam("Accept") String accept, + Mono>> validateForBackup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @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}) + @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/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate") - @ExpectedResponses({202, 204}) + @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/locations/{location}/crossRegionRestore") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> triggerRehydrate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("vaultName") String vaultName, + Mono>> triggerCrossRegionRestore(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, + @BodyParam("application/json") CrossRegionRestoreRequestObject parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/validateCrossRegionRestore") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> validateCrossRegionRestore(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, + @BodyParam("application/json") ValidateCrossRegionRestoreRequestObject parameters, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> triggerRehydrate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @BodyParam("application/json") AzureBackupRehydrationRequest parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> triggerRestore( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, + 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, + @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}) + @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, + 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); + @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}) + @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, + 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); + @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}) + @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, + 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); + @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}) + @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, + 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); + @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}) + @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, + Mono>> syncBackupInstance(@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, - @BodyParam("application/json") SyncBackupInstanceRequest parameters, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("backupInstanceName") String backupInstanceName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SyncBackupInstanceRequest parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validateForRestore( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, + Mono>> validateForRestore(@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") ValidateRestoreRequestObject parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String vaultName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String vaultName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -349,32 +295,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, 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 backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -382,22 +312,18 @@ private Mono> listSinglePageAsync( * @throws 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 along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String vaultName, Context context) { + private Mono> listSinglePageAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -409,28 +335,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -440,13 +353,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String vaultName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, vaultName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Gets a backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -456,16 +369,15 @@ private PagedFlux listAsync(String resourceGroupNam * @return a backup instances belonging to a backup vault as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String vaultName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, vaultName, context), + private PagedFlux listAsync(String resourceGroupName, String vaultName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets a backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -480,7 +392,7 @@ public PagedIterable list(String resourceGroupName, /** * Gets a backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -490,14 +402,14 @@ public PagedIterable list(String resourceGroupName, * @return a backup instances belonging to a backup vault as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String vaultName, Context context) { + public PagedIterable list(String resourceGroupName, String vaultName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, vaultName, context)); } /** * Gets a backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -505,22 +417,18 @@ public PagedIterable list( * @throws 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 along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String vaultName, String backupInstanceName) { + private Mono> getWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -535,24 +443,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupInstanceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -561,22 +459,18 @@ private Mono> getWithResponseAsync( * @throws 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 along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + private Mono> getWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -591,21 +485,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, backupInstanceName, accept, context); } /** * Gets a backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -615,15 +501,15 @@ private Mono> getWithResponseAsync( * @return a backup instance with name in a backup vault on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String vaultName, String backupInstanceName) { + private Mono getAsync(String resourceGroupName, String vaultName, + String backupInstanceName) { return getWithResponseAsync(resourceGroupName, vaultName, backupInstanceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -634,14 +520,14 @@ private Mono getAsync( * @return a backup instance with name in a backup vault along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + public Response getWithResponse(String resourceGroupName, String vaultName, + String backupInstanceName, Context context) { return getWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, context).block(); } /** * Gets a backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -657,7 +543,7 @@ public BackupInstanceResourceInner get(String resourceGroupName, String vaultNam /** * Create or update a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -668,19 +554,15 @@ public BackupInstanceResourceInner get(String resourceGroupName, String vaultNam * @return backupInstanceResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters) { + private Mono>> createOrUpdateWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -700,25 +582,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupInstanceName, parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -730,23 +602,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return backupInstanceResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - BackupInstanceResourceInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String vaultName, + String backupInstanceName, BackupInstanceResourceInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -766,22 +630,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupInstanceName, parameters, accept, + context); } /** * Create or update a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -794,21 +650,16 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BackupInstanceResourceInner> beginCreateOrUpdateAsync( String resourceGroupName, String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BackupInstanceResourceInner.class, - BackupInstanceResourceInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), BackupInstanceResourceInner.class, BackupInstanceResourceInner.class, + this.client.getContext()); } /** * Create or update a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -821,27 +672,19 @@ private PollerFlux, BackupInstanceResour */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BackupInstanceResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - BackupInstanceResourceInner parameters, + String resourceGroupName, String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BackupInstanceResourceInner.class, - BackupInstanceResourceInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), BackupInstanceResourceInner.class, BackupInstanceResourceInner.class, + context); } /** * Create or update a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -854,14 +697,13 @@ private PollerFlux, BackupInstanceResour @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BackupInstanceResourceInner> beginCreateOrUpdate( String resourceGroupName, String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, vaultName, backupInstanceName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, vaultName, backupInstanceName, parameters) .getSyncPoller(); } /** * Create or update a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -874,19 +716,15 @@ public SyncPoller, BackupInstanceResourc */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BackupInstanceResourceInner> beginCreateOrUpdate( - String resourceGroupName, - String vaultName, - String backupInstanceName, - BackupInstanceResourceInner parameters, + String resourceGroupName, String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) .getSyncPoller(); } /** * Create or update a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -897,16 +735,15 @@ public SyncPoller, BackupInstanceResourc * @return backupInstanceResource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, vaultName, backupInstanceName, parameters) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String vaultName, + String backupInstanceName, BackupInstanceResourceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, vaultName, backupInstanceName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -918,20 +755,15 @@ private Mono createOrUpdateAsync( * @return backupInstanceResource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - BackupInstanceResourceInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String vaultName, + String backupInstanceName, BackupInstanceResourceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -942,14 +774,14 @@ private Mono createOrUpdateAsync( * @return backupInstanceResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInstanceResourceInner createOrUpdate( - String resourceGroupName, String vaultName, String backupInstanceName, BackupInstanceResourceInner parameters) { + public BackupInstanceResourceInner createOrUpdate(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 resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -961,18 +793,14 @@ public BackupInstanceResourceInner createOrUpdate( * @return backupInstanceResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInstanceResourceInner createOrUpdate( - String resourceGroupName, - String vaultName, - String backupInstanceName, - BackupInstanceResourceInner parameters, - Context context) { + public BackupInstanceResourceInner createOrUpdate(String resourceGroupName, String vaultName, + String backupInstanceName, BackupInstanceResourceInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).block(); } /** * Delete a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -982,19 +810,15 @@ public BackupInstanceResourceInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String vaultName, String backupInstanceName) { + private Mono>> deleteWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1009,24 +833,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupInstanceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1037,19 +851,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + private Mono>> deleteWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1064,21 +874,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, backupInstanceName, accept, context); } /** * Delete a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1088,19 +890,17 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String vaultName, String backupInstanceName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, vaultName, backupInstanceName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String vaultName, + String backupInstanceName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, vaultName, backupInstanceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1111,19 +911,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String vaultName, + String backupInstanceName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1133,14 +932,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String vaultName, String backupInstanceName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String vaultName, + String backupInstanceName) { return this.beginDeleteAsync(resourceGroupName, vaultName, backupInstanceName).getSyncPoller(); } /** * Delete a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1151,14 +950,14 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String vaultName, + String backupInstanceName, Context context) { return this.beginDeleteAsync(resourceGroupName, vaultName, backupInstanceName, context).getSyncPoller(); } /** * Delete a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1169,14 +968,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String vaultName, String backupInstanceName) { - return beginDeleteAsync(resourceGroupName, vaultName, backupInstanceName) - .last() + return beginDeleteAsync(resourceGroupName, vaultName, backupInstanceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1187,16 +985,15 @@ private Mono deleteAsync(String resourceGroupName, String vaultName, Strin * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String vaultName, String backupInstanceName, Context context) { - return beginDeleteAsync(resourceGroupName, vaultName, backupInstanceName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String vaultName, String backupInstanceName, + Context context) { + return beginDeleteAsync(resourceGroupName, vaultName, backupInstanceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1211,7 +1008,7 @@ public void delete(String resourceGroupName, String vaultName, String backupInst /** * Delete a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1227,7 +1024,7 @@ public void delete(String resourceGroupName, String vaultName, String backupInst /** * Trigger adhoc backup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1238,19 +1035,15 @@ public void delete(String resourceGroupName, String vaultName, String backupInst * @return operationJobExtendedInfo along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> adhocBackupWithResponseAsync( - String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters) { + private Mono>> adhocBackupWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1270,25 +1063,15 @@ private Mono>> adhocBackupWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .adhocBackup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - parameters, - accept, - context)) + .withContext(context -> service.adhocBackup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupInstanceName, parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Trigger adhoc backup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1300,23 +1083,15 @@ private Mono>> adhocBackupWithResponseAsync( * @return operationJobExtendedInfo along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> adhocBackupWithResponseAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - TriggerBackupRequest parameters, - Context context) { + private Mono>> adhocBackupWithResponseAsync(String resourceGroupName, String vaultName, + String backupInstanceName, TriggerBackupRequest parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1336,22 +1111,14 @@ private Mono>> adhocBackupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .adhocBackup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - parameters, - accept, - context); + return service.adhocBackup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupInstanceName, parameters, accept, + context); } /** * Trigger adhoc backup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1364,21 +1131,16 @@ private Mono>> adhocBackupWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationJobExtendedInfoInner> beginAdhocBackupAsync( String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters) { - Mono>> mono = - adhocBackupWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OperationJobExtendedInfoInner.class, - OperationJobExtendedInfoInner.class, - this.client.getContext()); + Mono>> mono + = adhocBackupWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, + this.client.getContext()); } /** * Trigger adhoc backup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1391,27 +1153,19 @@ private PollerFlux, OperationJobExtend */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationJobExtendedInfoInner> beginAdhocBackupAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - TriggerBackupRequest parameters, + String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - adhocBackupWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OperationJobExtendedInfoInner.class, - OperationJobExtendedInfoInner.class, - context); + Mono>> mono + = adhocBackupWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, + context); } /** * Trigger adhoc backup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1429,7 +1183,7 @@ public SyncPoller, OperationJobExtende /** * Trigger adhoc backup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1442,19 +1196,15 @@ public SyncPoller, OperationJobExtende */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationJobExtendedInfoInner> beginAdhocBackup( - String resourceGroupName, - String vaultName, - String backupInstanceName, - TriggerBackupRequest parameters, + String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters, Context context) { - return this - .beginAdhocBackupAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) + return this.beginAdhocBackupAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) .getSyncPoller(); } /** * Trigger adhoc backup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1465,16 +1215,15 @@ public SyncPoller, OperationJobExtende * @return operationJobExtendedInfo on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono adhocBackupAsync( - String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters) { - return beginAdhocBackupAsync(resourceGroupName, vaultName, backupInstanceName, parameters) - .last() + private Mono adhocBackupAsync(String resourceGroupName, String vaultName, + String backupInstanceName, TriggerBackupRequest parameters) { + return beginAdhocBackupAsync(resourceGroupName, vaultName, backupInstanceName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Trigger adhoc backup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1486,20 +1235,15 @@ private Mono adhocBackupAsync( * @return operationJobExtendedInfo on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono adhocBackupAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - TriggerBackupRequest parameters, - Context context) { - return beginAdhocBackupAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) - .last() + private Mono adhocBackupAsync(String resourceGroupName, String vaultName, + String backupInstanceName, TriggerBackupRequest parameters, Context context) { + return beginAdhocBackupAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Trigger adhoc backup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1510,14 +1254,14 @@ private Mono adhocBackupAsync( * @return operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationJobExtendedInfoInner adhocBackup( - String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters) { + public OperationJobExtendedInfoInner adhocBackup(String resourceGroupName, String vaultName, + String backupInstanceName, TriggerBackupRequest parameters) { return adhocBackupAsync(resourceGroupName, vaultName, backupInstanceName, parameters).block(); } /** * Trigger adhoc backup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1529,18 +1273,14 @@ public OperationJobExtendedInfoInner adhocBackup( * @return operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationJobExtendedInfoInner adhocBackup( - String resourceGroupName, - String vaultName, - String backupInstanceName, - TriggerBackupRequest parameters, - Context context) { + public OperationJobExtendedInfoInner adhocBackup(String resourceGroupName, String vaultName, + String backupInstanceName, TriggerBackupRequest parameters, Context context) { return adhocBackupAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).block(); } /** * Validate whether adhoc backup will be successful or not. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1550,19 +1290,15 @@ public OperationJobExtendedInfoInner adhocBackup( * @return operationJobExtendedInfo along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateForBackupWithResponseAsync( - String resourceGroupName, String vaultName, ValidateForBackupRequest parameters) { + private Mono>> validateForBackupWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1578,24 +1314,14 @@ private Mono>> validateForBackupWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .validateForBackup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - parameters, - accept, - context)) + .withContext(context -> service.validateForBackup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Validate whether adhoc backup will be successful or not. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1606,19 +1332,15 @@ private Mono>> validateForBackupWithResponseAsync( * @return operationJobExtendedInfo along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateForBackupWithResponseAsync( - String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, Context context) { + private Mono>> validateForBackupWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1634,21 +1356,13 @@ private Mono>> validateForBackupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .validateForBackup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - parameters, - accept, - context); + return service.validateForBackup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, parameters, accept, context); } /** * Validate whether adhoc backup will be successful or not. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1660,21 +1374,16 @@ private Mono>> validateForBackupWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationJobExtendedInfoInner> beginValidateForBackupAsync(String resourceGroupName, String vaultName, ValidateForBackupRequest parameters) { - Mono>> mono = - validateForBackupWithResponseAsync(resourceGroupName, vaultName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OperationJobExtendedInfoInner.class, - OperationJobExtendedInfoInner.class, - this.client.getContext()); + Mono>> mono + = validateForBackupWithResponseAsync(resourceGroupName, vaultName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, + this.client.getContext()); } /** * Validate whether adhoc backup will be successful or not. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1686,24 +1395,19 @@ private Mono>> validateForBackupWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationJobExtendedInfoInner> - beginValidateForBackupAsync( - String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, Context context) { + beginValidateForBackupAsync(String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, + Context context) { context = this.client.mergeContext(context); - Mono>> mono = - validateForBackupWithResponseAsync(resourceGroupName, vaultName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OperationJobExtendedInfoInner.class, - OperationJobExtendedInfoInner.class, - context); + Mono>> mono + = validateForBackupWithResponseAsync(resourceGroupName, vaultName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, + context); } /** * Validate whether adhoc backup will be successful or not. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1713,14 +1417,14 @@ private Mono>> validateForBackupWithResponseAsync( * @return the {@link SyncPoller} for polling of operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OperationJobExtendedInfoInner> beginValidateForBackup( - String resourceGroupName, String vaultName, ValidateForBackupRequest parameters) { + public SyncPoller, OperationJobExtendedInfoInner> + beginValidateForBackup(String resourceGroupName, String vaultName, ValidateForBackupRequest parameters) { return this.beginValidateForBackupAsync(resourceGroupName, vaultName, parameters).getSyncPoller(); } /** * Validate whether adhoc backup will be successful or not. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1738,7 +1442,7 @@ public SyncPoller, OperationJobExtende /** * Validate whether adhoc backup will be successful or not. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1748,16 +1452,15 @@ public SyncPoller, OperationJobExtende * @return operationJobExtendedInfo on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateForBackupAsync( - String resourceGroupName, String vaultName, ValidateForBackupRequest parameters) { - return beginValidateForBackupAsync(resourceGroupName, vaultName, parameters) - .last() + private Mono validateForBackupAsync(String resourceGroupName, String vaultName, + ValidateForBackupRequest parameters) { + return beginValidateForBackupAsync(resourceGroupName, vaultName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Validate whether adhoc backup will be successful or not. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1768,16 +1471,15 @@ private Mono validateForBackupAsync( * @return operationJobExtendedInfo on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateForBackupAsync( - String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, Context context) { - return beginValidateForBackupAsync(resourceGroupName, vaultName, parameters, context) - .last() + private Mono validateForBackupAsync(String resourceGroupName, String vaultName, + ValidateForBackupRequest parameters, Context context) { + return beginValidateForBackupAsync(resourceGroupName, vaultName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Validate whether adhoc backup will be successful or not. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1787,14 +1489,14 @@ private Mono validateForBackupAsync( * @return operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationJobExtendedInfoInner validateForBackup( - String resourceGroupName, String vaultName, ValidateForBackupRequest parameters) { + public OperationJobExtendedInfoInner validateForBackup(String resourceGroupName, String vaultName, + ValidateForBackupRequest parameters) { return validateForBackupAsync(resourceGroupName, vaultName, parameters).block(); } /** * Validate whether adhoc backup will be successful or not. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1805,14 +1507,14 @@ public OperationJobExtendedInfoInner validateForBackup( * @return operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationJobExtendedInfoInner validateForBackup( - String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, Context context) { + public OperationJobExtendedInfoInner validateForBackup(String resourceGroupName, String vaultName, + ValidateForBackupRequest parameters, Context context) { return validateForBackupAsync(resourceGroupName, vaultName, parameters, context).block(); } /** * Get result of backup instance creation operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1821,22 +1523,18 @@ public OperationJobExtendedInfoInner validateForBackup( * @throws 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} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1854,25 +1552,15 @@ private Mono> getBackupInstanceOperationRe } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getBackupInstanceOperationResult( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - operationId, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getBackupInstanceOperationResult(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupInstanceName, operationId, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get result of backup instance creation operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1882,22 +1570,18 @@ private Mono> getBackupInstanceOperationRe * @throws 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} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1915,22 +1599,14 @@ private Mono> getBackupInstanceOperationRe } 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); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1941,16 +1617,15 @@ private Mono> getBackupInstanceOperationRe * @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(res -> Mono.justOrEmpty(res.getValue())); + private Mono getBackupInstanceOperationResultAsync(String resourceGroupName, + String vaultName, String backupInstanceName, String operationId) { + return getBackupInstanceOperationResultWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, + operationId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get result of backup instance creation operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1962,16 +1637,15 @@ private Mono getBackupInstanceOperationResultAsync( * @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(); + public Response getBackupInstanceOperationResultWithResponse(String resourceGroupName, + String vaultName, String backupInstanceName, String operationId, Context context) { + return getBackupInstanceOperationResultWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, + operationId, context).block(); } /** * Get result of backup instance creation operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -1982,16 +1656,493 @@ public Response getBackupInstanceOperationResultWit * @return result of backup instance creation operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupInstanceResourceInner getBackupInstanceOperationResult( - String resourceGroupName, String vaultName, String backupInstanceName, String operationId) { - return getBackupInstanceOperationResultWithResponse( - resourceGroupName, vaultName, backupInstanceName, operationId, Context.NONE) - .getValue(); + public BackupInstanceResourceInner getBackupInstanceOperationResult(String resourceGroupName, String vaultName, + String backupInstanceName, String operationId) { + return getBackupInstanceOperationResultWithResponse(resourceGroupName, vaultName, backupInstanceName, + operationId, Context.NONE).getValue(); + } + + /** + * Triggers Cross Region Restore for BackupInstance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for trigger CRR operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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>> triggerCrossRegionRestoreWithResponseAsync(String resourceGroupName, + String location, CrossRegionRestoreRequestObject 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location 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.triggerCrossRegionRestore(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, location, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Triggers Cross Region Restore for BackupInstance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for trigger CRR 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> triggerCrossRegionRestoreWithResponseAsync(String resourceGroupName, + String location, CrossRegionRestoreRequestObject 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location 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.triggerCrossRegionRestore(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, location, parameters, accept, context); + } + + /** + * Triggers Cross Region Restore for BackupInstance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for trigger CRR operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 operationJobExtendedInfo. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationJobExtendedInfoInner> + beginTriggerCrossRegionRestoreAsync(String resourceGroupName, String location, + CrossRegionRestoreRequestObject parameters) { + Mono>> mono + = triggerCrossRegionRestoreWithResponseAsync(resourceGroupName, location, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, + this.client.getContext()); + } + + /** + * Triggers Cross Region Restore for BackupInstance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for trigger CRR 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 operationJobExtendedInfo. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationJobExtendedInfoInner> + beginTriggerCrossRegionRestoreAsync(String resourceGroupName, String location, + CrossRegionRestoreRequestObject parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = triggerCrossRegionRestoreWithResponseAsync(resourceGroupName, location, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, + context); + } + + /** + * Triggers Cross Region Restore for BackupInstance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for trigger CRR operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 operationJobExtendedInfo. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationJobExtendedInfoInner> + beginTriggerCrossRegionRestore(String resourceGroupName, String location, + CrossRegionRestoreRequestObject parameters) { + return this.beginTriggerCrossRegionRestoreAsync(resourceGroupName, location, parameters).getSyncPoller(); + } + + /** + * Triggers Cross Region Restore for BackupInstance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for trigger CRR 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 operationJobExtendedInfo. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationJobExtendedInfoInner> + beginTriggerCrossRegionRestore(String resourceGroupName, String location, + CrossRegionRestoreRequestObject parameters, Context context) { + return this.beginTriggerCrossRegionRestoreAsync(resourceGroupName, location, parameters, context) + .getSyncPoller(); + } + + /** + * Triggers Cross Region Restore for BackupInstance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for trigger CRR operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono triggerCrossRegionRestoreAsync(String resourceGroupName, + String location, CrossRegionRestoreRequestObject parameters) { + return beginTriggerCrossRegionRestoreAsync(resourceGroupName, location, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Triggers Cross Region Restore for BackupInstance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for trigger CRR 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono triggerCrossRegionRestoreAsync(String resourceGroupName, + String location, CrossRegionRestoreRequestObject parameters, Context context) { + return beginTriggerCrossRegionRestoreAsync(resourceGroupName, location, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Triggers Cross Region Restore for BackupInstance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for trigger CRR operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationJobExtendedInfoInner triggerCrossRegionRestore(String resourceGroupName, String location, + CrossRegionRestoreRequestObject parameters) { + return triggerCrossRegionRestoreAsync(resourceGroupName, location, parameters).block(); + } + + /** + * Triggers Cross Region Restore for BackupInstance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for trigger CRR 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationJobExtendedInfoInner triggerCrossRegionRestore(String resourceGroupName, String location, + CrossRegionRestoreRequestObject parameters, Context context) { + return triggerCrossRegionRestoreAsync(resourceGroupName, location, parameters, context).block(); + } + + /** + * Validates whether Cross Region Restore can be triggered for DataSource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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>> validateCrossRegionRestoreWithResponseAsync(String resourceGroupName, + String location, ValidateCrossRegionRestoreRequestObject 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location 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.validateCrossRegionRestore(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, location, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Validates whether Cross Region Restore can be triggered for DataSource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateCrossRegionRestoreWithResponseAsync(String resourceGroupName, + String location, ValidateCrossRegionRestoreRequestObject 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location 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.validateCrossRegionRestore(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, location, parameters, accept, context); + } + + /** + * Validates whether Cross Region Restore can be triggered for DataSource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 operationJobExtendedInfo. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationJobExtendedInfoInner> + beginValidateCrossRegionRestoreAsync(String resourceGroupName, String location, + ValidateCrossRegionRestoreRequestObject parameters) { + Mono>> mono + = validateCrossRegionRestoreWithResponseAsync(resourceGroupName, location, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, + this.client.getContext()); + } + + /** + * Validates whether Cross Region Restore can be triggered for DataSource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 operationJobExtendedInfo. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationJobExtendedInfoInner> + beginValidateCrossRegionRestoreAsync(String resourceGroupName, String location, + ValidateCrossRegionRestoreRequestObject parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = validateCrossRegionRestoreWithResponseAsync(resourceGroupName, location, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, + context); + } + + /** + * Validates whether Cross Region Restore can be triggered for DataSource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 operationJobExtendedInfo. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationJobExtendedInfoInner> + beginValidateCrossRegionRestore(String resourceGroupName, String location, + ValidateCrossRegionRestoreRequestObject parameters) { + return this.beginValidateCrossRegionRestoreAsync(resourceGroupName, location, parameters).getSyncPoller(); + } + + /** + * Validates whether Cross Region Restore can be triggered for DataSource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 operationJobExtendedInfo. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationJobExtendedInfoInner> + beginValidateCrossRegionRestore(String resourceGroupName, String location, + ValidateCrossRegionRestoreRequestObject parameters, Context context) { + return this.beginValidateCrossRegionRestoreAsync(resourceGroupName, location, parameters, context) + .getSyncPoller(); + } + + /** + * Validates whether Cross Region Restore can be triggered for DataSource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateCrossRegionRestoreAsync(String resourceGroupName, + String location, ValidateCrossRegionRestoreRequestObject parameters) { + return beginValidateCrossRegionRestoreAsync(resourceGroupName, location, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Validates whether Cross Region Restore can be triggered for DataSource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateCrossRegionRestoreAsync(String resourceGroupName, + String location, ValidateCrossRegionRestoreRequestObject parameters, Context context) { + return beginValidateCrossRegionRestoreAsync(resourceGroupName, location, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Validates whether Cross Region Restore can be triggered for DataSource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationJobExtendedInfoInner validateCrossRegionRestore(String resourceGroupName, String location, + ValidateCrossRegionRestoreRequestObject parameters) { + return validateCrossRegionRestoreAsync(resourceGroupName, location, parameters).block(); + } + + /** + * Validates whether Cross Region Restore can be triggered for DataSource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationJobExtendedInfoInner validateCrossRegionRestore(String resourceGroupName, String location, + ValidateCrossRegionRestoreRequestObject parameters, Context context) { + return validateCrossRegionRestoreAsync(resourceGroupName, location, parameters, context).block(); } /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2002,26 +2153,19 @@ public BackupInstanceResourceInner getBackupInstanceOperationResult( * @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) { + 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.")); + 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.")); + 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.")); @@ -2037,25 +2181,15 @@ private Mono>> triggerRehydrateWithResponseAsync( } 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)) + .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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2067,27 +2201,19 @@ private Mono>> triggerRehydrateWithResponseAsync( * @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, - Context context) { + private Mono>> triggerRehydrateWithResponseAsync(String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupRehydrationRequest parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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.")); @@ -2103,22 +2229,13 @@ private Mono>> triggerRehydrateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .triggerRehydrate( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - vaultName, - backupInstanceName, - parameters, - accept, - context); + return service.triggerRehydrate(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName, + this.client.getSubscriptionId(), vaultName, backupInstanceName, parameters, accept, context); } /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2129,22 +2246,17 @@ private Mono>> triggerRehydrateWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginTriggerRehydrateAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRehydrationRequest parameters) { - Mono>> mono = - triggerRehydrateWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginTriggerRehydrateAsync(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupRehydrationRequest parameters) { + Mono>> mono + = triggerRehydrateWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2156,23 +2268,18 @@ private PollerFlux, Void> beginTriggerRehydrateAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginTriggerRehydrateAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRehydrationRequest parameters, - Context context) { + private PollerFlux, Void> beginTriggerRehydrateAsync(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupRehydrationRequest parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - triggerRehydrateWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = triggerRehydrateWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2183,19 +2290,15 @@ private PollerFlux, Void> beginTriggerRehydrateAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginTriggerRehydrate( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRehydrationRequest parameters) { - return this - .beginTriggerRehydrateAsync(resourceGroupName, vaultName, backupInstanceName, parameters) + public SyncPoller, Void> beginTriggerRehydrate(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupRehydrationRequest parameters) { + return this.beginTriggerRehydrateAsync(resourceGroupName, vaultName, backupInstanceName, parameters) .getSyncPoller(); } /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2207,20 +2310,15 @@ public SyncPoller, Void> beginTriggerRehydrate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginTriggerRehydrate( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRehydrationRequest parameters, - Context context) { - return this - .beginTriggerRehydrateAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) + public SyncPoller, Void> beginTriggerRehydrate(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupRehydrationRequest parameters, Context context) { + return this.beginTriggerRehydrateAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) .getSyncPoller(); } /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2231,19 +2329,15 @@ public SyncPoller, Void> beginTriggerRehydrate( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono triggerRehydrateAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, + private Mono triggerRehydrateAsync(String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRehydrationRequest parameters) { - return beginTriggerRehydrateAsync(resourceGroupName, vaultName, backupInstanceName, parameters) - .last() + return beginTriggerRehydrateAsync(resourceGroupName, vaultName, backupInstanceName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2255,20 +2349,15 @@ private Mono triggerRehydrateAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono triggerRehydrateAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRehydrationRequest parameters, - Context context) { - return beginTriggerRehydrateAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) - .last() + private Mono triggerRehydrateAsync(String resourceGroupName, String vaultName, String backupInstanceName, + AzureBackupRehydrationRequest parameters, Context context) { + return beginTriggerRehydrateAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2278,17 +2367,14 @@ private Mono triggerRehydrateAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void triggerRehydrate( - String resourceGroupName, - String vaultName, - String backupInstanceName, + public void triggerRehydrate(String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRehydrationRequest parameters) { triggerRehydrateAsync(resourceGroupName, vaultName, backupInstanceName, parameters).block(); } /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2299,18 +2385,14 @@ public void triggerRehydrate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void triggerRehydrate( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRehydrationRequest parameters, - Context context) { + public void triggerRehydrate(String resourceGroupName, String vaultName, String backupInstanceName, + AzureBackupRehydrationRequest parameters, Context context) { triggerRehydrateAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).block(); } /** * Triggers restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2321,19 +2403,15 @@ public void triggerRehydrate( * @return operationJobExtendedInfo along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> triggerRestoreWithResponseAsync( - String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters) { + private Mono>> triggerRestoreWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2353,25 +2431,15 @@ private Mono>> triggerRestoreWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .triggerRestore( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - parameters, - accept, - context)) + .withContext(context -> service.triggerRestore(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupInstanceName, parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Triggers restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2383,23 +2451,15 @@ private Mono>> triggerRestoreWithResponseAsync( * @return operationJobExtendedInfo along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> triggerRestoreWithResponseAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRestoreRequest parameters, - Context context) { + private Mono>> triggerRestoreWithResponseAsync(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupRestoreRequest parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2419,22 +2479,14 @@ private Mono>> triggerRestoreWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .triggerRestore( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - parameters, - accept, - context); + return service.triggerRestore(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupInstanceName, parameters, accept, + context); } /** * Triggers restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2446,26 +2498,18 @@ private Mono>> triggerRestoreWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationJobExtendedInfoInner> - beginTriggerRestoreAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, + beginTriggerRestoreAsync(String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters) { - Mono>> mono = - triggerRestoreWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OperationJobExtendedInfoInner.class, - OperationJobExtendedInfoInner.class, - this.client.getContext()); + Mono>> mono + = triggerRestoreWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, + this.client.getContext()); } /** * Triggers restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2478,28 +2522,19 @@ private Mono>> triggerRestoreWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationJobExtendedInfoInner> - beginTriggerRestoreAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRestoreRequest parameters, - Context context) { + beginTriggerRestoreAsync(String resourceGroupName, String vaultName, String backupInstanceName, + AzureBackupRestoreRequest parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - triggerRestoreWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OperationJobExtendedInfoInner.class, - OperationJobExtendedInfoInner.class, - context); + Mono>> mono + = triggerRestoreWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, + context); } /** * Triggers restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2512,14 +2547,13 @@ private Mono>> triggerRestoreWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationJobExtendedInfoInner> beginTriggerRestore( String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters) { - return this - .beginTriggerRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters) + return this.beginTriggerRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters) .getSyncPoller(); } /** * Triggers restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2532,19 +2566,15 @@ public SyncPoller, OperationJobExtende */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationJobExtendedInfoInner> beginTriggerRestore( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRestoreRequest parameters, + String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters, Context context) { - return this - .beginTriggerRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) + return this.beginTriggerRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) .getSyncPoller(); } /** * Triggers restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2555,16 +2585,15 @@ public SyncPoller, OperationJobExtende * @return operationJobExtendedInfo on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono triggerRestoreAsync( - String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters) { - return beginTriggerRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters) - .last() + private Mono triggerRestoreAsync(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupRestoreRequest parameters) { + return beginTriggerRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Triggers restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2576,20 +2605,15 @@ private Mono triggerRestoreAsync( * @return operationJobExtendedInfo on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono triggerRestoreAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRestoreRequest parameters, - Context context) { - return beginTriggerRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) - .last() + private Mono triggerRestoreAsync(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupRestoreRequest parameters, Context context) { + return beginTriggerRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Triggers restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2600,14 +2624,14 @@ private Mono triggerRestoreAsync( * @return operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationJobExtendedInfoInner triggerRestore( - String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters) { + public OperationJobExtendedInfoInner triggerRestore(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupRestoreRequest parameters) { return triggerRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters).block(); } /** * Triggers restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2619,18 +2643,14 @@ public OperationJobExtendedInfoInner triggerRestore( * @return operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationJobExtendedInfoInner triggerRestore( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRestoreRequest parameters, - Context context) { + public OperationJobExtendedInfoInner triggerRestore(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupRestoreRequest parameters, Context context) { return triggerRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).block(); } /** * This operation will resume backups for backup instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2640,19 +2660,15 @@ public OperationJobExtendedInfoInner triggerRestore( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resumeBackupsWithResponseAsync( - String resourceGroupName, String vaultName, String backupInstanceName) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2667,24 +2683,14 @@ private Mono>> resumeBackupsWithResponseAsync( } 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)) + .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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2695,19 +2701,15 @@ private Mono>> resumeBackupsWithResponseAsync( * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2722,21 +2724,13 @@ private Mono>> resumeBackupsWithResponseAsync( } 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); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2746,19 +2740,17 @@ private Mono>> resumeBackupsWithResponseAsync( * @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()); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2769,19 +2761,18 @@ private PollerFlux, Void> beginResumeBackupsAsync( * @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) { + 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); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2791,14 +2782,14 @@ private PollerFlux, Void> beginResumeBackupsAsync( * @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) { + public SyncPoller, Void> beginResumeBackups(String resourceGroupName, String vaultName, + String backupInstanceName) { return this.beginResumeBackupsAsync(resourceGroupName, vaultName, backupInstanceName).getSyncPoller(); } /** * This operation will resume backups for backup instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2809,14 +2800,14 @@ public SyncPoller, Void> beginResumeBackups( * @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) { + public SyncPoller, Void> beginResumeBackups(String resourceGroupName, String vaultName, + String backupInstanceName, Context context) { return this.beginResumeBackupsAsync(resourceGroupName, vaultName, backupInstanceName, context).getSyncPoller(); } /** * This operation will resume backups for backup instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2827,14 +2818,13 @@ public SyncPoller, Void> beginResumeBackups( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono resumeBackupsAsync(String resourceGroupName, String vaultName, String backupInstanceName) { - return beginResumeBackupsAsync(resourceGroupName, vaultName, backupInstanceName) - .last() + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2845,16 +2835,15 @@ private Mono resumeBackupsAsync(String resourceGroupName, String vaultName * @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() + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2869,7 +2858,7 @@ public void resumeBackups(String resourceGroupName, String vaultName, String bac /** * This operation will resume backups for backup instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2885,7 +2874,7 @@ public void resumeBackups(String resourceGroupName, String vaultName, String bac /** * This operation will resume protection for a stopped backup instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2895,19 +2884,15 @@ public void resumeBackups(String resourceGroupName, String vaultName, String bac * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resumeProtectionWithResponseAsync( - String resourceGroupName, String vaultName, String backupInstanceName) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2922,24 +2907,14 @@ private Mono>> resumeProtectionWithResponseAsync( } 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)) + .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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -2950,19 +2925,15 @@ private Mono>> resumeProtectionWithResponseAsync( * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2977,21 +2948,13 @@ private Mono>> resumeProtectionWithResponseAsync( } 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); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3001,19 +2964,17 @@ private Mono>> resumeProtectionWithResponseAsync( * @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()); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3024,19 +2985,18 @@ private PollerFlux, Void> beginResumeProtectionAsync( * @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) { + 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); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3046,14 +3006,14 @@ private PollerFlux, Void> beginResumeProtectionAsync( * @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) { + public SyncPoller, Void> beginResumeProtection(String resourceGroupName, String vaultName, + String backupInstanceName) { return this.beginResumeProtectionAsync(resourceGroupName, vaultName, backupInstanceName).getSyncPoller(); } /** * This operation will resume protection for a stopped backup instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3064,16 +3024,15 @@ public SyncPoller, Void> beginResumeProtection( * @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 this - .beginResumeProtectionAsync(resourceGroupName, vaultName, backupInstanceName, context) + public SyncPoller, Void> beginResumeProtection(String resourceGroupName, String vaultName, + String backupInstanceName, Context context) { + return this.beginResumeProtectionAsync(resourceGroupName, vaultName, backupInstanceName, context) .getSyncPoller(); } /** * This operation will resume protection for a stopped backup instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3084,14 +3043,13 @@ public SyncPoller, Void> beginResumeProtection( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono resumeProtectionAsync(String resourceGroupName, String vaultName, String backupInstanceName) { - return beginResumeProtectionAsync(resourceGroupName, vaultName, backupInstanceName) - .last() + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3102,16 +3060,15 @@ private Mono resumeProtectionAsync(String resourceGroupName, String vaultN * @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() + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3126,7 +3083,7 @@ public void resumeProtection(String resourceGroupName, String vaultName, String /** * This operation will resume protection for a stopped backup instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3136,14 +3093,14 @@ public void resumeProtection(String resourceGroupName, String vaultName, String * @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) { + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3153,19 +3110,15 @@ public void resumeProtection( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopProtectionWithResponseAsync( - String resourceGroupName, String vaultName, String backupInstanceName) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3180,24 +3133,14 @@ private Mono>> stopProtectionWithResponseAsync( } 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)) + .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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3208,19 +3151,15 @@ private Mono>> stopProtectionWithResponseAsync( * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3235,21 +3174,13 @@ private Mono>> stopProtectionWithResponseAsync( } 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); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3259,19 +3190,17 @@ private Mono>> stopProtectionWithResponseAsync( * @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()); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3282,19 +3211,18 @@ private PollerFlux, Void> beginStopProtectionAsync( * @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) { + 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); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3304,14 +3232,14 @@ private PollerFlux, Void> beginStopProtectionAsync( * @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) { + public SyncPoller, Void> beginStopProtection(String resourceGroupName, String vaultName, + String backupInstanceName) { return this.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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3322,14 +3250,14 @@ public SyncPoller, Void> beginStopProtection( * @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) { + public SyncPoller, Void> beginStopProtection(String resourceGroupName, String vaultName, + String backupInstanceName, Context context) { return this.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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3340,14 +3268,13 @@ public SyncPoller, Void> beginStopProtection( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopProtectionAsync(String resourceGroupName, String vaultName, String backupInstanceName) { - return beginStopProtectionAsync(resourceGroupName, vaultName, backupInstanceName) - .last() + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3358,16 +3285,15 @@ private Mono stopProtectionAsync(String resourceGroupName, String vaultNam * @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() + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3382,7 +3308,7 @@ public void stopProtection(String resourceGroupName, String vaultName, String ba /** * This operation will stop protection of a backup instance and data will be held forever. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3399,7 +3325,7 @@ public void stopProtection(String resourceGroupName, String vaultName, String ba /** * This operation will stop backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained forever). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3409,19 +3335,15 @@ public void stopProtection(String resourceGroupName, String vaultName, String ba * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> suspendBackupsWithResponseAsync( - String resourceGroupName, String vaultName, String backupInstanceName) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3436,25 +3358,15 @@ private Mono>> suspendBackupsWithResponseAsync( } 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)) + .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 backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained forever). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3465,19 +3377,15 @@ private Mono>> suspendBackupsWithResponseAsync( * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3492,22 +3400,14 @@ private Mono>> suspendBackupsWithResponseAsync( } 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); + return service.suspendBackups(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + vaultName, backupInstanceName, this.client.getApiVersion(), accept, context); } /** * This operation will stop backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained forever). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3517,20 +3417,18 @@ private Mono>> suspendBackupsWithResponseAsync( * @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()); + 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 backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained forever). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3541,20 +3439,19 @@ private PollerFlux, Void> beginSuspendBackupsAsync( * @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) { + 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); + Mono>> mono + = suspendBackupsWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * This operation will stop backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained forever). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3564,15 +3461,15 @@ private PollerFlux, Void> beginSuspendBackupsAsync( * @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) { + public SyncPoller, Void> beginSuspendBackups(String resourceGroupName, String vaultName, + String backupInstanceName) { return this.beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName).getSyncPoller(); } /** * This operation will stop backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained forever). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3583,15 +3480,15 @@ public SyncPoller, Void> beginSuspendBackups( * @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) { + public SyncPoller, Void> beginSuspendBackups(String resourceGroupName, String vaultName, + String backupInstanceName, Context context) { return this.beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName, context).getSyncPoller(); } /** * This operation will stop backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained forever). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3602,15 +3499,14 @@ public SyncPoller, Void> beginSuspendBackups( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono suspendBackupsAsync(String resourceGroupName, String vaultName, String backupInstanceName) { - return beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName) - .last() + return beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * This operation will stop backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained forever). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3621,17 +3517,16 @@ private Mono suspendBackupsAsync(String resourceGroupName, String vaultNam * @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() + 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 backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained forever). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3647,7 +3542,7 @@ public void suspendBackups(String resourceGroupName, String vaultName, String ba /** * This operation will stop backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained forever). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3662,9 +3557,9 @@ public void suspendBackups(String resourceGroupName, String vaultName, String ba } /** - * Sync backup instance again in case of failure This action will retry last failed operation and will bring backup - * instance to valid state. - * + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3675,19 +3570,15 @@ public void suspendBackups(String resourceGroupName, String vaultName, String ba * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3707,26 +3598,16 @@ private Mono>> syncBackupInstanceWithResponseAsync( } 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)) + .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. - * + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3738,23 +3619,15 @@ private Mono>> syncBackupInstanceWithResponseAsync( * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3774,23 +3647,14 @@ private Mono>> syncBackupInstanceWithResponseAsync( } 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); + 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. - * + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3801,20 +3665,18 @@ private Mono>> syncBackupInstanceWithResponseAsync( * @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()); + 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. - * + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3826,24 +3688,19 @@ private PollerFlux, Void> beginSyncBackupInstanceAsync( * @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) { + 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); + 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. - * + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3854,17 +3711,16 @@ private PollerFlux, Void> beginSyncBackupInstanceAsync( * @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 this - .beginSyncBackupInstanceAsync(resourceGroupName, vaultName, backupInstanceName, parameters) + public SyncPoller, Void> beginSyncBackupInstance(String resourceGroupName, String vaultName, + String backupInstanceName, SyncBackupInstanceRequest parameters) { + return this.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. - * + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3876,21 +3732,16 @@ public SyncPoller, Void> beginSyncBackupInstance( * @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 this - .beginSyncBackupInstanceAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) + public SyncPoller, Void> beginSyncBackupInstance(String resourceGroupName, String vaultName, + String backupInstanceName, SyncBackupInstanceRequest parameters, Context context) { + return this.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. - * + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3901,17 +3752,16 @@ public SyncPoller, Void> beginSyncBackupInstance( * @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() + 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. - * + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3923,21 +3773,16 @@ private Mono syncBackupInstanceAsync( * @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) { + 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); + .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. - * + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3947,15 +3792,15 @@ private Mono syncBackupInstanceAsync( * @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) { + 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. - * + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3966,18 +3811,14 @@ public void syncBackupInstance( * @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) { + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -3988,22 +3829,15 @@ public void syncBackupInstance( * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -4023,25 +3857,15 @@ private Mono>> validateForRestoreWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .validateForRestore( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - parameters, - accept, - context)) + .withContext(context -> service.validateForRestore(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupInstanceName, parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Validates if Restore can be triggered for a DataSource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -4053,23 +3877,15 @@ private Mono>> validateForRestoreWithResponseAsync( * @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, - Context context) { + private Mono>> validateForRestoreWithResponseAsync(String resourceGroupName, + String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -4089,22 +3905,14 @@ private Mono>> validateForRestoreWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .validateForRestore( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - parameters, - accept, - context); + return service.validateForRestore(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupInstanceName, parameters, accept, + context); } /** * Validates if Restore can be triggered for a DataSource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -4116,26 +3924,18 @@ private Mono>> validateForRestoreWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationJobExtendedInfoInner> - beginValidateForRestoreAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, + beginValidateForRestoreAsync(String resourceGroupName, String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters) { - Mono>> mono = - validateForRestoreWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OperationJobExtendedInfoInner.class, - OperationJobExtendedInfoInner.class, - this.client.getContext()); + Mono>> mono + = validateForRestoreWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, + this.client.getContext()); } /** * Validates if Restore can be triggered for a DataSource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -4148,28 +3948,19 @@ private Mono>> validateForRestoreWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OperationJobExtendedInfoInner> - beginValidateForRestoreAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - ValidateRestoreRequestObject parameters, - Context context) { + beginValidateForRestoreAsync(String resourceGroupName, String vaultName, String backupInstanceName, + ValidateRestoreRequestObject parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - validateForRestoreWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OperationJobExtendedInfoInner.class, - OperationJobExtendedInfoInner.class, - context); + Mono>> mono = validateForRestoreWithResponseAsync(resourceGroupName, vaultName, + backupInstanceName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, + context); } /** * Validates if Restore can be triggered for a DataSource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -4181,18 +3972,15 @@ private Mono>> validateForRestoreWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationJobExtendedInfoInner> beginValidateForRestore( - String resourceGroupName, - String vaultName, - String backupInstanceName, + String resourceGroupName, String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters) { - return this - .beginValidateForRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters) + return this.beginValidateForRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters) .getSyncPoller(); } /** * Validates if Restore can be triggered for a DataSource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -4205,19 +3993,15 @@ public SyncPoller, OperationJobExtende */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OperationJobExtendedInfoInner> beginValidateForRestore( - String resourceGroupName, - String vaultName, - String backupInstanceName, - ValidateRestoreRequestObject parameters, + String resourceGroupName, String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters, Context context) { - return this - .beginValidateForRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) + return this.beginValidateForRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) .getSyncPoller(); } /** * Validates if Restore can be triggered for a DataSource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -4228,19 +4012,15 @@ public SyncPoller, OperationJobExtende * @return operationJobExtendedInfo on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateForRestoreAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - ValidateRestoreRequestObject parameters) { - return beginValidateForRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters) - .last() + private Mono validateForRestoreAsync(String resourceGroupName, String vaultName, + String backupInstanceName, ValidateRestoreRequestObject parameters) { + return beginValidateForRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Validates if Restore can be triggered for a DataSource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -4252,20 +4032,15 @@ private Mono validateForRestoreAsync( * @return operationJobExtendedInfo on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateForRestoreAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - ValidateRestoreRequestObject parameters, - Context context) { + private Mono validateForRestoreAsync(String resourceGroupName, String vaultName, + String backupInstanceName, ValidateRestoreRequestObject parameters, Context context) { return beginValidateForRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** * Validates if Restore can be triggered for a DataSource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -4276,17 +4051,14 @@ private Mono validateForRestoreAsync( * @return operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationJobExtendedInfoInner validateForRestore( - String resourceGroupName, - String vaultName, - String backupInstanceName, - ValidateRestoreRequestObject parameters) { + public OperationJobExtendedInfoInner validateForRestore(String resourceGroupName, String vaultName, + String backupInstanceName, ValidateRestoreRequestObject parameters) { return validateForRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters).block(); } /** * Validates if Restore can be triggered for a DataSource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -4298,20 +4070,17 @@ public OperationJobExtendedInfoInner validateForRestore( * @return operationJobExtendedInfo. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationJobExtendedInfoInner validateForRestore( - String resourceGroupName, - String vaultName, - String backupInstanceName, - ValidateRestoreRequestObject parameters, - Context context) { + public OperationJobExtendedInfoInner validateForRestore(String resourceGroupName, String vaultName, + String backupInstanceName, ValidateRestoreRequestObject parameters, Context context) { return validateForRestoreAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -4323,31 +4092,22 @@ private Mono> listNextSinglePageAsync 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.")); + 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)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -4360,23 +4120,13 @@ private Mono> listNextSinglePageAsync 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.")); + 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)); + 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/BackupInstancesImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesImpl.java index e57967c90d92..4467dd44a0de 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 @@ -16,9 +16,11 @@ import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest; import com.azure.resourcemanager.dataprotection.models.BackupInstanceResource; import com.azure.resourcemanager.dataprotection.models.BackupInstances; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreRequestObject; 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.ValidateCrossRegionRestoreRequestObject; import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest; import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject; @@ -29,8 +31,7 @@ public final class BackupInstancesImpl implements BackupInstances { private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public BackupInstancesImpl( - BackupInstancesClient innerClient, + public BackupInstancesImpl(BackupInstancesClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -42,20 +43,17 @@ public PagedIterable list(String resourceGroupName, Stri } public PagedIterable list(String resourceGroupName, String vaultName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, vaultName, context); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, vaultName, context); return Utils.mapPage(inner, inner1 -> new BackupInstanceResourceImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String vaultName, String backupInstanceName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, vaultName, backupInstanceName, context); + public Response getWithResponse(String resourceGroupName, String vaultName, + String backupInstanceName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, vaultName, backupInstanceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new BackupInstanceResourceImpl(inner.getValue(), this.manager())); } else { return null; @@ -79,10 +77,10 @@ public void delete(String resourceGroupName, String vaultName, String backupInst this.serviceClient().delete(resourceGroupName, vaultName, backupInstanceName, context); } - public OperationJobExtendedInfo adhocBackup( - String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters) { - OperationJobExtendedInfoInner inner = - this.serviceClient().adhocBackup(resourceGroupName, vaultName, backupInstanceName, parameters); + public OperationJobExtendedInfo adhocBackup(String resourceGroupName, String vaultName, String backupInstanceName, + TriggerBackupRequest parameters) { + OperationJobExtendedInfoInner inner + = this.serviceClient().adhocBackup(resourceGroupName, vaultName, backupInstanceName, parameters); if (inner != null) { return new OperationJobExtendedInfoImpl(inner, this.manager()); } else { @@ -90,14 +88,10 @@ public OperationJobExtendedInfo adhocBackup( } } - public OperationJobExtendedInfo adhocBackup( - String resourceGroupName, - String vaultName, - String backupInstanceName, - TriggerBackupRequest parameters, - Context context) { - OperationJobExtendedInfoInner inner = - this.serviceClient().adhocBackup(resourceGroupName, vaultName, backupInstanceName, parameters, context); + public OperationJobExtendedInfo adhocBackup(String resourceGroupName, String vaultName, String backupInstanceName, + TriggerBackupRequest parameters, Context context) { + OperationJobExtendedInfoInner inner + = this.serviceClient().adhocBackup(resourceGroupName, vaultName, backupInstanceName, parameters, context); if (inner != null) { return new OperationJobExtendedInfoImpl(inner, this.manager()); } else { @@ -105,10 +99,10 @@ public OperationJobExtendedInfo adhocBackup( } } - public OperationJobExtendedInfo validateForBackup( - String resourceGroupName, String vaultName, ValidateForBackupRequest parameters) { - OperationJobExtendedInfoInner inner = - this.serviceClient().validateForBackup(resourceGroupName, vaultName, parameters); + public OperationJobExtendedInfo validateForBackup(String resourceGroupName, String vaultName, + ValidateForBackupRequest parameters) { + OperationJobExtendedInfoInner inner + = this.serviceClient().validateForBackup(resourceGroupName, vaultName, parameters); if (inner != null) { return new OperationJobExtendedInfoImpl(inner, this.manager()); } else { @@ -116,10 +110,10 @@ public OperationJobExtendedInfo validateForBackup( } } - public OperationJobExtendedInfo validateForBackup( - String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, Context context) { - OperationJobExtendedInfoInner inner = - this.serviceClient().validateForBackup(resourceGroupName, vaultName, parameters, context); + public OperationJobExtendedInfo validateForBackup(String resourceGroupName, String vaultName, + ValidateForBackupRequest parameters, Context context) { + OperationJobExtendedInfoInner inner + = this.serviceClient().validateForBackup(resourceGroupName, vaultName, parameters, context); if (inner != null) { return new OperationJobExtendedInfoImpl(inner, this.manager()); } else { @@ -127,30 +121,22 @@ public OperationJobExtendedInfo validateForBackup( } } - public Response getBackupInstanceOperationResultWithResponse( - String resourceGroupName, String vaultName, String backupInstanceName, String operationId, Context context) { - Response inner = - this - .serviceClient() - .getBackupInstanceOperationResultWithResponse( - resourceGroupName, vaultName, backupInstanceName, operationId, context); + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new BackupInstanceResourceImpl(inner.getValue(), this.manager())); } else { return null; } } - public BackupInstanceResource getBackupInstanceOperationResult( - String resourceGroupName, String vaultName, String backupInstanceName, String operationId) { - BackupInstanceResourceInner inner = - this - .serviceClient() - .getBackupInstanceOperationResult(resourceGroupName, vaultName, backupInstanceName, operationId); + 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 { @@ -158,27 +144,64 @@ public BackupInstanceResource getBackupInstanceOperationResult( } } - public void triggerRehydrate( - String resourceGroupName, - String vaultName, - String backupInstanceName, + public OperationJobExtendedInfo triggerCrossRegionRestore(String resourceGroupName, String location, + CrossRegionRestoreRequestObject parameters) { + OperationJobExtendedInfoInner inner + = this.serviceClient().triggerCrossRegionRestore(resourceGroupName, location, parameters); + if (inner != null) { + return new OperationJobExtendedInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationJobExtendedInfo triggerCrossRegionRestore(String resourceGroupName, String location, + CrossRegionRestoreRequestObject parameters, Context context) { + OperationJobExtendedInfoInner inner + = this.serviceClient().triggerCrossRegionRestore(resourceGroupName, location, parameters, context); + if (inner != null) { + return new OperationJobExtendedInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationJobExtendedInfo validateCrossRegionRestore(String resourceGroupName, String location, + ValidateCrossRegionRestoreRequestObject parameters) { + OperationJobExtendedInfoInner inner + = this.serviceClient().validateCrossRegionRestore(resourceGroupName, location, parameters); + if (inner != null) { + return new OperationJobExtendedInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationJobExtendedInfo validateCrossRegionRestore(String resourceGroupName, String location, + ValidateCrossRegionRestoreRequestObject parameters, Context context) { + OperationJobExtendedInfoInner inner + = this.serviceClient().validateCrossRegionRestore(resourceGroupName, location, parameters, context); + if (inner != null) { + return new OperationJobExtendedInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public void triggerRehydrate(String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRehydrationRequest parameters) { this.serviceClient().triggerRehydrate(resourceGroupName, vaultName, backupInstanceName, parameters); } - public void triggerRehydrate( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRehydrationRequest parameters, - Context context) { + public void triggerRehydrate(String resourceGroupName, String vaultName, String backupInstanceName, + AzureBackupRehydrationRequest parameters, Context context) { this.serviceClient().triggerRehydrate(resourceGroupName, vaultName, backupInstanceName, parameters, context); } - public OperationJobExtendedInfo triggerRestore( - String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters) { - OperationJobExtendedInfoInner inner = - this.serviceClient().triggerRestore(resourceGroupName, vaultName, backupInstanceName, parameters); + public OperationJobExtendedInfo triggerRestore(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupRestoreRequest parameters) { + OperationJobExtendedInfoInner inner + = this.serviceClient().triggerRestore(resourceGroupName, vaultName, backupInstanceName, parameters); if (inner != null) { return new OperationJobExtendedInfoImpl(inner, this.manager()); } else { @@ -186,14 +209,10 @@ public OperationJobExtendedInfo triggerRestore( } } - public OperationJobExtendedInfo triggerRestore( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRestoreRequest parameters, - Context context) { - OperationJobExtendedInfoInner inner = - this.serviceClient().triggerRestore(resourceGroupName, vaultName, backupInstanceName, parameters, context); + public OperationJobExtendedInfo triggerRestore(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupRestoreRequest parameters, Context context) { + OperationJobExtendedInfoInner inner = this.serviceClient().triggerRestore(resourceGroupName, vaultName, + backupInstanceName, parameters, context); if (inner != null) { return new OperationJobExtendedInfoImpl(inner, this.manager()); } else { @@ -213,8 +232,8 @@ public void resumeProtection(String resourceGroupName, String vaultName, String this.serviceClient().resumeProtection(resourceGroupName, vaultName, backupInstanceName); } - public void resumeProtection( - String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + public void resumeProtection(String resourceGroupName, String vaultName, String backupInstanceName, + Context context) { this.serviceClient().resumeProtection(resourceGroupName, vaultName, backupInstanceName, context); } @@ -234,27 +253,20 @@ public void suspendBackups(String resourceGroupName, String vaultName, String ba this.serviceClient().suspendBackups(resourceGroupName, vaultName, backupInstanceName, context); } - public void syncBackupInstance( - String resourceGroupName, String vaultName, String backupInstanceName, SyncBackupInstanceRequest parameters) { + 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) { + 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(resourceGroupName, vaultName, backupInstanceName, parameters); + public OperationJobExtendedInfo validateForRestore(String resourceGroupName, String vaultName, + String backupInstanceName, ValidateRestoreRequestObject parameters) { + OperationJobExtendedInfoInner inner + = this.serviceClient().validateForRestore(resourceGroupName, vaultName, backupInstanceName, parameters); if (inner != null) { return new OperationJobExtendedInfoImpl(inner, this.manager()); } else { @@ -262,16 +274,10 @@ public OperationJobExtendedInfo validateForRestore( } } - public OperationJobExtendedInfo validateForRestore( - String resourceGroupName, - String vaultName, - String backupInstanceName, - ValidateRestoreRequestObject parameters, - Context context) { - OperationJobExtendedInfoInner inner = - this - .serviceClient() - .validateForRestore(resourceGroupName, vaultName, backupInstanceName, parameters, context); + public OperationJobExtendedInfo validateForRestore(String resourceGroupName, String vaultName, + String backupInstanceName, ValidateRestoreRequestObject parameters, Context context) { + OperationJobExtendedInfoInner inner = this.serviceClient().validateForRestore(resourceGroupName, vaultName, + backupInstanceName, parameters, context); if (inner != null) { return new OperationJobExtendedInfoImpl(inner, this.manager()); } else { @@ -282,26 +288,18 @@ public OperationJobExtendedInfo validateForRestore( public BackupInstanceResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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))); + 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 - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'backupInstances'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupInstances'.", id))); } return this.getWithResponse(resourceGroupName, vaultName, backupInstanceName, Context.NONE).getValue(); } @@ -309,26 +307,18 @@ public BackupInstanceResource getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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))); + 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 - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'backupInstances'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupInstances'.", id))); } return this.getWithResponse(resourceGroupName, vaultName, backupInstanceName, context); } @@ -336,26 +326,18 @@ public Response getByIdWithResponse(String id, Context c public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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))); + 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 - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'backupInstances'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupInstances'.", id))); } this.delete(resourceGroupName, vaultName, backupInstanceName, Context.NONE); } @@ -363,26 +345,18 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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))); + 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 - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'backupInstances'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupInstances'.", id))); } this.delete(resourceGroupName, vaultName, backupInstanceName, context); } 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 ab36936cc1c3..e61689caccc2 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 @@ -33,106 +33,90 @@ import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicyResourceList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in BackupPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in BackupPoliciesClient. + */ public final class BackupPoliciesClientImpl implements BackupPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final BackupPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DataProtectionClientImpl client; /** * Initializes an instance of BackupPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ BackupPoliciesClientImpl(DataProtectionClientImpl client) { - this.service = - RestProxy.create(BackupPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(BackupPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for DataProtectionClientBackupPolicies to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for DataProtectionClientBackupPolicies to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface BackupPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}") - @ExpectedResponses({200}) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, - @PathParam("backupPolicyName") String backupPolicyName, - @HeaderParam("Accept") String accept, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("backupPolicyName") String backupPolicyName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @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, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, - @PathParam("backupPolicyName") String backupPolicyName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("backupPolicyName") String backupPolicyName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Returns list of backup policies belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -141,19 +125,15 @@ Mono> listNext( * @return baseBackupPolicyResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String vaultName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String vaultName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -164,32 +144,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, 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())); } /** * Returns list of backup policies belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -199,19 +163,15 @@ private Mono> listSinglePageAsync( * @return baseBackupPolicyResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String vaultName, Context context) { + private Mono> listSinglePageAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -223,28 +183,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns list of backup policies belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -254,13 +201,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String vaultName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, vaultName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Returns list of backup policies belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -270,16 +217,15 @@ private PagedFlux listAsync(String resourceGroupN * @return baseBackupPolicyResourceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String vaultName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, vaultName, context), + private PagedFlux listAsync(String resourceGroupName, String vaultName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Returns list of backup policies belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -294,7 +240,7 @@ public PagedIterable list(String resourceGroupNam /** * Returns list of backup policies belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -304,14 +250,14 @@ public PagedIterable list(String resourceGroupNam * @return baseBackupPolicyResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String vaultName, Context context) { + public PagedIterable list(String resourceGroupName, String vaultName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, vaultName, context)); } /** * Gets a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -319,22 +265,18 @@ public PagedIterable list( * @throws 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 along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String vaultName, String backupPolicyName) { + private Mono> getWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -349,24 +291,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupPolicyName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupPolicyName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -375,22 +307,18 @@ private Mono> getWithResponseAsync( * @throws 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 along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String vaultName, String backupPolicyName, Context context) { + private Mono> getWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -405,21 +333,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupPolicyName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, backupPolicyName, accept, context); } /** * Gets a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -429,15 +349,15 @@ private Mono> getWithResponseAsync( * @return a backup policy belonging to a backup vault on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String vaultName, String backupPolicyName) { + private Mono getAsync(String resourceGroupName, String vaultName, + String backupPolicyName) { return getWithResponseAsync(resourceGroupName, vaultName, backupPolicyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -448,14 +368,14 @@ private Mono getAsync( * @return a backup policy belonging to a backup vault along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String vaultName, String backupPolicyName, Context context) { + public Response getWithResponse(String resourceGroupName, String vaultName, + String backupPolicyName, Context context) { return getWithResponseAsync(resourceGroupName, vaultName, backupPolicyName, context).block(); } /** * Gets a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -471,7 +391,7 @@ public BaseBackupPolicyResourceInner get(String resourceGroupName, String vaultN /** * Creates or Updates a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName Name of the policy. @@ -482,19 +402,15 @@ public BaseBackupPolicyResourceInner get(String resourceGroupName, String vaultN * @return baseBackupPolicyResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String vaultName, String backupPolicyName, BaseBackupPolicyResourceInner parameters) { + private Mono> createOrUpdateWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -514,25 +430,15 @@ private Mono> createOrUpdateWithResponse } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupPolicyName, - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupPolicyName, parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or Updates a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName Name of the policy. @@ -544,23 +450,15 @@ private Mono> createOrUpdateWithResponse * @return baseBackupPolicyResource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String vaultName, - String backupPolicyName, - BaseBackupPolicyResourceInner parameters, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String vaultName, String backupPolicyName, BaseBackupPolicyResourceInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -580,22 +478,14 @@ private Mono> createOrUpdateWithResponse } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupPolicyName, - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupPolicyName, parameters, accept, + context); } /** * Creates or Updates a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName Name of the policy. @@ -606,15 +496,15 @@ private Mono> createOrUpdateWithResponse * @return baseBackupPolicyResource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String vaultName, String backupPolicyName, BaseBackupPolicyResourceInner parameters) { + private Mono createOrUpdateAsync(String resourceGroupName, String vaultName, + String backupPolicyName, BaseBackupPolicyResourceInner parameters) { return createOrUpdateWithResponseAsync(resourceGroupName, vaultName, backupPolicyName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or Updates a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName Name of the policy. @@ -626,19 +516,15 @@ private Mono createOrUpdateAsync( * @return baseBackupPolicyResource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String vaultName, - String backupPolicyName, - BaseBackupPolicyResourceInner parameters, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, + String vaultName, String backupPolicyName, BaseBackupPolicyResourceInner parameters, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, vaultName, backupPolicyName, parameters, context) .block(); } /** * Creates or Updates a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName Name of the policy. @@ -649,15 +535,15 @@ public Response createOrUpdateWithResponse( * @return baseBackupPolicyResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BaseBackupPolicyResourceInner createOrUpdate( - String resourceGroupName, String vaultName, String backupPolicyName, BaseBackupPolicyResourceInner parameters) { + public BaseBackupPolicyResourceInner createOrUpdate(String resourceGroupName, String vaultName, + String backupPolicyName, BaseBackupPolicyResourceInner parameters) { return createOrUpdateWithResponse(resourceGroupName, vaultName, backupPolicyName, parameters, Context.NONE) .getValue(); } /** * Deletes a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -667,19 +553,15 @@ public BaseBackupPolicyResourceInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String vaultName, String backupPolicyName) { + private Mono> deleteWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -694,24 +576,14 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupPolicyName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupPolicyName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -722,19 +594,15 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String vaultName, String backupPolicyName, Context context) { + private Mono> deleteWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -749,21 +617,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupPolicyName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, backupPolicyName, accept, context); } /** * Deletes a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -779,7 +639,7 @@ private Mono deleteAsync(String resourceGroupName, String vaultName, Strin /** * Deletes a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -790,14 +650,14 @@ private Mono deleteAsync(String resourceGroupName, String vaultName, Strin * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String vaultName, String backupPolicyName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String vaultName, String backupPolicyName, + Context context) { return deleteWithResponseAsync(resourceGroupName, vaultName, backupPolicyName, context).block(); } /** * Deletes a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -812,9 +672,10 @@ public void delete(String resourceGroupName, String vaultName, String backupPoli /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -826,31 +687,22 @@ private Mono> listNextSinglePageAsy 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.")); + 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)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -858,29 +710,19 @@ private Mono> listNextSinglePageAsy * @return baseBackupPolicyResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + 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.")); + 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)); + 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/BackupPoliciesImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesImpl.java index 7351212eddab..d018a222599b 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 @@ -21,8 +21,7 @@ public final class BackupPoliciesImpl implements BackupPolicies { private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public BackupPoliciesImpl( - BackupPoliciesClient innerClient, + public BackupPoliciesImpl(BackupPoliciesClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -34,20 +33,17 @@ public PagedIterable list(String resourceGroupName, St } public PagedIterable list(String resourceGroupName, String vaultName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, vaultName, context); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, vaultName, context); return Utils.mapPage(inner, inner1 -> new BaseBackupPolicyResourceImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String vaultName, String backupPolicyName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, vaultName, backupPolicyName, context); + public Response getWithResponse(String resourceGroupName, String vaultName, + String backupPolicyName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, vaultName, backupPolicyName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new BaseBackupPolicyResourceImpl(inner.getValue(), this.manager())); } else { return null; @@ -63,8 +59,8 @@ public BaseBackupPolicyResource get(String resourceGroupName, String vaultName, } } - public Response deleteWithResponse( - String resourceGroupName, String vaultName, String backupPolicyName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String vaultName, String backupPolicyName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, vaultName, backupPolicyName, context); } @@ -75,26 +71,18 @@ public void delete(String resourceGroupName, String vaultName, String backupPoli public BaseBackupPolicyResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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))); + 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 - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); } return this.getWithResponse(resourceGroupName, vaultName, backupPolicyName, Context.NONE).getValue(); } @@ -102,26 +90,18 @@ public BaseBackupPolicyResource getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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))); + 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 - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); } return this.getWithResponse(resourceGroupName, vaultName, backupPolicyName, context); } @@ -129,26 +109,18 @@ public Response getByIdWithResponse(String id, Context public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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))); + 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 - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); } this.deleteWithResponse(resourceGroupName, vaultName, backupPolicyName, Context.NONE); } @@ -156,26 +128,18 @@ public void deleteById(String id) { public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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))); + 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 - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id))); } return this.deleteWithResponse(resourceGroupName, vaultName, backupPolicyName, context); } 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 e147a197605c..698fb4970b57 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 @@ -25,24 +25,28 @@ import com.azure.resourcemanager.dataprotection.models.BackupVaultOperationResultsGetResponse; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in BackupVaultOperationResultsClient. */ +/** + * An instance of this class provides access to all the operations defined in BackupVaultOperationResultsClient. + */ public final class BackupVaultOperationResultsClientImpl implements BackupVaultOperationResultsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final BackupVaultOperationResultsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DataProtectionClientImpl client; /** * Initializes an instance of BackupVaultOperationResultsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ BackupVaultOperationResultsClientImpl(DataProtectionClientImpl client) { - this.service = - RestProxy - .create( - BackupVaultOperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(BackupVaultOperationResultsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -53,25 +57,19 @@ public final class BackupVaultOperationResultsClientImpl implements BackupVaultO @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface BackupVaultOperationResultsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/operationResults/{operationId}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/operationResults/{operationId}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, - @PathParam("operationId") String operationId, - @HeaderParam("Accept") String accept, - Context context); + Mono get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); } /** * The get operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. @@ -81,19 +79,15 @@ Mono get( * @return backupVault Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync( - String resourceGroupName, String vaultName, String operationId) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -107,24 +101,14 @@ private Mono getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - operationId, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, operationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The get operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. @@ -135,19 +119,15 @@ private Mono getWithResponseAsync( * @return backupVault Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync( - String resourceGroupName, String vaultName, String operationId, Context context) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -161,21 +141,13 @@ private Mono getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - operationId, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, operationId, accept, context); } /** * The get operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. @@ -192,7 +164,7 @@ private Mono getAsync(String resourceGroupName, String /** * The get operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. @@ -203,14 +175,14 @@ private Mono getAsync(String resourceGroupName, String * @return backupVault Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupVaultOperationResultsGetResponse getWithResponse( - String resourceGroupName, String vaultName, String operationId, Context context) { + public BackupVaultOperationResultsGetResponse getWithResponse(String resourceGroupName, String vaultName, + String operationId, Context context) { return getWithResponseAsync(resourceGroupName, vaultName, operationId, context).block(); } /** * The get operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. 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 eab222c1f089..9369f80b32fd 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 @@ -21,22 +21,18 @@ public final class BackupVaultOperationResultsImpl implements BackupVaultOperati private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public BackupVaultOperationResultsImpl( - BackupVaultOperationResultsClient innerClient, + public BackupVaultOperationResultsImpl(BackupVaultOperationResultsClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String vaultName, String operationId, Context context) { - BackupVaultOperationResultsGetResponse inner = - this.serviceClient().getWithResponse(resourceGroupName, vaultName, operationId, context); + public Response getWithResponse(String resourceGroupName, String vaultName, String operationId, + Context context) { + BackupVaultOperationResultsGetResponse inner + = this.serviceClient().getWithResponse(resourceGroupName, vaultName, operationId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new BackupVaultResourceImpl(inner.getValue(), this.manager())); } else { return null; 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 30fcbc1aac1e..1bc0b1b7e2db 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 @@ -95,25 +95,19 @@ public BackupVaultResourceImpl withExistingResourceGroup(String resourceGroupNam } public BackupVaultResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getBackupVaults() - .createOrUpdate(resourceGroupName, vaultName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getBackupVaults().createOrUpdate(resourceGroupName, vaultName, + this.innerModel(), Context.NONE); return this; } public BackupVaultResource create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBackupVaults() - .createOrUpdate(resourceGroupName, vaultName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getBackupVaults().createOrUpdate(resourceGroupName, vaultName, + this.innerModel(), context); return this; } - BackupVaultResourceImpl( - String name, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + BackupVaultResourceImpl(String name, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = new BackupVaultResourceInner(); this.serviceManager = serviceManager; this.vaultName = name; @@ -125,25 +119,18 @@ public BackupVaultResourceImpl update() { } public BackupVaultResource apply() { - this.innerObject = - serviceManager - .serviceClient() - .getBackupVaults() - .update(resourceGroupName, vaultName, updateParameters, Context.NONE); + this.innerObject = serviceManager.serviceClient().getBackupVaults().update(resourceGroupName, vaultName, + updateParameters, Context.NONE); return this; } public BackupVaultResource apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBackupVaults() - .update(resourceGroupName, vaultName, updateParameters, context); + this.innerObject = serviceManager.serviceClient().getBackupVaults().update(resourceGroupName, vaultName, + updateParameters, context); return this; } - BackupVaultResourceImpl( - BackupVaultResourceInner innerObject, + BackupVaultResourceImpl(BackupVaultResourceInner innerObject, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -152,22 +139,14 @@ public BackupVaultResource apply(Context context) { } public BackupVaultResource refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getBackupVaults() - .getByResourceGroupWithResponse(resourceGroupName, vaultName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getBackupVaults() + .getByResourceGroupWithResponse(resourceGroupName, vaultName, Context.NONE).getValue(); return this; } public BackupVaultResource refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBackupVaults() - .getByResourceGroupWithResponse(resourceGroupName, vaultName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getBackupVaults() + .getByResourceGroupWithResponse(resourceGroupName, vaultName, context).getValue(); return this; } 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 effc191253ed..9778375f6f17 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 @@ -43,22 +43,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in BackupVaultsClient. */ +/** + * An instance of this class provides access to all the operations defined in BackupVaultsClient. + */ public final class BackupVaultsClientImpl implements BackupVaultsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final BackupVaultsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DataProtectionClientImpl client; /** * Initializes an instance of BackupVaultsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ BackupVaultsClientImpl(DataProtectionClientImpl client) { - this.service = - RestProxy.create(BackupVaultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(BackupVaultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -69,127 +75,90 @@ public final class BackupVaultsClientImpl implements BackupVaultsClient { @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface BackupVaultsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/backupVaults") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}") - @ExpectedResponses({200, 201}) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, - @BodyParam("application/json") BackupVaultResourceInner parameters, - @HeaderParam("Accept") String accept, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @BodyParam("application/json") BackupVaultResourceInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}") - @ExpectedResponses({200, 202}) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, - @BodyParam("application/json") PatchResourceRequestInput parameters, - @HeaderParam("Accept") String accept, + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @BodyParam("application/json") PatchResourceRequestInput parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/checkNameAvailability") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/checkNameAvailability") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, + Mono> checkNameAvailability(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @BodyParam("application/json") CheckNameAvailabilityRequest parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getInSubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getInResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Returns resource collection belonging to a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return backupVaultResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. @@ -197,43 +166,25 @@ Mono> getInResourceGroupNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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())); } /** * Returns resource collection belonging to a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -243,40 +194,25 @@ private Mono> listSinglePageAsync() { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns resource collection belonging to a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return backupVaultResourceList as paginated response with {@link PagedFlux}. @@ -288,7 +224,7 @@ private PagedFlux listAsync() { /** * Returns resource collection belonging to a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -297,13 +233,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> getInSubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> getInSubscriptionNextSinglePageAsync(nextLink, context)); } /** * Returns resource collection belonging to a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return backupVaultResourceList as paginated response with {@link PagedIterable}. @@ -315,7 +251,7 @@ public PagedIterable list() { /** * Returns resource collection belonging to a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -329,7 +265,7 @@ public PagedIterable list(Context context) { /** * Returns resource collection belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -339,48 +275,29 @@ public PagedIterable list(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), 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())); } /** * Returns resource collection belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -389,48 +306,32 @@ private Mono> listByResourceGroupSingleP * @return backupVaultResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + 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 - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName, + this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns resource collection belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -439,14 +340,13 @@ private Mono> listByResourceGroupSingleP */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> getInResourceGroupNextSinglePageAsync(nextLink)); } /** * Returns resource collection belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -456,14 +356,13 @@ private PagedFlux listByResourceGroupAsync(String reso */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> getInResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Returns resource collection belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -477,7 +376,7 @@ public PagedIterable listByResourceGroup(String resour /** * Returns resource collection belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -492,7 +391,7 @@ public PagedIterable listByResourceGroup(String resour /** * Returns a resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -501,19 +400,15 @@ public PagedIterable listByResourceGroup(String resour * @return backupVault Resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String vaultName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String vaultName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -524,23 +419,14 @@ private Mono> getByResourceGroupWithResponseA } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns a resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -550,19 +436,15 @@ private Mono> getByResourceGroupWithResponseA * @return backupVault Resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String vaultName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -573,20 +455,13 @@ private Mono> getByResourceGroupWithResponseA } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, accept, context); } /** * Returns a resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -602,7 +477,7 @@ private Mono getByResourceGroupAsync(String resourceGr /** * Returns a resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -612,14 +487,14 @@ private Mono getByResourceGroupAsync(String resourceGr * @return backupVault Resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String vaultName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String vaultName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, vaultName, context).block(); } /** * Returns a resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -634,7 +509,7 @@ public BackupVaultResourceInner getByResourceGroup(String resourceGroupName, Str /** * Creates or updates a BackupVault resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -644,19 +519,15 @@ public BackupVaultResourceInner getByResourceGroup(String resourceGroupName, Str * @return backupVault Resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String vaultName, BackupVaultResourceInner parameters) { + private Mono>> createOrUpdateWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -672,24 +543,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a BackupVault resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -700,19 +561,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return backupVault Resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String vaultName, BackupVaultResourceInner parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -728,21 +585,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, parameters, accept, context); } /** * Creates or updates a BackupVault resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -752,23 +601,18 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupVaultResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String vaultName, BackupVaultResourceInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, vaultName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BackupVaultResourceInner.class, - BackupVaultResourceInner.class, - this.client.getContext()); + private PollerFlux, BackupVaultResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String vaultName, BackupVaultResourceInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, vaultName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), BackupVaultResourceInner.class, BackupVaultResourceInner.class, + this.client.getContext()); } /** * Creates or updates a BackupVault resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -782,21 +626,15 @@ private PollerFlux, BackupVaultResourceInne private PollerFlux, BackupVaultResourceInner> beginCreateOrUpdateAsync( String resourceGroupName, String vaultName, BackupVaultResourceInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, vaultName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BackupVaultResourceInner.class, - BackupVaultResourceInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, vaultName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), BackupVaultResourceInner.class, BackupVaultResourceInner.class, context); } /** * Creates or updates a BackupVault resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -806,14 +644,14 @@ private PollerFlux, BackupVaultResourceInne * @return the {@link SyncPoller} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupVaultResourceInner> beginCreateOrUpdate( - String resourceGroupName, String vaultName, BackupVaultResourceInner parameters) { + public SyncPoller, BackupVaultResourceInner> + beginCreateOrUpdate(String resourceGroupName, String vaultName, BackupVaultResourceInner parameters) { return this.beginCreateOrUpdateAsync(resourceGroupName, vaultName, parameters).getSyncPoller(); } /** * Creates or updates a BackupVault resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -831,7 +669,7 @@ public SyncPoller, BackupVaultResourceInner /** * Creates or updates a BackupVault resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -841,16 +679,15 @@ public SyncPoller, BackupVaultResourceInner * @return backupVault Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String vaultName, BackupVaultResourceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, vaultName, parameters) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String vaultName, + BackupVaultResourceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, vaultName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a BackupVault resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -861,16 +698,15 @@ private Mono createOrUpdateAsync( * @return backupVault Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String vaultName, BackupVaultResourceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, vaultName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String vaultName, + BackupVaultResourceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, vaultName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a BackupVault resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -880,14 +716,14 @@ private Mono createOrUpdateAsync( * @return backupVault Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupVaultResourceInner createOrUpdate( - String resourceGroupName, String vaultName, BackupVaultResourceInner parameters) { + public BackupVaultResourceInner createOrUpdate(String resourceGroupName, String vaultName, + BackupVaultResourceInner parameters) { return createOrUpdateAsync(resourceGroupName, vaultName, parameters).block(); } /** * Creates or updates a BackupVault resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -898,14 +734,14 @@ public BackupVaultResourceInner createOrUpdate( * @return backupVault Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupVaultResourceInner createOrUpdate( - String resourceGroupName, String vaultName, BackupVaultResourceInner parameters, Context context) { + public BackupVaultResourceInner createOrUpdate(String resourceGroupName, String vaultName, + BackupVaultResourceInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, vaultName, parameters, context).block(); } /** * Deletes a BackupVault resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -916,16 +752,12 @@ public BackupVaultResourceInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String vaultName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -936,23 +768,14 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a BackupVault resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -962,19 +785,15 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String vaultName, Context context) { + private Mono>> deleteWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -985,20 +804,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, accept, context); } /** * Deletes a BackupVault resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1009,15 +821,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String vaultName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, vaultName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a BackupVault resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -1027,18 +837,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String vaultName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String vaultName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, vaultName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a BackupVault resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1053,7 +862,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a BackupVault resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -1069,7 +878,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a BackupVault resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1084,7 +893,7 @@ private Mono deleteAsync(String resourceGroupName, String vaultName) { /** * Deletes a BackupVault resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -1095,14 +904,13 @@ private Mono deleteAsync(String resourceGroupName, String vaultName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String vaultName, Context context) { - return beginDeleteAsync(resourceGroupName, vaultName, context) - .last() + return beginDeleteAsync(resourceGroupName, vaultName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a BackupVault resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1116,7 +924,7 @@ public void delete(String resourceGroupName, String vaultName) { /** * Deletes a BackupVault resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -1131,7 +939,7 @@ public void delete(String resourceGroupName, String vaultName, Context context) /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1141,19 +949,15 @@ public void delete(String resourceGroupName, String vaultName, Context context) * @return backupVault Resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String vaultName, PatchResourceRequestInput parameters) { + private Mono>> updateWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1169,24 +973,14 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1197,19 +991,15 @@ private Mono>> updateWithResponseAsync( * @return backupVault Resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String vaultName, PatchResourceRequestInput parameters, Context context) { + private Mono>> updateWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1225,21 +1015,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, parameters, accept, context); } /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1249,22 +1031,17 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BackupVaultResourceInner> beginUpdateAsync( - String resourceGroupName, String vaultName, PatchResourceRequestInput parameters) { + private PollerFlux, BackupVaultResourceInner> + beginUpdateAsync(String resourceGroupName, String vaultName, PatchResourceRequestInput parameters) { Mono>> mono = updateWithResponseAsync(resourceGroupName, vaultName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BackupVaultResourceInner.class, - BackupVaultResourceInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), BackupVaultResourceInner.class, BackupVaultResourceInner.class, + this.client.getContext()); } /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1278,21 +1055,15 @@ private PollerFlux, BackupVaultResourceInne private PollerFlux, BackupVaultResourceInner> beginUpdateAsync( String resourceGroupName, String vaultName, PatchResourceRequestInput parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, vaultName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BackupVaultResourceInner.class, - BackupVaultResourceInner.class, - context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, vaultName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), BackupVaultResourceInner.class, BackupVaultResourceInner.class, context); } /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1302,14 +1073,14 @@ private PollerFlux, BackupVaultResourceInne * @return the {@link SyncPoller} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupVaultResourceInner> beginUpdate( - String resourceGroupName, String vaultName, PatchResourceRequestInput parameters) { + public SyncPoller, BackupVaultResourceInner> + beginUpdate(String resourceGroupName, String vaultName, PatchResourceRequestInput parameters) { return this.beginUpdateAsync(resourceGroupName, vaultName, parameters).getSyncPoller(); } /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1320,14 +1091,14 @@ public SyncPoller, BackupVaultResourceInner * @return the {@link SyncPoller} for polling of backupVault Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BackupVaultResourceInner> beginUpdate( - String resourceGroupName, String vaultName, PatchResourceRequestInput parameters, Context context) { + public SyncPoller, BackupVaultResourceInner> + beginUpdate(String resourceGroupName, String vaultName, PatchResourceRequestInput parameters, Context context) { return this.beginUpdateAsync(resourceGroupName, vaultName, parameters, context).getSyncPoller(); } /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1337,16 +1108,15 @@ public SyncPoller, BackupVaultResourceInner * @return backupVault Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String vaultName, PatchResourceRequestInput parameters) { - return beginUpdateAsync(resourceGroupName, vaultName, parameters) - .last() + private Mono updateAsync(String resourceGroupName, String vaultName, + PatchResourceRequestInput parameters) { + return beginUpdateAsync(resourceGroupName, vaultName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1357,16 +1127,15 @@ private Mono updateAsync( * @return backupVault Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String vaultName, PatchResourceRequestInput parameters, Context context) { - return beginUpdateAsync(resourceGroupName, vaultName, parameters, context) - .last() + private Mono updateAsync(String resourceGroupName, String vaultName, + PatchResourceRequestInput parameters, Context context) { + return beginUpdateAsync(resourceGroupName, vaultName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1376,14 +1145,14 @@ private Mono updateAsync( * @return backupVault Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupVaultResourceInner update( - String resourceGroupName, String vaultName, PatchResourceRequestInput parameters) { + public BackupVaultResourceInner update(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 resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -1394,14 +1163,14 @@ public BackupVaultResourceInner update( * @return backupVault Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupVaultResourceInner update( - String resourceGroupName, String vaultName, PatchResourceRequestInput parameters, Context context) { + public BackupVaultResourceInner update(String resourceGroupName, String vaultName, + PatchResourceRequestInput parameters, Context context) { return updateAsync(resourceGroupName, vaultName, parameters, context).block(); } /** * API to check for resource name availability. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param location The location in which uniqueness will be verified. * @param parameters Check name availability request. @@ -1414,20 +1183,16 @@ public BackupVaultResourceInner update( private Mono> checkNameAvailabilityWithResponseAsync( String resourceGroupName, String location, CheckNameAvailabilityRequest parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -1440,23 +1205,14 @@ private Mono> checkNameAvailabilityWi final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - location, - parameters, - accept, - context)) + context -> service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), location, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * API to check for resource name availability. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param location The location in which uniqueness will be verified. * @param parameters Check name availability request. @@ -1470,20 +1226,16 @@ private Mono> checkNameAvailabilityWi private Mono> checkNameAvailabilityWithResponseAsync( String resourceGroupName, String location, CheckNameAvailabilityRequest parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -1495,21 +1247,13 @@ private Mono> checkNameAvailabilityWi } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - location, - parameters, - accept, - context); + return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName, + this.client.getSubscriptionId(), location, parameters, accept, context); } /** * API to check for resource name availability. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param location The location in which uniqueness will be verified. * @param parameters Check name availability request. @@ -1519,15 +1263,15 @@ private Mono> checkNameAvailabilityWi * @return checkNameAvailabilityResult on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync( - String resourceGroupName, String location, CheckNameAvailabilityRequest parameters) { + private Mono checkNameAvailabilityAsync(String resourceGroupName, String location, + CheckNameAvailabilityRequest parameters) { return checkNameAvailabilityWithResponseAsync(resourceGroupName, location, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * API to check for resource name availability. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param location The location in which uniqueness will be verified. * @param parameters Check name availability request. @@ -1538,14 +1282,14 @@ private Mono checkNameAvailabilityAsync( * @return checkNameAvailabilityResult along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - String resourceGroupName, String location, CheckNameAvailabilityRequest parameters, Context context) { + public Response checkNameAvailabilityWithResponse(String resourceGroupName, + String location, CheckNameAvailabilityRequest parameters, Context context) { return checkNameAvailabilityWithResponseAsync(resourceGroupName, location, parameters, context).block(); } /** * API to check for resource name availability. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param location The location in which uniqueness will be verified. * @param parameters Check name availability request. @@ -1555,16 +1299,17 @@ public Response checkNameAvailabilityWithRespo * @return checkNameAvailabilityResult. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CheckNameAvailabilityResultInner checkNameAvailability( - String resourceGroupName, String location, CheckNameAvailabilityRequest parameters) { + public CheckNameAvailabilityResultInner checkNameAvailability(String resourceGroupName, String location, + CheckNameAvailabilityRequest parameters) { return checkNameAvailabilityWithResponse(resourceGroupName, location, parameters, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1576,31 +1321,23 @@ private Mono> getInSubscriptionNextSingl 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.")); + 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.getInSubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1608,37 +1345,28 @@ private Mono> getInSubscriptionNextSingl * @return backupVaultResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getInSubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> getInSubscriptionNextSinglePageAsync(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.")); + 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 - .getInSubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.getInSubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1650,32 +1378,24 @@ private Mono> getInResourceGroupNextSing 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.")); + 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.getInResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1683,29 +1403,19 @@ private Mono> getInResourceGroupNextSing * @return backupVaultResourceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getInResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> getInResourceGroupNextSinglePageAsync(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.")); + 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 - .getInResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.getInResourceGroupNext(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/BackupVaultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultsImpl.java index ccd0bab66135..fa5a65556bee 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 @@ -24,8 +24,8 @@ public final class BackupVaultsImpl implements BackupVaults { private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public BackupVaultsImpl( - BackupVaultsClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + public BackupVaultsImpl(BackupVaultsClient innerClient, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -46,20 +46,17 @@ public PagedIterable listByResourceGroup(String resourceGro } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); return Utils.mapPage(inner, inner1 -> new BackupVaultResourceImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String vaultName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, vaultName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String vaultName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, vaultName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new BackupVaultResourceImpl(inner.getValue(), this.manager())); } else { return null; @@ -83,25 +80,22 @@ public void delete(String resourceGroupName, String vaultName, Context context) this.serviceClient().delete(resourceGroupName, vaultName, context); } - public Response checkNameAvailabilityWithResponse( - String resourceGroupName, String location, CheckNameAvailabilityRequest parameters, Context context) { - Response inner = - this.serviceClient().checkNameAvailabilityWithResponse(resourceGroupName, location, parameters, context); + public Response checkNameAvailabilityWithResponse(String resourceGroupName, + String location, CheckNameAvailabilityRequest parameters, Context context) { + Response inner + = this.serviceClient().checkNameAvailabilityWithResponse(resourceGroupName, location, parameters, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CheckNameAvailabilityResultImpl(inner.getValue(), this.manager())); } else { return null; } } - public CheckNameAvailabilityResult checkNameAvailability( - String resourceGroupName, String location, CheckNameAvailabilityRequest parameters) { - CheckNameAvailabilityResultInner inner = - this.serviceClient().checkNameAvailability(resourceGroupName, location, parameters); + public CheckNameAvailabilityResult checkNameAvailability(String resourceGroupName, String location, + CheckNameAvailabilityRequest parameters) { + CheckNameAvailabilityResultInner inner + = this.serviceClient().checkNameAvailability(resourceGroupName, location, parameters); if (inner != null) { return new CheckNameAvailabilityResultImpl(inner, this.manager()); } else { @@ -112,18 +106,13 @@ public CheckNameAvailabilityResult checkNameAvailability( public BackupVaultResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, vaultName, Context.NONE).getValue(); } @@ -131,18 +120,13 @@ public BackupVaultResource getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, vaultName, context); } @@ -150,18 +134,13 @@ public Response getByIdWithResponse(String id, Context cont public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); } this.delete(resourceGroupName, vaultName, Context.NONE); } @@ -169,18 +148,13 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); } this.delete(resourceGroupName, vaultName, context); } 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 34468db3c652..d89b0793650b 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 @@ -61,28 +61,21 @@ public BaseBackupPolicyResourceImpl withExistingBackupVault(String resourceGroup } public BaseBackupPolicyResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getBackupPolicies() - .createOrUpdateWithResponse( - resourceGroupName, vaultName, backupPolicyName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getBackupPolicies() + .createOrUpdateWithResponse(resourceGroupName, vaultName, backupPolicyName, this.innerModel(), Context.NONE) + .getValue(); return this; } public BaseBackupPolicyResource create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBackupPolicies() - .createOrUpdateWithResponse(resourceGroupName, vaultName, backupPolicyName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getBackupPolicies() + .createOrUpdateWithResponse(resourceGroupName, vaultName, backupPolicyName, this.innerModel(), context) + .getValue(); return this; } - BaseBackupPolicyResourceImpl( - String name, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + BaseBackupPolicyResourceImpl(String name, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = new BaseBackupPolicyResourceInner(); this.serviceManager = serviceManager; this.backupPolicyName = name; @@ -93,28 +86,20 @@ public BaseBackupPolicyResourceImpl update() { } public BaseBackupPolicyResource apply() { - this.innerObject = - serviceManager - .serviceClient() - .getBackupPolicies() - .createOrUpdateWithResponse( - resourceGroupName, vaultName, backupPolicyName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getBackupPolicies() + .createOrUpdateWithResponse(resourceGroupName, vaultName, backupPolicyName, this.innerModel(), Context.NONE) + .getValue(); return this; } public BaseBackupPolicyResource apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBackupPolicies() - .createOrUpdateWithResponse(resourceGroupName, vaultName, backupPolicyName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getBackupPolicies() + .createOrUpdateWithResponse(resourceGroupName, vaultName, backupPolicyName, this.innerModel(), context) + .getValue(); return this; } - BaseBackupPolicyResourceImpl( - BaseBackupPolicyResourceInner innerObject, + BaseBackupPolicyResourceImpl(BaseBackupPolicyResourceInner innerObject, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -124,22 +109,14 @@ public BaseBackupPolicyResource apply(Context context) { } public BaseBackupPolicyResource refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getBackupPolicies() - .getWithResponse(resourceGroupName, vaultName, backupPolicyName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getBackupPolicies() + .getWithResponse(resourceGroupName, vaultName, backupPolicyName, Context.NONE).getValue(); return this; } public BaseBackupPolicyResource refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBackupPolicies() - .getWithResponse(resourceGroupName, vaultName, backupPolicyName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getBackupPolicies() + .getWithResponse(resourceGroupName, vaultName, backupPolicyName, context).getValue(); return this; } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CheckNameAvailabilityResultImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CheckNameAvailabilityResultImpl.java index 3bef22f9ccb1..0ce809a21968 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CheckNameAvailabilityResultImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CheckNameAvailabilityResultImpl.java @@ -12,8 +12,7 @@ public final class CheckNameAvailabilityResultImpl implements CheckNameAvailabil private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - CheckNameAvailabilityResultImpl( - CheckNameAvailabilityResultInner innerObject, + CheckNameAvailabilityResultImpl(CheckNameAvailabilityResultInner innerObject, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ClientDiscoveryValueForSingleApiImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ClientDiscoveryValueForSingleApiImpl.java index 81510b874a3d..33e9b6d0bd90 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ClientDiscoveryValueForSingleApiImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ClientDiscoveryValueForSingleApiImpl.java @@ -14,8 +14,7 @@ public final class ClientDiscoveryValueForSingleApiImpl implements ClientDiscove private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - ClientDiscoveryValueForSingleApiImpl( - ClientDiscoveryValueForSingleApiInner innerObject, + ClientDiscoveryValueForSingleApiImpl(ClientDiscoveryValueForSingleApiInner innerObject, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 4fcf7d3886f2..a7caf1aca4c7 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 @@ -14,8 +14,10 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the DataProtectionClientImpl type. */ -@ServiceClientBuilder(serviceClients = {DataProtectionClientImpl.class}) +/** + * A builder for creating a new instance of the DataProtectionClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { DataProtectionClientImpl.class }) public final class DataProtectionClientBuilder { /* * The ID of the target subscription. The value must be an UUID. @@ -24,7 +26,7 @@ public final class DataProtectionClientBuilder { /** * Sets The ID of the target subscription. The value must be an UUID. - * + * * @param subscriptionId the subscriptionId value. * @return the DataProtectionClientBuilder. */ @@ -40,7 +42,7 @@ public DataProtectionClientBuilder subscriptionId(String subscriptionId) { /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the DataProtectionClientBuilder. */ @@ -56,7 +58,7 @@ public DataProtectionClientBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the DataProtectionClientBuilder. */ @@ -72,7 +74,7 @@ public DataProtectionClientBuilder environment(AzureEnvironment environment) { /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the DataProtectionClientBuilder. */ @@ -88,7 +90,7 @@ public DataProtectionClientBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the DataProtectionClientBuilder. */ @@ -104,7 +106,7 @@ public DataProtectionClientBuilder defaultPollInterval(Duration defaultPollInter /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the DataProtectionClientBuilder. */ @@ -115,30 +117,20 @@ public DataProtectionClientBuilder serializerAdapter(SerializerAdapter serialize /** * Builds an instance of DataProtectionClientImpl with the provided parameters. - * + * * @return an instance of DataProtectionClientImpl. */ public DataProtectionClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - DataProtectionClientImpl client = - new DataProtectionClientImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + DataProtectionClientImpl client = new DataProtectionClientImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } 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 6269ee984cee..65a61641845b 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 @@ -33,6 +33,9 @@ import com.azure.resourcemanager.dataprotection.fluent.DppResourceGuardProxiesClient; import com.azure.resourcemanager.dataprotection.fluent.ExportJobsClient; import com.azure.resourcemanager.dataprotection.fluent.ExportJobsOperationResultsClient; +import com.azure.resourcemanager.dataprotection.fluent.FetchCrossRegionRestoreJobsClient; +import com.azure.resourcemanager.dataprotection.fluent.FetchCrossRegionRestoreJobsOperationsClient; +import com.azure.resourcemanager.dataprotection.fluent.FetchSecondaryRecoveryPointsClient; import com.azure.resourcemanager.dataprotection.fluent.JobsClient; import com.azure.resourcemanager.dataprotection.fluent.OperationResultsClient; import com.azure.resourcemanager.dataprotection.fluent.OperationStatusBackupVaultContextsClient; @@ -50,291 +53,383 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the DataProtectionClientImpl type. */ +/** + * Initializes a new instance of the DataProtectionClientImpl type. + */ @ServiceClient(builder = DataProtectionClientBuilder.class) public final class DataProtectionClientImpl implements DataProtectionClient { - /** The ID of the target subscription. The value must be an UUID. */ + /** + * The ID of the target subscription. The value must be an UUID. + */ private final String subscriptionId; /** * Gets The ID of the target subscription. The value must be an UUID. - * + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The BackupVaultsClient object to access its operations. */ + /** + * The BackupVaultsClient object to access its operations. + */ private final BackupVaultsClient backupVaults; /** * Gets the BackupVaultsClient object to access its operations. - * + * * @return the BackupVaultsClient object. */ public BackupVaultsClient getBackupVaults() { return this.backupVaults; } - /** The OperationResultsClient object to access its operations. */ + /** + * The OperationResultsClient object to access its operations. + */ private final OperationResultsClient operationResults; /** * Gets the OperationResultsClient object to access its operations. - * + * * @return the OperationResultsClient object. */ public OperationResultsClient getOperationResults() { return this.operationResults; } - /** The OperationStatusClient object to access its operations. */ + /** + * The OperationStatusClient object to access its operations. + */ private final OperationStatusClient operationStatus; /** * Gets the OperationStatusClient object to access its operations. - * + * * @return the OperationStatusClient object. */ public OperationStatusClient getOperationStatus() { return this.operationStatus; } - /** The OperationStatusBackupVaultContextsClient object to access its operations. */ + /** + * 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. */ + /** + * 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. */ + /** + * The BackupVaultOperationResultsClient object to access its operations. + */ private final BackupVaultOperationResultsClient backupVaultOperationResults; /** * Gets the BackupVaultOperationResultsClient object to access its operations. - * + * * @return the BackupVaultOperationResultsClient object. */ public BackupVaultOperationResultsClient getBackupVaultOperationResults() { return this.backupVaultOperationResults; } - /** The DataProtectionsClient object to access its operations. */ + /** + * The DataProtectionsClient object to access its operations. + */ private final DataProtectionsClient dataProtections; /** * Gets the DataProtectionsClient object to access its operations. - * + * * @return the DataProtectionsClient object. */ public DataProtectionsClient getDataProtections() { return this.dataProtections; } - /** The DataProtectionOperationsClient object to access its operations. */ + /** + * The DataProtectionOperationsClient object to access its operations. + */ private final DataProtectionOperationsClient dataProtectionOperations; /** * Gets the DataProtectionOperationsClient object to access its operations. - * + * * @return the DataProtectionOperationsClient object. */ public DataProtectionOperationsClient getDataProtectionOperations() { return this.dataProtectionOperations; } - /** The BackupPoliciesClient object to access its operations. */ + /** + * The BackupPoliciesClient object to access its operations. + */ private final BackupPoliciesClient backupPolicies; /** * Gets the BackupPoliciesClient object to access its operations. - * + * * @return the BackupPoliciesClient object. */ public BackupPoliciesClient getBackupPolicies() { return this.backupPolicies; } - /** The BackupInstancesClient object to access its operations. */ + /** + * The BackupInstancesClient object to access its operations. + */ private final BackupInstancesClient backupInstances; /** * Gets the BackupInstancesClient object to access its operations. - * + * * @return the BackupInstancesClient object. */ public BackupInstancesClient getBackupInstances() { return this.backupInstances; } - /** The RecoveryPointsClient object to access its operations. */ + /** + * The RecoveryPointsClient object to access its operations. + */ private final RecoveryPointsClient recoveryPoints; /** * Gets the RecoveryPointsClient object to access its operations. - * + * * @return the RecoveryPointsClient object. */ public RecoveryPointsClient getRecoveryPoints() { return this.recoveryPoints; } - /** The JobsClient object to access its operations. */ + /** + * The FetchSecondaryRecoveryPointsClient object to access its operations. + */ + private final FetchSecondaryRecoveryPointsClient fetchSecondaryRecoveryPoints; + + /** + * Gets the FetchSecondaryRecoveryPointsClient object to access its operations. + * + * @return the FetchSecondaryRecoveryPointsClient object. + */ + public FetchSecondaryRecoveryPointsClient getFetchSecondaryRecoveryPoints() { + return this.fetchSecondaryRecoveryPoints; + } + + /** + * The FetchCrossRegionRestoreJobsClient object to access its operations. + */ + private final FetchCrossRegionRestoreJobsClient fetchCrossRegionRestoreJobs; + + /** + * Gets the FetchCrossRegionRestoreJobsClient object to access its operations. + * + * @return the FetchCrossRegionRestoreJobsClient object. + */ + public FetchCrossRegionRestoreJobsClient getFetchCrossRegionRestoreJobs() { + return this.fetchCrossRegionRestoreJobs; + } + + /** + * The FetchCrossRegionRestoreJobsOperationsClient object to access its operations. + */ + private final FetchCrossRegionRestoreJobsOperationsClient fetchCrossRegionRestoreJobsOperations; + + /** + * Gets the FetchCrossRegionRestoreJobsOperationsClient object to access its operations. + * + * @return the FetchCrossRegionRestoreJobsOperationsClient object. + */ + public FetchCrossRegionRestoreJobsOperationsClient getFetchCrossRegionRestoreJobsOperations() { + return this.fetchCrossRegionRestoreJobsOperations; + } + + /** + * The JobsClient object to access its operations. + */ private final JobsClient jobs; /** * Gets the JobsClient object to access its operations. - * + * * @return the JobsClient object. */ public JobsClient getJobs() { return this.jobs; } - /** The RestorableTimeRangesClient object to access its operations. */ + /** + * The RestorableTimeRangesClient object to access its operations. + */ private final RestorableTimeRangesClient restorableTimeRanges; /** * Gets the RestorableTimeRangesClient object to access its operations. - * + * * @return the RestorableTimeRangesClient object. */ public RestorableTimeRangesClient getRestorableTimeRanges() { return this.restorableTimeRanges; } - /** The ExportJobsClient object to access its operations. */ + /** + * The ExportJobsClient object to access its operations. + */ private final ExportJobsClient exportJobs; /** * Gets the ExportJobsClient object to access its operations. - * + * * @return the ExportJobsClient object. */ public ExportJobsClient getExportJobs() { return this.exportJobs; } - /** The ExportJobsOperationResultsClient object to access its operations. */ + /** + * The ExportJobsOperationResultsClient object to access its operations. + */ private final ExportJobsOperationResultsClient exportJobsOperationResults; /** * Gets the ExportJobsOperationResultsClient object to access its operations. - * + * * @return the ExportJobsOperationResultsClient object. */ public ExportJobsOperationResultsClient getExportJobsOperationResults() { return this.exportJobsOperationResults; } - /** The DeletedBackupInstancesClient object to access its operations. */ + /** + * The DeletedBackupInstancesClient object to access its operations. + */ private final DeletedBackupInstancesClient deletedBackupInstances; /** * Gets the DeletedBackupInstancesClient object to access its operations. - * + * * @return the DeletedBackupInstancesClient object. */ public DeletedBackupInstancesClient getDeletedBackupInstances() { return this.deletedBackupInstances; } - /** The ResourceGuardsClient object to access its operations. */ + /** + * The ResourceGuardsClient object to access its operations. + */ private final ResourceGuardsClient resourceGuards; /** * Gets the ResourceGuardsClient object to access its operations. - * + * * @return the ResourceGuardsClient object. */ public ResourceGuardsClient getResourceGuards() { return this.resourceGuards; } - /** The DppResourceGuardProxiesClient object to access its operations. */ + /** + * The DppResourceGuardProxiesClient object to access its operations. + */ private final DppResourceGuardProxiesClient dppResourceGuardProxies; /** * Gets the DppResourceGuardProxiesClient object to access its operations. - * + * * @return the DppResourceGuardProxiesClient object. */ public DppResourceGuardProxiesClient getDppResourceGuardProxies() { @@ -343,7 +438,7 @@ public DppResourceGuardProxiesClient getDppResourceGuardProxies() { /** * Initializes an instance of DataProtectionClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. @@ -351,19 +446,14 @@ public DppResourceGuardProxiesClient getDppResourceGuardProxies() { * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param endpoint server parameter. */ - DataProtectionClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + DataProtectionClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-05-01"; + this.apiVersion = "2023-11-01"; this.backupVaults = new BackupVaultsClientImpl(this); this.operationResults = new OperationResultsClientImpl(this); this.operationStatus = new OperationStatusClientImpl(this); @@ -375,6 +465,9 @@ public DppResourceGuardProxiesClient getDppResourceGuardProxies() { this.backupPolicies = new BackupPoliciesClientImpl(this); this.backupInstances = new BackupInstancesClientImpl(this); this.recoveryPoints = new RecoveryPointsClientImpl(this); + this.fetchSecondaryRecoveryPoints = new FetchSecondaryRecoveryPointsClientImpl(this); + this.fetchCrossRegionRestoreJobs = new FetchCrossRegionRestoreJobsClientImpl(this); + this.fetchCrossRegionRestoreJobsOperations = new FetchCrossRegionRestoreJobsOperationsClientImpl(this); this.jobs = new JobsClientImpl(this); this.restorableTimeRanges = new RestorableTimeRangesClientImpl(this); this.exportJobs = new ExportJobsClientImpl(this); @@ -386,7 +479,7 @@ public DppResourceGuardProxiesClient getDppResourceGuardProxies() { /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -395,7 +488,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -405,7 +498,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -415,26 +508,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -447,19 +529,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, + SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } 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 2b860a909b76..3b69cd443485 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 @@ -30,23 +30,28 @@ import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryResponse; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DataProtectionOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in DataProtectionOperationsClient. + */ public final class DataProtectionOperationsClientImpl implements DataProtectionOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DataProtectionOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DataProtectionClientImpl client; /** * Initializes an instance of DataProtectionOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DataProtectionOperationsClientImpl(DataProtectionClientImpl client) { - this.service = - RestProxy - .create(DataProtectionOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(DataProtectionOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,30 +62,24 @@ public final class DataProtectionOperationsClientImpl implements DataProtectionO @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface DataProtectionOperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.DataProtection/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Returns the list of available operations. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return clientDiscoveryResponse along with {@link PagedResponse} on successful completion of {@link Mono}. @@ -88,30 +87,21 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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())); } /** * Returns the list of available operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -121,29 +111,19 @@ private Mono> listSinglePag @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns the list of available operations. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return clientDiscoveryResponse as paginated response with {@link PagedFlux}. @@ -155,7 +135,7 @@ private PagedFlux listAsync() { /** * Returns the list of available operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -164,13 +144,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Returns the list of available operations. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return clientDiscoveryResponse as paginated response with {@link PagedIterable}. @@ -182,7 +162,7 @@ public PagedIterable list() { /** * Returns the list of available operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -196,9 +176,10 @@ public PagedIterable list(Context context /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -210,31 +191,22 @@ private Mono> listNextSingl 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.")); + 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)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -242,29 +214,19 @@ private Mono> listNextSingl * @return clientDiscoveryResponse along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + 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.")); + 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)); + 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/DataProtectionOperationsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionOperationsImpl.java index 661b14ac3f9f..9e06d8171f61 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 @@ -19,8 +19,7 @@ public final class DataProtectionOperationsImpl implements DataProtectionOperati private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public DataProtectionOperationsImpl( - DataProtectionOperationsClient innerClient, + public DataProtectionOperationsImpl(DataProtectionOperationsClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; 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 36da3791b925..5948a57c263e 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 @@ -27,22 +27,28 @@ import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequestBase; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DataProtectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in DataProtectionsClient. + */ public final class DataProtectionsClientImpl implements DataProtectionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DataProtectionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DataProtectionClientImpl client; /** * Initializes an instance of DataProtectionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DataProtectionsClientImpl(DataProtectionClientImpl client) { - this.service = - RestProxy.create(DataProtectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(DataProtectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -53,46 +59,38 @@ public final class DataProtectionsClientImpl implements DataProtectionsClient { @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface DataProtectionsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/checkFeatureSupport") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/checkFeatureSupport") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkFeatureSupport( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> checkFeatureSupport(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @BodyParam("application/json") FeatureValidationRequestBase parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); } /** * Validates if a feature is supported. - * + * * @param location The location parameter. * @param parameters Feature support request object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response} on successful completion of {@link - * Mono}. + * @return base class for Backup Feature support along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkFeatureSupportWithResponseAsync( - String location, FeatureValidationRequestBase parameters) { + private Mono> checkFeatureSupportWithResponseAsync(String location, + FeatureValidationRequestBase parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -104,46 +102,33 @@ private Mono> checkFeatureSupportWi } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .checkFeatureSupport( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - parameters, - accept, - context)) + .withContext(context -> service.checkFeatureSupport(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Validates if a feature is supported. - * + * * @param location The location parameter. * @param parameters Feature support request object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response} on successful completion of {@link - * Mono}. + * @return base class for Backup Feature support along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkFeatureSupportWithResponseAsync( - String location, FeatureValidationRequestBase parameters, Context context) { + private Mono> checkFeatureSupportWithResponseAsync(String location, + FeatureValidationRequestBase parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -155,20 +140,13 @@ private Mono> checkFeatureSupportWi } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .checkFeatureSupport( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - parameters, - accept, - context); + return service.checkFeatureSupport(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, parameters, accept, context); } /** * Validates if a feature is supported. - * + * * @param location The location parameter. * @param parameters Feature support request object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -177,15 +155,15 @@ private Mono> checkFeatureSupportWi * @return base class for Backup Feature support on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkFeatureSupportAsync( - String location, FeatureValidationRequestBase parameters) { + private Mono checkFeatureSupportAsync(String location, + FeatureValidationRequestBase parameters) { return checkFeatureSupportWithResponseAsync(location, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Validates if a feature is supported. - * + * * @param location The location parameter. * @param parameters Feature support request object. * @param context The context to associate with this operation. @@ -195,14 +173,14 @@ private Mono checkFeatureSupportAsync( * @return base class for Backup Feature support along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkFeatureSupportWithResponse( - String location, FeatureValidationRequestBase parameters, Context context) { + public Response checkFeatureSupportWithResponse(String location, + FeatureValidationRequestBase parameters, Context context) { return checkFeatureSupportWithResponseAsync(location, parameters, context).block(); } /** * Validates if a feature is supported. - * + * * @param location The location parameter. * @param parameters Feature support request object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -211,8 +189,8 @@ public Response checkFeatureSupportWithRespo * @return base class for Backup Feature support. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FeatureValidationResponseBaseInner checkFeatureSupport( - String location, FeatureValidationRequestBase parameters) { + public FeatureValidationResponseBaseInner checkFeatureSupport(String location, + FeatureValidationRequestBase parameters) { return checkFeatureSupportWithResponse(location, parameters, Context.NONE).getValue(); } } 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 1b315ace4d4c..0fce0f195282 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 @@ -21,22 +21,18 @@ public final class DataProtectionsImpl implements DataProtections { private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public DataProtectionsImpl( - DataProtectionsClient innerClient, + public DataProtectionsImpl(DataProtectionsClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response checkFeatureSupportWithResponse( - String location, FeatureValidationRequestBase parameters, Context context) { - Response inner = - this.serviceClient().checkFeatureSupportWithResponse(location, parameters, context); + public Response checkFeatureSupportWithResponse(String location, + FeatureValidationRequestBase parameters, Context context) { + Response inner + = this.serviceClient().checkFeatureSupportWithResponse(location, parameters, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new FeatureValidationResponseBaseImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DeletedBackupInstanceResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DeletedBackupInstanceResourceImpl.java index 6d0e790c746f..7d41624abe7c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DeletedBackupInstanceResourceImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DeletedBackupInstanceResourceImpl.java @@ -14,8 +14,7 @@ public final class DeletedBackupInstanceResourceImpl implements DeletedBackupIns private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - DeletedBackupInstanceResourceImpl( - DeletedBackupInstanceResourceInner innerObject, + DeletedBackupInstanceResourceImpl(DeletedBackupInstanceResourceInner innerObject, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DeletedBackupInstancesClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DeletedBackupInstancesClientImpl.java index 5cdc9c5acf1e..7dac85d329be 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DeletedBackupInstancesClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DeletedBackupInstancesClientImpl.java @@ -36,23 +36,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DeletedBackupInstancesClient. */ +/** + * An instance of this class provides access to all the operations defined in DeletedBackupInstancesClient. + */ public final class DeletedBackupInstancesClientImpl implements DeletedBackupInstancesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DeletedBackupInstancesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DataProtectionClientImpl client; /** * Initializes an instance of DeletedBackupInstancesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DeletedBackupInstancesClientImpl(DataProtectionClientImpl client) { - this.service = - RestProxy - .create(DeletedBackupInstancesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(DeletedBackupInstancesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -63,86 +68,65 @@ public final class DeletedBackupInstancesClientImpl implements DeletedBackupInst @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface DeletedBackupInstancesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/deletedBackupInstances") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/deletedBackupInstances") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/deletedBackupInstances/{backupInstanceName}") - @ExpectedResponses({200}) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/deletedBackupInstances/{backupInstanceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @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, - @HeaderParam("Accept") String accept, + Mono> get(@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, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/deletedBackupInstances/{backupInstanceName}/undelete") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/deletedBackupInstances/{backupInstanceName}/undelete") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> undelete( - @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, - @HeaderParam("Accept") String accept, + Mono>> undelete(@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, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets deleted backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 deleted backup instances belonging to a backup vault along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String vaultName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String vaultName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -153,32 +137,16 @@ private Mono> listSinglePageAs } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, 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 deleted backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -186,22 +154,18 @@ private Mono> listSinglePageAs * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return deleted backup instances belonging to a backup vault along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String vaultName, Context context) { + private Mono> listSinglePageAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -213,28 +177,15 @@ private Mono> listSinglePageAs final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets deleted backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -244,13 +195,13 @@ private Mono> listSinglePageAs */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String vaultName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, vaultName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Gets deleted backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -260,16 +211,15 @@ private PagedFlux listAsync(String resourceG * @return deleted backup instances belonging to a backup vault as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String vaultName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, vaultName, context), + private PagedFlux listAsync(String resourceGroupName, String vaultName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets deleted backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -284,7 +234,7 @@ public PagedIterable list(String resourceGro /** * Gets deleted backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -294,14 +244,14 @@ public PagedIterable list(String resourceGro * @return deleted backup instances belonging to a backup vault as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String vaultName, Context context) { + public PagedIterable list(String resourceGroupName, String vaultName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, vaultName, context)); } /** * Gets a deleted backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -309,22 +259,18 @@ public PagedIterable list( * @throws 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 deleted backup instance with name in a backup vault along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String vaultName, String backupInstanceName) { + private Mono> getWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -339,24 +285,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupInstanceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a deleted backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -365,22 +301,18 @@ private Mono> getWithResponseAsync( * @throws 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 deleted backup instance with name in a backup vault along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + private Mono> getWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -395,21 +327,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, backupInstanceName, accept, context); } /** * Gets a deleted backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -419,15 +343,15 @@ private Mono> getWithResponseAsync( * @return a deleted backup instance with name in a backup vault on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String vaultName, String backupInstanceName) { + private Mono getAsync(String resourceGroupName, String vaultName, + String backupInstanceName) { return getWithResponseAsync(resourceGroupName, vaultName, backupInstanceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a deleted backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -438,14 +362,14 @@ private Mono getAsync( * @return a deleted backup instance with name in a backup vault along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + public Response getWithResponse(String resourceGroupName, String vaultName, + String backupInstanceName, Context context) { return getWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, context).block(); } /** * Gets a deleted backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -455,14 +379,14 @@ public Response getWithResponse( * @return a deleted backup instance with name in a backup vault. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeletedBackupInstanceResourceInner get( - String resourceGroupName, String vaultName, String backupInstanceName) { + public DeletedBackupInstanceResourceInner get(String resourceGroupName, String vaultName, + String backupInstanceName) { return getWithResponse(resourceGroupName, vaultName, backupInstanceName, Context.NONE).getValue(); } /** * The undelete operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -472,19 +396,15 @@ public DeletedBackupInstanceResourceInner get( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> undeleteWithResponseAsync( - String resourceGroupName, String vaultName, String backupInstanceName) { + private Mono>> undeleteWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -499,24 +419,14 @@ private Mono>> undeleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .undelete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - accept, - context)) + .withContext(context -> service.undelete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupInstanceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The undelete operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -527,19 +437,15 @@ private Mono>> undeleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> undeleteWithResponseAsync( - String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + private Mono>> undeleteWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -554,21 +460,13 @@ private Mono>> undeleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .undelete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - accept, - context); + return service.undelete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, backupInstanceName, accept, context); } /** * The undelete operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -578,19 +476,17 @@ private Mono>> undeleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUndeleteAsync( - String resourceGroupName, String vaultName, String backupInstanceName) { - Mono>> mono = - undeleteWithResponseAsync(resourceGroupName, vaultName, backupInstanceName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginUndeleteAsync(String resourceGroupName, String vaultName, + String backupInstanceName) { + Mono>> mono + = undeleteWithResponseAsync(resourceGroupName, vaultName, backupInstanceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * The undelete operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -601,19 +497,18 @@ private PollerFlux, Void> beginUndeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUndeleteAsync( - String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + private PollerFlux, Void> beginUndeleteAsync(String resourceGroupName, String vaultName, + String backupInstanceName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - undeleteWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = undeleteWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * The undelete operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -623,14 +518,14 @@ private PollerFlux, Void> beginUndeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUndelete( - String resourceGroupName, String vaultName, String backupInstanceName) { + public SyncPoller, Void> beginUndelete(String resourceGroupName, String vaultName, + String backupInstanceName) { return this.beginUndeleteAsync(resourceGroupName, vaultName, backupInstanceName).getSyncPoller(); } /** * The undelete operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -641,14 +536,14 @@ public SyncPoller, Void> beginUndelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUndelete( - String resourceGroupName, String vaultName, String backupInstanceName, Context context) { + public SyncPoller, Void> beginUndelete(String resourceGroupName, String vaultName, + String backupInstanceName, Context context) { return this.beginUndeleteAsync(resourceGroupName, vaultName, backupInstanceName, context).getSyncPoller(); } /** * The undelete operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -659,14 +554,13 @@ public SyncPoller, Void> beginUndelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono undeleteAsync(String resourceGroupName, String vaultName, String backupInstanceName) { - return beginUndeleteAsync(resourceGroupName, vaultName, backupInstanceName) - .last() + return beginUndeleteAsync(resourceGroupName, vaultName, backupInstanceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The undelete operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -677,16 +571,15 @@ private Mono undeleteAsync(String resourceGroupName, String vaultName, Str * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono undeleteAsync( - String resourceGroupName, String vaultName, String backupInstanceName, Context context) { - return beginUndeleteAsync(resourceGroupName, vaultName, backupInstanceName, context) - .last() + private Mono undeleteAsync(String resourceGroupName, String vaultName, String backupInstanceName, + Context context) { + return beginUndeleteAsync(resourceGroupName, vaultName, backupInstanceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The undelete operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -701,7 +594,7 @@ public void undelete(String resourceGroupName, String vaultName, String backupIn /** * The undelete operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -717,14 +610,15 @@ public void undelete(String resourceGroupName, String vaultName, String backupIn /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of DeletedBackupInstance resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -732,62 +626,43 @@ private Mono> listNextSinglePa 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.")); + 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)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of DeletedBackupInstance resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + 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.")); + 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)); + 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/DeletedBackupInstancesImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DeletedBackupInstancesImpl.java index 646b308dbf81..3bda67f38b1c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DeletedBackupInstancesImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DeletedBackupInstancesImpl.java @@ -21,35 +21,31 @@ public final class DeletedBackupInstancesImpl implements DeletedBackupInstances private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public DeletedBackupInstancesImpl( - DeletedBackupInstancesClient innerClient, + public DeletedBackupInstancesImpl(DeletedBackupInstancesClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String vaultName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, vaultName); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, vaultName); return Utils.mapPage(inner, inner1 -> new DeletedBackupInstanceResourceImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String vaultName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, vaultName, context); + public PagedIterable list(String resourceGroupName, String vaultName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, vaultName, context); return Utils.mapPage(inner, inner1 -> new DeletedBackupInstanceResourceImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String vaultName, String backupInstanceName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, vaultName, backupInstanceName, context); + public Response getWithResponse(String resourceGroupName, String vaultName, + String backupInstanceName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, vaultName, backupInstanceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DeletedBackupInstanceResourceImpl(inner.getValue(), this.manager())); } else { return null; @@ -57,8 +53,8 @@ public Response getWithResponse( } public DeletedBackupInstanceResource get(String resourceGroupName, String vaultName, String backupInstanceName) { - DeletedBackupInstanceResourceInner inner = - this.serviceClient().get(resourceGroupName, vaultName, backupInstanceName); + DeletedBackupInstanceResourceInner inner + = this.serviceClient().get(resourceGroupName, vaultName, backupInstanceName); if (inner != null) { return new DeletedBackupInstanceResourceImpl(inner, this.manager()); } else { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppBaseResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppBaseResourceImpl.java index e2772ba767a2..232e25f0fe86 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppBaseResourceImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppBaseResourceImpl.java @@ -12,8 +12,7 @@ public final class DppBaseResourceImpl implements DppBaseResource { private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - DppBaseResourceImpl( - DppBaseResourceInner innerObject, + DppBaseResourceImpl(DppBaseResourceInner innerObject, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppResourceGuardProxiesClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppResourceGuardProxiesClientImpl.java index d3c612d676f8..78a9059f078f 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppResourceGuardProxiesClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppResourceGuardProxiesClientImpl.java @@ -36,23 +36,28 @@ import com.azure.resourcemanager.dataprotection.models.UnlockDeleteRequest; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DppResourceGuardProxiesClient. */ +/** + * An instance of this class provides access to all the operations defined in DppResourceGuardProxiesClient. + */ public final class DppResourceGuardProxiesClientImpl implements DppResourceGuardProxiesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DppResourceGuardProxiesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DataProtectionClientImpl client; /** * Initializes an instance of DppResourceGuardProxiesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DppResourceGuardProxiesClientImpl(DataProtectionClientImpl client) { - this.service = - RestProxy - .create(DppResourceGuardProxiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(DppResourceGuardProxiesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -63,118 +68,88 @@ public final class DppResourceGuardProxiesClientImpl implements DppResourceGuard @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface DppResourceGuardProxiesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("resourceGuardProxyName") String resourceGuardProxyName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("resourceGuardProxyName") String resourceGuardProxyName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ResourceGuardProxyBaseResourceInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("resourceGuardProxyName") String resourceGuardProxyName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @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}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> unlockDelete( - @HostParam("$host") String endpoint, + Mono> unlockDelete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("resourceGuardProxyName") String resourceGuardProxyName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") UnlockDeleteRequest parameters, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") UnlockDeleteRequest parameters, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Returns the list of ResourceGuardProxies associated with the vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 list of ResourceGuardProxyBase resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String vaultName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String vaultName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -185,32 +160,16 @@ private Mono> listSinglePageA } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns the list of ResourceGuardProxies associated with the vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -218,22 +177,18 @@ private Mono> listSinglePageA * @throws 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 ResourceGuardProxyBase resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String vaultName, Context context) { + private Mono> listSinglePageAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -245,28 +200,15 @@ private Mono> listSinglePageA final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, vaultName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns the list of ResourceGuardProxies associated with the vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -276,13 +218,13 @@ private Mono> listSinglePageA */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String vaultName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, vaultName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Returns the list of ResourceGuardProxies associated with the vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -292,16 +234,15 @@ private PagedFlux listAsync(String resource * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String vaultName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, vaultName, context), + private PagedFlux listAsync(String resourceGroupName, String vaultName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Returns the list of ResourceGuardProxies associated with the vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -316,7 +257,7 @@ public PagedIterable list(String resourceGr /** * Returns the list of ResourceGuardProxies associated with the vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -326,14 +267,14 @@ public PagedIterable list(String resourceGr * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String vaultName, Context context) { + public PagedIterable list(String resourceGroupName, String vaultName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, vaultName, context)); } /** * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -341,22 +282,18 @@ public PagedIterable list( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs - * along with {@link Response} on successful completion of {@link Mono}. + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String vaultName, String resourceGuardProxyName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String vaultName, String resourceGuardProxyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -366,30 +303,19 @@ private Mono> getWithResponseAsync return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); } if (resourceGuardProxyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter resourceGuardProxyName 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, - resourceGuardProxyName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, resourceGuardProxyName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -398,22 +324,18 @@ private Mono> getWithResponseAsync * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs - * along with {@link Response} on successful completion of {@link Mono}. + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String vaultName, String resourceGuardProxyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -423,27 +345,18 @@ private Mono> getWithResponseAsync return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); } if (resourceGuardProxyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter resourceGuardProxyName 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, - resourceGuardProxyName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, vaultName, + resourceGuardProxyName, this.client.getApiVersion(), accept, context); } /** * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -451,18 +364,18 @@ private Mono> getWithResponseAsync * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String vaultName, String resourceGuardProxyName) { + private Mono getAsync(String resourceGroupName, String vaultName, + String resourceGuardProxyName) { return getWithResponseAsync(resourceGroupName, vaultName, resourceGuardProxyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -471,17 +384,17 @@ private Mono getAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs - * along with {@link Response}. + * along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context) { + public Response getWithResponse(String resourceGroupName, String vaultName, + String resourceGuardProxyName, Context context) { return getWithResponseAsync(resourceGroupName, vaultName, resourceGuardProxyName, context).block(); } /** * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -491,14 +404,14 @@ public Response getWithResponse( * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResourceGuardProxyBaseResourceInner get( - String resourceGroupName, String vaultName, String resourceGuardProxyName) { + public ResourceGuardProxyBaseResourceInner get(String resourceGroupName, String vaultName, + String resourceGuardProxyName) { return getWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, Context.NONE).getValue(); } /** * Creates or Updates a ResourceGuardProxy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -507,25 +420,19 @@ public ResourceGuardProxyBaseResourceInner get( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs - * along with {@link Response} on successful completion of {@link Mono}. + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String vaultName, - String resourceGuardProxyName, + String resourceGroupName, String vaultName, String resourceGuardProxyName, ResourceGuardProxyBaseResourceInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -535,9 +442,8 @@ private Mono> createOrUpdateWithRe return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); } if (resourceGuardProxyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -546,25 +452,15 @@ private Mono> createOrUpdateWithRe } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - resourceGuardProxyName, - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, resourceGuardProxyName, this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or Updates a ResourceGuardProxy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -574,26 +470,19 @@ private Mono> createOrUpdateWithRe * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs - * along with {@link Response} on successful completion of {@link Mono}. + * along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String vaultName, - String resourceGuardProxyName, - ResourceGuardProxyBaseResourceInner parameters, - Context context) { + String resourceGroupName, String vaultName, String resourceGuardProxyName, + ResourceGuardProxyBaseResourceInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -603,9 +492,8 @@ private Mono> createOrUpdateWithRe return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); } if (resourceGuardProxyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -614,22 +502,13 @@ private Mono> createOrUpdateWithRe } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - resourceGuardProxyName, - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + vaultName, resourceGuardProxyName, this.client.getApiVersion(), parameters, accept, context); } /** * Creates or Updates a ResourceGuardProxy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -638,21 +517,18 @@ private Mono> createOrUpdateWithRe * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String vaultName, - String resourceGuardProxyName, - ResourceGuardProxyBaseResourceInner parameters) { + private Mono createOrUpdateAsync(String resourceGroupName, String vaultName, + String resourceGuardProxyName, ResourceGuardProxyBaseResourceInner parameters) { return createOrUpdateWithResponseAsync(resourceGroupName, vaultName, resourceGuardProxyName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or Updates a ResourceGuardProxy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -662,23 +538,19 @@ private Mono createOrUpdateAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs - * along with {@link Response}. + * along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String vaultName, - String resourceGuardProxyName, - ResourceGuardProxyBaseResourceInner parameters, + public Response createOrUpdateWithResponse(String resourceGroupName, + String vaultName, String resourceGuardProxyName, ResourceGuardProxyBaseResourceInner parameters, Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, vaultName, resourceGuardProxyName, parameters, context) - .block(); + return createOrUpdateWithResponseAsync(resourceGroupName, vaultName, resourceGuardProxyName, parameters, + context).block(); } /** * Creates or Updates a ResourceGuardProxy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -689,19 +561,15 @@ public Response createOrUpdateWithResponse( * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResourceGuardProxyBaseResourceInner createOrUpdate( - String resourceGroupName, - String vaultName, - String resourceGuardProxyName, - ResourceGuardProxyBaseResourceInner parameters) { - return createOrUpdateWithResponse( - resourceGroupName, vaultName, resourceGuardProxyName, parameters, Context.NONE) - .getValue(); + public ResourceGuardProxyBaseResourceInner createOrUpdate(String resourceGroupName, String vaultName, + String resourceGuardProxyName, ResourceGuardProxyBaseResourceInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, parameters, + Context.NONE).getValue(); } /** * Deletes the ResourceGuardProxy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -711,19 +579,15 @@ public ResourceGuardProxyBaseResourceInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String vaultName, String resourceGuardProxyName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String vaultName, + String resourceGuardProxyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -733,30 +597,19 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); } if (resourceGuardProxyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - resourceGuardProxyName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, resourceGuardProxyName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the ResourceGuardProxy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -767,19 +620,15 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String vaultName, + String resourceGuardProxyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -789,27 +638,18 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); } if (resourceGuardProxyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - resourceGuardProxyName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, vaultName, + resourceGuardProxyName, this.client.getApiVersion(), accept, context); } /** * Deletes the ResourceGuardProxy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -826,7 +666,7 @@ private Mono deleteAsync(String resourceGroupName, String vaultName, Strin /** * Deletes the ResourceGuardProxy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -837,14 +677,14 @@ private Mono deleteAsync(String resourceGroupName, String vaultName, Strin * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String vaultName, String resourceGuardProxyName, + Context context) { return deleteWithResponseAsync(resourceGroupName, vaultName, resourceGuardProxyName, context).block(); } /** * Deletes the ResourceGuardProxy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -859,7 +699,7 @@ public void delete(String resourceGroupName, String vaultName, String resourceGu /** * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -870,19 +710,15 @@ public void delete(String resourceGroupName, String vaultName, String resourceGu * @return response of Unlock Delete API along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> unlockDeleteWithResponseAsync( - String resourceGroupName, String vaultName, String resourceGuardProxyName, UnlockDeleteRequest parameters) { + private Mono> unlockDeleteWithResponseAsync(String resourceGroupName, + String vaultName, String resourceGuardProxyName, UnlockDeleteRequest parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -892,9 +728,8 @@ private Mono> unlockDeleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); } if (resourceGuardProxyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -903,25 +738,15 @@ private Mono> unlockDeleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .unlockDelete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - resourceGuardProxyName, - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.unlockDelete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, resourceGuardProxyName, this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -933,23 +758,15 @@ private Mono> unlockDeleteWithResponseAsync( * @return response of Unlock Delete API along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> unlockDeleteWithResponseAsync( - String resourceGroupName, - String vaultName, - String resourceGuardProxyName, - UnlockDeleteRequest parameters, - Context context) { + private Mono> unlockDeleteWithResponseAsync(String resourceGroupName, + String vaultName, String resourceGuardProxyName, UnlockDeleteRequest parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -959,9 +776,8 @@ private Mono> unlockDeleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); } if (resourceGuardProxyName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -970,22 +786,13 @@ private Mono> unlockDeleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .unlockDelete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - resourceGuardProxyName, - this.client.getApiVersion(), - parameters, - accept, - context); + return service.unlockDelete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + vaultName, resourceGuardProxyName, this.client.getApiVersion(), parameters, accept, context); } /** * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -996,15 +803,15 @@ private Mono> unlockDeleteWithResponseAsync( * @return response of Unlock Delete API on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono unlockDeleteAsync( - String resourceGroupName, String vaultName, String resourceGuardProxyName, UnlockDeleteRequest parameters) { + private Mono unlockDeleteAsync(String resourceGroupName, String vaultName, + String resourceGuardProxyName, UnlockDeleteRequest parameters) { return unlockDeleteWithResponseAsync(resourceGroupName, vaultName, resourceGuardProxyName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -1016,19 +823,15 @@ private Mono unlockDeleteAsync( * @return response of Unlock Delete API along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response unlockDeleteWithResponse( - String resourceGroupName, - String vaultName, - String resourceGuardProxyName, - UnlockDeleteRequest parameters, - Context context) { + public Response unlockDeleteWithResponse(String resourceGroupName, String vaultName, + String resourceGuardProxyName, UnlockDeleteRequest parameters, Context context) { return unlockDeleteWithResponseAsync(resourceGroupName, vaultName, resourceGuardProxyName, parameters, context) .block(); } /** * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -1039,22 +842,23 @@ public Response unlockDeleteWithResponse( * @return response of Unlock Delete API. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UnlockDeleteResponseInner unlockDelete( - String resourceGroupName, String vaultName, String resourceGuardProxyName, UnlockDeleteRequest parameters) { + public UnlockDeleteResponseInner unlockDelete(String resourceGroupName, String vaultName, + String resourceGuardProxyName, UnlockDeleteRequest parameters) { return unlockDeleteWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, parameters, Context.NONE) .getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of ResourceGuardProxyBase resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1062,62 +866,43 @@ private Mono> listNextSingleP 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.")); + 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)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of ResourceGuardProxyBase resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + 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.")); + 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)); + 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/DppResourceGuardProxiesImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppResourceGuardProxiesImpl.java index 44d58ddb918b..8cca54d74ab4 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppResourceGuardProxiesImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppResourceGuardProxiesImpl.java @@ -24,45 +24,41 @@ public final class DppResourceGuardProxiesImpl implements DppResourceGuardProxie private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public DppResourceGuardProxiesImpl( - DppResourceGuardProxiesClient innerClient, + public DppResourceGuardProxiesImpl(DppResourceGuardProxiesClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String vaultName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, vaultName); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, vaultName); return Utils.mapPage(inner, inner1 -> new ResourceGuardProxyBaseResourceImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String vaultName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, vaultName, context); + public PagedIterable list(String resourceGroupName, String vaultName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, vaultName, context); return Utils.mapPage(inner, inner1 -> new ResourceGuardProxyBaseResourceImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, context); + public Response getWithResponse(String resourceGroupName, String vaultName, + String resourceGuardProxyName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ResourceGuardProxyBaseResourceImpl(inner.getValue(), this.manager())); } else { return null; } } - public ResourceGuardProxyBaseResource get( - String resourceGroupName, String vaultName, String resourceGuardProxyName) { - ResourceGuardProxyBaseResourceInner inner = - this.serviceClient().get(resourceGroupName, vaultName, resourceGuardProxyName); + public ResourceGuardProxyBaseResource get(String resourceGroupName, String vaultName, + String resourceGuardProxyName) { + ResourceGuardProxyBaseResourceInner inner + = this.serviceClient().get(resourceGroupName, vaultName, resourceGuardProxyName); if (inner != null) { return new ResourceGuardProxyBaseResourceImpl(inner, this.manager()); } else { @@ -70,8 +66,8 @@ public ResourceGuardProxyBaseResource get( } } - public Response deleteWithResponse( - String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String vaultName, String resourceGuardProxyName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, context); } @@ -79,31 +75,22 @@ public void delete(String resourceGroupName, String vaultName, String resourceGu this.serviceClient().delete(resourceGroupName, vaultName, resourceGuardProxyName); } - public Response unlockDeleteWithResponse( - String resourceGroupName, - String vaultName, - String resourceGuardProxyName, - UnlockDeleteRequest parameters, - Context context) { - Response inner = - this - .serviceClient() - .unlockDeleteWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, parameters, context); + public Response unlockDeleteWithResponse(String resourceGroupName, String vaultName, + String resourceGuardProxyName, UnlockDeleteRequest parameters, Context context) { + Response inner = this.serviceClient().unlockDeleteWithResponse(resourceGroupName, + vaultName, resourceGuardProxyName, parameters, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new UnlockDeleteResponseImpl(inner.getValue(), this.manager())); } else { return null; } } - public UnlockDeleteResponse unlockDelete( - String resourceGroupName, String vaultName, String resourceGuardProxyName, UnlockDeleteRequest parameters) { - UnlockDeleteResponseInner inner = - this.serviceClient().unlockDelete(resourceGroupName, vaultName, resourceGuardProxyName, parameters); + public UnlockDeleteResponse unlockDelete(String resourceGroupName, String vaultName, String resourceGuardProxyName, + UnlockDeleteRequest parameters) { + UnlockDeleteResponseInner inner + = this.serviceClient().unlockDelete(resourceGroupName, vaultName, resourceGuardProxyName, parameters); if (inner != null) { return new UnlockDeleteResponseImpl(inner, this.manager()); } else { @@ -114,28 +101,18 @@ public UnlockDeleteResponse unlockDelete( public ResourceGuardProxyBaseResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); } String resourceGuardProxyName = Utils.getValueFromIdByName(id, "backupResourceGuardProxies"); if (resourceGuardProxyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'backupResourceGuardProxies'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'backupResourceGuardProxies'.", id))); } return this.getWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, Context.NONE).getValue(); } @@ -143,28 +120,18 @@ public ResourceGuardProxyBaseResource getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); } String resourceGuardProxyName = Utils.getValueFromIdByName(id, "backupResourceGuardProxies"); if (resourceGuardProxyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'backupResourceGuardProxies'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'backupResourceGuardProxies'.", id))); } return this.getWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, context); } @@ -172,28 +139,18 @@ public Response getByIdWithResponse(String id, C public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); } String resourceGuardProxyName = Utils.getValueFromIdByName(id, "backupResourceGuardProxies"); if (resourceGuardProxyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'backupResourceGuardProxies'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'backupResourceGuardProxies'.", id))); } this.deleteWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, Context.NONE); } @@ -201,28 +158,18 @@ public void deleteById(String id) { public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); } String resourceGuardProxyName = Utils.getValueFromIdByName(id, "backupResourceGuardProxies"); if (resourceGuardProxyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'backupResourceGuardProxies'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'backupResourceGuardProxies'.", id))); } return this.deleteWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, context); } 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 9b15ab425b84..7d16cd319916 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 @@ -29,22 +29,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ExportJobsClient. */ +/** + * An instance of this class provides access to all the operations defined in ExportJobsClient. + */ public final class ExportJobsClientImpl implements ExportJobsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ExportJobsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DataProtectionClientImpl client; /** * Initializes an instance of ExportJobsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ExportJobsClientImpl(DataProtectionClientImpl client) { - this.service = - RestProxy.create(ExportJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ExportJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -55,24 +61,19 @@ public final class ExportJobsClientImpl implements ExportJobsClient { @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface ExportJobsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/exportBackupJobs") - @ExpectedResponses({202, 204}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/exportBackupJobs") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> trigger( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, - @HeaderParam("Accept") String accept, - Context context); + Mono>> trigger(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Accept") String accept, Context context); } /** * Triggers export of jobs and returns an OperationID to track. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -83,16 +84,12 @@ Mono>> trigger( @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> triggerWithResponseAsync(String resourceGroupName, String vaultName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -103,23 +100,14 @@ private Mono>> triggerWithResponseAsync(String resourc } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .trigger( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - accept, - context)) + .withContext(context -> service.trigger(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Triggers export of jobs and returns an OperationID to track. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -129,19 +117,15 @@ private Mono>> triggerWithResponseAsync(String resourc * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> triggerWithResponseAsync( - String resourceGroupName, String vaultName, Context context) { + private Mono>> triggerWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -152,20 +136,13 @@ private Mono>> triggerWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .trigger( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - accept, - context); + return service.trigger(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, accept, context); } /** * Triggers export of jobs and returns an OperationID to track. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -176,15 +153,13 @@ private Mono>> triggerWithResponseAsync( @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, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Triggers export of jobs and returns an OperationID to track. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -194,18 +169,17 @@ private PollerFlux, Void> beginTriggerAsync(String resourceGrou * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginTriggerAsync( - String resourceGroupName, String vaultName, Context context) { + private PollerFlux, Void> beginTriggerAsync(String resourceGroupName, String vaultName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = triggerWithResponseAsync(resourceGroupName, vaultName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Triggers export of jobs and returns an OperationID to track. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -220,7 +194,7 @@ public SyncPoller, Void> beginTrigger(String resourceGroupName, /** * Triggers export of jobs and returns an OperationID to track. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -230,14 +204,14 @@ public SyncPoller, Void> beginTrigger(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginTrigger( - String resourceGroupName, String vaultName, Context context) { + public SyncPoller, Void> beginTrigger(String resourceGroupName, String vaultName, + Context context) { return this.beginTriggerAsync(resourceGroupName, vaultName, context).getSyncPoller(); } /** * Triggers export of jobs and returns an OperationID to track. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -252,7 +226,7 @@ private Mono triggerAsync(String resourceGroupName, String vaultName) { /** * Triggers export of jobs and returns an OperationID to track. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -263,14 +237,13 @@ private Mono triggerAsync(String resourceGroupName, String vaultName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono triggerAsync(String resourceGroupName, String vaultName, Context context) { - return beginTriggerAsync(resourceGroupName, vaultName, context) - .last() + return beginTriggerAsync(resourceGroupName, vaultName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Triggers export of jobs and returns an OperationID to track. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -284,7 +257,7 @@ public void trigger(String resourceGroupName, String vaultName) { /** * Triggers export of jobs and returns an OperationID to track. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. 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 38570717c214..dbc62093f0dd 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 @@ -16,8 +16,8 @@ public final class ExportJobsImpl implements ExportJobs { private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public ExportJobsImpl( - ExportJobsClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + public ExportJobsImpl(ExportJobsClient innerClient, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } 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 a396d1120518..55dbdb3b45af 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 @@ -25,24 +25,28 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in ExportJobsOperationResultsClient. + */ public final class ExportJobsOperationResultsClientImpl implements ExportJobsOperationResultsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ExportJobsOperationResultsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DataProtectionClientImpl client; /** * Initializes an instance of ExportJobsOperationResultsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ExportJobsOperationResultsClientImpl(DataProtectionClientImpl client) { - this.service = - RestProxy - .create( - ExportJobsOperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ExportJobsOperationResultsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -53,27 +57,21 @@ public final class ExportJobsOperationResultsClientImpl implements ExportJobsOpe @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface ExportJobsOperationResultsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/operations/{operationId}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/operations/{operationId}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, - @PathParam("operationId") String operationId, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); } /** * Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId OperationID which represents the export job. @@ -81,22 +79,18 @@ Mono> get( * @throws ManagementException 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 along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String vaultName, String operationId) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -110,18 +104,8 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - operationId, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, operationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -129,7 +113,7 @@ private Mono> getWithResponseAsync( * Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId OperationID which represents the export job. @@ -138,22 +122,18 @@ private Mono> getWithResponseAsync( * @throws ManagementException 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 along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String vaultName, String operationId, Context context) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -167,23 +147,15 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - operationId, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, operationId, accept, context); } /** * Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId OperationID which represents the export job. @@ -202,7 +174,7 @@ private Mono getAsync(String resourceGroupName, String va * Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId OperationID which represents the export job. @@ -213,8 +185,8 @@ private Mono getAsync(String resourceGroupName, String va * @return the operation result of operation triggered by Export Jobs API along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String vaultName, String operationId, Context context) { + public Response getWithResponse(String resourceGroupName, String vaultName, + String operationId, Context context) { return getWithResponseAsync(resourceGroupName, vaultName, operationId, context).block(); } @@ -222,7 +194,7 @@ public Response getWithResponse( * Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId OperationID which represents the export job. 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 553e0f713dda..5316b1fc5c7d 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 @@ -20,22 +20,18 @@ public final class ExportJobsOperationResultsImpl implements ExportJobsOperation private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public ExportJobsOperationResultsImpl( - ExportJobsOperationResultsClient innerClient, + public ExportJobsOperationResultsImpl(ExportJobsOperationResultsClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String vaultName, String operationId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, vaultName, operationId, context); + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ExportJobsResultImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsResultImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsResultImpl.java index 42591b48c755..0a1b5fb44b9e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsResultImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsResultImpl.java @@ -12,8 +12,7 @@ public final class ExportJobsResultImpl implements ExportJobsResult { private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - ExportJobsResultImpl( - ExportJobsResultInner innerObject, + ExportJobsResultImpl(ExportJobsResultInner innerObject, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FeatureValidationResponseBaseImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FeatureValidationResponseBaseImpl.java index 8e7c765972ac..7d23af2d5892 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FeatureValidationResponseBaseImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FeatureValidationResponseBaseImpl.java @@ -12,8 +12,7 @@ public final class FeatureValidationResponseBaseImpl implements FeatureValidatio private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - FeatureValidationResponseBaseImpl( - FeatureValidationResponseBaseInner innerObject, + FeatureValidationResponseBaseImpl(FeatureValidationResponseBaseInner innerObject, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchCrossRegionRestoreJobsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchCrossRegionRestoreJobsClientImpl.java new file mode 100644 index 000000000000..53179a57f720 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchCrossRegionRestoreJobsClientImpl.java @@ -0,0 +1,207 @@ +// 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.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.dataprotection.fluent.FetchCrossRegionRestoreJobsClient; +import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobRequest; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in FetchCrossRegionRestoreJobsClient. + */ +public final class FetchCrossRegionRestoreJobsClientImpl implements FetchCrossRegionRestoreJobsClient { + /** + * The proxy service used to perform REST calls. + */ + private final FetchCrossRegionRestoreJobsService service; + + /** + * The service client containing this operation class. + */ + private final DataProtectionClientImpl client; + + /** + * Initializes an instance of FetchCrossRegionRestoreJobsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FetchCrossRegionRestoreJobsClientImpl(DataProtectionClientImpl client) { + this.service = RestProxy.create(FetchCrossRegionRestoreJobsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DataProtectionClientFetchCrossRegionRestoreJobs to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DataProtectionClient") + public interface FetchCrossRegionRestoreJobsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/fetchCrossRegionRestoreJob") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @BodyParam("application/json") CrossRegionRestoreJobRequest parameters, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Fetches the Cross Region Restore Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 azureBackup Job Resource Class along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String location, + CrossRegionRestoreJobRequest 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location 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.get(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), location, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Fetches the Cross Region Restore Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 azureBackup Job Resource Class along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String location, + CrossRegionRestoreJobRequest parameters, 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location 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.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName, + this.client.getSubscriptionId(), location, parameters, accept, context); + } + + /** + * Fetches the Cross Region Restore Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 azureBackup Job Resource Class on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String location, + CrossRegionRestoreJobRequest parameters) { + return getWithResponseAsync(resourceGroupName, location, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Fetches the Cross Region Restore Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 azureBackup Job Resource Class along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String location, + CrossRegionRestoreJobRequest parameters, Context context) { + return getWithResponseAsync(resourceGroupName, location, parameters, context).block(); + } + + /** + * Fetches the Cross Region Restore Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 azureBackup Job Resource Class. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureBackupJobResourceInner get(String resourceGroupName, String location, + CrossRegionRestoreJobRequest parameters) { + return getWithResponse(resourceGroupName, location, parameters, Context.NONE).getValue(); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchCrossRegionRestoreJobsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchCrossRegionRestoreJobsImpl.java new file mode 100644 index 000000000000..e3278c4b9b42 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchCrossRegionRestoreJobsImpl.java @@ -0,0 +1,59 @@ +// 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.FetchCrossRegionRestoreJobsClient; +import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner; +import com.azure.resourcemanager.dataprotection.models.AzureBackupJobResource; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobRequest; +import com.azure.resourcemanager.dataprotection.models.FetchCrossRegionRestoreJobs; + +public final class FetchCrossRegionRestoreJobsImpl implements FetchCrossRegionRestoreJobs { + private static final ClientLogger LOGGER = new ClientLogger(FetchCrossRegionRestoreJobsImpl.class); + + private final FetchCrossRegionRestoreJobsClient innerClient; + + private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; + + public FetchCrossRegionRestoreJobsImpl(FetchCrossRegionRestoreJobsClient innerClient, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String location, + CrossRegionRestoreJobRequest parameters, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, location, parameters, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AzureBackupJobResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AzureBackupJobResource get(String resourceGroupName, String location, + CrossRegionRestoreJobRequest parameters) { + AzureBackupJobResourceInner inner = this.serviceClient().get(resourceGroupName, location, parameters); + if (inner != null) { + return new AzureBackupJobResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + private FetchCrossRegionRestoreJobsClient 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/FetchCrossRegionRestoreJobsOperationsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchCrossRegionRestoreJobsOperationsClientImpl.java new file mode 100644 index 000000000000..89459203c6da --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchCrossRegionRestoreJobsOperationsClientImpl.java @@ -0,0 +1,332 @@ +// 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.BodyParam; +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.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.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.FetchCrossRegionRestoreJobsOperationsClient; +import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner; +import com.azure.resourcemanager.dataprotection.models.AzureBackupJobResourceList; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobsRequest; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in + * FetchCrossRegionRestoreJobsOperationsClient. + */ +public final class FetchCrossRegionRestoreJobsOperationsClientImpl + implements FetchCrossRegionRestoreJobsOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final FetchCrossRegionRestoreJobsOperationsService service; + + /** + * The service client containing this operation class. + */ + private final DataProtectionClientImpl client; + + /** + * Initializes an instance of FetchCrossRegionRestoreJobsOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FetchCrossRegionRestoreJobsOperationsClientImpl(DataProtectionClientImpl client) { + this.service = RestProxy.create(FetchCrossRegionRestoreJobsOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DataProtectionClientFetchCrossRegionRestoreJobsOperations to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DataProtectionClient") + public interface FetchCrossRegionRestoreJobsOperationsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/fetchCrossRegionRestoreJobs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @QueryParam("$filter") String filter, + @BodyParam("application/json") CrossRegionRestoreJobsRequest parameters, + @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); + } + + /** + * Fetches list of Cross Region Restore job belonging to the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for operation. + * @param filter OData filter options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String location, CrossRegionRestoreJobsRequest parameters, String filter) { + 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location 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.list(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), location, filter, parameters, 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())); + } + + /** + * Fetches list of Cross Region Restore job belonging to the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for operation. + * @param filter OData filter options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String location, CrossRegionRestoreJobsRequest parameters, String filter, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location 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 + .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName, + this.client.getSubscriptionId(), location, filter, parameters, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Fetches list of Cross Region Restore job belonging to the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for operation. + * @param filter OData filter options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of AzureBackup Job resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String location, + CrossRegionRestoreJobsRequest parameters, String filter) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, location, parameters, filter), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Fetches list of Cross Region Restore job belonging to the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 of AzureBackup Job resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String location, + CrossRegionRestoreJobsRequest parameters) { + final String filter = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, location, parameters, filter), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Fetches list of Cross Region Restore job belonging to the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for operation. + * @param filter OData filter options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of AzureBackup Job resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String location, + CrossRegionRestoreJobsRequest parameters, String filter, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, location, parameters, filter, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Fetches list of Cross Region Restore job belonging to the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 of AzureBackup Job resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String location, + CrossRegionRestoreJobsRequest parameters) { + final String filter = null; + return new PagedIterable<>(listAsync(resourceGroupName, location, parameters, filter)); + } + + /** + * Fetches list of Cross Region Restore job belonging to the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for operation. + * @param filter OData filter options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of AzureBackup Job resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String location, + CrossRegionRestoreJobsRequest parameters, String filter, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, location, parameters, filter, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchCrossRegionRestoreJobsOperationsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchCrossRegionRestoreJobsOperationsImpl.java new file mode 100644 index 000000000000..527fa388dbc0 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchCrossRegionRestoreJobsOperationsImpl.java @@ -0,0 +1,50 @@ +// 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.FetchCrossRegionRestoreJobsOperationsClient; +import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner; +import com.azure.resourcemanager.dataprotection.models.AzureBackupJobResource; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobsRequest; +import com.azure.resourcemanager.dataprotection.models.FetchCrossRegionRestoreJobsOperations; + +public final class FetchCrossRegionRestoreJobsOperationsImpl implements FetchCrossRegionRestoreJobsOperations { + private static final ClientLogger LOGGER = new ClientLogger(FetchCrossRegionRestoreJobsOperationsImpl.class); + + private final FetchCrossRegionRestoreJobsOperationsClient innerClient; + + private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; + + public FetchCrossRegionRestoreJobsOperationsImpl(FetchCrossRegionRestoreJobsOperationsClient innerClient, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String location, + CrossRegionRestoreJobsRequest parameters) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, location, parameters); + return Utils.mapPage(inner, inner1 -> new AzureBackupJobResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String location, + CrossRegionRestoreJobsRequest parameters, String filter, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, location, parameters, filter, context); + return Utils.mapPage(inner, inner1 -> new AzureBackupJobResourceImpl(inner1, this.manager())); + } + + private FetchCrossRegionRestoreJobsOperationsClient 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/FetchSecondaryRecoveryPointsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchSecondaryRecoveryPointsClientImpl.java new file mode 100644 index 000000000000..310c2d792663 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchSecondaryRecoveryPointsClientImpl.java @@ -0,0 +1,348 @@ +// 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.BodyParam; +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.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.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.FetchSecondaryRecoveryPointsClient; +import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner; +import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointResourceList; +import com.azure.resourcemanager.dataprotection.models.FetchSecondaryRPsRequestParameters; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in FetchSecondaryRecoveryPointsClient. + */ +public final class FetchSecondaryRecoveryPointsClientImpl implements FetchSecondaryRecoveryPointsClient { + /** + * The proxy service used to perform REST calls. + */ + private final FetchSecondaryRecoveryPointsService service; + + /** + * The service client containing this operation class. + */ + private final DataProtectionClientImpl client; + + /** + * Initializes an instance of FetchSecondaryRecoveryPointsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FetchSecondaryRecoveryPointsClientImpl(DataProtectionClientImpl client) { + this.service = RestProxy.create(FetchSecondaryRecoveryPointsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DataProtectionClientFetchSecondaryRecoveryPoints to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DataProtectionClient") + public interface FetchSecondaryRecoveryPointsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/fetchSecondaryRecoveryPoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, + @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken, + @BodyParam("application/json") FetchSecondaryRPsRequestParameters parameters, + @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); + } + + /** + * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region + * Restore. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for operation. + * @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 along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String location, FetchSecondaryRPsRequestParameters parameters, 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 (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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location 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.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, location, filter, skipToken, parameters, 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())); + } + + /** + * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region + * Restore. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for operation. + * @param filter OData filter options. + * @param skipToken skipToken Filter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String location, FetchSecondaryRPsRequestParameters parameters, String filter, String skipToken, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location 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 + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, location, filter, skipToken, parameters, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region + * Restore. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for operation. + * @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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String location, + FetchSecondaryRPsRequestParameters parameters, String filter, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, location, parameters, filter, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region + * Restore. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 azureBackupRecoveryPointResourceList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String location, + FetchSecondaryRPsRequestParameters parameters) { + final String filter = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, location, parameters, filter, skipToken), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region + * Restore. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for operation. + * @param filter OData filter options. + * @param skipToken skipToken Filter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String location, + FetchSecondaryRPsRequestParameters parameters, String filter, String skipToken, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, location, parameters, filter, skipToken, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region + * Restore. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String location, + FetchSecondaryRPsRequestParameters parameters) { + final String filter = null; + final String skipToken = null; + return new PagedIterable<>(listAsync(resourceGroupName, location, parameters, filter, skipToken)); + } + + /** + * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region + * Restore. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for operation. + * @param filter OData filter options. + * @param skipToken skipToken Filter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String location, + FetchSecondaryRPsRequestParameters parameters, String filter, String skipToken, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, location, parameters, filter, skipToken, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureBackupRecoveryPointResourceList along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureBackupRecoveryPointResourceList 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/FetchSecondaryRecoveryPointsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchSecondaryRecoveryPointsImpl.java new file mode 100644 index 000000000000..24ad5988fe4c --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/FetchSecondaryRecoveryPointsImpl.java @@ -0,0 +1,50 @@ +// 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.FetchSecondaryRecoveryPointsClient; +import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner; +import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointResource; +import com.azure.resourcemanager.dataprotection.models.FetchSecondaryRPsRequestParameters; +import com.azure.resourcemanager.dataprotection.models.FetchSecondaryRecoveryPoints; + +public final class FetchSecondaryRecoveryPointsImpl implements FetchSecondaryRecoveryPoints { + private static final ClientLogger LOGGER = new ClientLogger(FetchSecondaryRecoveryPointsImpl.class); + + private final FetchSecondaryRecoveryPointsClient innerClient; + + private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; + + public FetchSecondaryRecoveryPointsImpl(FetchSecondaryRecoveryPointsClient innerClient, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String location, + FetchSecondaryRPsRequestParameters parameters) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, location, parameters); + return Utils.mapPage(inner, inner1 -> new AzureBackupRecoveryPointResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String location, + FetchSecondaryRPsRequestParameters parameters, String filter, String skipToken, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, location, parameters, filter, skipToken, context); + return Utils.mapPage(inner, inner1 -> new AzureBackupRecoveryPointResourceImpl(inner1, this.manager())); + } + + private FetchSecondaryRecoveryPointsClient 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/JobsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsClientImpl.java index d51c7a5da666..52117a3fc00b 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 @@ -30,17 +30,23 @@ import com.azure.resourcemanager.dataprotection.models.AzureBackupJobResourceList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobsClient. + */ public final class JobsClientImpl implements JobsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final JobsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DataProtectionClientImpl client; /** * Initializes an instance of JobsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ JobsClientImpl(DataProtectionClientImpl client) { @@ -55,71 +61,54 @@ public final class JobsClientImpl implements JobsClient { @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface JobsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, - @PathParam("jobId") String jobId, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("jobId") String jobId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Returns list of jobs belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String vaultName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String vaultName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -130,55 +119,35 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, 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())); } /** * Returns list of jobs belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String vaultName, Context context) { + private Mono> listSinglePageAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -190,28 +159,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns list of jobs belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -221,13 +177,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String vaultName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, vaultName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Returns list of jobs belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -237,16 +193,15 @@ private PagedFlux listAsync(String resourceGroupNam * @return list of AzureBackup Job resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String vaultName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, vaultName, context), + private PagedFlux listAsync(String resourceGroupName, String vaultName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Returns list of jobs belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -261,7 +216,7 @@ public PagedIterable list(String resourceGroupName, /** * Returns list of jobs belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -271,14 +226,14 @@ public PagedIterable list(String resourceGroupName, * @return list of AzureBackup Job resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String vaultName, Context context) { + public PagedIterable list(String resourceGroupName, String vaultName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, vaultName, context)); } /** * Gets a job with id in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param jobId The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). @@ -288,19 +243,15 @@ public PagedIterable list( * @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( - String resourceGroupName, String vaultName, String jobId) { + private Mono> getWithResponseAsync(String resourceGroupName, String vaultName, + String jobId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -314,24 +265,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - jobId, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, jobId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a job with id in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param jobId The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). @@ -342,19 +283,15 @@ private Mono> getWithResponseAsync( * @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( - String resourceGroupName, String vaultName, String jobId, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String vaultName, + String jobId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -368,21 +305,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - jobId, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, jobId, accept, context); } /** * Gets a job with id in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param jobId The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). @@ -399,7 +328,7 @@ private Mono getAsync(String resourceGroupName, Str /** * Gets a job with id in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param jobId The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). @@ -410,14 +339,14 @@ private Mono getAsync(String resourceGroupName, Str * @return a job with id in a backup vault along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String vaultName, String jobId, Context context) { + public Response getWithResponse(String resourceGroupName, String vaultName, + String jobId, Context context) { return getWithResponseAsync(resourceGroupName, vaultName, jobId, context).block(); } /** * Gets a job with id in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param jobId The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). @@ -433,14 +362,15 @@ public AzureBackupJobResourceInner get(String resourceGroupName, String vaultNam /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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) { @@ -448,37 +378,28 @@ private Mono> listNextSinglePageAsync 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.")); + 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)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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) { @@ -486,23 +407,13 @@ private Mono> listNextSinglePageAsync 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.")); + 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)); + 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/JobsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsImpl.java index a6a3b8c5988f..c8db886c0d65 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 @@ -21,8 +21,8 @@ public final class JobsImpl implements Jobs { private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public JobsImpl( - JobsClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + public JobsImpl(JobsClient innerClient, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -33,20 +33,17 @@ public PagedIterable list(String resourceGroupName, Stri } public PagedIterable list(String resourceGroupName, String vaultName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, vaultName, context); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, vaultName, context); return Utils.mapPage(inner, inner1 -> new AzureBackupJobResourceImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String vaultName, String jobId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, vaultName, jobId, context); + public Response getWithResponse(String resourceGroupName, String vaultName, String jobId, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, vaultName, jobId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AzureBackupJobResourceImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationJobExtendedInfoImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationJobExtendedInfoImpl.java index bcbc05fd8d5b..9e24d9cd2736 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationJobExtendedInfoImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationJobExtendedInfoImpl.java @@ -12,8 +12,7 @@ public final class OperationJobExtendedInfoImpl implements OperationJobExtendedI private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - OperationJobExtendedInfoImpl( - OperationJobExtendedInfoInner innerObject, + OperationJobExtendedInfoImpl(OperationJobExtendedInfoInner innerObject, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResourceImpl.java index 08d6a71dc858..cc809959f317 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResourceImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResourceImpl.java @@ -15,8 +15,7 @@ public final class OperationResourceImpl implements OperationResource { private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - OperationResourceImpl( - OperationResourceInner innerObject, + OperationResourceImpl(OperationResourceInner innerObject, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 99d117d502d5..0b07bc370311 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 @@ -25,22 +25,28 @@ import com.azure.resourcemanager.dataprotection.models.OperationResultsGetResponse; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationResultsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationResultsClient. + */ public final class OperationResultsClientImpl implements OperationResultsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationResultsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DataProtectionClientImpl client; /** * Initializes an instance of OperationResultsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationResultsClientImpl(DataProtectionClientImpl client) { - this.service = - RestProxy.create(OperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -51,26 +57,21 @@ public final class OperationResultsClientImpl implements OperationResultsClient @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface OperationResultsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationResults/{operationId}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationResults/{operationId}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("operationId") String operationId, - @PathParam("location") String location, - @HeaderParam("Accept") String accept, - Context context); + Mono get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("operationId") String operationId, @PathParam("location") String location, + @HeaderParam("Accept") String accept, Context context); } /** * Gets the operation status for a resource. - * - *

Gets the operation result for a resource. - * + * + * Gets the operation result for a resource. + * * @param operationId The operationId parameter. * @param location The location parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -81,16 +82,12 @@ Mono get( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getWithResponseAsync(String operationId, String location) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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.")); @@ -100,25 +97,16 @@ private Mono getWithResponseAsync(String operationI } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - operationId, - location, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), operationId, location, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the operation status for a resource. - * - *

Gets the operation result for a resource. - * + * + * Gets the operation result for a resource. + * * @param operationId The operationId parameter. * @param location The location parameter. * @param context The context to associate with this operation. @@ -128,19 +116,15 @@ private Mono getWithResponseAsync(String operationI * @return the operation result for a resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync( - String operationId, String location, Context context) { + private Mono getWithResponseAsync(String operationId, String location, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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.")); @@ -150,22 +134,15 @@ private Mono getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - operationId, - location, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + operationId, location, accept, context); } /** * Gets the operation status for a resource. - * - *

Gets the operation result for a resource. - * + * + * Gets the operation result for a resource. + * * @param operationId The operationId parameter. * @param location The location parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -180,9 +157,9 @@ private Mono getAsync(String operationId, String /** * Gets the operation status for a resource. - * - *

Gets the operation result for a resource. - * + * + * Gets the operation result for a resource. + * * @param operationId The operationId parameter. * @param location The location parameter. * @param context The context to associate with this operation. @@ -198,9 +175,9 @@ public OperationResultsGetResponse getWithResponse(String operationId, String lo /** * Gets the operation status for a resource. - * - *

Gets the operation result for a resource. - * + * + * Gets the operation result for a resource. + * * @param operationId The operationId parameter. * @param location The location parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 f55ba404e21e..a6914182ddfc 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 @@ -21,8 +21,7 @@ public final class OperationResultsImpl implements OperationResults { private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public OperationResultsImpl( - OperationResultsClient innerClient, + public OperationResultsImpl(OperationResultsClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -31,10 +30,7 @@ public OperationResultsImpl( public Response getWithResponse(String operationId, String location, Context context) { OperationResultsGetResponse inner = this.serviceClient().getWithResponse(operationId, location, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new OperationJobExtendedInfoImpl(inner.getValue(), this.manager())); } else { return null; 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 index 6249467cbd58..e9991f234dec 100644 --- 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 @@ -29,24 +29,24 @@ * 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. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationStatusBackupVaultContextsService service; - /** The service client containing this operation class. */ + /** + * 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.service = RestProxy.create(OperationStatusBackupVaultContextsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,25 +57,20 @@ public final class OperationStatusBackupVaultContextsClientImpl implements Opera @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface OperationStatusBackupVaultContextsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/operationStatus/{operationId}") - @ExpectedResponses({200}) + @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, + 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); + @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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. @@ -83,22 +78,18 @@ Mono> get( * @throws ManagementException 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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String vaultName, String operationId) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -112,24 +103,14 @@ private Mono> getWithResponseAsync( } 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)) + .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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. @@ -138,22 +119,18 @@ private Mono> getWithResponseAsync( * @throws ManagementException 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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String vaultName, String operationId, Context context) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -167,29 +144,21 @@ private Mono> getWithResponseAsync( } 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); + 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. The name is case insensitive. * @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}. + * @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) { @@ -199,7 +168,7 @@ private Mono getAsync(String resourceGroupName, String v /** * Gets the operation status for an operation over a BackupVault's context. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. @@ -210,14 +179,14 @@ private Mono getAsync(String resourceGroupName, String v * @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) { + public Response getWithResponse(String resourceGroupName, String vaultName, + String operationId, Context context) { return getWithResponseAsync(resourceGroupName, vaultName, operationId, context).block(); } /** * Gets the operation status for an operation over a BackupVault's context. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. 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 index 29fe80f3cbe1..10cab7fb7b6f 100644 --- 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 @@ -20,22 +20,18 @@ public final class OperationStatusBackupVaultContextsImpl implements OperationSt private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public OperationStatusBackupVaultContextsImpl( - OperationStatusBackupVaultContextsClient innerClient, + public OperationStatusBackupVaultContextsImpl(OperationStatusBackupVaultContextsClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String vaultName, String operationId, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, vaultName, operationId, context); + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new OperationResourceImpl(inner.getValue(), this.manager())); } else { return null; 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 fdc735d8f12e..ff1f1eac6f7a 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 @@ -25,22 +25,28 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in OperationStatusClient. + */ public final class OperationStatusClientImpl implements OperationStatusClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationStatusService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DataProtectionClientImpl client; /** * Initializes an instance of OperationStatusClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationStatusClientImpl(DataProtectionClientImpl client) { - this.service = - RestProxy.create(OperationStatusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationStatusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -51,24 +57,19 @@ public final class OperationStatusClientImpl implements OperationStatusClient { @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface OperationStatusService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationStatus/{operationId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationStatus/{operationId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @PathParam("operationId") String operationId, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, Context context); } /** * Gets the operation status for a resource. - * + * * @param location The location parameter. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,16 +80,12 @@ Mono> get( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String location, String operationId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -98,23 +95,14 @@ private Mono> getWithResponseAsync(String locat } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - operationId, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, operationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the operation status for a resource. - * + * * @param location The location parameter. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -124,19 +112,15 @@ private Mono> getWithResponseAsync(String locat * @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, Context context) { + private Mono> getWithResponseAsync(String location, String operationId, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -146,20 +130,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - operationId, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, operationId, accept, context); } /** * Gets the operation status for a resource. - * + * * @param location The location parameter. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -174,7 +151,7 @@ private Mono getAsync(String location, String operationI /** * Gets the operation status for a resource. - * + * * @param location The location parameter. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -190,7 +167,7 @@ public Response getWithResponse(String location, String /** * Gets the operation status for a resource. - * + * * @param location The location parameter. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 5e5aca72effc..dd4ceb667f46 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 @@ -20,8 +20,7 @@ public final class OperationStatusImpl implements OperationStatus { private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public OperationStatusImpl( - OperationStatusClient innerClient, + public OperationStatusImpl(OperationStatusClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -30,10 +29,7 @@ public OperationStatusImpl( public Response getWithResponse(String location, String operationId, Context context) { Response inner = this.serviceClient().getWithResponse(location, operationId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new OperationResourceImpl(inner.getValue(), this.manager())); } else { return null; 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 index 957f20e81b2c..f0894b7cee6b 100644 --- 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 @@ -31,24 +31,24 @@ */ public final class OperationStatusResourceGroupContextsClientImpl implements OperationStatusResourceGroupContextsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationStatusResourceGroupContextsService service; - /** The service client containing this operation class. */ + /** + * 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.service = RestProxy.create(OperationStatusResourceGroupContextsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -59,73 +59,55 @@ public final class OperationStatusResourceGroupContextsClientImpl @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface OperationStatusResourceGroupContextsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/operationStatus/{operationId}") - @ExpectedResponses({200}) + @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); + 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. The name is case insensitive. * @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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String operationId) { + 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.")); + 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.")); + 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)) + .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. The name is case insensitive. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -133,53 +115,42 @@ private Mono> getByResourceGroupWithResponseAsy * @throws ManagementException 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}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String operationId, Context context) { + 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.")); + 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.")); + 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); + 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. The name is case insensitive. * @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}. + * @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) { @@ -189,7 +160,7 @@ private Mono getByResourceGroupAsync(String resourceGrou /** * Gets the operation status for an operation over a ResourceGroup's context. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -199,14 +170,14 @@ private Mono getByResourceGroupAsync(String resourceGrou * @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) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String operationId, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, operationId, context).block(); } /** * Gets the operation status for an operation over a ResourceGroup's context. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 index 927457bd0eee..6bfcaceb191b 100644 --- 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 @@ -20,22 +20,18 @@ public final class OperationStatusResourceGroupContextsImpl implements Operation private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public OperationStatusResourceGroupContextsImpl( - OperationStatusResourceGroupContextsClient innerClient, + public OperationStatusResourceGroupContextsImpl(OperationStatusResourceGroupContextsClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String operationId, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, operationId, context); + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new OperationResourceImpl(inner.getValue(), this.manager())); } else { return null; 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 17b8270d8026..ddaf1859bac9 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 @@ -30,79 +30,71 @@ import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointResourceList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in RecoveryPointsClient. */ +/** + * An instance of this class provides access to all the operations defined in RecoveryPointsClient. + */ public final class RecoveryPointsClientImpl implements RecoveryPointsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final RecoveryPointsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DataProtectionClientImpl client; /** * Initializes an instance of RecoveryPointsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ RecoveryPointsClientImpl(DataProtectionClientImpl client) { - this.service = - RestProxy.create(RecoveryPointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(RecoveryPointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for DataProtectionClientRecoveryPoints to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for DataProtectionClientRecoveryPoints to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface RecoveryPointsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @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, - @QueryParam("$filter") String filter, - @QueryParam("$skipToken") String skipToken, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@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, @QueryParam("$filter") String filter, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints/{recoveryPointId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints/{recoveryPointId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, + Mono> get(@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, - @PathParam("recoveryPointId") String recoveryPointId, - @HeaderParam("Accept") String accept, + @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Returns a list of Recovery Points for a DataSource in a vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -111,23 +103,19 @@ 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 azureBackupRecoveryPointResourceList along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return azureBackupRecoveryPointResourceList along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String vaultName, String backupInstanceName, String filter, String skipToken) { + private Mono> listSinglePageAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -142,35 +130,17 @@ private Mono> listSinglePag } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - filter, - skipToken, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupInstanceName, filter, skipToken, + 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())); } /** * Returns a list of Recovery Points for a DataSource in a vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -180,28 +150,19 @@ 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 along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return azureBackupRecoveryPointResourceList along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - String filter, - String skipToken, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String vaultName, String backupInstanceName, String filter, String skipToken, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -217,31 +178,15 @@ private Mono> listSinglePag final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - filter, - skipToken, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, backupInstanceName, filter, skipToken, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns a list of Recovery Points for a DataSource in a vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -253,8 +198,8 @@ private Mono> listSinglePag * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String vaultName, String backupInstanceName, String filter, String skipToken) { + private PagedFlux listAsync(String resourceGroupName, String vaultName, + String backupInstanceName, String filter, String skipToken) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, vaultName, backupInstanceName, filter, skipToken), nextLink -> listNextSinglePageAsync(nextLink)); @@ -262,7 +207,7 @@ private PagedFlux listAsync( /** * Returns a list of Recovery Points for a DataSource in a vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -272,8 +217,8 @@ private PagedFlux listAsync( * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String vaultName, String backupInstanceName) { + private PagedFlux listAsync(String resourceGroupName, String vaultName, + String backupInstanceName) { final String filter = null; final String skipToken = null; return new PagedFlux<>( @@ -283,7 +228,7 @@ private PagedFlux listAsync( /** * Returns a list of Recovery Points for a DataSource in a vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -296,13 +241,8 @@ private PagedFlux listAsync( * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - String filter, - String skipToken, - Context context) { + private PagedFlux listAsync(String resourceGroupName, String vaultName, + String backupInstanceName, String filter, String skipToken, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, vaultName, backupInstanceName, filter, skipToken, context), nextLink -> listNextSinglePageAsync(nextLink, context)); @@ -310,7 +250,7 @@ private PagedFlux listAsync( /** * Returns a list of Recovery Points for a DataSource in a vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -320,8 +260,8 @@ private PagedFlux listAsync( * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String vaultName, String backupInstanceName) { + public PagedIterable list(String resourceGroupName, String vaultName, + String backupInstanceName) { final String filter = null; final String skipToken = null; return new PagedIterable<>(listAsync(resourceGroupName, vaultName, backupInstanceName, filter, skipToken)); @@ -329,7 +269,7 @@ public PagedIterable list( /** * Returns a list of Recovery Points for a DataSource in a vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -342,20 +282,15 @@ public PagedIterable list( * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String vaultName, - String backupInstanceName, - String filter, - String skipToken, - Context context) { + public PagedIterable list(String resourceGroupName, String vaultName, + String backupInstanceName, String filter, String skipToken, Context context) { return new PagedIterable<>( listAsync(resourceGroupName, vaultName, backupInstanceName, filter, skipToken, context)); } /** * Gets a Recovery Point using recoveryPointId for a Datasource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -364,22 +299,18 @@ public PagedIterable list( * @throws 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 along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String vaultName, String backupInstanceName, String recoveryPointId) { + private Mono> getWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -398,25 +329,15 @@ private Mono> getWithResponseAsy } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - recoveryPointId, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupInstanceName, recoveryPointId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a Recovery Point using recoveryPointId for a Datasource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -426,26 +347,18 @@ private Mono> getWithResponseAsy * @throws 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 along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - String recoveryPointId, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String vaultName, String backupInstanceName, String recoveryPointId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -464,22 +377,13 @@ private Mono> getWithResponseAsy } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - recoveryPointId, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, backupInstanceName, recoveryPointId, accept, context); } /** * Gets a Recovery Point using recoveryPointId for a Datasource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -490,15 +394,15 @@ private Mono> getWithResponseAsy * @return a Recovery Point using recoveryPointId for a Datasource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String vaultName, String backupInstanceName, String recoveryPointId) { + private Mono getAsync(String resourceGroupName, String vaultName, + String backupInstanceName, String recoveryPointId) { return getWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, recoveryPointId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a Recovery Point using recoveryPointId for a Datasource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -510,18 +414,14 @@ private Mono getAsync( * @return a Recovery Point using recoveryPointId for a Datasource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String vaultName, - String backupInstanceName, - String recoveryPointId, - Context context) { + public Response getWithResponse(String resourceGroupName, String vaultName, + String backupInstanceName, String recoveryPointId, Context context) { return getWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, recoveryPointId, context).block(); } /** * Gets a Recovery Point using recoveryPointId for a Datasource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -532,22 +432,23 @@ public Response getWithResponse( * @return a Recovery Point using recoveryPointId for a Datasource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AzureBackupRecoveryPointResourceInner get( - String resourceGroupName, String vaultName, String backupInstanceName, String recoveryPointId) { + public AzureBackupRecoveryPointResourceInner get(String resourceGroupName, String vaultName, + String backupInstanceName, String recoveryPointId) { return getWithResponse(resourceGroupName, vaultName, backupInstanceName, recoveryPointId, Context.NONE) .getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 azureBackupRecoveryPointResourceList along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return azureBackupRecoveryPointResourceList along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -555,62 +456,43 @@ private Mono> listNextSingl 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.")); + 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)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 azureBackupRecoveryPointResourceList along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return azureBackupRecoveryPointResourceList along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + 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.")); + 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)); + 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/RecoveryPointsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsImpl.java index aec72343936e..34797257df3c 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 @@ -21,57 +21,42 @@ public final class RecoveryPointsImpl implements RecoveryPoints { private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public RecoveryPointsImpl( - RecoveryPointsClient innerClient, + public RecoveryPointsImpl(RecoveryPointsClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable list( - String resourceGroupName, String vaultName, String backupInstanceName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, vaultName, backupInstanceName); + public PagedIterable list(String resourceGroupName, String vaultName, + String backupInstanceName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, vaultName, backupInstanceName); return Utils.mapPage(inner, inner1 -> new AzureBackupRecoveryPointResourceImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, - String vaultName, - String backupInstanceName, - String filter, - String skipToken, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, vaultName, backupInstanceName, filter, skipToken, context); + public PagedIterable list(String resourceGroupName, String vaultName, + String backupInstanceName, String filter, String skipToken, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, vaultName, backupInstanceName, filter, skipToken, context); return Utils.mapPage(inner, inner1 -> new AzureBackupRecoveryPointResourceImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, - String vaultName, - String backupInstanceName, - String recoveryPointId, - Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, vaultName, backupInstanceName, recoveryPointId, context); + public Response getWithResponse(String resourceGroupName, String vaultName, + String backupInstanceName, String recoveryPointId, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + vaultName, backupInstanceName, recoveryPointId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AzureBackupRecoveryPointResourceImpl(inner.getValue(), this.manager())); } else { return null; } } - public AzureBackupRecoveryPointResource get( - String resourceGroupName, String vaultName, String backupInstanceName, String recoveryPointId) { - AzureBackupRecoveryPointResourceInner inner = - this.serviceClient().get(resourceGroupName, vaultName, backupInstanceName, recoveryPointId); + public AzureBackupRecoveryPointResource get(String resourceGroupName, String vaultName, String backupInstanceName, + String recoveryPointId) { + AzureBackupRecoveryPointResourceInner inner + = this.serviceClient().get(resourceGroupName, vaultName, backupInstanceName, recoveryPointId); if (inner != null) { return new AzureBackupRecoveryPointResourceImpl(inner, this.manager()); } else { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardProxyBaseResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardProxyBaseResourceImpl.java index 9660797cfd29..188bd58bbef7 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardProxyBaseResourceImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardProxyBaseResourceImpl.java @@ -13,10 +13,8 @@ import com.azure.resourcemanager.dataprotection.models.UnlockDeleteRequest; import com.azure.resourcemanager.dataprotection.models.UnlockDeleteResponse; -public final class ResourceGuardProxyBaseResourceImpl - implements ResourceGuardProxyBaseResource, - ResourceGuardProxyBaseResource.Definition, - ResourceGuardProxyBaseResource.Update { +public final class ResourceGuardProxyBaseResourceImpl implements ResourceGuardProxyBaseResource, + ResourceGuardProxyBaseResource.Definition, ResourceGuardProxyBaseResource.Update { private ResourceGuardProxyBaseResourceInner innerObject; private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; @@ -66,29 +64,21 @@ public ResourceGuardProxyBaseResourceImpl withExistingBackupVault(String resourc } public ResourceGuardProxyBaseResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getDppResourceGuardProxies() - .createOrUpdateWithResponse( - resourceGroupName, vaultName, resourceGuardProxyName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getDppResourceGuardProxies().createOrUpdateWithResponse(resourceGroupName, + vaultName, resourceGuardProxyName, this.innerModel(), Context.NONE).getValue(); return this; } public ResourceGuardProxyBaseResource create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDppResourceGuardProxies() - .createOrUpdateWithResponse( - resourceGroupName, vaultName, resourceGuardProxyName, this.innerModel(), context) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getDppResourceGuardProxies().createOrUpdateWithResponse(resourceGroupName, + vaultName, resourceGuardProxyName, this.innerModel(), context).getValue(); return this; } - ResourceGuardProxyBaseResourceImpl( - String name, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + ResourceGuardProxyBaseResourceImpl(String name, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = new ResourceGuardProxyBaseResourceInner(); this.serviceManager = serviceManager; this.resourceGuardProxyName = name; @@ -99,29 +89,20 @@ public ResourceGuardProxyBaseResourceImpl update() { } public ResourceGuardProxyBaseResource apply() { - this.innerObject = - serviceManager - .serviceClient() - .getDppResourceGuardProxies() - .createOrUpdateWithResponse( - resourceGroupName, vaultName, resourceGuardProxyName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getDppResourceGuardProxies().createOrUpdateWithResponse(resourceGroupName, + vaultName, resourceGuardProxyName, this.innerModel(), Context.NONE).getValue(); return this; } public ResourceGuardProxyBaseResource apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDppResourceGuardProxies() - .createOrUpdateWithResponse( - resourceGroupName, vaultName, resourceGuardProxyName, this.innerModel(), context) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getDppResourceGuardProxies().createOrUpdateWithResponse(resourceGroupName, + vaultName, resourceGuardProxyName, this.innerModel(), context).getValue(); return this; } - ResourceGuardProxyBaseResourceImpl( - ResourceGuardProxyBaseResourceInner innerObject, + ResourceGuardProxyBaseResourceImpl(ResourceGuardProxyBaseResourceInner innerObject, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -131,35 +112,25 @@ public ResourceGuardProxyBaseResource apply(Context context) { } public ResourceGuardProxyBaseResource refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getDppResourceGuardProxies() - .getWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDppResourceGuardProxies() + .getWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, Context.NONE).getValue(); return this; } public ResourceGuardProxyBaseResource refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDppResourceGuardProxies() - .getWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDppResourceGuardProxies() + .getWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, context).getValue(); return this; } public Response unlockDeleteWithResponse(UnlockDeleteRequest parameters, Context context) { - return serviceManager - .dppResourceGuardProxies() - .unlockDeleteWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, parameters, context); + return serviceManager.dppResourceGuardProxies().unlockDeleteWithResponse(resourceGroupName, vaultName, + resourceGuardProxyName, parameters, context); } public UnlockDeleteResponse unlockDelete(UnlockDeleteRequest parameters) { - return serviceManager - .dppResourceGuardProxies() - .unlockDelete(resourceGroupName, vaultName, resourceGuardProxyName, parameters); + return serviceManager.dppResourceGuardProxies().unlockDelete(resourceGroupName, vaultName, + resourceGuardProxyName, parameters); } public ResourceGuardProxyBaseResourceImpl withProperties(ResourceGuardProxyBase properties) { 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 7d07d5835e0c..fbf54bc737b8 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 @@ -89,27 +89,19 @@ public ResourceGuardResourceImpl withExistingResourceGroup(String resourceGroupN } public ResourceGuardResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getResourceGuards() - .putWithResponse(resourceGroupName, resourceGuardsName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getResourceGuards() + .putWithResponse(resourceGroupName, resourceGuardsName, this.innerModel(), Context.NONE).getValue(); return this; } public ResourceGuardResource create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getResourceGuards() - .putWithResponse(resourceGroupName, resourceGuardsName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getResourceGuards() + .putWithResponse(resourceGroupName, resourceGuardsName, this.innerModel(), context).getValue(); return this; } - ResourceGuardResourceImpl( - String name, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + ResourceGuardResourceImpl(String name, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = new ResourceGuardResourceInner(); this.serviceManager = serviceManager; this.resourceGuardsName = name; @@ -121,27 +113,18 @@ public ResourceGuardResourceImpl update() { } public ResourceGuardResource apply() { - this.innerObject = - serviceManager - .serviceClient() - .getResourceGuards() - .patchWithResponse(resourceGroupName, resourceGuardsName, updateParameters, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getResourceGuards() + .patchWithResponse(resourceGroupName, resourceGuardsName, updateParameters, Context.NONE).getValue(); return this; } public ResourceGuardResource apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getResourceGuards() - .patchWithResponse(resourceGroupName, resourceGuardsName, updateParameters, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getResourceGuards() + .patchWithResponse(resourceGroupName, resourceGuardsName, updateParameters, context).getValue(); return this; } - ResourceGuardResourceImpl( - ResourceGuardResourceInner innerObject, + ResourceGuardResourceImpl(ResourceGuardResourceInner innerObject, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -150,22 +133,14 @@ public ResourceGuardResource apply(Context context) { } public ResourceGuardResource refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getResourceGuards() - .getByResourceGroupWithResponse(resourceGroupName, resourceGuardsName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getResourceGuards() + .getByResourceGroupWithResponse(resourceGroupName, resourceGuardsName, Context.NONE).getValue(); return this; } public ResourceGuardResource refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getResourceGuards() - .getByResourceGroupWithResponse(resourceGroupName, resourceGuardsName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getResourceGuards() + .getByResourceGroupWithResponse(resourceGroupName, resourceGuardsName, context).getValue(); return this; } 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 d3f9ae7bb1ff..e9f92b56aa0a 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 @@ -37,474 +37,362 @@ import com.azure.resourcemanager.dataprotection.models.ResourceGuardResourceList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ResourceGuardsClient. */ +/** + * An instance of this class provides access to all the operations defined in ResourceGuardsClient. + */ public final class ResourceGuardsClientImpl implements ResourceGuardsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ResourceGuardsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DataProtectionClientImpl client; /** * Initializes an instance of ResourceGuardsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ResourceGuardsClientImpl(DataProtectionClientImpl client) { - this.service = - RestProxy.create(ResourceGuardsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ResourceGuardsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for DataProtectionClientResourceGuards to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for DataProtectionClientResourceGuards to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface ResourceGuardsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/resourceGuards") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @HeaderParam("Accept") String accept, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> put( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("resourceGroupName") String resourceGroupName, + Mono> put(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, - @BodyParam("application/json") ResourceGuardResourceInner parameters, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ResourceGuardResourceInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("resourceGroupName") String resourceGroupName, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGuardsName") String resourceGuardsName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGuardsName") String resourceGuardsName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGuardsName") String resourceGuardsName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGuardsName") String resourceGuardsName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> patch( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("resourceGroupName") String resourceGroupName, + Mono> patch(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, - @BodyParam("application/json") PatchResourceGuardInput parameters, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") PatchResourceGuardInput parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDisableSoftDeleteRequestsObjects( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("resourceGroupName") String resourceGroupName, + Mono> getDisableSoftDeleteRequestsObjects(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGuardsName") String resourceGuardsName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGuardsName") String resourceGuardsName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDeleteResourceGuardProxyRequestsObjects( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGuardsName") String resourceGuardsName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGuardsName") String resourceGuardsName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getBackupSecurityPinRequestsObjects( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("resourceGroupName") String resourceGroupName, + Mono> getBackupSecurityPinRequestsObjects(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGuardsName") String resourceGuardsName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGuardsName") String resourceGuardsName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDeleteProtectedItemRequestsObjects( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("resourceGroupName") String resourceGroupName, + Mono> getDeleteProtectedItemRequestsObjects(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGuardsName") String resourceGuardsName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGuardsName") String resourceGuardsName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getUpdateProtectionPolicyRequestsObjects( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGuardsName") String resourceGuardsName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGuardsName") String resourceGuardsName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getUpdateProtectedItemRequestsObjects( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("resourceGroupName") String resourceGroupName, + Mono> getUpdateProtectedItemRequestsObjects(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGuardsName") String resourceGuardsName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGuardsName") String resourceGuardsName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests/{requestName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests/{requestName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDefaultDisableSoftDeleteRequestsObject( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGuardsName") String resourceGuardsName, - @PathParam("requestName") String requestName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGuardsName") String resourceGuardsName, @PathParam("requestName") String requestName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests/{requestName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests/{requestName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDefaultDeleteResourceGuardProxyRequestsObject( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGuardsName") String resourceGuardsName, - @PathParam("requestName") String requestName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGuardsName") String resourceGuardsName, @PathParam("requestName") String requestName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests/{requestName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests/{requestName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDefaultBackupSecurityPinRequestsObject( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGuardsName") String resourceGuardsName, - @PathParam("requestName") String requestName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGuardsName") String resourceGuardsName, @PathParam("requestName") String requestName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests/{requestName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests/{requestName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDefaultDeleteProtectedItemRequestsObject( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGuardsName") String resourceGuardsName, - @PathParam("requestName") String requestName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGuardsName") String resourceGuardsName, @PathParam("requestName") String requestName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests/{requestName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests/{requestName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDefaultUpdateProtectionPolicyRequestsObject( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGuardsName") String resourceGuardsName, - @PathParam("requestName") String requestName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGuardsName") String resourceGuardsName, @PathParam("requestName") String requestName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests/{requestName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests/{requestName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDefaultUpdateProtectedItemRequestsObject( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGuardsName") String resourceGuardsName, - @PathParam("requestName") String requestName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGuardsName") String resourceGuardsName, @PathParam("requestName") String requestName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getResourcesInSubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getResourcesInResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDisableSoftDeleteRequestsObjectsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDeleteResourceGuardProxyRequestsObjectsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getBackupSecurityPinRequestsObjectsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDeleteProtectedItemRequestsObjectsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getUpdateProtectionPolicyRequestsObjectsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getUpdateProtectedItemRequestsObjectsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Returns ResourceGuards collection belonging to a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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())); } /** * Returns ResourceGuards collection belonging to a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns ResourceGuards collection belonging to a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of ResourceGuard resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> getResourcesInSubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> getResourcesInSubscriptionNextSinglePageAsync(nextLink)); } /** * Returns ResourceGuards collection belonging to a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -513,14 +401,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), + return new PagedFlux<>(() -> listSinglePageAsync(context), nextLink -> getResourcesInSubscriptionNextSinglePageAsync(nextLink, context)); } /** * Returns ResourceGuards collection belonging to a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}. @@ -532,7 +419,7 @@ public PagedIterable list() { /** * Returns ResourceGuards collection belonging to a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -546,28 +433,24 @@ public PagedIterable list(Context context) { /** * Returns ResourceGuards collection belonging to a ResourceGroup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -575,53 +458,34 @@ private Mono> listByResourceGroupSingl } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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())); } /** * Returns ResourceGuards collection belonging to a ResourceGroup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -630,27 +494,15 @@ private Mono> listByResourceGroupSingl final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns ResourceGuards collection belonging to a ResourceGroup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -659,14 +511,13 @@ private Mono> listByResourceGroupSingl */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> getResourcesInResourceGroupNextSinglePageAsync(nextLink)); } /** * Returns ResourceGuards collection belonging to a ResourceGroup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -676,14 +527,13 @@ private PagedFlux listByResourceGroupAsync(String re */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> getResourcesInResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Returns ResourceGuards collection belonging to a ResourceGroup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -697,7 +547,7 @@ public PagedIterable listByResourceGroup(String reso /** * Returns ResourceGuards collection belonging to a ResourceGroup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -712,7 +562,7 @@ public PagedIterable listByResourceGroup(String reso /** * Creates or updates a ResourceGuard resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param parameters Request body for operation. @@ -722,23 +572,19 @@ public PagedIterable listByResourceGroup(String reso * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync( - String resourceGroupName, String resourceGuardsName, ResourceGuardResourceInner parameters) { + private Mono> putWithResponseAsync(String resourceGroupName, + String resourceGuardsName, ResourceGuardResourceInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -751,24 +597,14 @@ private Mono> putWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .put( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - parameters, - accept, - context)) + .withContext(context -> service.put(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a ResourceGuard resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param parameters Request body for operation. @@ -779,23 +615,19 @@ private Mono> putWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync( - String resourceGroupName, String resourceGuardsName, ResourceGuardResourceInner parameters, Context context) { + private Mono> putWithResponseAsync(String resourceGroupName, + String resourceGuardsName, ResourceGuardResourceInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -808,21 +640,13 @@ private Mono> putWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .put( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - parameters, - accept, - context); + return service.put(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName, + this.client.getSubscriptionId(), resourceGuardsName, parameters, accept, context); } /** * Creates or updates a ResourceGuard resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param parameters Request body for operation. @@ -832,15 +656,15 @@ private Mono> putWithResponseAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono putAsync( - String resourceGroupName, String resourceGuardsName, ResourceGuardResourceInner parameters) { + private Mono putAsync(String resourceGroupName, String resourceGuardsName, + ResourceGuardResourceInner parameters) { return putWithResponseAsync(resourceGroupName, resourceGuardsName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a ResourceGuard resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param parameters Request body for operation. @@ -851,14 +675,14 @@ private Mono putAsync( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response putWithResponse( - String resourceGroupName, String resourceGuardsName, ResourceGuardResourceInner parameters, Context context) { + public Response putWithResponse(String resourceGroupName, String resourceGuardsName, + ResourceGuardResourceInner parameters, Context context) { return putWithResponseAsync(resourceGroupName, resourceGuardsName, parameters, context).block(); } /** * Creates or updates a ResourceGuard resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param parameters Request body for operation. @@ -868,14 +692,14 @@ public Response putWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResourceGuardResourceInner put( - String resourceGroupName, String resourceGuardsName, ResourceGuardResourceInner parameters) { + public ResourceGuardResourceInner put(String resourceGroupName, String resourceGuardsName, + ResourceGuardResourceInner parameters) { return putWithResponse(resourceGroupName, resourceGuardsName, parameters, Context.NONE).getValue(); } /** * Returns a ResourceGuard belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -884,23 +708,19 @@ public ResourceGuardResourceInner put( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceGuardsName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceGuardsName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -908,23 +728,14 @@ private Mono> getByResourceGroupWithRespons } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns a ResourceGuard belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param context The context to associate with this operation. @@ -934,23 +745,19 @@ private Mono> getByResourceGroupWithRespons * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceGuardsName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceGuardsName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -958,20 +765,13 @@ private Mono> getByResourceGroupWithRespons } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName, + this.client.getSubscriptionId(), resourceGuardsName, accept, context); } /** * Returns a ResourceGuard belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -980,15 +780,15 @@ private Mono> getByResourceGroupWithRespons * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync( - String resourceGroupName, String resourceGuardsName) { + private Mono getByResourceGroupAsync(String resourceGroupName, + String resourceGuardsName) { return getByResourceGroupWithResponseAsync(resourceGroupName, resourceGuardsName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Returns a ResourceGuard belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param context The context to associate with this operation. @@ -998,14 +798,14 @@ private Mono getByResourceGroupAsync( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceGuardsName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String resourceGuardsName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, resourceGuardsName, context).block(); } /** * Returns a ResourceGuard belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1020,7 +820,7 @@ public ResourceGuardResourceInner getByResourceGroup(String resourceGroupName, S /** * Deletes a ResourceGuard resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1031,20 +831,16 @@ public ResourceGuardResourceInner getByResourceGroup(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceGuardsName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -1052,23 +848,14 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a ResourceGuard resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param context The context to associate with this operation. @@ -1078,23 +865,19 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String resourceGuardsName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceGuardsName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -1102,20 +885,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName, + this.client.getSubscriptionId(), resourceGuardsName, accept, context); } /** * Deletes a ResourceGuard resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1130,7 +906,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceGuardsNa /** * Deletes a ResourceGuard resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param context The context to associate with this operation. @@ -1146,7 +922,7 @@ public Response deleteWithResponse(String resourceGroupName, String resour /** * Deletes a ResourceGuard resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1160,7 +936,7 @@ public void delete(String resourceGroupName, String resourceGuardsName) { /** * Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param parameters Request body for operation. @@ -1170,23 +946,19 @@ public void delete(String resourceGroupName, String resourceGuardsName) { * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> patchWithResponseAsync( - String resourceGroupName, String resourceGuardsName, PatchResourceGuardInput parameters) { + private Mono> patchWithResponseAsync(String resourceGroupName, + String resourceGuardsName, PatchResourceGuardInput parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -1199,24 +971,14 @@ private Mono> patchWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .patch( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - parameters, - accept, - context)) + .withContext(context -> service.patch(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param parameters Request body for operation. @@ -1227,23 +989,19 @@ private Mono> patchWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> patchWithResponseAsync( - String resourceGroupName, String resourceGuardsName, PatchResourceGuardInput parameters, Context context) { + private Mono> patchWithResponseAsync(String resourceGroupName, + String resourceGuardsName, PatchResourceGuardInput parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -1256,21 +1014,13 @@ private Mono> patchWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .patch( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - parameters, - accept, - context); + return service.patch(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName, + this.client.getSubscriptionId(), resourceGuardsName, parameters, accept, context); } /** * Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param parameters Request body for operation. @@ -1280,15 +1030,15 @@ private Mono> patchWithResponseAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono patchAsync( - String resourceGroupName, String resourceGuardsName, PatchResourceGuardInput parameters) { + private Mono patchAsync(String resourceGroupName, String resourceGuardsName, + PatchResourceGuardInput parameters) { return patchWithResponseAsync(resourceGroupName, resourceGuardsName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param parameters Request body for operation. @@ -1299,14 +1049,14 @@ private Mono patchAsync( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response patchWithResponse( - String resourceGroupName, String resourceGuardsName, PatchResourceGuardInput parameters, Context context) { + public Response patchWithResponse(String resourceGroupName, String resourceGuardsName, + PatchResourceGuardInput parameters, Context context) { return patchWithResponseAsync(resourceGroupName, resourceGuardsName, parameters, context).block(); } /** * Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param parameters Request body for operation. @@ -1316,41 +1066,37 @@ public Response patchWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ResourceGuardResourceInner patch( - String resourceGroupName, String resourceGuardsName, PatchResourceGuardInput parameters) { + public ResourceGuardResourceInner patch(String resourceGroupName, String resourceGuardsName, + PatchResourceGuardInput parameters) { return patchWithResponse(resourceGroupName, resourceGuardsName, parameters, Context.NONE).getValue(); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String resourceGroupName, String resourceGuardsName) { + private Mono> + getDisableSoftDeleteRequestsObjectsSinglePageAsync(String resourceGroupName, String resourceGuardsName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -1358,60 +1104,41 @@ private Mono> getDisableSoftDeleteRequestsOb } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getDisableSoftDeleteRequestsObjects( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.getDisableSoftDeleteRequestsObjects(this.client.getEndpoint(), + this.client.getApiVersion(), resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, + 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())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( String resourceGroupName, String resourceGuardsName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -1420,29 +1147,16 @@ private Mono> getDisableSoftDeleteRequestsOb final String accept = "application/json"; context = this.client.mergeContext(context); return service - .getDisableSoftDeleteRequestsObjects( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .getDisableSoftDeleteRequestsObjects(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1451,8 +1165,8 @@ private Mono> getDisableSoftDeleteRequestsOb * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getDisableSoftDeleteRequestsObjectsAsync( - String resourceGroupName, String resourceGuardsName) { + private PagedFlux getDisableSoftDeleteRequestsObjectsAsync(String resourceGroupName, + String resourceGuardsName) { return new PagedFlux<>( () -> getDisableSoftDeleteRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName), nextLink -> getDisableSoftDeleteRequestsObjectsNextSinglePageAsync(nextLink)); @@ -1461,7 +1175,7 @@ private PagedFlux getDisableSoftDeleteRequestsObjectsAsync /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -1471,8 +1185,8 @@ private PagedFlux getDisableSoftDeleteRequestsObjectsAsync * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getDisableSoftDeleteRequestsObjectsAsync( - String resourceGroupName, String resourceGuardsName, Context context) { + private PagedFlux getDisableSoftDeleteRequestsObjectsAsync(String resourceGroupName, + String resourceGuardsName, Context context) { return new PagedFlux<>( () -> getDisableSoftDeleteRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName, context), nextLink -> getDisableSoftDeleteRequestsObjectsNextSinglePageAsync(nextLink, context)); @@ -1481,7 +1195,7 @@ private PagedFlux getDisableSoftDeleteRequestsObjectsAsync /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1490,15 +1204,15 @@ private PagedFlux getDisableSoftDeleteRequestsObjectsAsync * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getDisableSoftDeleteRequestsObjects( - String resourceGroupName, String resourceGuardsName) { + public PagedIterable getDisableSoftDeleteRequestsObjects(String resourceGroupName, + String resourceGuardsName) { return new PagedIterable<>(getDisableSoftDeleteRequestsObjectsAsync(resourceGroupName, resourceGuardsName)); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -1508,8 +1222,8 @@ public PagedIterable getDisableSoftDeleteRequestsObjects( * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getDisableSoftDeleteRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context) { + public PagedIterable getDisableSoftDeleteRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context) { return new PagedIterable<>( getDisableSoftDeleteRequestsObjectsAsync(resourceGroupName, resourceGuardsName, context)); } @@ -1517,33 +1231,29 @@ public PagedIterable getDisableSoftDeleteRequestsObjects( /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String resourceGroupName, String resourceGuardsName) { + private Mono> + getDeleteResourceGuardProxyRequestsObjectsSinglePageAsync(String resourceGroupName, String resourceGuardsName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -1551,60 +1261,41 @@ private Mono> getDeleteResourceGuardProxyReq } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getDeleteResourceGuardProxyRequestsObjects( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.getDeleteResourceGuardProxyRequestsObjects(this.client.getEndpoint(), + this.client.getApiVersion(), resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, + 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())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( String resourceGroupName, String resourceGuardsName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -1613,29 +1304,16 @@ private Mono> getDeleteResourceGuardProxyReq final String accept = "application/json"; context = this.client.mergeContext(context); return service - .getDeleteResourceGuardProxyRequestsObjects( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .getDeleteResourceGuardProxyRequestsObjects(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1644,8 +1322,8 @@ private Mono> getDeleteResourceGuardProxyReq * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getDeleteResourceGuardProxyRequestsObjectsAsync( - String resourceGroupName, String resourceGuardsName) { + private PagedFlux getDeleteResourceGuardProxyRequestsObjectsAsync(String resourceGroupName, + String resourceGuardsName) { return new PagedFlux<>( () -> getDeleteResourceGuardProxyRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName), nextLink -> getDeleteResourceGuardProxyRequestsObjectsNextSinglePageAsync(nextLink)); @@ -1654,7 +1332,7 @@ private PagedFlux getDeleteResourceGuardProxyRequestsObjec /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -1664,19 +1342,17 @@ private PagedFlux getDeleteResourceGuardProxyRequestsObjec * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getDeleteResourceGuardProxyRequestsObjectsAsync( - String resourceGroupName, String resourceGuardsName, Context context) { - return new PagedFlux<>( - () -> - getDeleteResourceGuardProxyRequestsObjectsSinglePageAsync( - resourceGroupName, resourceGuardsName, context), + private PagedFlux getDeleteResourceGuardProxyRequestsObjectsAsync(String resourceGroupName, + String resourceGuardsName, Context context) { + return new PagedFlux<>(() -> getDeleteResourceGuardProxyRequestsObjectsSinglePageAsync(resourceGroupName, + resourceGuardsName, context), nextLink -> getDeleteResourceGuardProxyRequestsObjectsNextSinglePageAsync(nextLink, context)); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1685,8 +1361,8 @@ private PagedFlux getDeleteResourceGuardProxyRequestsObjec * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getDeleteResourceGuardProxyRequestsObjects( - String resourceGroupName, String resourceGuardsName) { + public PagedIterable getDeleteResourceGuardProxyRequestsObjects(String resourceGroupName, + String resourceGuardsName) { return new PagedIterable<>( getDeleteResourceGuardProxyRequestsObjectsAsync(resourceGroupName, resourceGuardsName)); } @@ -1694,7 +1370,7 @@ public PagedIterable getDeleteResourceGuardProxyRequestsOb /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -1704,8 +1380,8 @@ public PagedIterable getDeleteResourceGuardProxyRequestsOb * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getDeleteResourceGuardProxyRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context) { + public PagedIterable getDeleteResourceGuardProxyRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context) { return new PagedIterable<>( getDeleteResourceGuardProxyRequestsObjectsAsync(resourceGroupName, resourceGuardsName, context)); } @@ -1713,33 +1389,29 @@ public PagedIterable getDeleteResourceGuardProxyRequestsOb /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String resourceGroupName, String resourceGuardsName) { + private Mono> + getBackupSecurityPinRequestsObjectsSinglePageAsync(String resourceGroupName, String resourceGuardsName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -1747,60 +1419,41 @@ private Mono> getBackupSecurityPinRequestsOb } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getBackupSecurityPinRequestsObjects( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.getBackupSecurityPinRequestsObjects(this.client.getEndpoint(), + this.client.getApiVersion(), resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, + 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())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( String resourceGroupName, String resourceGuardsName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -1809,29 +1462,16 @@ private Mono> getBackupSecurityPinRequestsOb final String accept = "application/json"; context = this.client.mergeContext(context); return service - .getBackupSecurityPinRequestsObjects( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .getBackupSecurityPinRequestsObjects(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1840,8 +1480,8 @@ private Mono> getBackupSecurityPinRequestsOb * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getBackupSecurityPinRequestsObjectsAsync( - String resourceGroupName, String resourceGuardsName) { + private PagedFlux getBackupSecurityPinRequestsObjectsAsync(String resourceGroupName, + String resourceGuardsName) { return new PagedFlux<>( () -> getBackupSecurityPinRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName), nextLink -> getBackupSecurityPinRequestsObjectsNextSinglePageAsync(nextLink)); @@ -1850,7 +1490,7 @@ private PagedFlux getBackupSecurityPinRequestsObjectsAsync /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -1860,8 +1500,8 @@ private PagedFlux getBackupSecurityPinRequestsObjectsAsync * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getBackupSecurityPinRequestsObjectsAsync( - String resourceGroupName, String resourceGuardsName, Context context) { + private PagedFlux getBackupSecurityPinRequestsObjectsAsync(String resourceGroupName, + String resourceGuardsName, Context context) { return new PagedFlux<>( () -> getBackupSecurityPinRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName, context), nextLink -> getBackupSecurityPinRequestsObjectsNextSinglePageAsync(nextLink, context)); @@ -1870,7 +1510,7 @@ private PagedFlux getBackupSecurityPinRequestsObjectsAsync /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1879,15 +1519,15 @@ private PagedFlux getBackupSecurityPinRequestsObjectsAsync * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getBackupSecurityPinRequestsObjects( - String resourceGroupName, String resourceGuardsName) { + public PagedIterable getBackupSecurityPinRequestsObjects(String resourceGroupName, + String resourceGuardsName) { return new PagedIterable<>(getBackupSecurityPinRequestsObjectsAsync(resourceGroupName, resourceGuardsName)); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -1897,8 +1537,8 @@ public PagedIterable getBackupSecurityPinRequestsObjects( * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getBackupSecurityPinRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context) { + public PagedIterable getBackupSecurityPinRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context) { return new PagedIterable<>( getBackupSecurityPinRequestsObjectsAsync(resourceGroupName, resourceGuardsName, context)); } @@ -1906,33 +1546,29 @@ public PagedIterable getBackupSecurityPinRequestsObjects( /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String resourceGroupName, String resourceGuardsName) { + private Mono> + getDeleteProtectedItemRequestsObjectsSinglePageAsync(String resourceGroupName, String resourceGuardsName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -1940,60 +1576,41 @@ private Mono> getDeleteProtectedItemRequests } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getDeleteProtectedItemRequestsObjects( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.getDeleteProtectedItemRequestsObjects(this.client.getEndpoint(), + this.client.getApiVersion(), resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, + 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())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( String resourceGroupName, String resourceGuardsName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -2002,29 +1619,16 @@ private Mono> getDeleteProtectedItemRequests final String accept = "application/json"; context = this.client.mergeContext(context); return service - .getDeleteProtectedItemRequestsObjects( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .getDeleteProtectedItemRequestsObjects(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2033,8 +1637,8 @@ private Mono> getDeleteProtectedItemRequests * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getDeleteProtectedItemRequestsObjectsAsync( - String resourceGroupName, String resourceGuardsName) { + private PagedFlux getDeleteProtectedItemRequestsObjectsAsync(String resourceGroupName, + String resourceGuardsName) { return new PagedFlux<>( () -> getDeleteProtectedItemRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName), nextLink -> getDeleteProtectedItemRequestsObjectsNextSinglePageAsync(nextLink)); @@ -2043,7 +1647,7 @@ private PagedFlux getDeleteProtectedItemRequestsObjectsAsy /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -2053,8 +1657,8 @@ private PagedFlux getDeleteProtectedItemRequestsObjectsAsy * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getDeleteProtectedItemRequestsObjectsAsync( - String resourceGroupName, String resourceGuardsName, Context context) { + private PagedFlux getDeleteProtectedItemRequestsObjectsAsync(String resourceGroupName, + String resourceGuardsName, Context context) { return new PagedFlux<>( () -> getDeleteProtectedItemRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName, context), nextLink -> getDeleteProtectedItemRequestsObjectsNextSinglePageAsync(nextLink, context)); @@ -2063,7 +1667,7 @@ private PagedFlux getDeleteProtectedItemRequestsObjectsAsy /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2072,15 +1676,15 @@ private PagedFlux getDeleteProtectedItemRequestsObjectsAsy * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getDeleteProtectedItemRequestsObjects( - String resourceGroupName, String resourceGuardsName) { + public PagedIterable getDeleteProtectedItemRequestsObjects(String resourceGroupName, + String resourceGuardsName) { return new PagedIterable<>(getDeleteProtectedItemRequestsObjectsAsync(resourceGroupName, resourceGuardsName)); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -2090,8 +1694,8 @@ public PagedIterable getDeleteProtectedItemRequestsObjects * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getDeleteProtectedItemRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context) { + public PagedIterable getDeleteProtectedItemRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context) { return new PagedIterable<>( getDeleteProtectedItemRequestsObjectsAsync(resourceGroupName, resourceGuardsName, context)); } @@ -2099,33 +1703,29 @@ public PagedIterable getDeleteProtectedItemRequestsObjects /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String resourceGroupName, String resourceGuardsName) { + private Mono> + getUpdateProtectionPolicyRequestsObjectsSinglePageAsync(String resourceGroupName, String resourceGuardsName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -2133,60 +1733,41 @@ private Mono> getUpdateProtectionPolicyReque } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getUpdateProtectionPolicyRequestsObjects( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.getUpdateProtectionPolicyRequestsObjects(this.client.getEndpoint(), + this.client.getApiVersion(), resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, + 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())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( String resourceGroupName, String resourceGuardsName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -2195,29 +1776,16 @@ private Mono> getUpdateProtectionPolicyReque final String accept = "application/json"; context = this.client.mergeContext(context); return service - .getUpdateProtectionPolicyRequestsObjects( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .getUpdateProtectionPolicyRequestsObjects(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2226,8 +1794,8 @@ private Mono> getUpdateProtectionPolicyReque * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getUpdateProtectionPolicyRequestsObjectsAsync( - String resourceGroupName, String resourceGuardsName) { + private PagedFlux getUpdateProtectionPolicyRequestsObjectsAsync(String resourceGroupName, + String resourceGuardsName) { return new PagedFlux<>( () -> getUpdateProtectionPolicyRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName), nextLink -> getUpdateProtectionPolicyRequestsObjectsNextSinglePageAsync(nextLink)); @@ -2236,7 +1804,7 @@ private PagedFlux getUpdateProtectionPolicyRequestsObjects /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -2246,18 +1814,17 @@ private PagedFlux getUpdateProtectionPolicyRequestsObjects * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getUpdateProtectionPolicyRequestsObjectsAsync( - String resourceGroupName, String resourceGuardsName, Context context) { - return new PagedFlux<>( - () -> - getUpdateProtectionPolicyRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName, context), + private PagedFlux getUpdateProtectionPolicyRequestsObjectsAsync(String resourceGroupName, + String resourceGuardsName, Context context) { + return new PagedFlux<>(() -> getUpdateProtectionPolicyRequestsObjectsSinglePageAsync(resourceGroupName, + resourceGuardsName, context), nextLink -> getUpdateProtectionPolicyRequestsObjectsNextSinglePageAsync(nextLink, context)); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2266,8 +1833,8 @@ private PagedFlux getUpdateProtectionPolicyRequestsObjects * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getUpdateProtectionPolicyRequestsObjects( - String resourceGroupName, String resourceGuardsName) { + public PagedIterable getUpdateProtectionPolicyRequestsObjects(String resourceGroupName, + String resourceGuardsName) { return new PagedIterable<>( getUpdateProtectionPolicyRequestsObjectsAsync(resourceGroupName, resourceGuardsName)); } @@ -2275,7 +1842,7 @@ public PagedIterable getUpdateProtectionPolicyRequestsObje /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -2285,8 +1852,8 @@ public PagedIterable getUpdateProtectionPolicyRequestsObje * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getUpdateProtectionPolicyRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context) { + public PagedIterable getUpdateProtectionPolicyRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context) { return new PagedIterable<>( getUpdateProtectionPolicyRequestsObjectsAsync(resourceGroupName, resourceGuardsName, context)); } @@ -2294,33 +1861,29 @@ public PagedIterable getUpdateProtectionPolicyRequestsObje /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String resourceGroupName, String resourceGuardsName) { + private Mono> + getUpdateProtectedItemRequestsObjectsSinglePageAsync(String resourceGroupName, String resourceGuardsName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -2328,60 +1891,41 @@ private Mono> getUpdateProtectedItemRequests } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getUpdateProtectedItemRequestsObjects( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.getUpdateProtectedItemRequestsObjects(this.client.getEndpoint(), + this.client.getApiVersion(), resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, + 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())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( String resourceGroupName, String resourceGuardsName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -2390,29 +1934,16 @@ private Mono> getUpdateProtectedItemRequests final String accept = "application/json"; context = this.client.mergeContext(context); return service - .getUpdateProtectedItemRequestsObjects( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .getUpdateProtectedItemRequestsObjects(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2421,8 +1952,8 @@ private Mono> getUpdateProtectedItemRequests * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getUpdateProtectedItemRequestsObjectsAsync( - String resourceGroupName, String resourceGuardsName) { + private PagedFlux getUpdateProtectedItemRequestsObjectsAsync(String resourceGroupName, + String resourceGuardsName) { return new PagedFlux<>( () -> getUpdateProtectedItemRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName), nextLink -> getUpdateProtectedItemRequestsObjectsNextSinglePageAsync(nextLink)); @@ -2431,7 +1962,7 @@ private PagedFlux getUpdateProtectedItemRequestsObjectsAsy /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -2441,8 +1972,8 @@ private PagedFlux getUpdateProtectedItemRequestsObjectsAsy * @return base for all lists of V2 resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getUpdateProtectedItemRequestsObjectsAsync( - String resourceGroupName, String resourceGuardsName, Context context) { + private PagedFlux getUpdateProtectedItemRequestsObjectsAsync(String resourceGroupName, + String resourceGuardsName, Context context) { return new PagedFlux<>( () -> getUpdateProtectedItemRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName, context), nextLink -> getUpdateProtectedItemRequestsObjectsNextSinglePageAsync(nextLink, context)); @@ -2451,7 +1982,7 @@ private PagedFlux getUpdateProtectedItemRequestsObjectsAsy /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2460,15 +1991,15 @@ private PagedFlux getUpdateProtectedItemRequestsObjectsAsy * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getUpdateProtectedItemRequestsObjects( - String resourceGroupName, String resourceGuardsName) { + public PagedIterable getUpdateProtectedItemRequestsObjects(String resourceGroupName, + String resourceGuardsName) { return new PagedIterable<>(getUpdateProtectedItemRequestsObjectsAsync(resourceGroupName, resourceGuardsName)); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -2478,8 +2009,8 @@ public PagedIterable getUpdateProtectedItemRequestsObjects * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getUpdateProtectedItemRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context) { + public PagedIterable getUpdateProtectedItemRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context) { return new PagedIterable<>( getUpdateProtectedItemRequestsObjectsAsync(resourceGroupName, resourceGuardsName, context)); } @@ -2487,7 +2018,7 @@ public PagedIterable getUpdateProtectedItemRequestsObjects /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -2495,26 +2026,22 @@ public PagedIterable getUpdateProtectedItemRequestsObjects * @throws 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 along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultDisableSoftDeleteRequestsObjectWithResponseAsync( String resourceGroupName, String resourceGuardsName, String requestName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -2525,25 +2052,16 @@ private Mono> getDefaultDisableSoftDeleteRequests } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getDefaultDisableSoftDeleteRequestsObject( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - requestName, - accept, - context)) + .withContext(context -> service.getDefaultDisableSoftDeleteRequestsObject(this.client.getEndpoint(), + this.client.getApiVersion(), resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, + requestName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -2552,26 +2070,22 @@ private Mono> getDefaultDisableSoftDeleteRequests * @throws 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 along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultDisableSoftDeleteRequestsObjectWithResponseAsync( String resourceGroupName, String resourceGuardsName, String requestName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -2582,22 +2096,14 @@ private Mono> getDefaultDisableSoftDeleteRequests } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getDefaultDisableSoftDeleteRequestsObject( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - requestName, - accept, - context); + return service.getDefaultDisableSoftDeleteRequestsObject(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, requestName, accept, context); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -2607,17 +2113,16 @@ private Mono> getDefaultDisableSoftDeleteRequests * @return base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDefaultDisableSoftDeleteRequestsObjectAsync( - String resourceGroupName, String resourceGuardsName, String requestName) { - return getDefaultDisableSoftDeleteRequestsObjectWithResponseAsync( - resourceGroupName, resourceGuardsName, requestName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono getDefaultDisableSoftDeleteRequestsObjectAsync(String resourceGroupName, + String resourceGuardsName, String requestName) { + return getDefaultDisableSoftDeleteRequestsObjectWithResponseAsync(resourceGroupName, resourceGuardsName, + requestName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -2630,15 +2135,14 @@ private Mono getDefaultDisableSoftDeleteRequestsObjectAsyn @ServiceMethod(returns = ReturnType.SINGLE) public Response getDefaultDisableSoftDeleteRequestsObjectWithResponse( String resourceGroupName, String resourceGuardsName, String requestName, Context context) { - return getDefaultDisableSoftDeleteRequestsObjectWithResponseAsync( - resourceGroupName, resourceGuardsName, requestName, context) - .block(); + return getDefaultDisableSoftDeleteRequestsObjectWithResponseAsync(resourceGroupName, resourceGuardsName, + requestName, context).block(); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -2648,17 +2152,16 @@ public Response getDefaultDisableSoftDeleteRequestsObjectW * @return base resource under Microsoft.DataProtection provider namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DppBaseResourceInner getDefaultDisableSoftDeleteRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName) { - return getDefaultDisableSoftDeleteRequestsObjectWithResponse( - resourceGroupName, resourceGuardsName, requestName, Context.NONE) - .getValue(); + public DppBaseResourceInner getDefaultDisableSoftDeleteRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName) { + return getDefaultDisableSoftDeleteRequestsObjectWithResponse(resourceGroupName, resourceGuardsName, requestName, + Context.NONE).getValue(); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -2666,26 +2169,22 @@ public DppBaseResourceInner getDefaultDisableSoftDeleteRequestsObject( * @throws 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 along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultDeleteResourceGuardProxyRequestsObjectWithResponseAsync( String resourceGroupName, String resourceGuardsName, String requestName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -2696,25 +2195,16 @@ private Mono> getDefaultDeleteResourceGuardProxyR } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getDefaultDeleteResourceGuardProxyRequestsObject( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - requestName, - accept, - context)) + .withContext(context -> service.getDefaultDeleteResourceGuardProxyRequestsObject(this.client.getEndpoint(), + this.client.getApiVersion(), resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, + requestName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -2723,26 +2213,22 @@ private Mono> getDefaultDeleteResourceGuardProxyR * @throws 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 along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultDeleteResourceGuardProxyRequestsObjectWithResponseAsync( String resourceGroupName, String resourceGuardsName, String requestName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -2753,22 +2239,15 @@ private Mono> getDefaultDeleteResourceGuardProxyR } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getDefaultDeleteResourceGuardProxyRequestsObject( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - requestName, - accept, - context); + return service.getDefaultDeleteResourceGuardProxyRequestsObject(this.client.getEndpoint(), + this.client.getApiVersion(), resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, + requestName, accept, context); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -2778,17 +2257,16 @@ private Mono> getDefaultDeleteResourceGuardProxyR * @return base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDefaultDeleteResourceGuardProxyRequestsObjectAsync( - String resourceGroupName, String resourceGuardsName, String requestName) { - return getDefaultDeleteResourceGuardProxyRequestsObjectWithResponseAsync( - resourceGroupName, resourceGuardsName, requestName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono getDefaultDeleteResourceGuardProxyRequestsObjectAsync(String resourceGroupName, + String resourceGuardsName, String requestName) { + return getDefaultDeleteResourceGuardProxyRequestsObjectWithResponseAsync(resourceGroupName, resourceGuardsName, + requestName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -2801,15 +2279,14 @@ private Mono getDefaultDeleteResourceGuardProxyRequestsObj @ServiceMethod(returns = ReturnType.SINGLE) public Response getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse( String resourceGroupName, String resourceGuardsName, String requestName, Context context) { - return getDefaultDeleteResourceGuardProxyRequestsObjectWithResponseAsync( - resourceGroupName, resourceGuardsName, requestName, context) - .block(); + return getDefaultDeleteResourceGuardProxyRequestsObjectWithResponseAsync(resourceGroupName, resourceGuardsName, + requestName, context).block(); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -2819,17 +2296,16 @@ public Response getDefaultDeleteResourceGuardProxyRequests * @return base resource under Microsoft.DataProtection provider namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DppBaseResourceInner getDefaultDeleteResourceGuardProxyRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName) { - return getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse( - resourceGroupName, resourceGuardsName, requestName, Context.NONE) - .getValue(); + public DppBaseResourceInner getDefaultDeleteResourceGuardProxyRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName) { + return getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse(resourceGroupName, resourceGuardsName, + requestName, Context.NONE).getValue(); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -2837,26 +2313,22 @@ public DppBaseResourceInner getDefaultDeleteResourceGuardProxyRequestsObject( * @throws 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 along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultBackupSecurityPinRequestsObjectWithResponseAsync( String resourceGroupName, String resourceGuardsName, String requestName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -2867,25 +2339,16 @@ private Mono> getDefaultBackupSecurityPinRequests } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getDefaultBackupSecurityPinRequestsObject( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - requestName, - accept, - context)) + .withContext(context -> service.getDefaultBackupSecurityPinRequestsObject(this.client.getEndpoint(), + this.client.getApiVersion(), resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, + requestName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -2894,26 +2357,22 @@ private Mono> getDefaultBackupSecurityPinRequests * @throws 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 along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultBackupSecurityPinRequestsObjectWithResponseAsync( String resourceGroupName, String resourceGuardsName, String requestName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -2924,22 +2383,14 @@ private Mono> getDefaultBackupSecurityPinRequests } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getDefaultBackupSecurityPinRequestsObject( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - requestName, - accept, - context); + return service.getDefaultBackupSecurityPinRequestsObject(this.client.getEndpoint(), this.client.getApiVersion(), + resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, requestName, accept, context); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -2949,17 +2400,16 @@ private Mono> getDefaultBackupSecurityPinRequests * @return base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDefaultBackupSecurityPinRequestsObjectAsync( - String resourceGroupName, String resourceGuardsName, String requestName) { - return getDefaultBackupSecurityPinRequestsObjectWithResponseAsync( - resourceGroupName, resourceGuardsName, requestName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono getDefaultBackupSecurityPinRequestsObjectAsync(String resourceGroupName, + String resourceGuardsName, String requestName) { + return getDefaultBackupSecurityPinRequestsObjectWithResponseAsync(resourceGroupName, resourceGuardsName, + requestName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -2972,15 +2422,14 @@ private Mono getDefaultBackupSecurityPinRequestsObjectAsyn @ServiceMethod(returns = ReturnType.SINGLE) public Response getDefaultBackupSecurityPinRequestsObjectWithResponse( String resourceGroupName, String resourceGuardsName, String requestName, Context context) { - return getDefaultBackupSecurityPinRequestsObjectWithResponseAsync( - resourceGroupName, resourceGuardsName, requestName, context) - .block(); + return getDefaultBackupSecurityPinRequestsObjectWithResponseAsync(resourceGroupName, resourceGuardsName, + requestName, context).block(); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -2990,17 +2439,16 @@ public Response getDefaultBackupSecurityPinRequestsObjectW * @return base resource under Microsoft.DataProtection provider namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DppBaseResourceInner getDefaultBackupSecurityPinRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName) { - return getDefaultBackupSecurityPinRequestsObjectWithResponse( - resourceGroupName, resourceGuardsName, requestName, Context.NONE) - .getValue(); + public DppBaseResourceInner getDefaultBackupSecurityPinRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName) { + return getDefaultBackupSecurityPinRequestsObjectWithResponse(resourceGroupName, resourceGuardsName, requestName, + Context.NONE).getValue(); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -3008,26 +2456,22 @@ public DppBaseResourceInner getDefaultBackupSecurityPinRequestsObject( * @throws 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 along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultDeleteProtectedItemRequestsObjectWithResponseAsync( String resourceGroupName, String resourceGuardsName, String requestName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -3038,25 +2482,16 @@ private Mono> getDefaultDeleteProtectedItemReques } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getDefaultDeleteProtectedItemRequestsObject( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - requestName, - accept, - context)) + .withContext(context -> service.getDefaultDeleteProtectedItemRequestsObject(this.client.getEndpoint(), + this.client.getApiVersion(), resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, + requestName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -3065,26 +2500,22 @@ private Mono> getDefaultDeleteProtectedItemReques * @throws 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 along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultDeleteProtectedItemRequestsObjectWithResponseAsync( String resourceGroupName, String resourceGuardsName, String requestName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -3095,22 +2526,15 @@ private Mono> getDefaultDeleteProtectedItemReques } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getDefaultDeleteProtectedItemRequestsObject( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - requestName, - accept, - context); + return service.getDefaultDeleteProtectedItemRequestsObject(this.client.getEndpoint(), + this.client.getApiVersion(), resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, + requestName, accept, context); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -3120,17 +2544,16 @@ private Mono> getDefaultDeleteProtectedItemReques * @return base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDefaultDeleteProtectedItemRequestsObjectAsync( - String resourceGroupName, String resourceGuardsName, String requestName) { - return getDefaultDeleteProtectedItemRequestsObjectWithResponseAsync( - resourceGroupName, resourceGuardsName, requestName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono getDefaultDeleteProtectedItemRequestsObjectAsync(String resourceGroupName, + String resourceGuardsName, String requestName) { + return getDefaultDeleteProtectedItemRequestsObjectWithResponseAsync(resourceGroupName, resourceGuardsName, + requestName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -3143,15 +2566,14 @@ private Mono getDefaultDeleteProtectedItemRequestsObjectAs @ServiceMethod(returns = ReturnType.SINGLE) public Response getDefaultDeleteProtectedItemRequestsObjectWithResponse( String resourceGroupName, String resourceGuardsName, String requestName, Context context) { - return getDefaultDeleteProtectedItemRequestsObjectWithResponseAsync( - resourceGroupName, resourceGuardsName, requestName, context) - .block(); + return getDefaultDeleteProtectedItemRequestsObjectWithResponseAsync(resourceGroupName, resourceGuardsName, + requestName, context).block(); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -3161,17 +2583,16 @@ public Response getDefaultDeleteProtectedItemRequestsObjec * @return base resource under Microsoft.DataProtection provider namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DppBaseResourceInner getDefaultDeleteProtectedItemRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName) { - return getDefaultDeleteProtectedItemRequestsObjectWithResponse( - resourceGroupName, resourceGuardsName, requestName, Context.NONE) - .getValue(); + public DppBaseResourceInner getDefaultDeleteProtectedItemRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName) { + return getDefaultDeleteProtectedItemRequestsObjectWithResponse(resourceGroupName, resourceGuardsName, + requestName, Context.NONE).getValue(); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -3179,26 +2600,22 @@ public DppBaseResourceInner getDefaultDeleteProtectedItemRequestsObject( * @throws 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 along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultUpdateProtectionPolicyRequestsObjectWithResponseAsync( String resourceGroupName, String resourceGuardsName, String requestName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -3209,25 +2626,16 @@ private Mono> getDefaultUpdateProtectionPolicyReq } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getDefaultUpdateProtectionPolicyRequestsObject( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - requestName, - accept, - context)) + .withContext(context -> service.getDefaultUpdateProtectionPolicyRequestsObject(this.client.getEndpoint(), + this.client.getApiVersion(), resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, + requestName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -3236,26 +2644,22 @@ private Mono> getDefaultUpdateProtectionPolicyReq * @throws 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 along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultUpdateProtectionPolicyRequestsObjectWithResponseAsync( String resourceGroupName, String resourceGuardsName, String requestName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -3266,22 +2670,15 @@ private Mono> getDefaultUpdateProtectionPolicyReq } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getDefaultUpdateProtectionPolicyRequestsObject( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - requestName, - accept, - context); + return service.getDefaultUpdateProtectionPolicyRequestsObject(this.client.getEndpoint(), + this.client.getApiVersion(), resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, + requestName, accept, context); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -3291,17 +2688,16 @@ private Mono> getDefaultUpdateProtectionPolicyReq * @return base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDefaultUpdateProtectionPolicyRequestsObjectAsync( - String resourceGroupName, String resourceGuardsName, String requestName) { - return getDefaultUpdateProtectionPolicyRequestsObjectWithResponseAsync( - resourceGroupName, resourceGuardsName, requestName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono getDefaultUpdateProtectionPolicyRequestsObjectAsync(String resourceGroupName, + String resourceGuardsName, String requestName) { + return getDefaultUpdateProtectionPolicyRequestsObjectWithResponseAsync(resourceGroupName, resourceGuardsName, + requestName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -3314,15 +2710,14 @@ private Mono getDefaultUpdateProtectionPolicyRequestsObjec @ServiceMethod(returns = ReturnType.SINGLE) public Response getDefaultUpdateProtectionPolicyRequestsObjectWithResponse( String resourceGroupName, String resourceGuardsName, String requestName, Context context) { - return getDefaultUpdateProtectionPolicyRequestsObjectWithResponseAsync( - resourceGroupName, resourceGuardsName, requestName, context) - .block(); + return getDefaultUpdateProtectionPolicyRequestsObjectWithResponseAsync(resourceGroupName, resourceGuardsName, + requestName, context).block(); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -3332,17 +2727,16 @@ public Response getDefaultUpdateProtectionPolicyRequestsOb * @return base resource under Microsoft.DataProtection provider namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DppBaseResourceInner getDefaultUpdateProtectionPolicyRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName) { - return getDefaultUpdateProtectionPolicyRequestsObjectWithResponse( - resourceGroupName, resourceGuardsName, requestName, Context.NONE) - .getValue(); + public DppBaseResourceInner getDefaultUpdateProtectionPolicyRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName) { + return getDefaultUpdateProtectionPolicyRequestsObjectWithResponse(resourceGroupName, resourceGuardsName, + requestName, Context.NONE).getValue(); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -3350,26 +2744,22 @@ public DppBaseResourceInner getDefaultUpdateProtectionPolicyRequestsObject( * @throws 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 along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultUpdateProtectedItemRequestsObjectWithResponseAsync( String resourceGroupName, String resourceGuardsName, String requestName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -3380,25 +2770,16 @@ private Mono> getDefaultUpdateProtectedItemReques } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getDefaultUpdateProtectedItemRequestsObject( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - requestName, - accept, - context)) + .withContext(context -> service.getDefaultUpdateProtectedItemRequestsObject(this.client.getEndpoint(), + this.client.getApiVersion(), resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, + requestName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -3407,26 +2788,22 @@ private Mono> getDefaultUpdateProtectedItemReques * @throws 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 along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultUpdateProtectedItemRequestsObjectWithResponseAsync( String resourceGroupName, String resourceGuardsName, String requestName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGuardsName == null) { return Mono @@ -3437,22 +2814,15 @@ private Mono> getDefaultUpdateProtectedItemReques } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getDefaultUpdateProtectedItemRequestsObject( - this.client.getEndpoint(), - this.client.getApiVersion(), - resourceGroupName, - this.client.getSubscriptionId(), - resourceGuardsName, - requestName, - accept, - context); + return service.getDefaultUpdateProtectedItemRequestsObject(this.client.getEndpoint(), + this.client.getApiVersion(), resourceGroupName, this.client.getSubscriptionId(), resourceGuardsName, + requestName, accept, context); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -3462,17 +2832,16 @@ private Mono> getDefaultUpdateProtectedItemReques * @return base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDefaultUpdateProtectedItemRequestsObjectAsync( - String resourceGroupName, String resourceGuardsName, String requestName) { - return getDefaultUpdateProtectedItemRequestsObjectWithResponseAsync( - resourceGroupName, resourceGuardsName, requestName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono getDefaultUpdateProtectedItemRequestsObjectAsync(String resourceGroupName, + String resourceGuardsName, String requestName) { + return getDefaultUpdateProtectedItemRequestsObjectWithResponseAsync(resourceGroupName, resourceGuardsName, + requestName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -3485,15 +2854,14 @@ private Mono getDefaultUpdateProtectedItemRequestsObjectAs @ServiceMethod(returns = ReturnType.SINGLE) public Response getDefaultUpdateProtectedItemRequestsObjectWithResponse( String resourceGroupName, String resourceGuardsName, String requestName, Context context) { - return getDefaultUpdateProtectedItemRequestsObjectWithResponseAsync( - resourceGroupName, resourceGuardsName, requestName, context) - .block(); + return getDefaultUpdateProtectedItemRequestsObjectWithResponseAsync(resourceGroupName, resourceGuardsName, + requestName, context).block(); } /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -3503,651 +2871,498 @@ public Response getDefaultUpdateProtectedItemRequestsObjec * @return base resource under Microsoft.DataProtection provider namespace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName) { - return getDefaultUpdateProtectedItemRequestsObjectWithResponse( - resourceGroupName, resourceGuardsName, requestName, Context.NONE) - .getValue(); + public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName) { + return getDefaultUpdateProtectedItemRequestsObjectWithResponse(resourceGroupName, resourceGuardsName, + requestName, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getResourcesInSubscriptionNextSinglePageAsync( - String nextLink) { + private Mono> + getResourcesInSubscriptionNextSinglePageAsync(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.")); + 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.getResourcesInSubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getResourcesInSubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + getResourcesInSubscriptionNextSinglePageAsync(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.")); + 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 - .getResourcesInSubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.getResourcesInSubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getResourcesInResourceGroupNextSinglePageAsync( - String nextLink) { + private Mono> + getResourcesInResourceGroupNextSinglePageAsync(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.")); + 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.getResourcesInResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext( + context -> service.getResourcesInResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getResourcesInResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + getResourcesInResourceGroupNextSinglePageAsync(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.")); + 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 - .getResourcesInResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.getResourcesInResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String nextLink) { + private Mono> + getDisableSoftDeleteRequestsObjectsNextSinglePageAsync(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.")); + 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 - .getDisableSoftDeleteRequestsObjectsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.getDisableSoftDeleteRequestsObjectsNext(nextLink, this.client.getEndpoint(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String nextLink, Context context) { + private Mono> + getDisableSoftDeleteRequestsObjectsNextSinglePageAsync(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.")); + 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 - .getDisableSoftDeleteRequestsObjectsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.getDisableSoftDeleteRequestsObjectsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String nextLink) { + private Mono> + getDeleteResourceGuardProxyRequestsObjectsNextSinglePageAsync(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.")); + 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 - .getDeleteResourceGuardProxyRequestsObjectsNext( - nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.getDeleteResourceGuardProxyRequestsObjectsNext(nextLink, + this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String nextLink, Context context) { + private Mono> + getDeleteResourceGuardProxyRequestsObjectsNextSinglePageAsync(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.")); + 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 .getDeleteResourceGuardProxyRequestsObjectsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String nextLink) { + private Mono> + getBackupSecurityPinRequestsObjectsNextSinglePageAsync(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.")); + 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 - .getBackupSecurityPinRequestsObjectsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.getBackupSecurityPinRequestsObjectsNext(nextLink, this.client.getEndpoint(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String nextLink, Context context) { + private Mono> + getBackupSecurityPinRequestsObjectsNextSinglePageAsync(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.")); + 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 - .getBackupSecurityPinRequestsObjectsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.getBackupSecurityPinRequestsObjectsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String nextLink) { + private Mono> + getDeleteProtectedItemRequestsObjectsNextSinglePageAsync(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.")); + 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 - .getDeleteProtectedItemRequestsObjectsNext( - nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.getDeleteProtectedItemRequestsObjectsNext(nextLink, + this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String nextLink, Context context) { + private Mono> + getDeleteProtectedItemRequestsObjectsNextSinglePageAsync(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.")); + 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 - .getDeleteProtectedItemRequestsObjectsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.getDeleteProtectedItemRequestsObjectsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String nextLink) { + private Mono> + getUpdateProtectionPolicyRequestsObjectsNextSinglePageAsync(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.")); + 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 - .getUpdateProtectionPolicyRequestsObjectsNext( - nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.getUpdateProtectionPolicyRequestsObjectsNext(nextLink, + this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String nextLink, Context context) { + private Mono> + getUpdateProtectionPolicyRequestsObjectsNextSinglePageAsync(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.")); + 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 .getUpdateProtectionPolicyRequestsObjectsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String nextLink) { + private Mono> + getUpdateProtectedItemRequestsObjectsNextSinglePageAsync(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.")); + 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 - .getUpdateProtectedItemRequestsObjectsNext( - nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.getUpdateProtectedItemRequestsObjectsNext(nextLink, + this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @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( - String nextLink, Context context) { + private Mono> + getUpdateProtectedItemRequestsObjectsNextSinglePageAsync(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.")); + 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 - .getUpdateProtectedItemRequestsObjectsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.getUpdateProtectedItemRequestsObjectsNext(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/ResourceGuardsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardsImpl.java index 5d096d9e4f0b..56b2d8b38ad9 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 @@ -23,8 +23,7 @@ public final class ResourceGuardsImpl implements ResourceGuards { private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public ResourceGuardsImpl( - ResourceGuardsClient innerClient, + public ResourceGuardsImpl(ResourceGuardsClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -46,20 +45,17 @@ public PagedIterable listByResourceGroup(String resourceG } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); return Utils.mapPage(inner, inner1 -> new ResourceGuardResourceImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceGuardsName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceGuardsName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String resourceGuardsName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceGuardsName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ResourceGuardResourceImpl(inner.getValue(), this.manager())); } else { return null; @@ -67,8 +63,8 @@ public Response getByResourceGroupWithResponse( } public ResourceGuardResource getByResourceGroup(String resourceGroupName, String resourceGuardsName) { - ResourceGuardResourceInner inner = - this.serviceClient().getByResourceGroup(resourceGroupName, resourceGuardsName); + ResourceGuardResourceInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, resourceGuardsName); if (inner != null) { return new ResourceGuardResourceImpl(inner, this.manager()); } else { @@ -76,8 +72,8 @@ public ResourceGuardResource getByResourceGroup(String resourceGroupName, String } } - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String resourceGuardsName, Context context) { + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceGuardsName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, resourceGuardsName, context); } @@ -85,118 +81,107 @@ public void deleteByResourceGroup(String resourceGroupName, String resourceGuard this.serviceClient().delete(resourceGroupName, resourceGuardsName); } - public PagedIterable getDisableSoftDeleteRequestsObjects( - String resourceGroupName, String resourceGuardsName) { - PagedIterable inner = - this.serviceClient().getDisableSoftDeleteRequestsObjects(resourceGroupName, resourceGuardsName); + public PagedIterable getDisableSoftDeleteRequestsObjects(String resourceGroupName, + String resourceGuardsName) { + PagedIterable inner + = this.serviceClient().getDisableSoftDeleteRequestsObjects(resourceGroupName, resourceGuardsName); return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager())); } - public PagedIterable getDisableSoftDeleteRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context) { - PagedIterable inner = - this.serviceClient().getDisableSoftDeleteRequestsObjects(resourceGroupName, resourceGuardsName, context); + public PagedIterable getDisableSoftDeleteRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context) { + PagedIterable inner + = this.serviceClient().getDisableSoftDeleteRequestsObjects(resourceGroupName, resourceGuardsName, context); return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager())); } - public PagedIterable getDeleteResourceGuardProxyRequestsObjects( - String resourceGroupName, String resourceGuardsName) { - PagedIterable inner = - this.serviceClient().getDeleteResourceGuardProxyRequestsObjects(resourceGroupName, resourceGuardsName); + public PagedIterable getDeleteResourceGuardProxyRequestsObjects(String resourceGroupName, + String resourceGuardsName) { + PagedIterable inner + = this.serviceClient().getDeleteResourceGuardProxyRequestsObjects(resourceGroupName, resourceGuardsName); return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager())); } - public PagedIterable getDeleteResourceGuardProxyRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context) { - PagedIterable inner = - this - .serviceClient() - .getDeleteResourceGuardProxyRequestsObjects(resourceGroupName, resourceGuardsName, context); + public PagedIterable getDeleteResourceGuardProxyRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context) { + PagedIterable inner = this.serviceClient() + .getDeleteResourceGuardProxyRequestsObjects(resourceGroupName, resourceGuardsName, context); return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager())); } - public PagedIterable getBackupSecurityPinRequestsObjects( - String resourceGroupName, String resourceGuardsName) { - PagedIterable inner = - this.serviceClient().getBackupSecurityPinRequestsObjects(resourceGroupName, resourceGuardsName); + public PagedIterable getBackupSecurityPinRequestsObjects(String resourceGroupName, + String resourceGuardsName) { + PagedIterable inner + = this.serviceClient().getBackupSecurityPinRequestsObjects(resourceGroupName, resourceGuardsName); return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager())); } - public PagedIterable getBackupSecurityPinRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context) { - PagedIterable inner = - this.serviceClient().getBackupSecurityPinRequestsObjects(resourceGroupName, resourceGuardsName, context); + public PagedIterable getBackupSecurityPinRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context) { + PagedIterable inner + = this.serviceClient().getBackupSecurityPinRequestsObjects(resourceGroupName, resourceGuardsName, context); return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager())); } - public PagedIterable getDeleteProtectedItemRequestsObjects( - String resourceGroupName, String resourceGuardsName) { - PagedIterable inner = - this.serviceClient().getDeleteProtectedItemRequestsObjects(resourceGroupName, resourceGuardsName); + public PagedIterable getDeleteProtectedItemRequestsObjects(String resourceGroupName, + String resourceGuardsName) { + PagedIterable inner + = this.serviceClient().getDeleteProtectedItemRequestsObjects(resourceGroupName, resourceGuardsName); return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager())); } - public PagedIterable getDeleteProtectedItemRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context) { - PagedIterable inner = - this.serviceClient().getDeleteProtectedItemRequestsObjects(resourceGroupName, resourceGuardsName, context); + public PagedIterable getDeleteProtectedItemRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context) { + PagedIterable inner = this.serviceClient() + .getDeleteProtectedItemRequestsObjects(resourceGroupName, resourceGuardsName, context); return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager())); } - public PagedIterable getUpdateProtectionPolicyRequestsObjects( - String resourceGroupName, String resourceGuardsName) { - PagedIterable inner = - this.serviceClient().getUpdateProtectionPolicyRequestsObjects(resourceGroupName, resourceGuardsName); + public PagedIterable getUpdateProtectionPolicyRequestsObjects(String resourceGroupName, + String resourceGuardsName) { + PagedIterable inner + = this.serviceClient().getUpdateProtectionPolicyRequestsObjects(resourceGroupName, resourceGuardsName); return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager())); } - public PagedIterable getUpdateProtectionPolicyRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context) { - PagedIterable inner = - this - .serviceClient() - .getUpdateProtectionPolicyRequestsObjects(resourceGroupName, resourceGuardsName, context); + public PagedIterable getUpdateProtectionPolicyRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context) { + PagedIterable inner = this.serviceClient() + .getUpdateProtectionPolicyRequestsObjects(resourceGroupName, resourceGuardsName, context); return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager())); } - public PagedIterable getUpdateProtectedItemRequestsObjects( - String resourceGroupName, String resourceGuardsName) { - PagedIterable inner = - this.serviceClient().getUpdateProtectedItemRequestsObjects(resourceGroupName, resourceGuardsName); + public PagedIterable getUpdateProtectedItemRequestsObjects(String resourceGroupName, + String resourceGuardsName) { + PagedIterable inner + = this.serviceClient().getUpdateProtectedItemRequestsObjects(resourceGroupName, resourceGuardsName); return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager())); } - public PagedIterable getUpdateProtectedItemRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context) { - PagedIterable inner = - this.serviceClient().getUpdateProtectedItemRequestsObjects(resourceGroupName, resourceGuardsName, context); + public PagedIterable getUpdateProtectedItemRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context) { + PagedIterable inner = this.serviceClient() + .getUpdateProtectedItemRequestsObjects(resourceGroupName, resourceGuardsName, context); return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager())); } - public Response getDefaultDisableSoftDeleteRequestsObjectWithResponse( - String resourceGroupName, String resourceGuardsName, String requestName, Context context) { - Response inner = - this - .serviceClient() - .getDefaultDisableSoftDeleteRequestsObjectWithResponse( - resourceGroupName, resourceGuardsName, requestName, context); + public Response getDefaultDisableSoftDeleteRequestsObjectWithResponse(String resourceGroupName, + String resourceGuardsName, String requestName, Context context) { + Response inner + = this.serviceClient().getDefaultDisableSoftDeleteRequestsObjectWithResponse(resourceGroupName, + resourceGuardsName, requestName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DppBaseResourceImpl(inner.getValue(), this.manager())); } else { return null; } } - public DppBaseResource getDefaultDisableSoftDeleteRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName) { - DppBaseResourceInner inner = - this - .serviceClient() - .getDefaultDisableSoftDeleteRequestsObject(resourceGroupName, resourceGuardsName, requestName); + public DppBaseResource getDefaultDisableSoftDeleteRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName) { + DppBaseResourceInner inner = this.serviceClient().getDefaultDisableSoftDeleteRequestsObject(resourceGroupName, + resourceGuardsName, requestName); if (inner != null) { return new DppBaseResourceImpl(inner, this.manager()); } else { @@ -206,28 +191,21 @@ public DppBaseResource getDefaultDisableSoftDeleteRequestsObject( public Response getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse( String resourceGroupName, String resourceGuardsName, String requestName, Context context) { - Response inner = - this - .serviceClient() - .getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse( - resourceGroupName, resourceGuardsName, requestName, context); + Response inner + = this.serviceClient().getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse(resourceGroupName, + resourceGuardsName, requestName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DppBaseResourceImpl(inner.getValue(), this.manager())); } else { return null; } } - public DppBaseResource getDefaultDeleteResourceGuardProxyRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName) { - DppBaseResourceInner inner = - this - .serviceClient() - .getDefaultDeleteResourceGuardProxyRequestsObject(resourceGroupName, resourceGuardsName, requestName); + public DppBaseResource getDefaultDeleteResourceGuardProxyRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName) { + DppBaseResourceInner inner = this.serviceClient() + .getDefaultDeleteResourceGuardProxyRequestsObject(resourceGroupName, resourceGuardsName, requestName); if (inner != null) { return new DppBaseResourceImpl(inner, this.manager()); } else { @@ -235,30 +213,23 @@ public DppBaseResource getDefaultDeleteResourceGuardProxyRequestsObject( } } - public Response getDefaultBackupSecurityPinRequestsObjectWithResponse( - String resourceGroupName, String resourceGuardsName, String requestName, Context context) { - Response inner = - this - .serviceClient() - .getDefaultBackupSecurityPinRequestsObjectWithResponse( - resourceGroupName, resourceGuardsName, requestName, context); + public Response getDefaultBackupSecurityPinRequestsObjectWithResponse(String resourceGroupName, + String resourceGuardsName, String requestName, Context context) { + Response inner + = this.serviceClient().getDefaultBackupSecurityPinRequestsObjectWithResponse(resourceGroupName, + resourceGuardsName, requestName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DppBaseResourceImpl(inner.getValue(), this.manager())); } else { return null; } } - public DppBaseResource getDefaultBackupSecurityPinRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName) { - DppBaseResourceInner inner = - this - .serviceClient() - .getDefaultBackupSecurityPinRequestsObject(resourceGroupName, resourceGuardsName, requestName); + public DppBaseResource getDefaultBackupSecurityPinRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName) { + DppBaseResourceInner inner = this.serviceClient().getDefaultBackupSecurityPinRequestsObject(resourceGroupName, + resourceGuardsName, requestName); if (inner != null) { return new DppBaseResourceImpl(inner, this.manager()); } else { @@ -266,30 +237,23 @@ public DppBaseResource getDefaultBackupSecurityPinRequestsObject( } } - public Response getDefaultDeleteProtectedItemRequestsObjectWithResponse( - String resourceGroupName, String resourceGuardsName, String requestName, Context context) { - Response inner = - this - .serviceClient() - .getDefaultDeleteProtectedItemRequestsObjectWithResponse( - resourceGroupName, resourceGuardsName, requestName, context); + public Response getDefaultDeleteProtectedItemRequestsObjectWithResponse(String resourceGroupName, + String resourceGuardsName, String requestName, Context context) { + Response inner + = this.serviceClient().getDefaultDeleteProtectedItemRequestsObjectWithResponse(resourceGroupName, + resourceGuardsName, requestName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DppBaseResourceImpl(inner.getValue(), this.manager())); } else { return null; } } - public DppBaseResource getDefaultDeleteProtectedItemRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName) { - DppBaseResourceInner inner = - this - .serviceClient() - .getDefaultDeleteProtectedItemRequestsObject(resourceGroupName, resourceGuardsName, requestName); + public DppBaseResource getDefaultDeleteProtectedItemRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName) { + DppBaseResourceInner inner = this.serviceClient().getDefaultDeleteProtectedItemRequestsObject(resourceGroupName, + resourceGuardsName, requestName); if (inner != null) { return new DppBaseResourceImpl(inner, this.manager()); } else { @@ -299,28 +263,21 @@ public DppBaseResource getDefaultDeleteProtectedItemRequestsObject( public Response getDefaultUpdateProtectionPolicyRequestsObjectWithResponse( String resourceGroupName, String resourceGuardsName, String requestName, Context context) { - Response inner = - this - .serviceClient() - .getDefaultUpdateProtectionPolicyRequestsObjectWithResponse( - resourceGroupName, resourceGuardsName, requestName, context); + Response inner + = this.serviceClient().getDefaultUpdateProtectionPolicyRequestsObjectWithResponse(resourceGroupName, + resourceGuardsName, requestName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DppBaseResourceImpl(inner.getValue(), this.manager())); } else { return null; } } - public DppBaseResource getDefaultUpdateProtectionPolicyRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName) { - DppBaseResourceInner inner = - this - .serviceClient() - .getDefaultUpdateProtectionPolicyRequestsObject(resourceGroupName, resourceGuardsName, requestName); + public DppBaseResource getDefaultUpdateProtectionPolicyRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName) { + DppBaseResourceInner inner = this.serviceClient() + .getDefaultUpdateProtectionPolicyRequestsObject(resourceGroupName, resourceGuardsName, requestName); if (inner != null) { return new DppBaseResourceImpl(inner, this.manager()); } else { @@ -328,30 +285,23 @@ public DppBaseResource getDefaultUpdateProtectionPolicyRequestsObject( } } - public Response getDefaultUpdateProtectedItemRequestsObjectWithResponse( - String resourceGroupName, String resourceGuardsName, String requestName, Context context) { - Response inner = - this - .serviceClient() - .getDefaultUpdateProtectedItemRequestsObjectWithResponse( - resourceGroupName, resourceGuardsName, requestName, context); + public Response getDefaultUpdateProtectedItemRequestsObjectWithResponse(String resourceGroupName, + String resourceGuardsName, String requestName, Context context) { + Response inner + = this.serviceClient().getDefaultUpdateProtectedItemRequestsObjectWithResponse(resourceGroupName, + resourceGuardsName, requestName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DppBaseResourceImpl(inner.getValue(), this.manager())); } else { return null; } } - public DppBaseResource getDefaultUpdateProtectedItemRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName) { - DppBaseResourceInner inner = - this - .serviceClient() - .getDefaultUpdateProtectedItemRequestsObject(resourceGroupName, resourceGuardsName, requestName); + public DppBaseResource getDefaultUpdateProtectedItemRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName) { + DppBaseResourceInner inner = this.serviceClient().getDefaultUpdateProtectedItemRequestsObject(resourceGroupName, + resourceGuardsName, requestName); if (inner != null) { return new DppBaseResourceImpl(inner, this.manager()); } else { @@ -362,19 +312,13 @@ public DppBaseResource getDefaultUpdateProtectedItemRequestsObject( public ResourceGuardResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String resourceGuardsName = Utils.getValueFromIdByName(id, "resourceGuards"); if (resourceGuardsName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGuards'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGuards'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, resourceGuardsName, Context.NONE).getValue(); } @@ -382,19 +326,13 @@ public ResourceGuardResource getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String resourceGuardsName = Utils.getValueFromIdByName(id, "resourceGuards"); if (resourceGuardsName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGuards'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGuards'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, resourceGuardsName, context); } @@ -402,19 +340,13 @@ public Response getByIdWithResponse(String id, Context co public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String resourceGuardsName = Utils.getValueFromIdByName(id, "resourceGuards"); if (resourceGuardsName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGuards'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGuards'.", id))); } this.deleteByResourceGroupWithResponse(resourceGroupName, resourceGuardsName, Context.NONE); } @@ -422,19 +354,13 @@ public void deleteById(String id) { public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String resourceGuardsName = Utils.getValueFromIdByName(id, "resourceGuards"); if (resourceGuardsName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGuards'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGuards'.", id))); } return this.deleteByResourceGroupWithResponse(resourceGroupName, resourceGuardsName, context); } 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 0b3cad71ea5e..2d8650b9a1ef 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 @@ -27,23 +27,28 @@ import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in RestorableTimeRangesClient. */ +/** + * An instance of this class provides access to all the operations defined in RestorableTimeRangesClient. + */ public final class RestorableTimeRangesClientImpl implements RestorableTimeRangesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final RestorableTimeRangesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DataProtectionClientImpl client; /** * Initializes an instance of RestorableTimeRangesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ RestorableTimeRangesClientImpl(DataProtectionClientImpl client) { - this.service = - RestProxy - .create(RestorableTimeRangesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(RestorableTimeRangesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -54,26 +59,22 @@ public final class RestorableTimeRangesClientImpl implements RestorableTimeRange @Host("{$host}") @ServiceInterface(name = "DataProtectionClient") public interface RestorableTimeRangesService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/findRestorableTimeRanges") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/findRestorableTimeRanges") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> find( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @BodyParam("application/json") AzureBackupFindRestorableTimeRangesRequest parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); } /** * The find operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -85,21 +86,15 @@ Mono> find( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> findWithResponseAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, + String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -119,25 +114,15 @@ private Mono> } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .find( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - parameters, - accept, - context)) + .withContext(context -> service.find(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupInstanceName, parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The find operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -150,22 +135,15 @@ private Mono> */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> findWithResponseAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupFindRestorableTimeRangesRequest parameters, - Context context) { + String resourceGroupName, String vaultName, String backupInstanceName, + AzureBackupFindRestorableTimeRangesRequest parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -185,22 +163,13 @@ private Mono> } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .find( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - vaultName, - backupInstanceName, - parameters, - accept, - context); + return service.find(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, backupInstanceName, parameters, accept, context); } /** * The find operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -211,18 +180,15 @@ private Mono> * @return list Restore Ranges Response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono findAsync( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupFindRestorableTimeRangesRequest parameters) { + private Mono findAsync(String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters) { return findWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * The find operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -234,18 +200,15 @@ private Mono findAsync * @return list Restore Ranges Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response findWithResponse( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupFindRestorableTimeRangesRequest parameters, + public Response findWithResponse(String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters, Context context) { return findWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).block(); } /** * The find operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -256,11 +219,8 @@ public Response findWi * @return list Restore Ranges Response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AzureBackupFindRestorableTimeRangesResponseResourceInner find( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupFindRestorableTimeRangesRequest parameters) { + public AzureBackupFindRestorableTimeRangesResponseResourceInner find(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters) { return findWithResponse(resourceGroupName, vaultName, backupInstanceName, parameters, Context.NONE).getValue(); } } 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 df3b1c09ef5a..be2191e5d0a5 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 @@ -21,41 +21,29 @@ public final class RestorableTimeRangesImpl implements RestorableTimeRanges { private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - public RestorableTimeRangesImpl( - RestorableTimeRangesClient innerClient, + public RestorableTimeRangesImpl(RestorableTimeRangesClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response findWithResponse( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupFindRestorableTimeRangesRequest parameters, + public Response findWithResponse(String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters, Context context) { - Response inner = - this - .serviceClient() - .findWithResponse(resourceGroupName, vaultName, backupInstanceName, parameters, context); + Response inner = this.serviceClient() + .findWithResponse(resourceGroupName, vaultName, backupInstanceName, parameters, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AzureBackupFindRestorableTimeRangesResponseResourceImpl(inner.getValue(), this.manager())); } else { return null; } } - public AzureBackupFindRestorableTimeRangesResponseResource find( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupFindRestorableTimeRangesRequest parameters) { - AzureBackupFindRestorableTimeRangesResponseResourceInner inner = - this.serviceClient().find(resourceGroupName, vaultName, backupInstanceName, parameters); + public AzureBackupFindRestorableTimeRangesResponseResource find(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters) { + AzureBackupFindRestorableTimeRangesResponseResourceInner inner + = this.serviceClient().find(resourceGroupName, vaultName, backupInstanceName, parameters); if (inner != null) { return new AzureBackupFindRestorableTimeRangesResponseResourceImpl(inner, this.manager()); } else { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/UnlockDeleteResponseImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/UnlockDeleteResponseImpl.java index d7e88380d248..c32d86e1a898 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/UnlockDeleteResponseImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/UnlockDeleteResponseImpl.java @@ -12,8 +12,7 @@ public final class UnlockDeleteResponseImpl implements UnlockDeleteResponse { private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; - UnlockDeleteResponseImpl( - UnlockDeleteResponseInner innerObject, + UnlockDeleteResponseImpl(UnlockDeleteResponseInner innerObject, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/Utils.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/Utils.java index 828dd229bf34..887f0e7ad4d3 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/Utils.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/Utils.java @@ -20,6 +20,9 @@ import reactor.core.publisher.Flux; final class Utils { + private Utils() { + } + static String getValueFromIdByName(String id, String name) { if (id == null) { return null; @@ -38,6 +41,7 @@ static String getValueFromIdByName(String id, String name) { } } return null; + } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -60,7 +64,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri segments.add(idSegment); idItrReverted.forEachRemaining(segments::add); Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { + if (!segments.isEmpty() && segments.get(0).isEmpty()) { segments.remove(0); } return String.join("/", segments); @@ -71,10 +75,11 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; + } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); + return new PagedIterableImpl<>(pageIterable, mapper); } private static final class PagedIterableImpl extends PagedIterable { @@ -84,26 +89,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override @@ -133,30 +129,27 @@ public Stream> streamByPage(String continuationToken, int prefe @Override public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); + return new IteratorImpl<>(pagedIterable.iterator(), mapper); } @Override public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); } @Override public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); } } @@ -198,7 +191,7 @@ private IterableImpl(Iterable iterable, Function mapper) { @Override public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); + return new IteratorImpl<>(iterable.iterator(), mapper); } } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/package-info.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/package-info.java index ff44e329d694..2562b3b8d7c1 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/package-info.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the implementations for DataProtectionClient. Open API 2.0 Specs for Azure Data Protection - * service. + * Package containing the implementations for DataProtectionClient. + * Open API 2.0 Specs for Azure Data Protection service. */ package com.azure.resourcemanager.dataprotection.implementation; 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 c4ab83aedd73..a34cc3798199 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 @@ -10,18 +10,22 @@ /** * AbsoluteDeleteOption - * - *

Delete option with duration. + * + * Delete option with duration. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("AbsoluteDeleteOption") @Fluent public final class AbsoluteDeleteOption extends DeleteOption { - /** Creates an instance of AbsoluteDeleteOption class. */ + /** + * Creates an instance of AbsoluteDeleteOption class. + */ public AbsoluteDeleteOption() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AbsoluteDeleteOption withDuration(String duration) { super.withDuration(duration); @@ -30,7 +34,7 @@ public AbsoluteDeleteOption withDuration(String duration) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AbsoluteMarker.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AbsoluteMarker.java index bc42c2c23866..4f3b1b1a75d0 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AbsoluteMarker.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AbsoluteMarker.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AbsoluteMarker. */ +/** + * Defines values for AbsoluteMarker. + */ public final class AbsoluteMarker extends ExpandableStringEnum { - /** Static value AllBackup for AbsoluteMarker. */ + /** + * Static value AllBackup for AbsoluteMarker. + */ public static final AbsoluteMarker ALL_BACKUP = fromString("AllBackup"); - /** Static value FirstOfDay for AbsoluteMarker. */ + /** + * Static value FirstOfDay for AbsoluteMarker. + */ public static final AbsoluteMarker FIRST_OF_DAY = fromString("FirstOfDay"); - /** Static value FirstOfMonth for AbsoluteMarker. */ + /** + * Static value FirstOfMonth for AbsoluteMarker. + */ public static final AbsoluteMarker FIRST_OF_MONTH = fromString("FirstOfMonth"); - /** Static value FirstOfWeek for AbsoluteMarker. */ + /** + * Static value FirstOfWeek for AbsoluteMarker. + */ public static final AbsoluteMarker FIRST_OF_WEEK = fromString("FirstOfWeek"); - /** Static value FirstOfYear for AbsoluteMarker. */ + /** + * Static value FirstOfYear for AbsoluteMarker. + */ public static final AbsoluteMarker FIRST_OF_YEAR = fromString("FirstOfYear"); /** * Creates a new instance of AbsoluteMarker value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public AbsoluteMarker() { /** * Creates or finds a AbsoluteMarker from its string representation. - * + * * @param name a name to look for. * @return the corresponding AbsoluteMarker. */ @@ -47,7 +59,7 @@ public static AbsoluteMarker fromString(String name) { /** * Gets known AbsoluteMarker values. - * + * * @return known AbsoluteMarker values. */ public static Collection values() { 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 dbbfb711f2ee..bdb98ec5cfad 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 @@ -10,8 +10,8 @@ /** * AdHocBackupRuleOptions - * - *

Adhoc backup rules. + * + * Adhoc backup rules. */ @Fluent public final class AdHocBackupRuleOptions { @@ -23,19 +23,21 @@ public final class AdHocBackupRuleOptions { /* * AdhocBackupTriggerOption - * + * * Adhoc backup trigger option */ @JsonProperty(value = "triggerOption", required = true) private AdhocBackupTriggerOption triggerOption; - /** Creates an instance of AdHocBackupRuleOptions class. */ + /** + * Creates an instance of AdHocBackupRuleOptions class. + */ public AdHocBackupRuleOptions() { } /** * Get the ruleName property: The ruleName property. - * + * * @return the ruleName value. */ public String ruleName() { @@ -44,7 +46,7 @@ public String ruleName() { /** * Set the ruleName property: The ruleName property. - * + * * @param ruleName the ruleName value to set. * @return the AdHocBackupRuleOptions object itself. */ @@ -55,9 +57,9 @@ public AdHocBackupRuleOptions withRuleName(String ruleName) { /** * Get the triggerOption property: AdhocBackupTriggerOption - * - *

Adhoc backup trigger option. - * + * + * Adhoc backup trigger option. + * * @return the triggerOption value. */ public AdhocBackupTriggerOption triggerOption() { @@ -66,9 +68,9 @@ public AdhocBackupTriggerOption triggerOption() { /** * Set the triggerOption property: AdhocBackupTriggerOption - * - *

Adhoc backup trigger option. - * + * + * Adhoc backup trigger option. + * * @param triggerOption the triggerOption value to set. * @return the AdHocBackupRuleOptions object itself. */ @@ -79,20 +81,17 @@ public AdHocBackupRuleOptions withTriggerOption(AdhocBackupTriggerOption trigger /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (ruleName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property ruleName in model AdHocBackupRuleOptions")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property ruleName in model AdHocBackupRuleOptions")); } if (triggerOption() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property triggerOption in model AdHocBackupRuleOptions")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property triggerOption in model AdHocBackupRuleOptions")); } else { triggerOption().validate(); } 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 f90b4aa57a94..8c2c85727ef3 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 @@ -9,8 +9,8 @@ /** * AdhocBackupTriggerOption - * - *

Adhoc backup trigger option. + * + * Adhoc backup trigger option. */ @Fluent public final class AdhocBackupTriggerOption { @@ -20,13 +20,15 @@ public final class AdhocBackupTriggerOption { @JsonProperty(value = "retentionTagOverride") private String retentionTagOverride; - /** Creates an instance of AdhocBackupTriggerOption class. */ + /** + * Creates an instance of AdhocBackupTriggerOption class. + */ public AdhocBackupTriggerOption() { } /** * Get the retentionTagOverride property: The retentionTagOverride property. - * + * * @return the retentionTagOverride value. */ public String retentionTagOverride() { @@ -35,7 +37,7 @@ public String retentionTagOverride() { /** * Set the retentionTagOverride property: The retentionTagOverride property. - * + * * @param retentionTagOverride the retentionTagOverride value to set. * @return the AdhocBackupTriggerOption object itself. */ @@ -46,7 +48,7 @@ public AdhocBackupTriggerOption withRetentionTagOverride(String retentionTagOver /** * 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/AdhocBasedTaggingCriteria.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdhocBasedTaggingCriteria.java index 0c0266bac532..c32d06355892 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 @@ -9,28 +9,30 @@ /** * AdhocBasedTaggingCriteria - * - *

Adhoc backup tagging criteria. + * + * Adhoc backup tagging criteria. */ @Fluent public final class AdhocBasedTaggingCriteria { /* * RetentionTag - * + * * Retention tag information */ @JsonProperty(value = "tagInfo") private RetentionTag tagInfo; - /** Creates an instance of AdhocBasedTaggingCriteria class. */ + /** + * Creates an instance of AdhocBasedTaggingCriteria class. + */ public AdhocBasedTaggingCriteria() { } /** * Get the tagInfo property: RetentionTag - * - *

Retention tag information. - * + * + * Retention tag information. + * * @return the tagInfo value. */ public RetentionTag tagInfo() { @@ -39,9 +41,9 @@ public RetentionTag tagInfo() { /** * Set the tagInfo property: RetentionTag - * - *

Retention tag information. - * + * + * Retention tag information. + * * @param tagInfo the tagInfo value to set. * @return the AdhocBasedTaggingCriteria object itself. */ @@ -52,7 +54,7 @@ public AdhocBasedTaggingCriteria withTagInfo(RetentionTag tagInfo) { /** * 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/AdhocBasedTriggerContext.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AdhocBasedTriggerContext.java index e622d787ffc7..76c4f4e6b069 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 @@ -12,8 +12,8 @@ /** * AdhocBasedTriggerContext - * - *

Adhoc trigger context. + * + * Adhoc trigger context. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("AdhocBasedTriggerContext") @@ -21,21 +21,23 @@ public final class AdhocBasedTriggerContext extends TriggerContext { /* * AdhocBasedTaggingCriteria - * + * * Tagging Criteria containing retention tag for adhoc backup. */ @JsonProperty(value = "taggingCriteria", required = true) private AdhocBasedTaggingCriteria taggingCriteria; - /** Creates an instance of AdhocBasedTriggerContext class. */ + /** + * Creates an instance of AdhocBasedTriggerContext class. + */ public AdhocBasedTriggerContext() { } /** * Get the taggingCriteria property: AdhocBasedTaggingCriteria - * - *

Tagging Criteria containing retention tag for adhoc backup. - * + * + * Tagging Criteria containing retention tag for adhoc backup. + * * @return the taggingCriteria value. */ public AdhocBasedTaggingCriteria taggingCriteria() { @@ -44,9 +46,9 @@ public AdhocBasedTaggingCriteria taggingCriteria() { /** * Set the taggingCriteria property: AdhocBasedTaggingCriteria - * - *

Tagging Criteria containing retention tag for adhoc backup. - * + * + * Tagging Criteria containing retention tag for adhoc backup. + * * @param taggingCriteria the taggingCriteria value to set. * @return the AdhocBasedTriggerContext object itself. */ @@ -57,17 +59,15 @@ public AdhocBasedTriggerContext withTaggingCriteria(AdhocBasedTaggingCriteria ta /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (taggingCriteria() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property taggingCriteria in model AdhocBasedTriggerContext")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property taggingCriteria in model AdhocBasedTriggerContext")); } else { taggingCriteria().validate(); } 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 index cb7d51012d6c..8e7cc4f79ff4 100644 --- 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 @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AlertsState. */ +/** + * Defines values for AlertsState. + */ public final class AlertsState extends ExpandableStringEnum { - /** Static value Enabled for AlertsState. */ + /** + * Static value Enabled for AlertsState. + */ public static final AlertsState ENABLED = fromString("Enabled"); - /** Static value Disabled for AlertsState. */ + /** + * Static value Disabled for AlertsState. + */ public static final AlertsState DISABLED = fromString("Disabled"); /** * Creates a new instance of AlertsState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AlertsState() { /** * Creates or finds a AlertsState from its string representation. - * + * * @param name a name to look for. * @return the corresponding AlertsState. */ @@ -38,7 +44,7 @@ public static AlertsState fromString(String name) { /** * Gets known AlertsState values. - * + * * @return known AlertsState values. */ public static Collection values() { 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 548a2d554780..144683df789e 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Base class for different types of authentication credentials. */ +/** + * Base class for different types of authentication credentials. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -17,17 +19,18 @@ defaultImpl = AuthCredentials.class) @JsonTypeName("AuthCredentials") @JsonSubTypes({ - @JsonSubTypes.Type(name = "SecretStoreBasedAuthCredentials", value = SecretStoreBasedAuthCredentials.class) -}) + @JsonSubTypes.Type(name = "SecretStoreBasedAuthCredentials", value = SecretStoreBasedAuthCredentials.class) }) @Immutable public class AuthCredentials { - /** Creates an instance of AuthCredentials class. */ + /** + * Creates an instance of AuthCredentials class. + */ public AuthCredentials() { } /** * 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/AzureBackupDiscreteRecoveryPoint.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupDiscreteRecoveryPoint.java index 9008d9074767..c86ccfbaba45 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 @@ -14,8 +14,8 @@ /** * AzureBackupDiscreteRecoveryPoint - * - *

Azure backup discrete RecoveryPoint. + * + * Azure backup discrete RecoveryPoint. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("AzureBackupDiscreteRecoveryPoint") @@ -81,13 +81,22 @@ public final class AzureBackupDiscreteRecoveryPoint extends AzureBackupRecoveryP @JsonProperty(value = "expiryTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime expiryTime; - /** Creates an instance of AzureBackupDiscreteRecoveryPoint class. */ + /* + * Specifies recovery point completeness. Partial (i.e., only some of the intended items were backed up), or + * Completed (i.e., ALL intended items were backed up). + */ + @JsonProperty(value = "recoveryPointState") + private RecoveryPointCompletionState recoveryPointState; + + /** + * Creates an instance of AzureBackupDiscreteRecoveryPoint class. + */ public AzureBackupDiscreteRecoveryPoint() { } /** * Get the friendlyName property: The friendlyName property. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -96,7 +105,7 @@ public String friendlyName() { /** * Set the friendlyName property: The friendlyName property. - * + * * @param friendlyName the friendlyName value to set. * @return the AzureBackupDiscreteRecoveryPoint object itself. */ @@ -107,7 +116,7 @@ public AzureBackupDiscreteRecoveryPoint withFriendlyName(String friendlyName) { /** * Get the recoveryPointDataStoresDetails property: The recoveryPointDataStoresDetails property. - * + * * @return the recoveryPointDataStoresDetails value. */ public List recoveryPointDataStoresDetails() { @@ -116,19 +125,19 @@ public List recoveryPointDataStoresDetails() { /** * Set the recoveryPointDataStoresDetails property: The recoveryPointDataStoresDetails property. - * + * * @param recoveryPointDataStoresDetails the recoveryPointDataStoresDetails value to set. * @return the AzureBackupDiscreteRecoveryPoint object itself. */ - public AzureBackupDiscreteRecoveryPoint withRecoveryPointDataStoresDetails( - List recoveryPointDataStoresDetails) { + public AzureBackupDiscreteRecoveryPoint + withRecoveryPointDataStoresDetails(List recoveryPointDataStoresDetails) { this.recoveryPointDataStoresDetails = recoveryPointDataStoresDetails; return this; } /** * Get the recoveryPointTime property: The recoveryPointTime property. - * + * * @return the recoveryPointTime value. */ public OffsetDateTime recoveryPointTime() { @@ -137,7 +146,7 @@ public OffsetDateTime recoveryPointTime() { /** * Set the recoveryPointTime property: The recoveryPointTime property. - * + * * @param recoveryPointTime the recoveryPointTime value to set. * @return the AzureBackupDiscreteRecoveryPoint object itself. */ @@ -148,7 +157,7 @@ public AzureBackupDiscreteRecoveryPoint withRecoveryPointTime(OffsetDateTime rec /** * Get the policyName property: The policyName property. - * + * * @return the policyName value. */ public String policyName() { @@ -157,7 +166,7 @@ public String policyName() { /** * Set the policyName property: The policyName property. - * + * * @param policyName the policyName value to set. * @return the AzureBackupDiscreteRecoveryPoint object itself. */ @@ -168,7 +177,7 @@ public AzureBackupDiscreteRecoveryPoint withPolicyName(String policyName) { /** * Get the policyVersion property: The policyVersion property. - * + * * @return the policyVersion value. */ public String policyVersion() { @@ -177,7 +186,7 @@ public String policyVersion() { /** * Set the policyVersion property: The policyVersion property. - * + * * @param policyVersion the policyVersion value to set. * @return the AzureBackupDiscreteRecoveryPoint object itself. */ @@ -188,7 +197,7 @@ public AzureBackupDiscreteRecoveryPoint withPolicyVersion(String policyVersion) /** * Get the recoveryPointId property: The recoveryPointId property. - * + * * @return the recoveryPointId value. */ public String recoveryPointId() { @@ -197,7 +206,7 @@ public String recoveryPointId() { /** * Set the recoveryPointId property: The recoveryPointId property. - * + * * @param recoveryPointId the recoveryPointId value to set. * @return the AzureBackupDiscreteRecoveryPoint object itself. */ @@ -208,7 +217,7 @@ public AzureBackupDiscreteRecoveryPoint withRecoveryPointId(String recoveryPoint /** * Get the recoveryPointType property: The recoveryPointType property. - * + * * @return the recoveryPointType value. */ public String recoveryPointType() { @@ -217,7 +226,7 @@ public String recoveryPointType() { /** * Set the recoveryPointType property: The recoveryPointType property. - * + * * @param recoveryPointType the recoveryPointType value to set. * @return the AzureBackupDiscreteRecoveryPoint object itself. */ @@ -228,7 +237,7 @@ public AzureBackupDiscreteRecoveryPoint withRecoveryPointType(String recoveryPoi /** * Get the retentionTagName property: The retentionTagName property. - * + * * @return the retentionTagName value. */ public String retentionTagName() { @@ -237,7 +246,7 @@ public String retentionTagName() { /** * Set the retentionTagName property: The retentionTagName property. - * + * * @param retentionTagName the retentionTagName value to set. * @return the AzureBackupDiscreteRecoveryPoint object itself. */ @@ -248,7 +257,7 @@ public AzureBackupDiscreteRecoveryPoint withRetentionTagName(String retentionTag /** * Get the retentionTagVersion property: The retentionTagVersion property. - * + * * @return the retentionTagVersion value. */ public String retentionTagVersion() { @@ -257,7 +266,7 @@ public String retentionTagVersion() { /** * Set the retentionTagVersion property: The retentionTagVersion property. - * + * * @param retentionTagVersion the retentionTagVersion value to set. * @return the AzureBackupDiscreteRecoveryPoint object itself. */ @@ -268,16 +277,38 @@ public AzureBackupDiscreteRecoveryPoint withRetentionTagVersion(String retention /** * Get the expiryTime property: The expiryTime property. - * + * * @return the expiryTime value. */ public OffsetDateTime expiryTime() { return this.expiryTime; } + /** + * Get the recoveryPointState property: Specifies recovery point completeness. Partial (i.e., only some of the + * intended items were backed up), or Completed (i.e., ALL intended items were backed up). + * + * @return the recoveryPointState value. + */ + public RecoveryPointCompletionState recoveryPointState() { + return this.recoveryPointState; + } + + /** + * Set the recoveryPointState property: Specifies recovery point completeness. Partial (i.e., only some of the + * intended items were backed up), or Completed (i.e., ALL intended items were backed up). + * + * @param recoveryPointState the recoveryPointState value to set. + * @return the AzureBackupDiscreteRecoveryPoint object itself. + */ + public AzureBackupDiscreteRecoveryPoint withRecoveryPointState(RecoveryPointCompletionState recoveryPointState) { + this.recoveryPointState = recoveryPointState; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override @@ -287,10 +318,8 @@ public void validate() { recoveryPointDataStoresDetails().forEach(e -> e.validate()); } if (recoveryPointTime() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property recoveryPointTime in model AzureBackupDiscreteRecoveryPoint")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property recoveryPointTime in model AzureBackupDiscreteRecoveryPoint")); } } 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 7022070ef891..c69b35889e25 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 @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** List Restore Ranges Request. */ +/** + * List Restore Ranges Request. + */ @Fluent public final class AzureBackupFindRestorableTimeRangesRequest { /* @@ -29,13 +31,15 @@ public final class AzureBackupFindRestorableTimeRangesRequest { @JsonProperty(value = "endTime") private String endTime; - /** Creates an instance of AzureBackupFindRestorableTimeRangesRequest class. */ + /** + * Creates an instance of AzureBackupFindRestorableTimeRangesRequest class. + */ public AzureBackupFindRestorableTimeRangesRequest() { } /** * Get the sourceDataStoreType property: Gets or sets the type of the source data store. - * + * * @return the sourceDataStoreType value. */ public RestoreSourceDataStoreType sourceDataStoreType() { @@ -44,19 +48,19 @@ public RestoreSourceDataStoreType sourceDataStoreType() { /** * Set the sourceDataStoreType property: Gets or sets the type of the source data store. - * + * * @param sourceDataStoreType the sourceDataStoreType value to set. * @return the AzureBackupFindRestorableTimeRangesRequest object itself. */ - public AzureBackupFindRestorableTimeRangesRequest withSourceDataStoreType( - RestoreSourceDataStoreType sourceDataStoreType) { + public AzureBackupFindRestorableTimeRangesRequest + withSourceDataStoreType(RestoreSourceDataStoreType sourceDataStoreType) { this.sourceDataStoreType = sourceDataStoreType; return this; } /** * Get the startTime property: Start time for the List Restore Ranges request. ISO 8601 format. - * + * * @return the startTime value. */ public String startTime() { @@ -65,7 +69,7 @@ public String startTime() { /** * Set the startTime property: Start time for the List Restore Ranges request. ISO 8601 format. - * + * * @param startTime the startTime value to set. * @return the AzureBackupFindRestorableTimeRangesRequest object itself. */ @@ -76,7 +80,7 @@ public AzureBackupFindRestorableTimeRangesRequest withStartTime(String startTime /** * Get the endTime property: End time for the List Restore Ranges request. ISO 8601 format. - * + * * @return the endTime value. */ public String endTime() { @@ -85,7 +89,7 @@ public String endTime() { /** * Set the endTime property: End time for the List Restore Ranges request. ISO 8601 format. - * + * * @param endTime the endTime value to set. * @return the AzureBackupFindRestorableTimeRangesRequest object itself. */ @@ -96,16 +100,13 @@ public AzureBackupFindRestorableTimeRangesRequest withEndTime(String endTime) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (sourceDataStoreType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceDataStoreType in model" - + " AzureBackupFindRestorableTimeRangesRequest")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property sourceDataStoreType in model AzureBackupFindRestorableTimeRangesRequest")); } } 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 43e299ebea4e..227f8471b59a 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 @@ -9,7 +9,9 @@ import java.util.List; import java.util.Map; -/** List Restore Ranges Request. */ +/** + * List Restore Ranges Request. + */ @Fluent public final class AzureBackupFindRestorableTimeRangesRequestResource extends DppWorkerRequest { /* @@ -18,13 +20,15 @@ public final class AzureBackupFindRestorableTimeRangesRequestResource extends Dp @JsonProperty(value = "content") private AzureBackupFindRestorableTimeRangesRequest content; - /** Creates an instance of AzureBackupFindRestorableTimeRangesRequestResource class. */ + /** + * Creates an instance of AzureBackupFindRestorableTimeRangesRequestResource class. + */ public AzureBackupFindRestorableTimeRangesRequestResource() { } /** * Get the content property: AzureBackupFindRestorableTimeRangesRequestResource content. - * + * * @return the content value. */ public AzureBackupFindRestorableTimeRangesRequest content() { @@ -33,60 +37,74 @@ public AzureBackupFindRestorableTimeRangesRequest content() { /** * Set the content property: AzureBackupFindRestorableTimeRangesRequestResource content. - * + * * @param content the content value to set. * @return the AzureBackupFindRestorableTimeRangesRequestResource object itself. */ - public AzureBackupFindRestorableTimeRangesRequestResource withContent( - AzureBackupFindRestorableTimeRangesRequest content) { + public AzureBackupFindRestorableTimeRangesRequestResource + withContent(AzureBackupFindRestorableTimeRangesRequest content) { this.content = content; return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupFindRestorableTimeRangesRequestResource withSubscriptionId(String subscriptionId) { super.withSubscriptionId(subscriptionId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupFindRestorableTimeRangesRequestResource withUri(String uri) { super.withUri(uri); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupFindRestorableTimeRangesRequestResource withHeaders(Map> headers) { super.withHeaders(headers); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public AzureBackupFindRestorableTimeRangesRequestResource withSupportedGroupVersions( - List supportedGroupVersions) { + public AzureBackupFindRestorableTimeRangesRequestResource + withSupportedGroupVersions(List supportedGroupVersions) { super.withSupportedGroupVersions(supportedGroupVersions); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupFindRestorableTimeRangesRequestResource withCultureInfo(String cultureInfo) { super.withCultureInfo(cultureInfo); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupFindRestorableTimeRangesRequestResource withParameters(Map parameters) { super.withParameters(parameters); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupFindRestorableTimeRangesRequestResource withHttpMethod(String httpMethod) { super.withHttpMethod(httpMethod); @@ -95,7 +113,7 @@ public AzureBackupFindRestorableTimeRangesRequestResource withHttpMethod(String /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 eb9390895420..2b6908ff9948 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List Restore Ranges Response. */ +/** + * List Restore Ranges Response. + */ @Fluent public final class AzureBackupFindRestorableTimeRangesResponse { /* @@ -23,13 +25,15 @@ public final class AzureBackupFindRestorableTimeRangesResponse { @JsonProperty(value = "objectType") private String objectType; - /** Creates an instance of AzureBackupFindRestorableTimeRangesResponse class. */ + /** + * Creates an instance of AzureBackupFindRestorableTimeRangesResponse class. + */ public AzureBackupFindRestorableTimeRangesResponse() { } /** * Get the restorableTimeRanges property: Returns the Restore Ranges available on the Backup Instance. - * + * * @return the restorableTimeRanges value. */ public List restorableTimeRanges() { @@ -38,19 +42,19 @@ public List restorableTimeRanges() { /** * Set the restorableTimeRanges property: Returns the Restore Ranges available on the Backup Instance. - * + * * @param restorableTimeRanges the restorableTimeRanges value to set. * @return the AzureBackupFindRestorableTimeRangesResponse object itself. */ - public AzureBackupFindRestorableTimeRangesResponse withRestorableTimeRanges( - List restorableTimeRanges) { + public AzureBackupFindRestorableTimeRangesResponse + withRestorableTimeRanges(List restorableTimeRanges) { this.restorableTimeRanges = restorableTimeRanges; return this; } /** * Get the objectType property: The objectType property. - * + * * @return the objectType value. */ public String objectType() { @@ -59,7 +63,7 @@ public String objectType() { /** * Set the objectType property: The objectType property. - * + * * @param objectType the objectType value to set. * @return the AzureBackupFindRestorableTimeRangesResponse object itself. */ @@ -70,7 +74,7 @@ public AzureBackupFindRestorableTimeRangesResponse withObjectType(String objectT /** * 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/AzureBackupFindRestorableTimeRangesResponseResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupFindRestorableTimeRangesResponseResource.java index 6bf12d32f5a0..0d711eca0cad 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupFindRestorableTimeRangesResponseResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupFindRestorableTimeRangesResponseResource.java @@ -7,39 +7,41 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupFindRestorableTimeRangesResponseResourceInner; -/** An immutable client-side representation of AzureBackupFindRestorableTimeRangesResponseResource. */ +/** + * An immutable client-side representation of AzureBackupFindRestorableTimeRangesResponseResource. + */ public interface AzureBackupFindRestorableTimeRangesResponseResource { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the properties property: AzureBackupFindRestorableTimeRangesResponseResource properties. - * + * * @return the properties value. */ AzureBackupFindRestorableTimeRangesResponse properties(); @@ -48,7 +50,7 @@ public interface AzureBackupFindRestorableTimeRangesResponseResource { * Gets the inner * com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupFindRestorableTimeRangesResponseResourceInner * object. - * + * * @return the inner object. */ AzureBackupFindRestorableTimeRangesResponseResourceInner innerModel(); 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 77335b7ee1b8..dc3db5a949e6 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 @@ -10,7 +10,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** AzureBackup Job Class. */ +/** + * AzureBackup Job Class. + */ @Fluent public final class AzureBackupJob { /* @@ -200,13 +202,15 @@ public final class AzureBackupJob { @JsonProperty(value = "destinationDataStoreName") private String destinationDataStoreName; - /** Creates an instance of AzureBackupJob class. */ + /** + * Creates an instance of AzureBackupJob class. + */ public AzureBackupJob() { } /** * Get the activityId property: Job Activity Id. - * + * * @return the activityId value. */ public String activityId() { @@ -215,7 +219,7 @@ public String activityId() { /** * Set the activityId property: Job Activity Id. - * + * * @param activityId the activityId value to set. * @return the AzureBackupJob object itself. */ @@ -226,7 +230,7 @@ public AzureBackupJob withActivityId(String activityId) { /** * Get the backupInstanceFriendlyName property: Name of the Backup Instance. - * + * * @return the backupInstanceFriendlyName value. */ public String backupInstanceFriendlyName() { @@ -235,7 +239,7 @@ public String backupInstanceFriendlyName() { /** * Set the backupInstanceFriendlyName property: Name of the Backup Instance. - * + * * @param backupInstanceFriendlyName the backupInstanceFriendlyName value to set. * @return the AzureBackupJob object itself. */ @@ -246,7 +250,7 @@ public AzureBackupJob withBackupInstanceFriendlyName(String backupInstanceFriend /** * Get the backupInstanceId property: ARM ID of the Backup Instance. - * + * * @return the backupInstanceId value. */ public String backupInstanceId() { @@ -255,7 +259,7 @@ public String backupInstanceId() { /** * Get the dataSourceId property: ARM ID of the DataSource. - * + * * @return the dataSourceId value. */ public String dataSourceId() { @@ -264,7 +268,7 @@ public String dataSourceId() { /** * Set the dataSourceId property: ARM ID of the DataSource. - * + * * @param dataSourceId the dataSourceId value to set. * @return the AzureBackupJob object itself. */ @@ -275,7 +279,7 @@ public AzureBackupJob withDataSourceId(String dataSourceId) { /** * Get the dataSourceLocation property: Location of the DataSource. - * + * * @return the dataSourceLocation value. */ public String dataSourceLocation() { @@ -284,7 +288,7 @@ public String dataSourceLocation() { /** * Set the dataSourceLocation property: Location of the DataSource. - * + * * @param dataSourceLocation the dataSourceLocation value to set. * @return the AzureBackupJob object itself. */ @@ -295,7 +299,7 @@ public AzureBackupJob withDataSourceLocation(String dataSourceLocation) { /** * Get the dataSourceName property: User Friendly Name of the DataSource. - * + * * @return the dataSourceName value. */ public String dataSourceName() { @@ -304,7 +308,7 @@ public String dataSourceName() { /** * Set the dataSourceName property: User Friendly Name of the DataSource. - * + * * @param dataSourceName the dataSourceName value to set. * @return the AzureBackupJob object itself. */ @@ -315,7 +319,7 @@ public AzureBackupJob withDataSourceName(String dataSourceName) { /** * Get the dataSourceSetName property: Data Source Set Name of the DataSource. - * + * * @return the dataSourceSetName value. */ public String dataSourceSetName() { @@ -324,7 +328,7 @@ public String dataSourceSetName() { /** * Set the dataSourceSetName property: Data Source Set Name of the DataSource. - * + * * @param dataSourceSetName the dataSourceSetName value to set. * @return the AzureBackupJob object itself. */ @@ -335,7 +339,7 @@ public AzureBackupJob withDataSourceSetName(String dataSourceSetName) { /** * Get the dataSourceType property: Type of DataSource. - * + * * @return the dataSourceType value. */ public String dataSourceType() { @@ -344,7 +348,7 @@ public String dataSourceType() { /** * Set the dataSourceType property: Type of DataSource. - * + * * @param dataSourceType the dataSourceType value to set. * @return the AzureBackupJob object itself. */ @@ -355,7 +359,7 @@ public AzureBackupJob withDataSourceType(String dataSourceType) { /** * Get the duration property: Total run time of the job. ISO 8601 format. - * + * * @return the duration value. */ public String duration() { @@ -364,7 +368,7 @@ public String duration() { /** * Set the duration property: Total run time of the job. ISO 8601 format. - * + * * @param duration the duration value to set. * @return the AzureBackupJob object itself. */ @@ -375,7 +379,7 @@ public AzureBackupJob withDuration(String duration) { /** * Get the endTime property: EndTime of the job(in UTC). - * + * * @return the endTime value. */ public OffsetDateTime endTime() { @@ -384,7 +388,7 @@ public OffsetDateTime endTime() { /** * Get the errorDetails property: A List, detailing the errors related to the job. - * + * * @return the errorDetails value. */ public List errorDetails() { @@ -393,7 +397,7 @@ public List errorDetails() { /** * Get the extendedInfo property: Extended Information about the job. - * + * * @return the extendedInfo value. */ public JobExtendedInfo extendedInfo() { @@ -402,7 +406,7 @@ public JobExtendedInfo extendedInfo() { /** * Get the isUserTriggered property: Indicated that whether the job is adhoc(true) or scheduled(false). - * + * * @return the isUserTriggered value. */ public boolean isUserTriggered() { @@ -411,7 +415,7 @@ public boolean isUserTriggered() { /** * Set the isUserTriggered property: Indicated that whether the job is adhoc(true) or scheduled(false). - * + * * @param isUserTriggered the isUserTriggered value to set. * @return the AzureBackupJob object itself. */ @@ -423,7 +427,7 @@ public AzureBackupJob withIsUserTriggered(boolean isUserTriggered) { /** * Get the operation property: It indicates the type of Job i.e. Backup:full/log/diff ;Restore:ALR/OLR; * Tiering:Backup/Archive ; Management:ConfigureProtection/UnConfigure. - * + * * @return the operation value. */ public String operation() { @@ -433,7 +437,7 @@ public String operation() { /** * Set the operation property: It indicates the type of Job i.e. Backup:full/log/diff ;Restore:ALR/OLR; * Tiering:Backup/Archive ; Management:ConfigureProtection/UnConfigure. - * + * * @param operation the operation value to set. * @return the AzureBackupJob object itself. */ @@ -444,7 +448,7 @@ public AzureBackupJob withOperation(String operation) { /** * Get the operationCategory property: It indicates the type of Job i.e. Backup/Restore/Tiering/Management. - * + * * @return the operationCategory value. */ public String operationCategory() { @@ -453,7 +457,7 @@ public String operationCategory() { /** * Set the operationCategory property: It indicates the type of Job i.e. Backup/Restore/Tiering/Management. - * + * * @param operationCategory the operationCategory value to set. * @return the AzureBackupJob object itself. */ @@ -464,7 +468,7 @@ public AzureBackupJob withOperationCategory(String operationCategory) { /** * Get the policyId property: ARM ID of the policy. - * + * * @return the policyId value. */ public String policyId() { @@ -473,7 +477,7 @@ public String policyId() { /** * Get the policyName property: Name of the policy. - * + * * @return the policyName value. */ public String policyName() { @@ -482,7 +486,7 @@ public String policyName() { /** * Get the progressEnabled property: Indicated whether progress is enabled for the job. - * + * * @return the progressEnabled value. */ public boolean progressEnabled() { @@ -491,7 +495,7 @@ public boolean progressEnabled() { /** * Set the progressEnabled property: Indicated whether progress is enabled for the job. - * + * * @param progressEnabled the progressEnabled value to set. * @return the AzureBackupJob object itself. */ @@ -502,7 +506,7 @@ public AzureBackupJob withProgressEnabled(boolean progressEnabled) { /** * Get the progressUrl property: Url which contains job's progress. - * + * * @return the progressUrl value. */ public String progressUrl() { @@ -511,7 +515,7 @@ public String progressUrl() { /** * Get the rehydrationPriority property: Priority to be used for rehydration. - * + * * @return the rehydrationPriority value. */ public String rehydrationPriority() { @@ -520,7 +524,7 @@ public String rehydrationPriority() { /** * Get the restoreType property: It indicates the sub type of operation i.e. in case of Restore it can be ALR/OLR. - * + * * @return the restoreType value. */ public String restoreType() { @@ -529,7 +533,7 @@ public String restoreType() { /** * Get the sourceResourceGroup property: Resource Group Name of the Datasource. - * + * * @return the sourceResourceGroup value. */ public String sourceResourceGroup() { @@ -538,7 +542,7 @@ public String sourceResourceGroup() { /** * Set the sourceResourceGroup property: Resource Group Name of the Datasource. - * + * * @param sourceResourceGroup the sourceResourceGroup value to set. * @return the AzureBackupJob object itself. */ @@ -549,7 +553,7 @@ public AzureBackupJob withSourceResourceGroup(String sourceResourceGroup) { /** * Get the sourceSubscriptionId property: SubscriptionId corresponding to the DataSource. - * + * * @return the sourceSubscriptionId value. */ public String sourceSubscriptionId() { @@ -558,7 +562,7 @@ public String sourceSubscriptionId() { /** * Set the sourceSubscriptionId property: SubscriptionId corresponding to the DataSource. - * + * * @param sourceSubscriptionId the sourceSubscriptionId value to set. * @return the AzureBackupJob object itself. */ @@ -569,7 +573,7 @@ public AzureBackupJob withSourceSubscriptionId(String sourceSubscriptionId) { /** * Get the startTime property: StartTime of the job(in UTC). - * + * * @return the startTime value. */ public OffsetDateTime startTime() { @@ -578,7 +582,7 @@ public OffsetDateTime startTime() { /** * Set the startTime property: StartTime of the job(in UTC). - * + * * @param startTime the startTime value to set. * @return the AzureBackupJob object itself. */ @@ -589,7 +593,7 @@ public AzureBackupJob withStartTime(OffsetDateTime startTime) { /** * Get the status property: Status of the job like InProgress/Success/Failed/Cancelled/SuccessWithWarning. - * + * * @return the status value. */ public String status() { @@ -598,7 +602,7 @@ public String status() { /** * Set the status property: Status of the job like InProgress/Success/Failed/Cancelled/SuccessWithWarning. - * + * * @param status the status value to set. * @return the AzureBackupJob object itself. */ @@ -609,7 +613,7 @@ public AzureBackupJob withStatus(String status) { /** * Get the subscriptionId property: Subscription Id of the corresponding backup vault. - * + * * @return the subscriptionId value. */ public String subscriptionId() { @@ -618,7 +622,7 @@ public String subscriptionId() { /** * Set the subscriptionId property: Subscription Id of the corresponding backup vault. - * + * * @param subscriptionId the subscriptionId value to set. * @return the AzureBackupJob object itself. */ @@ -629,7 +633,7 @@ public AzureBackupJob withSubscriptionId(String subscriptionId) { /** * Get the supportedActions property: List of supported actions. - * + * * @return the supportedActions value. */ public List supportedActions() { @@ -638,7 +642,7 @@ public List supportedActions() { /** * Set the supportedActions property: List of supported actions. - * + * * @param supportedActions the supportedActions value to set. * @return the AzureBackupJob object itself. */ @@ -649,7 +653,7 @@ public AzureBackupJob withSupportedActions(List supportedActions) { /** * Get the vaultName property: Name of the vault. - * + * * @return the vaultName value. */ public String vaultName() { @@ -658,7 +662,7 @@ public String vaultName() { /** * Set the vaultName property: Name of the vault. - * + * * @param vaultName the vaultName value to set. * @return the AzureBackupJob object itself. */ @@ -669,7 +673,7 @@ public AzureBackupJob withVaultName(String vaultName) { /** * Get the etag property: The etag property. - * + * * @return the etag value. */ public String etag() { @@ -678,7 +682,7 @@ public String etag() { /** * Set the etag property: The etag property. - * + * * @param etag the etag value to set. * @return the AzureBackupJob object itself. */ @@ -689,7 +693,7 @@ public AzureBackupJob withEtag(String etag) { /** * Get the sourceDataStoreName property: The sourceDataStoreName property. - * + * * @return the sourceDataStoreName value. */ public String sourceDataStoreName() { @@ -698,7 +702,7 @@ public String sourceDataStoreName() { /** * Set the sourceDataStoreName property: The sourceDataStoreName property. - * + * * @param sourceDataStoreName the sourceDataStoreName value to set. * @return the AzureBackupJob object itself. */ @@ -709,7 +713,7 @@ public AzureBackupJob withSourceDataStoreName(String sourceDataStoreName) { /** * Get the destinationDataStoreName property: The destinationDataStoreName property. - * + * * @return the destinationDataStoreName value. */ public String destinationDataStoreName() { @@ -718,7 +722,7 @@ public String destinationDataStoreName() { /** * Set the destinationDataStoreName property: The destinationDataStoreName property. - * + * * @param destinationDataStoreName the destinationDataStoreName value to set. * @return the AzureBackupJob object itself. */ @@ -729,41 +733,33 @@ public AzureBackupJob withDestinationDataStoreName(String destinationDataStoreNa /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (activityId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property activityId in model AzureBackupJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property activityId in model AzureBackupJob")); } if (backupInstanceFriendlyName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property backupInstanceFriendlyName in model AzureBackupJob")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property backupInstanceFriendlyName in model AzureBackupJob")); } if (dataSourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property dataSourceId in model AzureBackupJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property dataSourceId in model AzureBackupJob")); } if (dataSourceLocation() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataSourceLocation in model AzureBackupJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property dataSourceLocation in model AzureBackupJob")); } if (dataSourceName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property dataSourceName in model AzureBackupJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property dataSourceName in model AzureBackupJob")); } if (dataSourceType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property dataSourceType in model AzureBackupJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property dataSourceType in model AzureBackupJob")); } if (errorDetails() != null) { errorDetails().forEach(e -> e.validate()); @@ -772,52 +768,40 @@ public void validate() { extendedInfo().validate(); } if (operation() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property operation in model AzureBackupJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property operation in model AzureBackupJob")); } if (operationCategory() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property operationCategory in model AzureBackupJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property operationCategory in model AzureBackupJob")); } if (sourceResourceGroup() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceResourceGroup in model AzureBackupJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property sourceResourceGroup in model AzureBackupJob")); } if (sourceSubscriptionId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceSubscriptionId in model AzureBackupJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property sourceSubscriptionId in model AzureBackupJob")); } if (startTime() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property startTime in model AzureBackupJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property startTime in model AzureBackupJob")); } if (status() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property status in model AzureBackupJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property status in model AzureBackupJob")); } if (subscriptionId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property subscriptionId in model AzureBackupJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property subscriptionId in model AzureBackupJob")); } if (supportedActions() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property supportedActions in model AzureBackupJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property supportedActions in model AzureBackupJob")); } if (vaultName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property vaultName in model AzureBackupJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property vaultName in model AzureBackupJob")); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJobResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJobResource.java index 3132c1ad8645..fa1c39b6d9d9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJobResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJobResource.java @@ -7,46 +7,48 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner; -/** An immutable client-side representation of AzureBackupJobResource. */ +/** + * An immutable client-side representation of AzureBackupJobResource. + */ public interface AzureBackupJobResource { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the properties property: AzureBackupJobResource properties. - * + * * @return the properties value. */ AzureBackupJob properties(); /** * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner object. - * + * * @return the inner object. */ AzureBackupJobResourceInner innerModel(); 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 21c049979559..8eca430e2dfc 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of AzureBackup Job resources. */ +/** + * List of AzureBackup Job resources. + */ @Fluent public final class AzureBackupJobResourceList extends DppResourceList { /* @@ -18,13 +20,15 @@ public final class AzureBackupJobResourceList extends DppResourceList { @JsonProperty(value = "value") private List value; - /** Creates an instance of AzureBackupJobResourceList class. */ + /** + * Creates an instance of AzureBackupJobResourceList class. + */ public AzureBackupJobResourceList() { } /** * Get the value property: List of resources. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: List of resources. - * + * * @param value the value value to set. * @return the AzureBackupJobResourceList object itself. */ @@ -42,7 +46,9 @@ public AzureBackupJobResourceList withValue(List va return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupJobResourceList withNextLink(String nextLink) { super.withNextLink(nextLink); @@ -51,7 +57,7 @@ public AzureBackupJobResourceList withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 b8bf244138db..3d539a01acb4 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 @@ -12,8 +12,8 @@ /** * AzureBackupParams - * - *

Azure backup parameters. + * + * Azure backup parameters. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("AzureBackupParams") @@ -25,13 +25,15 @@ public final class AzureBackupParams extends BackupParameters { @JsonProperty(value = "backupType", required = true) private String backupType; - /** Creates an instance of AzureBackupParams class. */ + /** + * Creates an instance of AzureBackupParams class. + */ public AzureBackupParams() { } /** * Get the backupType property: BackupType ; Full/Incremental etc. - * + * * @return the backupType value. */ public String backupType() { @@ -40,7 +42,7 @@ public String backupType() { /** * Set the backupType property: BackupType ; Full/Incremental etc. - * + * * @param backupType the backupType value to set. * @return the AzureBackupParams object itself. */ @@ -51,16 +53,15 @@ public AzureBackupParams withBackupType(String backupType) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (backupType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property backupType in model AzureBackupParams")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property backupType in model AzureBackupParams")); } } 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 b49f4a08d2ca..c06859dce4e3 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 @@ -11,8 +11,8 @@ /** * AzureBackupRecoveryPoint - * - *

Azure backup recoveryPoint. + * + * Azure backup recoveryPoint. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, @@ -21,17 +21,18 @@ defaultImpl = AzureBackupRecoveryPoint.class) @JsonTypeName("AzureBackupRecoveryPoint") @JsonSubTypes({ - @JsonSubTypes.Type(name = "AzureBackupDiscreteRecoveryPoint", value = AzureBackupDiscreteRecoveryPoint.class) -}) + @JsonSubTypes.Type(name = "AzureBackupDiscreteRecoveryPoint", value = AzureBackupDiscreteRecoveryPoint.class) }) @Immutable public class AzureBackupRecoveryPoint { - /** Creates an instance of AzureBackupRecoveryPoint class. */ + /** + * Creates an instance of AzureBackupRecoveryPoint class. + */ public AzureBackupRecoveryPoint() { } /** * 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/AzureBackupRecoveryPointBasedRestoreRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointBasedRestoreRequest.java index 2426bde6d94f..3996761cdb6a 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 @@ -13,8 +13,8 @@ /** * AzureBackupRecoveryPointBasedRestoreRequest - * - *

Azure backup recoveryPoint based restore request. + * + * Azure backup recoveryPoint based restore request. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, @@ -25,8 +25,7 @@ @JsonSubTypes({ @JsonSubTypes.Type( name = "AzureBackupRestoreWithRehydrationRequest", - value = AzureBackupRestoreWithRehydrationRequest.class) -}) + value = AzureBackupRestoreWithRehydrationRequest.class) }) @Fluent public class AzureBackupRecoveryPointBasedRestoreRequest extends AzureBackupRestoreRequest { /* @@ -35,13 +34,15 @@ public class AzureBackupRecoveryPointBasedRestoreRequest extends AzureBackupRest @JsonProperty(value = "recoveryPointId", required = true) private String recoveryPointId; - /** Creates an instance of AzureBackupRecoveryPointBasedRestoreRequest class. */ + /** + * Creates an instance of AzureBackupRecoveryPointBasedRestoreRequest class. + */ public AzureBackupRecoveryPointBasedRestoreRequest() { } /** * Get the recoveryPointId property: The recoveryPointId property. - * + * * @return the recoveryPointId value. */ public String recoveryPointId() { @@ -50,7 +51,7 @@ public String recoveryPointId() { /** * Set the recoveryPointId property: The recoveryPointId property. - * + * * @param recoveryPointId the recoveryPointId value to set. * @return the AzureBackupRecoveryPointBasedRestoreRequest object itself. */ @@ -59,29 +60,37 @@ public AzureBackupRecoveryPointBasedRestoreRequest withRecoveryPointId(String re return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupRecoveryPointBasedRestoreRequest withRestoreTargetInfo(RestoreTargetInfoBase restoreTargetInfo) { super.withRestoreTargetInfo(restoreTargetInfo); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public AzureBackupRecoveryPointBasedRestoreRequest withSourceDataStoreType( - SourceDataStoreType sourceDataStoreType) { + public AzureBackupRecoveryPointBasedRestoreRequest + withSourceDataStoreType(SourceDataStoreType sourceDataStoreType) { super.withSourceDataStoreType(sourceDataStoreType); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupRecoveryPointBasedRestoreRequest withSourceResourceId(String sourceResourceId) { super.withSourceResourceId(sourceResourceId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupRecoveryPointBasedRestoreRequest withIdentityDetails(IdentityDetails identityDetails) { super.withIdentityDetails(identityDetails); @@ -90,18 +99,15 @@ public AzureBackupRecoveryPointBasedRestoreRequest withIdentityDetails(IdentityD /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (recoveryPointId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property recoveryPointId in model" - + " AzureBackupRecoveryPointBasedRestoreRequest")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property recoveryPointId in model AzureBackupRecoveryPointBasedRestoreRequest")); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointResource.java index 87c221652a32..02c04f2e2b59 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointResource.java @@ -7,41 +7,43 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner; -/** An immutable client-side representation of AzureBackupRecoveryPointResource. */ +/** + * An immutable client-side representation of AzureBackupRecoveryPointResource. + */ public interface AzureBackupRecoveryPointResource { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the properties property: AzureBackupRecoveryPoint - * - *

AzureBackupRecoveryPointResource properties. - * + * + * AzureBackupRecoveryPointResource properties. + * * @return the properties value. */ AzureBackupRecoveryPoint properties(); @@ -49,7 +51,7 @@ public interface AzureBackupRecoveryPointResource { /** * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner * object. - * + * * @return the inner object. */ AzureBackupRecoveryPointResourceInner innerModel(); 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 6ade06dda218..3b9515bbcb99 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 @@ -11,8 +11,8 @@ /** * AzureBackupRecoveryPointResourceList - * - *

Azure backup recoveryPoint resource list. + * + * Azure backup recoveryPoint resource list. */ @Fluent public final class AzureBackupRecoveryPointResourceList extends DppResourceList { @@ -22,13 +22,15 @@ public final class AzureBackupRecoveryPointResourceList extends DppResourceList @JsonProperty(value = "value") private List value; - /** Creates an instance of AzureBackupRecoveryPointResourceList class. */ + /** + * Creates an instance of AzureBackupRecoveryPointResourceList class. + */ public AzureBackupRecoveryPointResourceList() { } /** * Get the value property: List of resources. - * + * * @return the value value. */ public List value() { @@ -37,7 +39,7 @@ public List value() { /** * Set the value property: List of resources. - * + * * @param value the value value to set. * @return the AzureBackupRecoveryPointResourceList object itself. */ @@ -46,7 +48,9 @@ public AzureBackupRecoveryPointResourceList withValue(ListAzureBackup RecoveryPointTime Based Restore Request. + * + * AzureBackup RecoveryPointTime Based Restore Request. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("AzureBackupRecoveryTimeBasedRestoreRequest") @@ -25,13 +25,15 @@ public final class AzureBackupRecoveryTimeBasedRestoreRequest extends AzureBacku @JsonProperty(value = "recoveryPointTime", required = true) private String recoveryPointTime; - /** Creates an instance of AzureBackupRecoveryTimeBasedRestoreRequest class. */ + /** + * Creates an instance of AzureBackupRecoveryTimeBasedRestoreRequest class. + */ public AzureBackupRecoveryTimeBasedRestoreRequest() { } /** * Get the recoveryPointTime property: The recovery time in ISO 8601 format example - 2020-08-14T17:30:00.0000000Z. - * + * * @return the recoveryPointTime value. */ public String recoveryPointTime() { @@ -40,7 +42,7 @@ public String recoveryPointTime() { /** * Set the recoveryPointTime property: The recovery time in ISO 8601 format example - 2020-08-14T17:30:00.0000000Z. - * + * * @param recoveryPointTime the recoveryPointTime value to set. * @return the AzureBackupRecoveryTimeBasedRestoreRequest object itself. */ @@ -49,28 +51,36 @@ public AzureBackupRecoveryTimeBasedRestoreRequest withRecoveryPointTime(String r return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupRecoveryTimeBasedRestoreRequest withRestoreTargetInfo(RestoreTargetInfoBase restoreTargetInfo) { super.withRestoreTargetInfo(restoreTargetInfo); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupRecoveryTimeBasedRestoreRequest withSourceDataStoreType(SourceDataStoreType sourceDataStoreType) { super.withSourceDataStoreType(sourceDataStoreType); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupRecoveryTimeBasedRestoreRequest withSourceResourceId(String sourceResourceId) { super.withSourceResourceId(sourceResourceId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupRecoveryTimeBasedRestoreRequest withIdentityDetails(IdentityDetails identityDetails) { super.withIdentityDetails(identityDetails); @@ -79,18 +89,15 @@ public AzureBackupRecoveryTimeBasedRestoreRequest withIdentityDetails(IdentityDe /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (recoveryPointTime() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property recoveryPointTime in model" - + " AzureBackupRecoveryTimeBasedRestoreRequest")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property recoveryPointTime in model AzureBackupRecoveryTimeBasedRestoreRequest")); } } 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 d54b17413c15..9be14a341b41 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 @@ -10,8 +10,8 @@ /** * AzureBackupRehydrationRequest - * - *

Azure Backup Rehydrate Request. + * + * Azure Backup Rehydrate Request. */ @Fluent public final class AzureBackupRehydrationRequest { @@ -33,13 +33,15 @@ public final class AzureBackupRehydrationRequest { @JsonProperty(value = "rehydrationRetentionDuration", required = true) private String rehydrationRetentionDuration; - /** Creates an instance of AzureBackupRehydrationRequest class. */ + /** + * Creates an instance of AzureBackupRehydrationRequest class. + */ public AzureBackupRehydrationRequest() { } /** * Get the recoveryPointId property: Id of the recovery point to be recovered. - * + * * @return the recoveryPointId value. */ public String recoveryPointId() { @@ -48,7 +50,7 @@ public String recoveryPointId() { /** * Set the recoveryPointId property: Id of the recovery point to be recovered. - * + * * @param recoveryPointId the recoveryPointId value to set. * @return the AzureBackupRehydrationRequest object itself. */ @@ -59,7 +61,7 @@ public AzureBackupRehydrationRequest withRecoveryPointId(String recoveryPointId) /** * Get the rehydrationPriority property: Priority to be used for rehydration. Values High or Standard. - * + * * @return the rehydrationPriority value. */ public RehydrationPriority rehydrationPriority() { @@ -68,7 +70,7 @@ public RehydrationPriority rehydrationPriority() { /** * Set the rehydrationPriority property: Priority to be used for rehydration. Values High or Standard. - * + * * @param rehydrationPriority the rehydrationPriority value to set. * @return the AzureBackupRehydrationRequest object itself. */ @@ -79,7 +81,7 @@ public AzureBackupRehydrationRequest withRehydrationPriority(RehydrationPriority /** * Get the rehydrationRetentionDuration property: Retention duration in ISO 8601 format i.e P10D . - * + * * @return the rehydrationRetentionDuration value. */ public String rehydrationRetentionDuration() { @@ -88,7 +90,7 @@ public String rehydrationRetentionDuration() { /** * Set the rehydrationRetentionDuration property: Retention duration in ISO 8601 format i.e P10D . - * + * * @param rehydrationRetentionDuration the rehydrationRetentionDuration value to set. * @return the AzureBackupRehydrationRequest object itself. */ @@ -99,22 +101,17 @@ public AzureBackupRehydrationRequest withRehydrationRetentionDuration(String reh /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (recoveryPointId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property recoveryPointId in model AzureBackupRehydrationRequest")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property recoveryPointId in model AzureBackupRehydrationRequest")); } if (rehydrationRetentionDuration() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property rehydrationRetentionDuration in model" - + " AzureBackupRehydrationRequest")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property rehydrationRetentionDuration in model AzureBackupRehydrationRequest")); } } 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 3aa39e8426f0..bc80109934b5 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 @@ -13,8 +13,8 @@ /** * AzureBackupRestoreRequest - * - *

Azure backup restore request. + * + * Azure backup restore request. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, @@ -28,8 +28,7 @@ value = AzureBackupRecoveryPointBasedRestoreRequest.class), @JsonSubTypes.Type( name = "AzureBackupRecoveryTimeBasedRestoreRequest", - value = AzureBackupRecoveryTimeBasedRestoreRequest.class) -}) + value = AzureBackupRecoveryTimeBasedRestoreRequest.class) }) @Fluent public class AzureBackupRestoreRequest { /* @@ -57,13 +56,15 @@ public class AzureBackupRestoreRequest { @JsonProperty(value = "identityDetails") private IdentityDetails identityDetails; - /** Creates an instance of AzureBackupRestoreRequest class. */ + /** + * Creates an instance of AzureBackupRestoreRequest class. + */ public AzureBackupRestoreRequest() { } /** * Get the restoreTargetInfo property: Gets or sets the restore target information. - * + * * @return the restoreTargetInfo value. */ public RestoreTargetInfoBase restoreTargetInfo() { @@ -72,7 +73,7 @@ public RestoreTargetInfoBase restoreTargetInfo() { /** * Set the restoreTargetInfo property: Gets or sets the restore target information. - * + * * @param restoreTargetInfo the restoreTargetInfo value to set. * @return the AzureBackupRestoreRequest object itself. */ @@ -83,7 +84,7 @@ public AzureBackupRestoreRequest withRestoreTargetInfo(RestoreTargetInfoBase res /** * Get the sourceDataStoreType property: Gets or sets the type of the source data store. - * + * * @return the sourceDataStoreType value. */ public SourceDataStoreType sourceDataStoreType() { @@ -92,7 +93,7 @@ public SourceDataStoreType sourceDataStoreType() { /** * Set the sourceDataStoreType property: Gets or sets the type of the source data store. - * + * * @param sourceDataStoreType the sourceDataStoreType value to set. * @return the AzureBackupRestoreRequest object itself. */ @@ -104,7 +105,7 @@ public AzureBackupRestoreRequest withSourceDataStoreType(SourceDataStoreType sou /** * Get the sourceResourceId property: Fully qualified Azure Resource Manager ID of the datasource which is being * recovered. - * + * * @return the sourceResourceId value. */ public String sourceResourceId() { @@ -114,7 +115,7 @@ public String 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. */ @@ -124,9 +125,9 @@ public AzureBackupRestoreRequest withSourceResourceId(String sourceResourceId) { } /** - * Get the identityDetails property: Contains information of the Identity Details for the BI. If it is null, default - * will be considered as System Assigned. - * + * Get the identityDetails property: Contains information of the Identity Details for the BI. + * If it is null, default will be considered as System Assigned. + * * @return the identityDetails value. */ public IdentityDetails identityDetails() { @@ -134,9 +135,9 @@ public IdentityDetails identityDetails() { } /** - * Set the identityDetails property: Contains information of the Identity Details for the BI. If it is null, default - * will be considered as System Assigned. - * + * Set the identityDetails property: Contains information of the Identity Details for the BI. + * If it is null, default will be considered as System Assigned. + * * @param identityDetails the identityDetails value to set. * @return the AzureBackupRestoreRequest object itself. */ @@ -147,23 +148,19 @@ public AzureBackupRestoreRequest withIdentityDetails(IdentityDetails identityDet /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (restoreTargetInfo() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property restoreTargetInfo in model AzureBackupRestoreRequest")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property restoreTargetInfo in model AzureBackupRestoreRequest")); } else { restoreTargetInfo().validate(); } if (sourceDataStoreType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property sourceDataStoreType in model AzureBackupRestoreRequest")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property sourceDataStoreType in model AzureBackupRestoreRequest")); } if (identityDetails() != null) { identityDetails().validate(); 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 5008dc3ca1d8..b90d24b10cc4 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 @@ -12,8 +12,8 @@ /** * AzureBackupRestoreWithRehydrationRequest - * - *

AzureBackup Restore with Rehydration Request. + * + * AzureBackup Restore with Rehydration Request. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("AzureBackupRestoreWithRehydrationRequest") @@ -31,13 +31,15 @@ public final class AzureBackupRestoreWithRehydrationRequest extends AzureBackupR @JsonProperty(value = "rehydrationRetentionDuration", required = true) private String rehydrationRetentionDuration; - /** Creates an instance of AzureBackupRestoreWithRehydrationRequest class. */ + /** + * Creates an instance of AzureBackupRestoreWithRehydrationRequest class. + */ public AzureBackupRestoreWithRehydrationRequest() { } /** * Get the rehydrationPriority property: Priority to be used for rehydration. Values High or Standard. - * + * * @return the rehydrationPriority value. */ public RehydrationPriority rehydrationPriority() { @@ -46,7 +48,7 @@ public RehydrationPriority rehydrationPriority() { /** * Set the rehydrationPriority property: Priority to be used for rehydration. Values High or Standard. - * + * * @param rehydrationPriority the rehydrationPriority value to set. * @return the AzureBackupRestoreWithRehydrationRequest object itself. */ @@ -57,7 +59,7 @@ public AzureBackupRestoreWithRehydrationRequest withRehydrationPriority(Rehydrat /** * Get the rehydrationRetentionDuration property: Retention duration in ISO 8601 format i.e P10D . - * + * * @return the rehydrationRetentionDuration value. */ public String rehydrationRetentionDuration() { @@ -66,45 +68,55 @@ public String rehydrationRetentionDuration() { /** * Set the rehydrationRetentionDuration property: Retention duration in ISO 8601 format i.e P10D . - * + * * @param rehydrationRetentionDuration the rehydrationRetentionDuration value to set. * @return the AzureBackupRestoreWithRehydrationRequest object itself. */ - public AzureBackupRestoreWithRehydrationRequest withRehydrationRetentionDuration( - String rehydrationRetentionDuration) { + public AzureBackupRestoreWithRehydrationRequest + withRehydrationRetentionDuration(String rehydrationRetentionDuration) { this.rehydrationRetentionDuration = rehydrationRetentionDuration; return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupRestoreWithRehydrationRequest withRecoveryPointId(String recoveryPointId) { super.withRecoveryPointId(recoveryPointId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupRestoreWithRehydrationRequest withRestoreTargetInfo(RestoreTargetInfoBase restoreTargetInfo) { super.withRestoreTargetInfo(restoreTargetInfo); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupRestoreWithRehydrationRequest withSourceDataStoreType(SourceDataStoreType sourceDataStoreType) { super.withSourceDataStoreType(sourceDataStoreType); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupRestoreWithRehydrationRequest withSourceResourceId(String sourceResourceId) { super.withSourceResourceId(sourceResourceId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupRestoreWithRehydrationRequest withIdentityDetails(IdentityDetails identityDetails) { super.withIdentityDetails(identityDetails); @@ -113,25 +125,19 @@ public AzureBackupRestoreWithRehydrationRequest withIdentityDetails(IdentityDeta /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (rehydrationPriority() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property rehydrationPriority in model" - + " AzureBackupRestoreWithRehydrationRequest")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property rehydrationPriority in model AzureBackupRestoreWithRehydrationRequest")); } if (rehydrationRetentionDuration() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property rehydrationRetentionDuration in model" - + " AzureBackupRestoreWithRehydrationRequest")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property rehydrationRetentionDuration in model AzureBackupRestoreWithRehydrationRequest")); } } 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 4fdef45092f6..b619f954718f 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 @@ -12,8 +12,8 @@ /** * AzureBackupRule - * - *

Azure backup rule. + * + * Azure backup rule. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("AzureBackupRule") @@ -21,7 +21,7 @@ public final class AzureBackupRule extends BasePolicyRule { /* * BackupParameters - * + * * BackupParameters base */ @JsonProperty(value = "backupParameters") @@ -29,7 +29,7 @@ public final class AzureBackupRule extends BasePolicyRule { /* * DataStoreInfoBase - * + * * DataStoreInfo base */ @JsonProperty(value = "dataStore", required = true) @@ -37,21 +37,23 @@ public final class AzureBackupRule extends BasePolicyRule { /* * TriggerContext - * + * * Trigger context */ @JsonProperty(value = "trigger", required = true) private TriggerContext trigger; - /** Creates an instance of AzureBackupRule class. */ + /** + * Creates an instance of AzureBackupRule class. + */ public AzureBackupRule() { } /** * Get the backupParameters property: BackupParameters - * - *

BackupParameters base. - * + * + * BackupParameters base. + * * @return the backupParameters value. */ public BackupParameters backupParameters() { @@ -60,9 +62,9 @@ public BackupParameters backupParameters() { /** * Set the backupParameters property: BackupParameters - * - *

BackupParameters base. - * + * + * BackupParameters base. + * * @param backupParameters the backupParameters value to set. * @return the AzureBackupRule object itself. */ @@ -73,9 +75,9 @@ public AzureBackupRule withBackupParameters(BackupParameters backupParameters) { /** * Get the dataStore property: DataStoreInfoBase - * - *

DataStoreInfo base. - * + * + * DataStoreInfo base. + * * @return the dataStore value. */ public DataStoreInfoBase dataStore() { @@ -84,9 +86,9 @@ public DataStoreInfoBase dataStore() { /** * Set the dataStore property: DataStoreInfoBase - * - *

DataStoreInfo base. - * + * + * DataStoreInfo base. + * * @param dataStore the dataStore value to set. * @return the AzureBackupRule object itself. */ @@ -97,9 +99,9 @@ public AzureBackupRule withDataStore(DataStoreInfoBase dataStore) { /** * Get the trigger property: TriggerContext - * - *

Trigger context. - * + * + * Trigger context. + * * @return the trigger value. */ public TriggerContext trigger() { @@ -108,9 +110,9 @@ public TriggerContext trigger() { /** * Set the trigger property: TriggerContext - * - *

Trigger context. - * + * + * Trigger context. + * * @param trigger the trigger value to set. * @return the AzureBackupRule object itself. */ @@ -119,7 +121,9 @@ public AzureBackupRule withTrigger(TriggerContext trigger) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBackupRule withName(String name) { super.withName(name); @@ -128,7 +132,7 @@ public AzureBackupRule withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override @@ -138,16 +142,14 @@ public void validate() { backupParameters().validate(); } if (dataStore() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property dataStore in model AzureBackupRule")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property dataStore in model AzureBackupRule")); } else { dataStore().validate(); } if (trigger() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property trigger in model AzureBackupRule")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property trigger in model AzureBackupRule")); } else { trigger().validate(); } 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 index a3d7ff6a2a9b..a2bb6c8df2f5 100644 --- 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Settings for Azure Monitor based alerts. */ +/** + * Settings for Azure Monitor based alerts. + */ @Fluent public final class AzureMonitorAlertSettings { /* @@ -16,13 +18,15 @@ public final class AzureMonitorAlertSettings { @JsonProperty(value = "alertsForAllJobFailures") private AlertsState alertsForAllJobFailures; - /** Creates an instance of AzureMonitorAlertSettings class. */ + /** + * Creates an instance of AzureMonitorAlertSettings class. + */ public AzureMonitorAlertSettings() { } /** * Get the alertsForAllJobFailures property: The alertsForAllJobFailures property. - * + * * @return the alertsForAllJobFailures value. */ public AlertsState alertsForAllJobFailures() { @@ -31,7 +35,7 @@ public AlertsState alertsForAllJobFailures() { /** * Set the alertsForAllJobFailures property: The alertsForAllJobFailures property. - * + * * @param alertsForAllJobFailures the alertsForAllJobFailures value to set. * @return the AzureMonitorAlertSettings object itself. */ @@ -42,7 +46,7 @@ public AzureMonitorAlertSettings withAlertsForAllJobFailures(AlertsState alertsF /** * 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 cdd8edc20dca..834c5043966f 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Parameters for Operational-Tier DataStore. */ +/** + * Parameters for Operational-Tier DataStore. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("AzureOperationalStoreParameters") @Fluent @@ -20,13 +22,15 @@ public final class AzureOperationalStoreParameters extends DataStoreParameters { @JsonProperty(value = "resourceGroupId") private String resourceGroupId; - /** Creates an instance of AzureOperationalStoreParameters class. */ + /** + * Creates an instance of AzureOperationalStoreParameters class. + */ public AzureOperationalStoreParameters() { } /** * Get the resourceGroupId property: Gets or sets the Snapshot Resource Group Uri. - * + * * @return the resourceGroupId value. */ public String resourceGroupId() { @@ -35,7 +39,7 @@ public String resourceGroupId() { /** * Set the resourceGroupId property: Gets or sets the Snapshot Resource Group Uri. - * + * * @param resourceGroupId the resourceGroupId value to set. * @return the AzureOperationalStoreParameters object itself. */ @@ -44,7 +48,9 @@ public AzureOperationalStoreParameters withResourceGroupId(String resourceGroupI return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureOperationalStoreParameters withDataStoreType(DataStoreTypes dataStoreType) { super.withDataStoreType(dataStoreType); @@ -53,7 +59,7 @@ public AzureOperationalStoreParameters withDataStoreType(DataStoreTypes dataStor /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 dc4c5e56e076..15f684d03c79 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 @@ -13,8 +13,8 @@ /** * AzureRetentionRule - * - *

Azure retention rule. + * + * Azure retention rule. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("AzureRetentionRule") @@ -32,13 +32,15 @@ public final class AzureRetentionRule extends BasePolicyRule { @JsonProperty(value = "lifecycles", required = true) private List lifecycles; - /** Creates an instance of AzureRetentionRule class. */ + /** + * Creates an instance of AzureRetentionRule class. + */ public AzureRetentionRule() { } /** * Get the isDefault property: The isDefault property. - * + * * @return the isDefault value. */ public Boolean isDefault() { @@ -47,7 +49,7 @@ public Boolean isDefault() { /** * Set the isDefault property: The isDefault property. - * + * * @param isDefault the isDefault value to set. * @return the AzureRetentionRule object itself. */ @@ -58,7 +60,7 @@ public AzureRetentionRule withIsDefault(Boolean isDefault) { /** * Get the lifecycles property: The lifecycles property. - * + * * @return the lifecycles value. */ public List lifecycles() { @@ -67,7 +69,7 @@ public List lifecycles() { /** * Set the lifecycles property: The lifecycles property. - * + * * @param lifecycles the lifecycles value to set. * @return the AzureRetentionRule object itself. */ @@ -76,7 +78,9 @@ public AzureRetentionRule withLifecycles(List lifecycles) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureRetentionRule withName(String name) { super.withName(name); @@ -85,16 +89,15 @@ public AzureRetentionRule withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (lifecycles() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property lifecycles in model AzureRetentionRule")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property lifecycles in model AzureRetentionRule")); } else { lifecycles().forEach(e -> e.validate()); } 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 deda8b686927..855f454ba8bb 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 @@ -11,8 +11,8 @@ /** * BackupCriteria - * - *

BackupCriteria base class. + * + * BackupCriteria base class. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, @@ -20,16 +20,18 @@ property = "objectType", defaultImpl = BackupCriteria.class) @JsonTypeName("BackupCriteria") -@JsonSubTypes({@JsonSubTypes.Type(name = "ScheduleBasedBackupCriteria", value = ScheduleBasedBackupCriteria.class)}) +@JsonSubTypes({ @JsonSubTypes.Type(name = "ScheduleBasedBackupCriteria", value = ScheduleBasedBackupCriteria.class) }) @Immutable public class BackupCriteria { - /** Creates an instance of BackupCriteria class. */ + /** + * Creates an instance of BackupCriteria class. + */ public BackupCriteria() { } /** * 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/BackupDatasourceParameters.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupDatasourceParameters.java index b2121e337112..1c89bdfe986f 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupDatasourceParameters.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupDatasourceParameters.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Parameters for Backup Datasource. */ +/** + * Parameters for Backup Datasource. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -20,17 +22,18 @@ @JsonSubTypes.Type( name = "KubernetesClusterBackupDatasourceParameters", value = KubernetesClusterBackupDatasourceParameters.class), - @JsonSubTypes.Type(name = "BlobBackupDatasourceParameters", value = BlobBackupDatasourceParameters.class) -}) + @JsonSubTypes.Type(name = "BlobBackupDatasourceParameters", value = BlobBackupDatasourceParameters.class) }) @Immutable public class BackupDatasourceParameters { - /** Creates an instance of BackupDatasourceParameters class. */ + /** + * Creates an instance of BackupDatasourceParameters class. + */ public BackupDatasourceParameters() { } /** * 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/BackupInstance.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstance.java index 402a5f39faba..1983de7944a0 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 @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Backup Instance. */ +/** + * Backup Instance. + */ @Fluent public class BackupInstance { /* @@ -19,7 +21,7 @@ public class BackupInstance { /* * Datasource - * + * * Gets or sets the data source information. */ @JsonProperty(value = "dataSourceInfo", required = true) @@ -27,7 +29,7 @@ public class BackupInstance { /* * DatasourceSet - * + * * Gets or sets the data source set information. */ @JsonProperty(value = "dataSourceSetInfo") @@ -35,7 +37,7 @@ public class BackupInstance { /* * PolicyInfo - * + * * Gets or sets the policy information. */ @JsonProperty(value = "policyInfo", required = true) @@ -43,7 +45,7 @@ public class BackupInstance { /* * ProtectionStatusDetails - * + * * Specifies the protection status of the resource */ @JsonProperty(value = "protectionStatus", access = JsonProperty.Access.WRITE_ONLY) @@ -93,13 +95,15 @@ public class BackupInstance { @JsonProperty(value = "objectType", required = true) private String objectType; - /** Creates an instance of BackupInstance class. */ + /** + * Creates an instance of BackupInstance class. + */ public BackupInstance() { } /** * Get the friendlyName property: Gets or sets the Backup Instance friendly name. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -108,7 +112,7 @@ public String friendlyName() { /** * Set the friendlyName property: Gets or sets the Backup Instance friendly name. - * + * * @param friendlyName the friendlyName value to set. * @return the BackupInstance object itself. */ @@ -119,9 +123,9 @@ public BackupInstance withFriendlyName(String friendlyName) { /** * Get the dataSourceInfo property: Datasource - * - *

Gets or sets the data source information. - * + * + * Gets or sets the data source information. + * * @return the dataSourceInfo value. */ public Datasource dataSourceInfo() { @@ -130,9 +134,9 @@ public Datasource dataSourceInfo() { /** * Set the dataSourceInfo property: Datasource - * - *

Gets or sets the data source information. - * + * + * Gets or sets the data source information. + * * @param dataSourceInfo the dataSourceInfo value to set. * @return the BackupInstance object itself. */ @@ -143,9 +147,9 @@ public BackupInstance withDataSourceInfo(Datasource dataSourceInfo) { /** * Get the dataSourceSetInfo property: DatasourceSet - * - *

Gets or sets the data source set information. - * + * + * Gets or sets the data source set information. + * * @return the dataSourceSetInfo value. */ public DatasourceSet dataSourceSetInfo() { @@ -154,9 +158,9 @@ public DatasourceSet dataSourceSetInfo() { /** * Set the dataSourceSetInfo property: DatasourceSet - * - *

Gets or sets the data source set information. - * + * + * Gets or sets the data source set information. + * * @param dataSourceSetInfo the dataSourceSetInfo value to set. * @return the BackupInstance object itself. */ @@ -167,9 +171,9 @@ public BackupInstance withDataSourceSetInfo(DatasourceSet dataSourceSetInfo) { /** * Get the policyInfo property: PolicyInfo - * - *

Gets or sets the policy information. - * + * + * Gets or sets the policy information. + * * @return the policyInfo value. */ public PolicyInfo policyInfo() { @@ -178,9 +182,9 @@ public PolicyInfo policyInfo() { /** * Set the policyInfo property: PolicyInfo - * - *

Gets or sets the policy information. - * + * + * Gets or sets the policy information. + * * @param policyInfo the policyInfo value to set. * @return the BackupInstance object itself. */ @@ -191,9 +195,9 @@ public BackupInstance withPolicyInfo(PolicyInfo policyInfo) { /** * Get the protectionStatus property: ProtectionStatusDetails - * - *

Specifies the protection status of the resource. - * + * + * Specifies the protection status of the resource. + * * @return the protectionStatus value. */ public ProtectionStatusDetails protectionStatus() { @@ -202,7 +206,7 @@ public ProtectionStatusDetails protectionStatus() { /** * Get the currentProtectionState property: Specifies the current protection state of the resource. - * + * * @return the currentProtectionState value. */ public CurrentProtectionState currentProtectionState() { @@ -211,7 +215,7 @@ public CurrentProtectionState currentProtectionState() { /** * Get the protectionErrorDetails property: Specifies the protection error of the resource. - * + * * @return the protectionErrorDetails value. */ public UserFacingError protectionErrorDetails() { @@ -221,7 +225,7 @@ public UserFacingError protectionErrorDetails() { /** * Get the provisioningState property: Specifies the provisioning state of the resource i.e. * provisioning/updating/Succeeded/Failed. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -230,7 +234,7 @@ public String provisioningState() { /** * Get the datasourceAuthCredentials property: Credentials to use to authenticate with data source provider. - * + * * @return the datasourceAuthCredentials value. */ public AuthCredentials datasourceAuthCredentials() { @@ -239,7 +243,7 @@ public AuthCredentials datasourceAuthCredentials() { /** * Set the datasourceAuthCredentials property: Credentials to use to authenticate with data source provider. - * + * * @param datasourceAuthCredentials the datasourceAuthCredentials value to set. * @return the BackupInstance object itself. */ @@ -251,7 +255,7 @@ public BackupInstance withDatasourceAuthCredentials(AuthCredentials datasourceAu /** * 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() { @@ -261,7 +265,7 @@ public ValidationType 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. */ @@ -271,9 +275,9 @@ public BackupInstance withValidationType(ValidationType validationType) { } /** - * Get the identityDetails property: Contains information of the Identity Details for the BI. If it is null, default - * will be considered as System Assigned. - * + * Get the identityDetails property: Contains information of the Identity Details for the BI. + * If it is null, default will be considered as System Assigned. + * * @return the identityDetails value. */ public IdentityDetails identityDetails() { @@ -281,9 +285,9 @@ public IdentityDetails identityDetails() { } /** - * Set the identityDetails property: Contains information of the Identity Details for the BI. If it is null, default - * will be considered as System Assigned. - * + * Set the identityDetails property: Contains information of the Identity Details for the BI. + * If it is null, default will be considered as System Assigned. + * * @param identityDetails the identityDetails value to set. * @return the BackupInstance object itself. */ @@ -294,7 +298,7 @@ public BackupInstance withIdentityDetails(IdentityDetails identityDetails) { /** * Get the objectType property: The objectType property. - * + * * @return the objectType value. */ public String objectType() { @@ -303,7 +307,7 @@ public String objectType() { /** * Set the objectType property: The objectType property. - * + * * @param objectType the objectType value to set. * @return the BackupInstance object itself. */ @@ -314,14 +318,13 @@ public BackupInstance withObjectType(String objectType) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (dataSourceInfo() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property dataSourceInfo in model BackupInstance")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property dataSourceInfo in model BackupInstance")); } else { dataSourceInfo().validate(); } @@ -329,9 +332,8 @@ public void validate() { dataSourceSetInfo().validate(); } if (policyInfo() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property policyInfo in model BackupInstance")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property policyInfo in model BackupInstance")); } else { policyInfo().validate(); } @@ -348,9 +350,8 @@ public void validate() { identityDetails().validate(); } if (objectType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property objectType in model BackupInstance")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property objectType in model BackupInstance")); } } 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 72a4de02404e..c38fe2733832 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 @@ -9,80 +9,90 @@ import com.azure.resourcemanager.dataprotection.fluent.models.BackupInstanceResourceInner; import java.util.Map; -/** An immutable client-side representation of BackupInstanceResource. */ +/** + * An immutable client-side representation of BackupInstanceResource. + */ public interface BackupInstanceResource { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the tags property: Proxy Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the properties property: BackupInstanceResource properties. - * + * * @return the properties value. */ BackupInstance properties(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.BackupInstanceResourceInner object. - * + * * @return the inner object. */ BackupInstanceResourceInner innerModel(); - /** The entirety of the BackupInstanceResource definition. */ + /** + * The entirety of the BackupInstanceResource definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The BackupInstanceResource definition stages. */ + /** + * The BackupInstanceResource definition stages. + */ interface DefinitionStages { - /** The first stage of the BackupInstanceResource definition. */ + /** + * The first stage of the BackupInstanceResource definition. + */ interface Blank extends WithParentResource { } - /** The stage of the BackupInstanceResource definition allowing to specify parent resource. */ + /** + * The stage of the BackupInstanceResource definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, vaultName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @return the next definition stage. @@ -97,36 +107,40 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ BackupInstanceResource create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ BackupInstanceResource create(Context context); } - /** The stage of the BackupInstanceResource definition allowing to specify tags. */ + /** + * The stage of the BackupInstanceResource definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Proxy Resource tags.. - * + * * @param tags Proxy Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the BackupInstanceResource definition allowing to specify properties. */ + /** + * The stage of the BackupInstanceResource definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: BackupInstanceResource properties. - * + * * @param properties BackupInstanceResource properties. * @return the next definition stage. */ @@ -136,47 +150,55 @@ interface WithProperties { /** * Begins update for the BackupInstanceResource resource. - * + * * @return the stage of resource update. */ BackupInstanceResource.Update update(); - /** The template for BackupInstanceResource update. */ + /** + * The template for BackupInstanceResource update. + */ interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ BackupInstanceResource apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ BackupInstanceResource apply(Context context); } - /** The BackupInstanceResource update stages. */ + /** + * The BackupInstanceResource update stages. + */ interface UpdateStages { - /** The stage of the BackupInstanceResource update allowing to specify tags. */ + /** + * The stage of the BackupInstanceResource update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Proxy Resource tags.. - * + * * @param tags Proxy Resource tags. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the BackupInstanceResource update allowing to specify properties. */ + /** + * The stage of the BackupInstanceResource update allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: BackupInstanceResource properties. - * + * * @param properties BackupInstanceResource properties. * @return the next definition stage. */ @@ -186,14 +208,14 @@ interface WithProperties { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ BackupInstanceResource refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -201,7 +223,7 @@ interface WithProperties { /** * Trigger adhoc backup. - * + * * @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. @@ -212,7 +234,7 @@ interface WithProperties { /** * Trigger adhoc backup. - * + * * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -224,7 +246,7 @@ interface WithProperties { /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @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. @@ -234,7 +256,7 @@ interface WithProperties { /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -245,7 +267,7 @@ interface WithProperties { /** * Triggers restore for a BackupInstance. - * + * * @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. @@ -256,7 +278,7 @@ interface WithProperties { /** * Triggers restore for a BackupInstance. - * + * * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -268,7 +290,7 @@ interface WithProperties { /** * 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. */ @@ -276,7 +298,7 @@ interface WithProperties { /** * 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. @@ -286,7 +308,7 @@ interface WithProperties { /** * 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. */ @@ -294,7 +316,7 @@ interface WithProperties { /** * 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. @@ -304,7 +326,7 @@ interface WithProperties { /** * 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. */ @@ -312,7 +334,7 @@ interface WithProperties { /** * 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. @@ -323,7 +345,7 @@ interface WithProperties { /** * This operation will stop backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained 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. */ @@ -332,7 +354,7 @@ interface WithProperties { /** * This operation will stop backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained 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. @@ -341,9 +363,9 @@ interface WithProperties { 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. - * + * 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. @@ -352,9 +374,9 @@ interface WithProperties { 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. - * + * 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. @@ -365,7 +387,7 @@ interface WithProperties { /** * Validates if Restore can be triggered for a DataSource. - * + * * @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. @@ -376,7 +398,7 @@ interface WithProperties { /** * Validates if Restore can be triggered for a DataSource. - * + * * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 892156f5a7a5..b8993cfb69c0 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 @@ -11,8 +11,8 @@ /** * BackupInstanceResourceList - * - *

BackupInstance Resource list response. + * + * BackupInstance Resource list response. */ @Fluent public final class BackupInstanceResourceList extends DppResourceList { @@ -22,13 +22,15 @@ public final class BackupInstanceResourceList extends DppResourceList { @JsonProperty(value = "value") private List value; - /** Creates an instance of BackupInstanceResourceList class. */ + /** + * Creates an instance of BackupInstanceResourceList class. + */ public BackupInstanceResourceList() { } /** * Get the value property: List of resources. - * + * * @return the value value. */ public List value() { @@ -37,7 +39,7 @@ public List value() { /** * Set the value property: List of resources. - * + * * @param value the value value to set. * @return the BackupInstanceResourceList object itself. */ @@ -46,7 +48,9 @@ public BackupInstanceResourceList withValue(List va return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BackupInstanceResourceList withNextLink(String nextLink) { super.withNextLink(nextLink); @@ -55,7 +59,7 @@ public BackupInstanceResourceList withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 c9b1634d541f..1f675077db18 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of BackupInstances. */ +/** + * Resource collection API of BackupInstances. + */ public interface BackupInstances { /** * Gets a backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,7 +26,7 @@ public interface BackupInstances { /** * Gets a backup instances belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -37,7 +39,7 @@ public interface BackupInstances { /** * Gets a backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -47,12 +49,12 @@ public interface BackupInstances { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a backup instance with name in a backup vault along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String vaultName, String backupInstanceName, Context context); + Response getWithResponse(String resourceGroupName, String vaultName, + String backupInstanceName, Context context); /** * Gets a backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -65,7 +67,7 @@ Response getWithResponse( /** * Delete a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -77,7 +79,7 @@ Response getWithResponse( /** * Delete a backup instance in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -90,7 +92,7 @@ Response getWithResponse( /** * Trigger adhoc backup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -100,12 +102,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return operationJobExtendedInfo. */ - OperationJobExtendedInfo adhocBackup( - String resourceGroupName, String vaultName, String backupInstanceName, TriggerBackupRequest parameters); + OperationJobExtendedInfo adhocBackup(String resourceGroupName, String vaultName, String backupInstanceName, + TriggerBackupRequest parameters); /** * Trigger adhoc backup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -116,16 +118,12 @@ OperationJobExtendedInfo adhocBackup( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return operationJobExtendedInfo. */ - OperationJobExtendedInfo adhocBackup( - String resourceGroupName, - String vaultName, - String backupInstanceName, - TriggerBackupRequest parameters, - Context context); + OperationJobExtendedInfo adhocBackup(String resourceGroupName, String vaultName, String backupInstanceName, + TriggerBackupRequest parameters, Context context); /** * Validate whether adhoc backup will be successful or not. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -134,12 +132,12 @@ OperationJobExtendedInfo adhocBackup( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return operationJobExtendedInfo. */ - OperationJobExtendedInfo validateForBackup( - String resourceGroupName, String vaultName, ValidateForBackupRequest parameters); + OperationJobExtendedInfo validateForBackup(String resourceGroupName, String vaultName, + ValidateForBackupRequest parameters); /** * Validate whether adhoc backup will be successful or not. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param parameters Request body for operation. @@ -149,12 +147,12 @@ OperationJobExtendedInfo validateForBackup( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return operationJobExtendedInfo. */ - OperationJobExtendedInfo validateForBackup( - String resourceGroupName, String vaultName, ValidateForBackupRequest parameters, Context context); + OperationJobExtendedInfo validateForBackup(String resourceGroupName, String vaultName, + ValidateForBackupRequest parameters, Context context); /** * Get result of backup instance creation operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -165,12 +163,12 @@ OperationJobExtendedInfo validateForBackup( * @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); + Response getBackupInstanceOperationResultWithResponse(String resourceGroupName, + String vaultName, String backupInstanceName, String operationId, Context context); /** * Get result of backup instance creation operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -180,12 +178,70 @@ Response getBackupInstanceOperationResultWithResponse( * @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); + BackupInstanceResource getBackupInstanceOperationResult(String resourceGroupName, String vaultName, + String backupInstanceName, String operationId); + + /** + * Triggers Cross Region Restore for BackupInstance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for trigger CRR operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + OperationJobExtendedInfo triggerCrossRegionRestore(String resourceGroupName, String location, + CrossRegionRestoreRequestObject parameters); + + /** + * Triggers Cross Region Restore for BackupInstance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for trigger CRR 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. + */ + OperationJobExtendedInfo triggerCrossRegionRestore(String resourceGroupName, String location, + CrossRegionRestoreRequestObject parameters, Context context); + + /** + * Validates whether Cross Region Restore can be triggered for DataSource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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. + */ + OperationJobExtendedInfo validateCrossRegionRestore(String resourceGroupName, String location, + ValidateCrossRegionRestoreRequestObject parameters); + + /** + * Validates whether Cross Region Restore can be triggered for DataSource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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. + */ + OperationJobExtendedInfo validateCrossRegionRestore(String resourceGroupName, String location, + ValidateCrossRegionRestoreRequestObject parameters, Context context); /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -194,15 +250,12 @@ BackupInstanceResource getBackupInstanceOperationResult( * @throws com.azure.core.management.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 triggerRehydrate( - String resourceGroupName, - String vaultName, - String backupInstanceName, + void triggerRehydrate(String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRehydrationRequest parameters); /** * rehydrate recovery point for restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -212,16 +265,12 @@ void triggerRehydrate( * @throws com.azure.core.management.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 triggerRehydrate( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRehydrationRequest parameters, - Context context); + void triggerRehydrate(String resourceGroupName, String vaultName, String backupInstanceName, + AzureBackupRehydrationRequest parameters, Context context); /** * Triggers restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -231,12 +280,12 @@ void triggerRehydrate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return operationJobExtendedInfo. */ - OperationJobExtendedInfo triggerRestore( - String resourceGroupName, String vaultName, String backupInstanceName, AzureBackupRestoreRequest parameters); + OperationJobExtendedInfo triggerRestore(String resourceGroupName, String vaultName, String backupInstanceName, + AzureBackupRestoreRequest parameters); /** * Triggers restore for a BackupInstance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -247,16 +296,12 @@ OperationJobExtendedInfo triggerRestore( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return operationJobExtendedInfo. */ - OperationJobExtendedInfo triggerRestore( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupRestoreRequest parameters, - Context context); + OperationJobExtendedInfo triggerRestore(String resourceGroupName, String vaultName, String backupInstanceName, + AzureBackupRestoreRequest parameters, Context context); /** * This operation will resume backups for backup instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -268,7 +313,7 @@ OperationJobExtendedInfo triggerRestore( /** * This operation will resume backups for backup instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -281,7 +326,7 @@ OperationJobExtendedInfo triggerRestore( /** * This operation will resume protection for a stopped backup instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -293,7 +338,7 @@ OperationJobExtendedInfo triggerRestore( /** * This operation will resume protection for a stopped backup instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -306,7 +351,7 @@ OperationJobExtendedInfo triggerRestore( /** * This operation will stop protection of a backup instance and data will be held forever. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -318,7 +363,7 @@ OperationJobExtendedInfo triggerRestore( /** * This operation will stop protection of a backup instance and data will be held forever. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -332,7 +377,7 @@ OperationJobExtendedInfo triggerRestore( /** * This operation will stop backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained forever). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -345,7 +390,7 @@ OperationJobExtendedInfo triggerRestore( /** * This operation will stop backup for a backup instance and retains the backup data as per the policy (except * latest Recovery point, which will be retained forever). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -357,9 +402,9 @@ OperationJobExtendedInfo triggerRestore( 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. - * + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -368,13 +413,13 @@ OperationJobExtendedInfo triggerRestore( * @throws com.azure.core.management.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); + 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. - * + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -384,16 +429,12 @@ void syncBackupInstance( * @throws com.azure.core.management.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); + 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -403,12 +444,12 @@ void syncBackupInstance( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return operationJobExtendedInfo. */ - OperationJobExtendedInfo validateForRestore( - String resourceGroupName, String vaultName, String backupInstanceName, ValidateRestoreRequestObject parameters); + OperationJobExtendedInfo validateForRestore(String resourceGroupName, String vaultName, String backupInstanceName, + ValidateRestoreRequestObject parameters); /** * Validates if Restore can be triggered for a DataSource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -419,16 +460,12 @@ OperationJobExtendedInfo validateForRestore( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return operationJobExtendedInfo. */ - OperationJobExtendedInfo validateForRestore( - String resourceGroupName, - String vaultName, - String backupInstanceName, - ValidateRestoreRequestObject parameters, - Context context); + OperationJobExtendedInfo validateForRestore(String resourceGroupName, String vaultName, String backupInstanceName, + ValidateRestoreRequestObject parameters, Context context); /** * Gets a backup instance with name in a backup vault. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -439,7 +476,7 @@ OperationJobExtendedInfo validateForRestore( /** * Gets a backup instance with name in a backup vault. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -451,7 +488,7 @@ OperationJobExtendedInfo validateForRestore( /** * Delete a backup instance in a backup vault. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -461,7 +498,7 @@ OperationJobExtendedInfo validateForRestore( /** * Delete a backup instance in a backup vault. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -472,7 +509,7 @@ OperationJobExtendedInfo validateForRestore( /** * Begins definition for a new BackupInstanceResource resource. - * + * * @param name resource name. * @return the first stage of the new BackupInstanceResource definition. */ 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 42d2cf4f0dfa..a418064fd74d 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 @@ -11,8 +11,8 @@ /** * BackupParameters - * - *

BackupParameters base. + * + * BackupParameters base. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, @@ -20,16 +20,18 @@ property = "objectType", defaultImpl = BackupParameters.class) @JsonTypeName("BackupParameters") -@JsonSubTypes({@JsonSubTypes.Type(name = "AzureBackupParams", value = AzureBackupParams.class)}) +@JsonSubTypes({ @JsonSubTypes.Type(name = "AzureBackupParams", value = AzureBackupParams.class) }) @Immutable public class BackupParameters { - /** Creates an instance of BackupParameters class. */ + /** + * Creates an instance of BackupParameters class. + */ public BackupParameters() { } /** * 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/BackupPolicies.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupPolicies.java index 3b72e16fce2a..fb14d08f1c97 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of BackupPolicies. */ +/** + * Resource collection API of BackupPolicies. + */ public interface BackupPolicies { /** * Returns list of backup policies belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,7 +26,7 @@ public interface BackupPolicies { /** * Returns list of backup policies belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -37,7 +39,7 @@ public interface BackupPolicies { /** * Gets a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -47,12 +49,12 @@ public interface BackupPolicies { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a backup policy belonging to a backup vault along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String vaultName, String backupPolicyName, Context context); + Response getWithResponse(String resourceGroupName, String vaultName, + String backupPolicyName, Context context); /** * Gets a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -65,7 +67,7 @@ Response getWithResponse( /** * Deletes a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -75,12 +77,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String vaultName, String backupPolicyName, Context context); + Response deleteWithResponse(String resourceGroupName, String vaultName, String backupPolicyName, + Context context); /** * Deletes a backup policy belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupPolicyName The backupPolicyName parameter. @@ -92,7 +94,7 @@ Response deleteWithResponse( /** * Gets a backup policy belonging to a backup vault. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -103,7 +105,7 @@ Response deleteWithResponse( /** * Gets a backup policy belonging to a backup vault. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -115,7 +117,7 @@ Response deleteWithResponse( /** * Deletes a backup policy belonging to a backup vault. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -125,7 +127,7 @@ Response deleteWithResponse( /** * Deletes a backup policy belonging to a backup vault. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -137,7 +139,7 @@ Response deleteWithResponse( /** * Begins definition for a new BaseBackupPolicyResource resource. - * + * * @param name resource name. * @return the first stage of the new BaseBackupPolicyResource definition. */ 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 80b2ce16996c..35f02793d92b 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 @@ -13,8 +13,8 @@ /** * BackupPolicy - * - *

Rule based backup policy. + * + * Rule based backup policy. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("BackupPolicy") @@ -26,14 +26,16 @@ public final class BackupPolicy extends BaseBackupPolicy { @JsonProperty(value = "policyRules", required = true) private List policyRules; - /** Creates an instance of BackupPolicy class. */ + /** + * Creates an instance of BackupPolicy class. + */ public BackupPolicy() { } /** * Get the policyRules property: Policy rule dictionary that contains rules for each backuptype i.e * Full/Incremental/Logs etc. - * + * * @return the policyRules value. */ public List policyRules() { @@ -43,7 +45,7 @@ public List policyRules() { /** * Set the policyRules property: Policy rule dictionary that contains rules for each backuptype i.e * Full/Incremental/Logs etc. - * + * * @param policyRules the policyRules value to set. * @return the BackupPolicy object itself. */ @@ -52,7 +54,9 @@ public BackupPolicy withPolicyRules(List policyRules) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BackupPolicy withDatasourceTypes(List datasourceTypes) { super.withDatasourceTypes(datasourceTypes); @@ -61,16 +65,15 @@ public BackupPolicy withDatasourceTypes(List datasourceTypes) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (policyRules() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property policyRules in model BackupPolicy")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property policyRules in model BackupPolicy")); } else { policyRules().forEach(e -> e.validate()); } 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 fc31fe4df23b..309b6d7486ff 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 @@ -11,8 +11,8 @@ /** * BackupSchedule - * - *

Schedule for backup. + * + * Schedule for backup. */ @Fluent public final class BackupSchedule { @@ -28,13 +28,15 @@ public final class BackupSchedule { @JsonProperty(value = "timeZone") private String timeZone; - /** Creates an instance of BackupSchedule class. */ + /** + * Creates an instance of BackupSchedule class. + */ public BackupSchedule() { } /** * Get the repeatingTimeIntervals property: ISO 8601 repeating time interval format. - * + * * @return the repeatingTimeIntervals value. */ public List repeatingTimeIntervals() { @@ -43,7 +45,7 @@ public List repeatingTimeIntervals() { /** * Set the repeatingTimeIntervals property: ISO 8601 repeating time interval format. - * + * * @param repeatingTimeIntervals the repeatingTimeIntervals value to set. * @return the BackupSchedule object itself. */ @@ -54,7 +56,7 @@ public BackupSchedule withRepeatingTimeIntervals(List repeatingTimeInter /** * Get the timeZone property: Time zone for a schedule. Example: Pacific Standard Time. - * + * * @return the timeZone value. */ public String timeZone() { @@ -63,7 +65,7 @@ public String timeZone() { /** * Set the timeZone property: Time zone for a schedule. Example: Pacific Standard Time. - * + * * @param timeZone the timeZone value to set. * @return the BackupSchedule object itself. */ @@ -74,15 +76,13 @@ public BackupSchedule withTimeZone(String timeZone) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (repeatingTimeIntervals() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property repeatingTimeIntervals in model BackupSchedule")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property repeatingTimeIntervals in model BackupSchedule")); } } 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 2f929eef5d70..86f0c105f8aa 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 @@ -11,8 +11,8 @@ /** * BackupVault - * - *

Backup Vault. + * + * Backup Vault. */ @Fluent public final class BackupVault { @@ -70,13 +70,21 @@ public final class BackupVault { @JsonProperty(value = "secureScore", access = JsonProperty.Access.WRITE_ONLY) private SecureScoreLevel secureScore; - /** Creates an instance of BackupVault class. */ + /* + * List of replicated regions for Backup Vault + */ + @JsonProperty(value = "replicatedRegions") + private List replicatedRegions; + + /** + * Creates an instance of BackupVault class. + */ public BackupVault() { } /** * Get the monitoringSettings property: Monitoring Settings. - * + * * @return the monitoringSettings value. */ public MonitoringSettings monitoringSettings() { @@ -85,7 +93,7 @@ public MonitoringSettings monitoringSettings() { /** * Set the monitoringSettings property: Monitoring Settings. - * + * * @param monitoringSettings the monitoringSettings value to set. * @return the BackupVault object itself. */ @@ -96,7 +104,7 @@ public BackupVault withMonitoringSettings(MonitoringSettings monitoringSettings) /** * Get the provisioningState property: Provisioning state of the BackupVault resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -105,7 +113,7 @@ public ProvisioningState provisioningState() { /** * Get the resourceMoveState property: Resource move state for backup vault. - * + * * @return the resourceMoveState value. */ public ResourceMoveState resourceMoveState() { @@ -114,7 +122,7 @@ public ResourceMoveState resourceMoveState() { /** * Get the resourceMoveDetails property: Resource move details for backup vault. - * + * * @return the resourceMoveDetails value. */ public ResourceMoveDetails resourceMoveDetails() { @@ -123,7 +131,7 @@ public ResourceMoveDetails resourceMoveDetails() { /** * Get the securitySettings property: Security Settings. - * + * * @return the securitySettings value. */ public SecuritySettings securitySettings() { @@ -132,7 +140,7 @@ public SecuritySettings securitySettings() { /** * Set the securitySettings property: Security Settings. - * + * * @param securitySettings the securitySettings value to set. * @return the BackupVault object itself. */ @@ -143,7 +151,7 @@ public BackupVault withSecuritySettings(SecuritySettings securitySettings) { /** * Get the storageSettings property: Storage Settings. - * + * * @return the storageSettings value. */ public List storageSettings() { @@ -152,7 +160,7 @@ public List storageSettings() { /** * Set the storageSettings property: Storage Settings. - * + * * @param storageSettings the storageSettings value to set. * @return the BackupVault object itself. */ @@ -163,7 +171,7 @@ public BackupVault withStorageSettings(List storageSettings) { /** * Get the isVaultProtectedByResourceGuard property: Is vault protected by resource guard. - * + * * @return the isVaultProtectedByResourceGuard value. */ public Boolean isVaultProtectedByResourceGuard() { @@ -172,7 +180,7 @@ public Boolean isVaultProtectedByResourceGuard() { /** * Get the featureSettings property: Feature Settings. - * + * * @return the featureSettings value. */ public FeatureSettings featureSettings() { @@ -181,7 +189,7 @@ public FeatureSettings featureSettings() { /** * Set the featureSettings property: Feature Settings. - * + * * @param featureSettings the featureSettings value to set. * @return the BackupVault object itself. */ @@ -192,16 +200,36 @@ public BackupVault withFeatureSettings(FeatureSettings featureSettings) { /** * Get the secureScore property: Secure Score of Backup Vault. - * + * * @return the secureScore value. */ public SecureScoreLevel secureScore() { return this.secureScore; } + /** + * Get the replicatedRegions property: List of replicated regions for Backup Vault. + * + * @return the replicatedRegions value. + */ + public List replicatedRegions() { + return this.replicatedRegions; + } + + /** + * Set the replicatedRegions property: List of replicated regions for Backup Vault. + * + * @param replicatedRegions the replicatedRegions value to set. + * @return the BackupVault object itself. + */ + public BackupVault withReplicatedRegions(List replicatedRegions) { + this.replicatedRegions = replicatedRegions; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -215,9 +243,8 @@ public void validate() { securitySettings().validate(); } if (storageSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property storageSettings in model BackupVault")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property storageSettings in model BackupVault")); } else { storageSettings().forEach(e -> e.validate()); } 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 6a474d31a4f7..8b69c290519c 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 @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of BackupVaultOperationResults. */ +/** + * Resource collection API of BackupVaultOperationResults. + */ public interface BackupVaultOperationResults { /** * The get operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. @@ -21,12 +23,12 @@ public interface BackupVaultOperationResults { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return backupVault Resource. */ - Response getWithResponse( - String resourceGroupName, String vaultName, String operationId, Context context); + Response getWithResponse(String resourceGroupName, String vaultName, String operationId, + Context context); /** * The get operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. 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 e8ecd318caf8..e23d2cd89874 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 @@ -9,7 +9,9 @@ import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; -/** The BackupVaultOperationResultsGetHeaders model. */ +/** + * The BackupVaultOperationResultsGetHeaders model. + */ @Fluent public final class BackupVaultOperationResultsGetHeaders { /* @@ -35,7 +37,7 @@ public final class BackupVaultOperationResultsGetHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of BackupVaultOperationResultsGetHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public BackupVaultOperationResultsGetHeaders(HttpHeaders rawHeaders) { @@ -49,7 +51,7 @@ public BackupVaultOperationResultsGetHeaders(HttpHeaders rawHeaders) { /** * Get the retryAfter property: The Retry-After property. - * + * * @return the retryAfter value. */ public Integer retryAfter() { @@ -58,7 +60,7 @@ public Integer retryAfter() { /** * Set the retryAfter property: The Retry-After property. - * + * * @param retryAfter the retryAfter value to set. * @return the BackupVaultOperationResultsGetHeaders object itself. */ @@ -69,7 +71,7 @@ public BackupVaultOperationResultsGetHeaders withRetryAfter(Integer retryAfter) /** * Get the azureAsyncOperation property: The Azure-AsyncOperation property. - * + * * @return the azureAsyncOperation value. */ public String azureAsyncOperation() { @@ -78,7 +80,7 @@ public String azureAsyncOperation() { /** * Set the azureAsyncOperation property: The Azure-AsyncOperation property. - * + * * @param azureAsyncOperation the azureAsyncOperation value to set. * @return the BackupVaultOperationResultsGetHeaders object itself. */ @@ -89,7 +91,7 @@ public BackupVaultOperationResultsGetHeaders withAzureAsyncOperation(String azur /** * Get the location property: The Location property. - * + * * @return the location value. */ public String location() { @@ -98,7 +100,7 @@ public String location() { /** * Set the location property: The Location property. - * + * * @param location the location value to set. * @return the BackupVaultOperationResultsGetHeaders object itself. */ @@ -109,7 +111,7 @@ public BackupVaultOperationResultsGetHeaders withLocation(String location) { /** * 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/BackupVaultOperationResultsGetResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultOperationResultsGetResponse.java index ae8a16ece46d..a377553f5c48 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultOperationResultsGetResponse.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVaultOperationResultsGetResponse.java @@ -9,30 +9,28 @@ import com.azure.core.http.rest.ResponseBase; import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner; -/** Contains all response data for the get operation. */ +/** + * Contains all response data for the get operation. + */ public final class BackupVaultOperationResultsGetResponse extends ResponseBase { /** * Creates an instance of BackupVaultOperationResultsGetResponse. - * + * * @param request the request which resulted in this BackupVaultOperationResultsGetResponse. * @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 BackupVaultOperationResultsGetResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - BackupVaultResourceInner value, - BackupVaultOperationResultsGetHeaders headers) { + public BackupVaultOperationResultsGetResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, + BackupVaultResourceInner value, BackupVaultOperationResultsGetHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } /** * Gets the deserialized response body. - * + * * @return the deserialized response body. */ @Override 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 15d9c2bd21f3..4c3bc3bf1a98 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 @@ -10,123 +10,129 @@ import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner; import java.util.Map; -/** An immutable client-side representation of BackupVaultResource. */ +/** + * An immutable client-side representation of BackupVaultResource. + */ public interface BackupVaultResource { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the etag property: Optional ETag. - * + * * @return the etag value. */ String etag(); /** * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the identity property: DppIdentityDetails - * - *

Input Managed Identity Details. - * + * + * Input Managed Identity Details. + * * @return the identity value. */ DppIdentityDetails identity(); /** * Gets the properties property: BackupVault - * - *

BackupVaultResource properties. - * + * + * BackupVaultResource properties. + * * @return the properties value. */ BackupVault properties(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner object. - * + * * @return the inner object. */ BackupVaultResourceInner innerModel(); - /** The entirety of the BackupVaultResource definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the BackupVaultResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The BackupVaultResource definition stages. */ + /** + * The BackupVaultResource definition stages. + */ interface DefinitionStages { - /** The first stage of the BackupVaultResource definition. */ + /** + * The first stage of the BackupVaultResource definition. + */ interface Blank extends WithLocation { } - /** The stage of the BackupVaultResource definition allowing to specify location. */ + /** + * The stage of the BackupVaultResource definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -134,33 +140,38 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the BackupVaultResource definition allowing to specify parent resource. */ + /** + * The stage of the BackupVaultResource definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithProperties withExistingResourceGroup(String resourceGroupName); } - /** The stage of the BackupVaultResource definition allowing to specify properties. */ + /** + * The stage of the BackupVaultResource definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: BackupVault - * - *

BackupVaultResource properties. - * + * + * BackupVaultResource properties. + * * @param properties BackupVault - *

BackupVaultResource properties. + * + * BackupVaultResource properties. * @return the next definition stage. */ WithCreate withProperties(BackupVault properties); @@ -174,51 +185,58 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithEtag, DefinitionStages.WithIdentity { /** * Executes the create request. - * + * * @return the created resource. */ BackupVaultResource create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ BackupVaultResource create(Context context); } - /** The stage of the BackupVaultResource definition allowing to specify tags. */ + /** + * The stage of the BackupVaultResource definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the BackupVaultResource definition allowing to specify etag. */ + /** + * The stage of the BackupVaultResource definition allowing to specify etag. + */ interface WithEtag { /** * Specifies the etag property: Optional ETag.. - * + * * @param etag Optional ETag. * @return the next definition stage. */ WithCreate withEtag(String etag); } - /** The stage of the BackupVaultResource definition allowing to specify identity. */ + /** + * The stage of the BackupVaultResource definition allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: DppIdentityDetails - * - *

Input Managed Identity Details. - * + * + * Input Managed Identity Details. + * * @param identity DppIdentityDetails - *

Input Managed Identity Details. + * + * Input Managed Identity Details. * @return the next definition stage. */ WithCreate withIdentity(DppIdentityDetails identity); @@ -227,61 +245,72 @@ interface WithIdentity { /** * Begins update for the BackupVaultResource resource. - * + * * @return the stage of resource update. */ BackupVaultResource.Update update(); - /** The template for BackupVaultResource update. */ + /** + * The template for BackupVaultResource update. + */ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ BackupVaultResource apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ BackupVaultResource apply(Context context); } - /** The BackupVaultResource update stages. */ + /** + * The BackupVaultResource update stages. + */ interface UpdateStages { - /** The stage of the BackupVaultResource update allowing to specify tags. */ + /** + * The stage of the BackupVaultResource update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the BackupVaultResource update allowing to specify identity. */ + /** + * The stage of the BackupVaultResource update allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: DppIdentityDetails - * - *

Input Managed Identity Details. - * + * + * Input Managed Identity Details. + * * @param identity DppIdentityDetails - *

Input Managed Identity Details. + * + * Input Managed Identity Details. * @return the next definition stage. */ Update withIdentity(DppIdentityDetails identity); } - /** The stage of the BackupVaultResource update allowing to specify properties. */ + /** + * 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. */ @@ -291,14 +320,14 @@ interface WithProperties { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ BackupVaultResource refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ 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 ebc8bac8fbb4..50ee60247c8c 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 @@ -11,8 +11,8 @@ /** * BackupVaultResourceList - * - *

List of BackupVault resources. + * + * List of BackupVault resources. */ @Fluent public final class BackupVaultResourceList extends DppResourceList { @@ -22,13 +22,15 @@ public final class BackupVaultResourceList extends DppResourceList { @JsonProperty(value = "value") private List value; - /** Creates an instance of BackupVaultResourceList class. */ + /** + * Creates an instance of BackupVaultResourceList class. + */ public BackupVaultResourceList() { } /** * Get the value property: List of resources. - * + * * @return the value value. */ public List value() { @@ -37,7 +39,7 @@ public List value() { /** * Set the value property: List of resources. - * + * * @param value the value value to set. * @return the BackupVaultResourceList object itself. */ @@ -46,7 +48,9 @@ public BackupVaultResourceList withValue(List value) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BackupVaultResourceList withNextLink(String nextLink) { super.withNextLink(nextLink); @@ -55,7 +59,7 @@ public BackupVaultResourceList withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 399e2b1aa539..34008aa7dea2 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of BackupVaults. */ +/** + * Resource collection API of BackupVaults. + */ public interface BackupVaults { /** * Returns resource collection belonging to a subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return backupVaultResourceList as paginated response with {@link PagedIterable}. @@ -21,7 +23,7 @@ public interface BackupVaults { /** * Returns resource collection belonging to a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,7 +34,7 @@ public interface BackupVaults { /** * Returns resource collection belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -43,7 +45,7 @@ public interface BackupVaults { /** * Returns resource collection belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -55,7 +57,7 @@ public interface BackupVaults { /** * Returns a resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -64,12 +66,12 @@ public interface BackupVaults { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return backupVault Resource along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String vaultName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String vaultName, + Context context); /** * Returns a resource belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -81,7 +83,7 @@ Response getByResourceGroupWithResponse( /** * Deletes a BackupVault resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -92,7 +94,7 @@ Response getByResourceGroupWithResponse( /** * Deletes a BackupVault resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -104,7 +106,7 @@ Response getByResourceGroupWithResponse( /** * API to check for resource name availability. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param location The location in which uniqueness will be verified. * @param parameters Check name availability request. @@ -114,12 +116,12 @@ Response getByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return checkNameAvailabilityResult along with {@link Response}. */ - Response checkNameAvailabilityWithResponse( - String resourceGroupName, String location, CheckNameAvailabilityRequest parameters, Context context); + Response checkNameAvailabilityWithResponse(String resourceGroupName, String location, + CheckNameAvailabilityRequest parameters, Context context); /** * API to check for resource name availability. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param location The location in which uniqueness will be verified. * @param parameters Check name availability request. @@ -128,12 +130,12 @@ Response checkNameAvailabilityWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return checkNameAvailabilityResult. */ - CheckNameAvailabilityResult checkNameAvailability( - String resourceGroupName, String location, CheckNameAvailabilityRequest parameters); + CheckNameAvailabilityResult checkNameAvailability(String resourceGroupName, String location, + CheckNameAvailabilityRequest parameters); /** * Returns a resource belonging to a resource group. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -144,7 +146,7 @@ CheckNameAvailabilityResult checkNameAvailability( /** * Returns a resource belonging to a resource group. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -156,7 +158,7 @@ CheckNameAvailabilityResult checkNameAvailability( /** * Deletes a BackupVault resource from the resource group. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -166,7 +168,7 @@ CheckNameAvailabilityResult checkNameAvailability( /** * Deletes a BackupVault resource from the resource group. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -177,7 +179,7 @@ CheckNameAvailabilityResult checkNameAvailability( /** * Begins definition for a new BackupVaultResource resource. - * + * * @param name resource name. * @return the first stage of the new BackupVaultResource definition. */ 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 802baeeb37f3..ca4e36806a51 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 @@ -14,8 +14,8 @@ /** * BaseBackupPolicy - * - *

BackupPolicy base. + * + * BackupPolicy base. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, @@ -23,7 +23,7 @@ property = "objectType", defaultImpl = BaseBackupPolicy.class) @JsonTypeName("BaseBackupPolicy") -@JsonSubTypes({@JsonSubTypes.Type(name = "BackupPolicy", value = BackupPolicy.class)}) +@JsonSubTypes({ @JsonSubTypes.Type(name = "BackupPolicy", value = BackupPolicy.class) }) @Fluent public class BaseBackupPolicy { /* @@ -32,13 +32,15 @@ public class BaseBackupPolicy { @JsonProperty(value = "datasourceTypes", required = true) private List datasourceTypes; - /** Creates an instance of BaseBackupPolicy class. */ + /** + * Creates an instance of BaseBackupPolicy class. + */ public BaseBackupPolicy() { } /** * Get the datasourceTypes property: Type of datasource for the backup management. - * + * * @return the datasourceTypes value. */ public List datasourceTypes() { @@ -47,7 +49,7 @@ public List datasourceTypes() { /** * Set the datasourceTypes property: Type of datasource for the backup management. - * + * * @param datasourceTypes the datasourceTypes value to set. * @return the BaseBackupPolicy object itself. */ @@ -58,15 +60,13 @@ public BaseBackupPolicy withDatasourceTypes(List datasourceTypes) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (datasourceTypes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property datasourceTypes in model BaseBackupPolicy")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property datasourceTypes in model BaseBackupPolicy")); } } 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 5b68f7299920..cc17ef25412a 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 @@ -8,75 +8,85 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.dataprotection.fluent.models.BaseBackupPolicyResourceInner; -/** An immutable client-side representation of BaseBackupPolicyResource. */ +/** + * An immutable client-side representation of BaseBackupPolicyResource. + */ public interface BaseBackupPolicyResource { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the properties property: BaseBackupPolicy - * - *

BaseBackupPolicyResource properties. - * + * + * BaseBackupPolicyResource properties. + * * @return the properties value. */ BaseBackupPolicy properties(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.BaseBackupPolicyResourceInner object. - * + * * @return the inner object. */ BaseBackupPolicyResourceInner innerModel(); - /** The entirety of the BaseBackupPolicyResource definition. */ + /** + * The entirety of the BaseBackupPolicyResource definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The BaseBackupPolicyResource definition stages. */ + /** + * The BaseBackupPolicyResource definition stages. + */ interface DefinitionStages { - /** The first stage of the BaseBackupPolicyResource definition. */ + /** + * The first stage of the BaseBackupPolicyResource definition. + */ interface Blank extends WithParentResource { } - /** The stage of the BaseBackupPolicyResource definition allowing to specify parent resource. */ + /** + * The stage of the BaseBackupPolicyResource definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, vaultName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @return the next definition stage. @@ -91,29 +101,32 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ BaseBackupPolicyResource create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ BaseBackupPolicyResource create(Context context); } - /** The stage of the BaseBackupPolicyResource definition allowing to specify properties. */ + /** + * The stage of the BaseBackupPolicyResource definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: BaseBackupPolicy - * - *

BaseBackupPolicyResource properties. - * + * + * BaseBackupPolicyResource properties. + * * @param properties BaseBackupPolicy - *

BaseBackupPolicyResource properties. + * + * BaseBackupPolicyResource properties. * @return the next definition stage. */ WithCreate withProperties(BaseBackupPolicy properties); @@ -122,40 +135,47 @@ interface WithProperties { /** * Begins update for the BaseBackupPolicyResource resource. - * + * * @return the stage of resource update. */ BaseBackupPolicyResource.Update update(); - /** The template for BaseBackupPolicyResource update. */ + /** + * The template for BaseBackupPolicyResource update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ BaseBackupPolicyResource apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ BaseBackupPolicyResource apply(Context context); } - /** The BaseBackupPolicyResource update stages. */ + /** + * The BaseBackupPolicyResource update stages. + */ interface UpdateStages { - /** The stage of the BaseBackupPolicyResource update allowing to specify properties. */ + /** + * The stage of the BaseBackupPolicyResource update allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: BaseBackupPolicy - * - *

BaseBackupPolicyResource properties. - * + * + * BaseBackupPolicyResource properties. + * * @param properties BaseBackupPolicy - *

BaseBackupPolicyResource properties. + * + * BaseBackupPolicyResource properties. * @return the next definition stage. */ Update withProperties(BaseBackupPolicy properties); @@ -164,14 +184,14 @@ interface WithProperties { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ BaseBackupPolicyResource refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ 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 da96c508c26e..1c2c42706687 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 @@ -11,8 +11,8 @@ /** * BaseBackupPolicyResourceList - * - *

List of BaseBackupPolicy resources. + * + * List of BaseBackupPolicy resources. */ @Fluent public final class BaseBackupPolicyResourceList extends DppResourceList { @@ -22,13 +22,15 @@ public final class BaseBackupPolicyResourceList extends DppResourceList { @JsonProperty(value = "value") private List value; - /** Creates an instance of BaseBackupPolicyResourceList class. */ + /** + * Creates an instance of BaseBackupPolicyResourceList class. + */ public BaseBackupPolicyResourceList() { } /** * Get the value property: List of resources. - * + * * @return the value value. */ public List value() { @@ -37,7 +39,7 @@ public List value() { /** * Set the value property: List of resources. - * + * * @param value the value value to set. * @return the BaseBackupPolicyResourceList object itself. */ @@ -46,7 +48,9 @@ public BaseBackupPolicyResourceList withValue(ListBasePolicy Rule. + * + * BasePolicy Rule. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, @@ -24,8 +24,7 @@ @JsonTypeName("BasePolicyRule") @JsonSubTypes({ @JsonSubTypes.Type(name = "AzureBackupRule", value = AzureBackupRule.class), - @JsonSubTypes.Type(name = "AzureRetentionRule", value = AzureRetentionRule.class) -}) + @JsonSubTypes.Type(name = "AzureRetentionRule", value = AzureRetentionRule.class) }) @Fluent public class BasePolicyRule { /* @@ -34,13 +33,15 @@ public class BasePolicyRule { @JsonProperty(value = "name", required = true) private String name; - /** Creates an instance of BasePolicyRule class. */ + /** + * Creates an instance of BasePolicyRule class. + */ public BasePolicyRule() { } /** * Get the name property: The name property. - * + * * @return the name value. */ public String name() { @@ -49,7 +50,7 @@ public String name() { /** * Set the name property: The name property. - * + * * @param name the name value to set. * @return the BasePolicyRule object itself. */ @@ -60,14 +61,13 @@ public BasePolicyRule withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model BasePolicyRule")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model BasePolicyRule")); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseResourceProperties.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseResourceProperties.java index 3da98ad80da0..f09a1f5c35f7 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseResourceProperties.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseResourceProperties.java @@ -5,21 +5,31 @@ package com.azure.resourcemanager.dataprotection.models; import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Properties which are specific to datasource/datasourceSets. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") +/** + * Properties which are specific to datasource/datasourceSets. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "objectType", + defaultImpl = BaseResourceProperties.class) @JsonTypeName("BaseResourceProperties") +@JsonSubTypes({ @JsonSubTypes.Type(name = "DefaultResourceProperties", value = DefaultResourceProperties.class) }) @Immutable -public final class BaseResourceProperties { - /** Creates an instance of BaseResourceProperties class. */ +public class BaseResourceProperties { + /** + * Creates an instance of BaseResourceProperties class. + */ public BaseResourceProperties() { } /** * 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/BlobBackupDatasourceParameters.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BlobBackupDatasourceParameters.java index 8f06f913eb5e..0536e22b6613 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BlobBackupDatasourceParameters.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BlobBackupDatasourceParameters.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Parameters to be used during configuration of backup of blobs. */ +/** + * Parameters to be used during configuration of backup of blobs. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("BlobBackupDatasourceParameters") @Fluent @@ -22,13 +24,15 @@ public final class BlobBackupDatasourceParameters extends BackupDatasourceParame @JsonProperty(value = "containersList", required = true) private List containersList; - /** Creates an instance of BlobBackupDatasourceParameters class. */ + /** + * Creates an instance of BlobBackupDatasourceParameters class. + */ public BlobBackupDatasourceParameters() { } /** * Get the containersList property: List of containers to be backed up during configuration of backup of blobs. - * + * * @return the containersList value. */ public List containersList() { @@ -37,7 +41,7 @@ public List containersList() { /** * Set the containersList property: List of containers to be backed up during configuration of backup of blobs. - * + * * @param containersList the containersList value to set. * @return the BlobBackupDatasourceParameters object itself. */ @@ -48,17 +52,15 @@ public BlobBackupDatasourceParameters withContainersList(List containers /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (containersList() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property containersList in model BlobBackupDatasourceParameters")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property containersList in model BlobBackupDatasourceParameters")); } } 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 d49b0eb2c524..ebd1e44d6643 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 @@ -9,8 +9,8 @@ /** * CheckNameAvailabilityRequest - * - *

CheckNameAvailability Request. + * + * CheckNameAvailability Request. */ @Fluent public final class CheckNameAvailabilityRequest { @@ -26,13 +26,15 @@ public final class CheckNameAvailabilityRequest { @JsonProperty(value = "type") private String type; - /** Creates an instance of CheckNameAvailabilityRequest class. */ + /** + * Creates an instance of CheckNameAvailabilityRequest class. + */ public CheckNameAvailabilityRequest() { } /** * Get the name property: Resource name for which availability needs to be checked. - * + * * @return the name value. */ public String name() { @@ -41,7 +43,7 @@ public String name() { /** * Set the name property: Resource name for which availability needs to be checked. - * + * * @param name the name value to set. * @return the CheckNameAvailabilityRequest object itself. */ @@ -52,7 +54,7 @@ public CheckNameAvailabilityRequest withName(String name) { /** * Get the type property: Describes the Resource type: Microsoft.DataProtection/BackupVaults. - * + * * @return the type value. */ public String type() { @@ -61,7 +63,7 @@ public String type() { /** * Set the type property: Describes the Resource type: Microsoft.DataProtection/BackupVaults. - * + * * @param type the type value to set. * @return the CheckNameAvailabilityRequest object itself. */ @@ -72,7 +74,7 @@ public CheckNameAvailabilityRequest withType(String type) { /** * 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/CheckNameAvailabilityResult.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CheckNameAvailabilityResult.java index d788c17384df..ba9043f82eb9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CheckNameAvailabilityResult.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CheckNameAvailabilityResult.java @@ -6,32 +6,34 @@ import com.azure.resourcemanager.dataprotection.fluent.models.CheckNameAvailabilityResultInner; -/** An immutable client-side representation of CheckNameAvailabilityResult. */ +/** + * An immutable client-side representation of CheckNameAvailabilityResult. + */ public interface CheckNameAvailabilityResult { /** * Gets the message property: Gets or sets the message. - * + * * @return the message value. */ String message(); /** * Gets the nameAvailable property: Gets or sets a value indicating whether [name available]. - * + * * @return the nameAvailable value. */ Boolean nameAvailable(); /** * Gets the reason property: Gets or sets the reason. - * + * * @return the reason value. */ String reason(); /** * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.CheckNameAvailabilityResultInner object. - * + * * @return the inner object. */ CheckNameAvailabilityResultInner innerModel(); 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 61aacb893cf5..bfa3e3217510 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 @@ -9,8 +9,8 @@ /** * ClientDiscoveryDisplay - * - *

Localized display information of an operation. + * + * Localized display information of an operation. */ @Fluent public final class ClientDiscoveryDisplay { @@ -38,13 +38,15 @@ public final class ClientDiscoveryDisplay { @JsonProperty(value = "resource") private String resource; - /** Creates an instance of ClientDiscoveryDisplay class. */ + /** + * Creates an instance of ClientDiscoveryDisplay class. + */ public ClientDiscoveryDisplay() { } /** * Get the description property: Description of the operation having details of what operation is about. - * + * * @return the description value. */ public String description() { @@ -53,7 +55,7 @@ public String description() { /** * Set the description property: Description of the operation having details of what operation is about. - * + * * @param description the description value to set. * @return the ClientDiscoveryDisplay object itself. */ @@ -64,7 +66,7 @@ public ClientDiscoveryDisplay withDescription(String description) { /** * Get the operation property: Operations Name itself. - * + * * @return the operation value. */ public String operation() { @@ -73,7 +75,7 @@ public String operation() { /** * Set the operation property: Operations Name itself. - * + * * @param operation the operation value to set. * @return the ClientDiscoveryDisplay object itself. */ @@ -84,7 +86,7 @@ public ClientDiscoveryDisplay withOperation(String operation) { /** * Get the provider property: Name of the provider for display purposes. - * + * * @return the provider value. */ public String provider() { @@ -93,7 +95,7 @@ public String provider() { /** * Set the provider property: Name of the provider for display purposes. - * + * * @param provider the provider value to set. * @return the ClientDiscoveryDisplay object itself. */ @@ -104,7 +106,7 @@ public ClientDiscoveryDisplay withProvider(String provider) { /** * Get the resource property: ResourceType for which this Operation can be performed. - * + * * @return the resource value. */ public String resource() { @@ -113,7 +115,7 @@ public String resource() { /** * Set the resource property: ResourceType for which this Operation can be performed. - * + * * @param resource the resource value to set. * @return the ClientDiscoveryDisplay object itself. */ @@ -124,7 +126,7 @@ public ClientDiscoveryDisplay withResource(String resource) { /** * 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/ClientDiscoveryForLogSpecification.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryForLogSpecification.java index cd3dc901e5f3..4c34af941d7b 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 @@ -9,8 +9,8 @@ /** * ClientDiscoveryForLogSpecification - * - *

Class to represent shoebox log specification in json client discovery. + * + * Class to represent shoebox log specification in json client discovery. */ @Fluent public final class ClientDiscoveryForLogSpecification { @@ -32,13 +32,15 @@ public final class ClientDiscoveryForLogSpecification { @JsonProperty(value = "name") private String name; - /** Creates an instance of ClientDiscoveryForLogSpecification class. */ + /** + * Creates an instance of ClientDiscoveryForLogSpecification class. + */ public ClientDiscoveryForLogSpecification() { } /** * Get the blobDuration property: blob duration of shoebox log specification. - * + * * @return the blobDuration value. */ public String blobDuration() { @@ -47,7 +49,7 @@ public String blobDuration() { /** * Set the blobDuration property: blob duration of shoebox log specification. - * + * * @param blobDuration the blobDuration value to set. * @return the ClientDiscoveryForLogSpecification object itself. */ @@ -58,7 +60,7 @@ public ClientDiscoveryForLogSpecification withBlobDuration(String blobDuration) /** * Get the displayName property: Localized display name. - * + * * @return the displayName value. */ public String displayName() { @@ -67,7 +69,7 @@ public String displayName() { /** * Set the displayName property: Localized display name. - * + * * @param displayName the displayName value to set. * @return the ClientDiscoveryForLogSpecification object itself. */ @@ -78,7 +80,7 @@ public ClientDiscoveryForLogSpecification withDisplayName(String displayName) { /** * Get the name property: Name for shoebox log specification. - * + * * @return the name value. */ public String name() { @@ -87,7 +89,7 @@ public String name() { /** * Set the name property: Name for shoebox log specification. - * + * * @param name the name value to set. * @return the ClientDiscoveryForLogSpecification object itself. */ @@ -98,7 +100,7 @@ public ClientDiscoveryForLogSpecification withName(String name) { /** * 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/ClientDiscoveryForProperties.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryForProperties.java index 974af49318aa..88814352d628 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 @@ -9,28 +9,30 @@ /** * ClientDiscoveryForProperties - * - *

Class to represent shoebox properties in json client discovery. + * + * Class to represent shoebox properties in json client discovery. */ @Fluent public final class ClientDiscoveryForProperties { /* * ClientDiscoveryForServiceSpecification - * + * * Operation properties. */ @JsonProperty(value = "serviceSpecification") private ClientDiscoveryForServiceSpecification serviceSpecification; - /** Creates an instance of ClientDiscoveryForProperties class. */ + /** + * Creates an instance of ClientDiscoveryForProperties class. + */ public ClientDiscoveryForProperties() { } /** * Get the serviceSpecification property: ClientDiscoveryForServiceSpecification - * - *

Operation properties. - * + * + * Operation properties. + * * @return the serviceSpecification value. */ public ClientDiscoveryForServiceSpecification serviceSpecification() { @@ -39,21 +41,21 @@ public ClientDiscoveryForServiceSpecification serviceSpecification() { /** * Set the serviceSpecification property: ClientDiscoveryForServiceSpecification - * - *

Operation properties. - * + * + * Operation properties. + * * @param serviceSpecification the serviceSpecification value to set. * @return the ClientDiscoveryForProperties object itself. */ - public ClientDiscoveryForProperties withServiceSpecification( - ClientDiscoveryForServiceSpecification serviceSpecification) { + public ClientDiscoveryForProperties + withServiceSpecification(ClientDiscoveryForServiceSpecification serviceSpecification) { this.serviceSpecification = serviceSpecification; 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/ClientDiscoveryForServiceSpecification.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryForServiceSpecification.java index 08abd7d39b32..ce3ce58807d4 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 @@ -10,8 +10,8 @@ /** * ClientDiscoveryForServiceSpecification - * - *

Class to represent shoebox service specification in json client discovery. + * + * Class to represent shoebox service specification in json client discovery. */ @Fluent public final class ClientDiscoveryForServiceSpecification { @@ -21,13 +21,15 @@ public final class ClientDiscoveryForServiceSpecification { @JsonProperty(value = "logSpecifications") private List logSpecifications; - /** Creates an instance of ClientDiscoveryForServiceSpecification class. */ + /** + * Creates an instance of ClientDiscoveryForServiceSpecification class. + */ public ClientDiscoveryForServiceSpecification() { } /** * Get the logSpecifications property: List of log specifications of this operation. - * + * * @return the logSpecifications value. */ public List logSpecifications() { @@ -36,19 +38,19 @@ public List logSpecifications() { /** * Set the logSpecifications property: List of log specifications of this operation. - * + * * @param logSpecifications the logSpecifications value to set. * @return the ClientDiscoveryForServiceSpecification object itself. */ - public ClientDiscoveryForServiceSpecification withLogSpecifications( - List logSpecifications) { + public ClientDiscoveryForServiceSpecification + withLogSpecifications(List logSpecifications) { this.logSpecifications = logSpecifications; 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/ClientDiscoveryResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ClientDiscoveryResponse.java index 828a6eee1950..b2a16febe2a1 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 @@ -11,8 +11,8 @@ /** * ClientDiscoveryResponse - * - *

Operations List response which contains list of available APIs. + * + * Operations List response which contains list of available APIs. */ @Fluent public final class ClientDiscoveryResponse { @@ -28,13 +28,15 @@ public final class ClientDiscoveryResponse { @JsonProperty(value = "value") private List value; - /** Creates an instance of ClientDiscoveryResponse class. */ + /** + * Creates an instance of ClientDiscoveryResponse class. + */ public ClientDiscoveryResponse() { } /** * Get the nextLink property: Link to the next chunk of Response. - * + * * @return the nextLink value. */ public String nextLink() { @@ -43,7 +45,7 @@ public String nextLink() { /** * Set the nextLink property: Link to the next chunk of Response. - * + * * @param nextLink the nextLink value to set. * @return the ClientDiscoveryResponse object itself. */ @@ -54,7 +56,7 @@ public ClientDiscoveryResponse withNextLink(String nextLink) { /** * Get the value property: List of available operations. - * + * * @return the value value. */ public List value() { @@ -63,7 +65,7 @@ public List value() { /** * Set the value property: List of available operations. - * + * * @param value the value value to set. * @return the ClientDiscoveryResponse object itself. */ @@ -74,7 +76,7 @@ public ClientDiscoveryResponse withValue(ListContains the localized display information for this particular operation. - * + * + * Contains the localized display information for this particular operation. + * * @return the display value. */ ClientDiscoveryDisplay display(); /** * Gets the name property: Name of the Operation. - * + * * @return the name value. */ String name(); /** * Gets the isDataAction property: Indicates whether the operation is a data action. - * + * * @return the isDataAction value. */ Boolean isDataAction(); @@ -34,16 +36,16 @@ public interface ClientDiscoveryValueForSingleApi { /** * Gets the origin property: The intended executor of the operation;governs the display of the operation in the RBAC * UX and the audit logs UX. - * + * * @return the origin value. */ String origin(); /** * Gets the properties property: ClientDiscoveryForProperties - * - *

Properties for the given operation. - * + * + * Properties for the given operation. + * * @return the properties value. */ ClientDiscoveryForProperties properties(); @@ -51,7 +53,7 @@ public interface ClientDiscoveryValueForSingleApi { /** * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.ClientDiscoveryValueForSingleApiInner * object. - * + * * @return the inner object. */ ClientDiscoveryValueForSingleApiInner innerModel(); 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 186faf72fd71..4ad6e9eee938 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 @@ -10,20 +10,22 @@ /** * CopyOnExpiryOption - * - *

Copy on Expiry Option. + * + * Copy on Expiry Option. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("CopyOnExpiryOption") @Immutable public final class CopyOnExpiryOption extends CopyOption { - /** Creates an instance of CopyOnExpiryOption class. */ + /** + * Creates an instance of CopyOnExpiryOption class. + */ public CopyOnExpiryOption() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 e8d271953036..3084cac6739b 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 @@ -11,8 +11,8 @@ /** * CopyOption - * - *

Options to copy. + * + * Options to copy. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, @@ -23,17 +23,18 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "CopyOnExpiryOption", value = CopyOnExpiryOption.class), @JsonSubTypes.Type(name = "CustomCopyOption", value = CustomCopyOption.class), - @JsonSubTypes.Type(name = "ImmediateCopyOption", value = ImmediateCopyOption.class) -}) + @JsonSubTypes.Type(name = "ImmediateCopyOption", value = ImmediateCopyOption.class) }) @Immutable public class CopyOption { - /** Creates an instance of CopyOption class. */ + /** + * Creates an instance of CopyOption class. + */ public CopyOption() { } /** * 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/CrossRegionRestoreDetails.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreDetails.java new file mode 100644 index 000000000000..06b0f67c2525 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreDetails.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Cross Region Restore details. + */ +@Fluent +public final class CrossRegionRestoreDetails { + /* + * The sourceRegion property. + */ + @JsonProperty(value = "sourceRegion", required = true) + private String sourceRegion; + + /* + * The sourceBackupInstanceId property. + */ + @JsonProperty(value = "sourceBackupInstanceId", required = true) + private String sourceBackupInstanceId; + + /** + * Creates an instance of CrossRegionRestoreDetails class. + */ + public CrossRegionRestoreDetails() { + } + + /** + * Get the sourceRegion property: The sourceRegion property. + * + * @return the sourceRegion value. + */ + public String sourceRegion() { + return this.sourceRegion; + } + + /** + * Set the sourceRegion property: The sourceRegion property. + * + * @param sourceRegion the sourceRegion value to set. + * @return the CrossRegionRestoreDetails object itself. + */ + public CrossRegionRestoreDetails withSourceRegion(String sourceRegion) { + this.sourceRegion = sourceRegion; + return this; + } + + /** + * Get the sourceBackupInstanceId property: The sourceBackupInstanceId property. + * + * @return the sourceBackupInstanceId value. + */ + public String sourceBackupInstanceId() { + return this.sourceBackupInstanceId; + } + + /** + * Set the sourceBackupInstanceId property: The sourceBackupInstanceId property. + * + * @param sourceBackupInstanceId the sourceBackupInstanceId value to set. + * @return the CrossRegionRestoreDetails object itself. + */ + public CrossRegionRestoreDetails withSourceBackupInstanceId(String sourceBackupInstanceId) { + this.sourceBackupInstanceId = sourceBackupInstanceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceRegion() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property sourceRegion in model CrossRegionRestoreDetails")); + } + if (sourceBackupInstanceId() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property sourceBackupInstanceId in model CrossRegionRestoreDetails")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CrossRegionRestoreDetails.class); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobRequest.java new file mode 100644 index 000000000000..30f1f6d9749a --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobRequest.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of CRR Job to be fetched. + */ +@Fluent +public final class CrossRegionRestoreJobRequest { + /* + * The sourceRegion property. + */ + @JsonProperty(value = "sourceRegion", required = true) + private String sourceRegion; + + /* + * The sourceBackupVaultId property. + */ + @JsonProperty(value = "sourceBackupVaultId", required = true) + private String sourceBackupVaultId; + + /* + * The jobId property. + */ + @JsonProperty(value = "jobId", required = true) + private String jobId; + + /** + * Creates an instance of CrossRegionRestoreJobRequest class. + */ + public CrossRegionRestoreJobRequest() { + } + + /** + * Get the sourceRegion property: The sourceRegion property. + * + * @return the sourceRegion value. + */ + public String sourceRegion() { + return this.sourceRegion; + } + + /** + * Set the sourceRegion property: The sourceRegion property. + * + * @param sourceRegion the sourceRegion value to set. + * @return the CrossRegionRestoreJobRequest object itself. + */ + public CrossRegionRestoreJobRequest withSourceRegion(String sourceRegion) { + this.sourceRegion = sourceRegion; + return this; + } + + /** + * Get the sourceBackupVaultId property: The sourceBackupVaultId property. + * + * @return the sourceBackupVaultId value. + */ + public String sourceBackupVaultId() { + return this.sourceBackupVaultId; + } + + /** + * Set the sourceBackupVaultId property: The sourceBackupVaultId property. + * + * @param sourceBackupVaultId the sourceBackupVaultId value to set. + * @return the CrossRegionRestoreJobRequest object itself. + */ + public CrossRegionRestoreJobRequest withSourceBackupVaultId(String sourceBackupVaultId) { + this.sourceBackupVaultId = sourceBackupVaultId; + return this; + } + + /** + * Get the jobId property: The jobId property. + * + * @return the jobId value. + */ + public String jobId() { + return this.jobId; + } + + /** + * Set the jobId property: The jobId property. + * + * @param jobId the jobId value to set. + * @return the CrossRegionRestoreJobRequest object itself. + */ + public CrossRegionRestoreJobRequest withJobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceRegion() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property sourceRegion in model CrossRegionRestoreJobRequest")); + } + if (sourceBackupVaultId() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property sourceBackupVaultId in model CrossRegionRestoreJobRequest")); + } + if (jobId() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property jobId in model CrossRegionRestoreJobRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CrossRegionRestoreJobRequest.class); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobsRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobsRequest.java new file mode 100644 index 000000000000..819f4fdf0803 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobsRequest.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of Backup Vault for which CRR Jobs are to be fetched. + */ +@Fluent +public final class CrossRegionRestoreJobsRequest { + /* + * The sourceRegion property. + */ + @JsonProperty(value = "sourceRegion", required = true) + private String sourceRegion; + + /* + * The sourceBackupVaultId property. + */ + @JsonProperty(value = "sourceBackupVaultId", required = true) + private String sourceBackupVaultId; + + /** + * Creates an instance of CrossRegionRestoreJobsRequest class. + */ + public CrossRegionRestoreJobsRequest() { + } + + /** + * Get the sourceRegion property: The sourceRegion property. + * + * @return the sourceRegion value. + */ + public String sourceRegion() { + return this.sourceRegion; + } + + /** + * Set the sourceRegion property: The sourceRegion property. + * + * @param sourceRegion the sourceRegion value to set. + * @return the CrossRegionRestoreJobsRequest object itself. + */ + public CrossRegionRestoreJobsRequest withSourceRegion(String sourceRegion) { + this.sourceRegion = sourceRegion; + return this; + } + + /** + * Get the sourceBackupVaultId property: The sourceBackupVaultId property. + * + * @return the sourceBackupVaultId value. + */ + public String sourceBackupVaultId() { + return this.sourceBackupVaultId; + } + + /** + * Set the sourceBackupVaultId property: The sourceBackupVaultId property. + * + * @param sourceBackupVaultId the sourceBackupVaultId value to set. + * @return the CrossRegionRestoreJobsRequest object itself. + */ + public CrossRegionRestoreJobsRequest withSourceBackupVaultId(String sourceBackupVaultId) { + this.sourceBackupVaultId = sourceBackupVaultId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceRegion() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property sourceRegion in model CrossRegionRestoreJobsRequest")); + } + if (sourceBackupVaultId() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property sourceBackupVaultId in model CrossRegionRestoreJobsRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CrossRegionRestoreJobsRequest.class); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreRequestObject.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreRequestObject.java new file mode 100644 index 000000000000..71902d48ee52 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreRequestObject.java @@ -0,0 +1,102 @@ +// 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.JsonProperty; + +/** + * Cross Region Restore Request Object. + */ +@Fluent +public final class CrossRegionRestoreRequestObject { + /* + * AzureBackupRestoreRequest + * + * Gets or sets the restore request object. + */ + @JsonProperty(value = "restoreRequestObject", required = true) + private AzureBackupRestoreRequest restoreRequestObject; + + /* + * Cross region restore details. + */ + @JsonProperty(value = "crossRegionRestoreDetails", required = true) + private CrossRegionRestoreDetails crossRegionRestoreDetails; + + /** + * Creates an instance of CrossRegionRestoreRequestObject class. + */ + public CrossRegionRestoreRequestObject() { + } + + /** + * Get the restoreRequestObject property: AzureBackupRestoreRequest + * + * Gets or sets the restore request object. + * + * @return the restoreRequestObject value. + */ + public AzureBackupRestoreRequest restoreRequestObject() { + return this.restoreRequestObject; + } + + /** + * Set the restoreRequestObject property: AzureBackupRestoreRequest + * + * Gets or sets the restore request object. + * + * @param restoreRequestObject the restoreRequestObject value to set. + * @return the CrossRegionRestoreRequestObject object itself. + */ + public CrossRegionRestoreRequestObject withRestoreRequestObject(AzureBackupRestoreRequest restoreRequestObject) { + this.restoreRequestObject = restoreRequestObject; + return this; + } + + /** + * Get the crossRegionRestoreDetails property: Cross region restore details. + * + * @return the crossRegionRestoreDetails value. + */ + public CrossRegionRestoreDetails crossRegionRestoreDetails() { + return this.crossRegionRestoreDetails; + } + + /** + * Set the crossRegionRestoreDetails property: Cross region restore details. + * + * @param crossRegionRestoreDetails the crossRegionRestoreDetails value to set. + * @return the CrossRegionRestoreRequestObject object itself. + */ + public CrossRegionRestoreRequestObject + withCrossRegionRestoreDetails(CrossRegionRestoreDetails crossRegionRestoreDetails) { + this.crossRegionRestoreDetails = crossRegionRestoreDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (restoreRequestObject() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property restoreRequestObject in model CrossRegionRestoreRequestObject")); + } else { + restoreRequestObject().validate(); + } + if (crossRegionRestoreDetails() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property crossRegionRestoreDetails in model CrossRegionRestoreRequestObject")); + } else { + crossRegionRestoreDetails().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CrossRegionRestoreRequestObject.class); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreSettings.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreSettings.java index eb9dbd0906f6..58c32ab03977 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreSettings.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreSettings.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The CrossRegionRestoreSettings model. */ +/** + * The CrossRegionRestoreSettings model. + */ @Fluent public final class CrossRegionRestoreSettings { /* @@ -16,13 +18,15 @@ public final class CrossRegionRestoreSettings { @JsonProperty(value = "state") private CrossRegionRestoreState state; - /** Creates an instance of CrossRegionRestoreSettings class. */ + /** + * Creates an instance of CrossRegionRestoreSettings class. + */ public CrossRegionRestoreSettings() { } /** * Get the state property: CrossRegionRestore state. - * + * * @return the state value. */ public CrossRegionRestoreState state() { @@ -31,7 +35,7 @@ public CrossRegionRestoreState state() { /** * Set the state property: CrossRegionRestore state. - * + * * @param state the state value to set. * @return the CrossRegionRestoreSettings object itself. */ @@ -42,7 +46,7 @@ public CrossRegionRestoreSettings withState(CrossRegionRestoreState state) { /** * 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/CrossRegionRestoreState.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreState.java index 81c5290794e8..a5eccd3bb73b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreState.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreState.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** CrossRegionRestore state. */ +/** + * CrossRegionRestore state. + */ public final class CrossRegionRestoreState extends ExpandableStringEnum { - /** Static value Disabled for CrossRegionRestoreState. */ + /** + * Static value Disabled for CrossRegionRestoreState. + */ public static final CrossRegionRestoreState DISABLED = fromString("Disabled"); - /** Static value Enabled for CrossRegionRestoreState. */ + /** + * Static value Enabled for CrossRegionRestoreState. + */ public static final CrossRegionRestoreState ENABLED = fromString("Enabled"); /** * Creates a new instance of CrossRegionRestoreState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public CrossRegionRestoreState() { /** * Creates or finds a CrossRegionRestoreState from its string representation. - * + * * @param name a name to look for. * @return the corresponding CrossRegionRestoreState. */ @@ -38,7 +44,7 @@ public static CrossRegionRestoreState fromString(String name) { /** * Gets known CrossRegionRestoreState values. - * + * * @return known CrossRegionRestoreState values. */ public static Collection values() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossSubscriptionRestoreSettings.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossSubscriptionRestoreSettings.java index 3bdaebbc3987..99ee334da075 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossSubscriptionRestoreSettings.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossSubscriptionRestoreSettings.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** CrossSubscriptionRestore Settings. */ +/** + * CrossSubscriptionRestore Settings. + */ @Fluent public final class CrossSubscriptionRestoreSettings { /* @@ -16,13 +18,15 @@ public final class CrossSubscriptionRestoreSettings { @JsonProperty(value = "state") private CrossSubscriptionRestoreState state; - /** Creates an instance of CrossSubscriptionRestoreSettings class. */ + /** + * Creates an instance of CrossSubscriptionRestoreSettings class. + */ public CrossSubscriptionRestoreSettings() { } /** * Get the state property: CrossSubscriptionRestore state. - * + * * @return the state value. */ public CrossSubscriptionRestoreState state() { @@ -31,7 +35,7 @@ public CrossSubscriptionRestoreState state() { /** * Set the state property: CrossSubscriptionRestore state. - * + * * @param state the state value to set. * @return the CrossSubscriptionRestoreSettings object itself. */ @@ -42,7 +46,7 @@ public CrossSubscriptionRestoreSettings withState(CrossSubscriptionRestoreState /** * 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/CrossSubscriptionRestoreState.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossSubscriptionRestoreState.java index e9e13f3f6977..06babda2d8eb 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossSubscriptionRestoreState.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossSubscriptionRestoreState.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** CrossSubscriptionRestore state. */ +/** + * CrossSubscriptionRestore state. + */ public final class CrossSubscriptionRestoreState extends ExpandableStringEnum { - /** Static value Disabled for CrossSubscriptionRestoreState. */ + /** + * Static value Disabled for CrossSubscriptionRestoreState. + */ public static final CrossSubscriptionRestoreState DISABLED = fromString("Disabled"); - /** Static value PermanentlyDisabled for CrossSubscriptionRestoreState. */ + /** + * Static value PermanentlyDisabled for CrossSubscriptionRestoreState. + */ public static final CrossSubscriptionRestoreState PERMANENTLY_DISABLED = fromString("PermanentlyDisabled"); - /** Static value Enabled for CrossSubscriptionRestoreState. */ + /** + * Static value Enabled for CrossSubscriptionRestoreState. + */ public static final CrossSubscriptionRestoreState ENABLED = fromString("Enabled"); /** * Creates a new instance of CrossSubscriptionRestoreState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public CrossSubscriptionRestoreState() { /** * Creates or finds a CrossSubscriptionRestoreState from its string representation. - * + * * @param name a name to look for. * @return the corresponding CrossSubscriptionRestoreState. */ @@ -41,7 +49,7 @@ public static CrossSubscriptionRestoreState fromString(String name) { /** * Gets known CrossSubscriptionRestoreState values. - * + * * @return known CrossSubscriptionRestoreState values. */ public static Collection values() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CurrentProtectionState.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CurrentProtectionState.java index 063745a7351f..14c37c31aa3b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CurrentProtectionState.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CurrentProtectionState.java @@ -8,49 +8,75 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Specifies the current protection state of the resource. */ +/** + * Specifies the current protection state of the resource. + */ public final class CurrentProtectionState extends ExpandableStringEnum { - /** Static value Invalid for CurrentProtectionState. */ + /** + * Static value Invalid for CurrentProtectionState. + */ public static final CurrentProtectionState INVALID = fromString("Invalid"); - /** Static value NotProtected for CurrentProtectionState. */ + /** + * Static value NotProtected for CurrentProtectionState. + */ public static final CurrentProtectionState NOT_PROTECTED = fromString("NotProtected"); - /** Static value ConfiguringProtection for CurrentProtectionState. */ + /** + * Static value ConfiguringProtection for CurrentProtectionState. + */ public static final CurrentProtectionState CONFIGURING_PROTECTION = fromString("ConfiguringProtection"); - /** Static value ProtectionConfigured for CurrentProtectionState. */ + /** + * Static value ProtectionConfigured for CurrentProtectionState. + */ public static final CurrentProtectionState PROTECTION_CONFIGURED = fromString("ProtectionConfigured"); - /** Static value BackupSchedulesSuspended for CurrentProtectionState. */ + /** + * Static value BackupSchedulesSuspended for CurrentProtectionState. + */ public static final CurrentProtectionState BACKUP_SCHEDULES_SUSPENDED = fromString("BackupSchedulesSuspended"); - /** Static value RetentionSchedulesSuspended for CurrentProtectionState. */ - public static final CurrentProtectionState RETENTION_SCHEDULES_SUSPENDED = - fromString("RetentionSchedulesSuspended"); + /** + * Static value RetentionSchedulesSuspended for CurrentProtectionState. + */ + public static final CurrentProtectionState RETENTION_SCHEDULES_SUSPENDED + = fromString("RetentionSchedulesSuspended"); - /** Static value ProtectionStopped for CurrentProtectionState. */ + /** + * Static value ProtectionStopped for CurrentProtectionState. + */ public static final CurrentProtectionState PROTECTION_STOPPED = fromString("ProtectionStopped"); - /** Static value ProtectionError for CurrentProtectionState. */ + /** + * Static value ProtectionError for CurrentProtectionState. + */ public static final CurrentProtectionState PROTECTION_ERROR = fromString("ProtectionError"); - /** Static value ConfiguringProtectionFailed for CurrentProtectionState. */ - public static final CurrentProtectionState CONFIGURING_PROTECTION_FAILED = - fromString("ConfiguringProtectionFailed"); + /** + * Static value ConfiguringProtectionFailed for CurrentProtectionState. + */ + public static final CurrentProtectionState CONFIGURING_PROTECTION_FAILED + = fromString("ConfiguringProtectionFailed"); - /** Static value SoftDeleting for CurrentProtectionState. */ + /** + * Static value SoftDeleting for CurrentProtectionState. + */ public static final CurrentProtectionState SOFT_DELETING = fromString("SoftDeleting"); - /** Static value SoftDeleted for CurrentProtectionState. */ + /** + * Static value SoftDeleted for CurrentProtectionState. + */ public static final CurrentProtectionState SOFT_DELETED = fromString("SoftDeleted"); - /** Static value UpdatingProtection for CurrentProtectionState. */ + /** + * Static value UpdatingProtection for CurrentProtectionState. + */ public static final CurrentProtectionState UPDATING_PROTECTION = fromString("UpdatingProtection"); /** * Creates a new instance of CurrentProtectionState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -59,7 +85,7 @@ public CurrentProtectionState() { /** * Creates or finds a CurrentProtectionState from its string representation. - * + * * @param name a name to look for. * @return the corresponding CurrentProtectionState. */ @@ -70,7 +96,7 @@ public static CurrentProtectionState fromString(String name) { /** * Gets known CurrentProtectionState values. - * + * * @return known CurrentProtectionState values. */ public static Collection values() { 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 ff6f3eae1384..9a88576fa394 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 @@ -11,8 +11,8 @@ /** * CustomCopyOption - * - *

Duration based custom options to copy. + * + * Duration based custom options to copy. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("CustomCopyOption") @@ -24,13 +24,15 @@ public final class CustomCopyOption extends CopyOption { @JsonProperty(value = "duration") private String duration; - /** Creates an instance of CustomCopyOption class. */ + /** + * Creates an instance of CustomCopyOption class. + */ public CustomCopyOption() { } /** * Get the duration property: Data copied after given timespan. - * + * * @return the duration value. */ public String duration() { @@ -39,7 +41,7 @@ public String duration() { /** * Set the duration property: Data copied after given timespan. - * + * * @param duration the duration value to set. * @return the CustomCopyOption object itself. */ @@ -50,7 +52,7 @@ public CustomCopyOption withDuration(String duration) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 f124a2467726..19d597e89881 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 @@ -7,11 +7,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of DataProtectionOperations. */ +/** + * Resource collection API of DataProtectionOperations. + */ public interface DataProtectionOperations { /** * Returns the list of available operations. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return clientDiscoveryResponse as paginated response with {@link PagedIterable}. @@ -20,7 +22,7 @@ public interface DataProtectionOperations { /** * Returns the list of available operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. 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 38d256d4d875..713c2f305ddc 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 @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of DataProtections. */ +/** + * Resource collection API of DataProtections. + */ public interface DataProtections { /** * Validates if a feature is supported. - * + * * @param location The location parameter. * @param parameters Feature support request object. * @param context The context to associate with this operation. @@ -20,12 +22,12 @@ public interface DataProtections { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base class for Backup Feature support along with {@link Response}. */ - Response checkFeatureSupportWithResponse( - String location, FeatureValidationRequestBase parameters, Context context); + Response checkFeatureSupportWithResponse(String location, + FeatureValidationRequestBase parameters, Context context); /** * Validates if a feature is supported. - * + * * @param location The location parameter. * @param parameters Feature support request object. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 e2c4f29781c4..e73c62362f7b 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 @@ -10,8 +10,8 @@ /** * DataStoreInfoBase - * - *

DataStoreInfo base. + * + * DataStoreInfo base. */ @Fluent public final class DataStoreInfoBase { @@ -27,13 +27,15 @@ public final class DataStoreInfoBase { @JsonProperty(value = "objectType", required = true) private String objectType; - /** Creates an instance of DataStoreInfoBase class. */ + /** + * Creates an instance of DataStoreInfoBase class. + */ public DataStoreInfoBase() { } /** * Get the dataStoreType property: type of datastore; Operational/Vault/Archive. - * + * * @return the dataStoreType value. */ public DataStoreTypes dataStoreType() { @@ -42,7 +44,7 @@ public DataStoreTypes dataStoreType() { /** * Set the dataStoreType property: type of datastore; Operational/Vault/Archive. - * + * * @param dataStoreType the dataStoreType value to set. * @return the DataStoreInfoBase object itself. */ @@ -53,7 +55,7 @@ public DataStoreInfoBase withDataStoreType(DataStoreTypes dataStoreType) { /** * Get the objectType property: Type of Datasource object, used to initialize the right inherited type. - * + * * @return the objectType value. */ public String objectType() { @@ -62,7 +64,7 @@ public String objectType() { /** * Set the objectType property: Type of Datasource object, used to initialize the right inherited type. - * + * * @param objectType the objectType value to set. * @return the DataStoreInfoBase object itself. */ @@ -73,19 +75,17 @@ public DataStoreInfoBase withObjectType(String objectType) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (dataStoreType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property dataStoreType in model DataStoreInfoBase")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property dataStoreType in model DataStoreInfoBase")); } if (objectType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property objectType in model DataStoreInfoBase")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property objectType in model DataStoreInfoBase")); } } 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 6cd528515a1a..b6019159e0f4 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 @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Parameters for DataStore. */ +/** + * Parameters for DataStore. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -19,8 +21,7 @@ defaultImpl = DataStoreParameters.class) @JsonTypeName("DataStoreParameters") @JsonSubTypes({ - @JsonSubTypes.Type(name = "AzureOperationalStoreParameters", value = AzureOperationalStoreParameters.class) -}) + @JsonSubTypes.Type(name = "AzureOperationalStoreParameters", value = AzureOperationalStoreParameters.class) }) @Fluent public class DataStoreParameters { /* @@ -29,13 +30,15 @@ public class DataStoreParameters { @JsonProperty(value = "dataStoreType", required = true) private DataStoreTypes dataStoreType; - /** Creates an instance of DataStoreParameters class. */ + /** + * Creates an instance of DataStoreParameters class. + */ public DataStoreParameters() { } /** * Get the dataStoreType property: type of datastore; Operational/Vault/Archive. - * + * * @return the dataStoreType value. */ public DataStoreTypes dataStoreType() { @@ -44,7 +47,7 @@ public DataStoreTypes dataStoreType() { /** * Set the dataStoreType property: type of datastore; Operational/Vault/Archive. - * + * * @param dataStoreType the dataStoreType value to set. * @return the DataStoreParameters object itself. */ @@ -55,15 +58,13 @@ public DataStoreParameters withDataStoreType(DataStoreTypes dataStoreType) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (dataStoreType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataStoreType in model DataStoreParameters")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property dataStoreType in model DataStoreParameters")); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataStoreTypes.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataStoreTypes.java index 99262371cd6c..2928311cdaf6 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataStoreTypes.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DataStoreTypes.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** type of datastore; Operational/Vault/Archive. */ +/** + * type of datastore; Operational/Vault/Archive. + */ public final class DataStoreTypes extends ExpandableStringEnum { - /** Static value OperationalStore for DataStoreTypes. */ + /** + * Static value OperationalStore for DataStoreTypes. + */ public static final DataStoreTypes OPERATIONAL_STORE = fromString("OperationalStore"); - /** Static value VaultStore for DataStoreTypes. */ + /** + * Static value VaultStore for DataStoreTypes. + */ public static final DataStoreTypes VAULT_STORE = fromString("VaultStore"); - /** Static value ArchiveStore for DataStoreTypes. */ + /** + * Static value ArchiveStore for DataStoreTypes. + */ public static final DataStoreTypes ARCHIVE_STORE = fromString("ArchiveStore"); /** * Creates a new instance of DataStoreTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public DataStoreTypes() { /** * Creates or finds a DataStoreTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding DataStoreTypes. */ @@ -41,7 +49,7 @@ public static DataStoreTypes fromString(String name) { /** * Gets known DataStoreTypes values. - * + * * @return known DataStoreTypes values. */ public static Collection values() { 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 a0e6ce494004..fbba0113ecd4 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 @@ -10,8 +10,8 @@ /** * Datasource - * - *

Datasource to be backed up. + * + * Datasource to be backed up. */ @Fluent public final class Datasource { @@ -64,13 +64,15 @@ public final class Datasource { @JsonProperty(value = "resourceProperties") private BaseResourceProperties resourceProperties; - /** Creates an instance of Datasource class. */ + /** + * Creates an instance of Datasource class. + */ public Datasource() { } /** * Get the datasourceType property: DatasourceType of the resource. - * + * * @return the datasourceType value. */ public String datasourceType() { @@ -79,7 +81,7 @@ public String datasourceType() { /** * Set the datasourceType property: DatasourceType of the resource. - * + * * @param datasourceType the datasourceType value to set. * @return the Datasource object itself. */ @@ -90,7 +92,7 @@ public Datasource withDatasourceType(String datasourceType) { /** * Get the objectType property: Type of Datasource object, used to initialize the right inherited type. - * + * * @return the objectType value. */ public String objectType() { @@ -99,7 +101,7 @@ public String objectType() { /** * Set the objectType property: Type of Datasource object, used to initialize the right inherited type. - * + * * @param objectType the objectType value to set. * @return the Datasource object itself. */ @@ -111,7 +113,7 @@ public Datasource withObjectType(String objectType) { /** * Get the resourceId property: Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure * resources, this will be the ID created by backup service via Fabric/Vault. - * + * * @return the resourceId value. */ public String resourceId() { @@ -121,7 +123,7 @@ public String resourceId() { /** * Set the resourceId property: Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure * resources, this will be the ID created by backup service via Fabric/Vault. - * + * * @param resourceId the resourceId value to set. * @return the Datasource object itself. */ @@ -132,7 +134,7 @@ public Datasource withResourceId(String resourceId) { /** * Get the resourceLocation property: Location of datasource. - * + * * @return the resourceLocation value. */ public String resourceLocation() { @@ -141,7 +143,7 @@ public String resourceLocation() { /** * Set the resourceLocation property: Location of datasource. - * + * * @param resourceLocation the resourceLocation value to set. * @return the Datasource object itself. */ @@ -152,7 +154,7 @@ public Datasource withResourceLocation(String resourceLocation) { /** * Get the resourceName property: Unique identifier of the resource in the context of parent. - * + * * @return the resourceName value. */ public String resourceName() { @@ -161,7 +163,7 @@ public String resourceName() { /** * Set the resourceName property: Unique identifier of the resource in the context of parent. - * + * * @param resourceName the resourceName value to set. * @return the Datasource object itself. */ @@ -172,7 +174,7 @@ public Datasource withResourceName(String resourceName) { /** * Get the resourceType property: Resource Type of Datasource. - * + * * @return the resourceType value. */ public String resourceType() { @@ -181,7 +183,7 @@ public String resourceType() { /** * Set the resourceType property: Resource Type of Datasource. - * + * * @param resourceType the resourceType value to set. * @return the Datasource object itself. */ @@ -192,7 +194,7 @@ public Datasource withResourceType(String resourceType) { /** * Get the resourceUri property: Uri of the resource. - * + * * @return the resourceUri value. */ public String resourceUri() { @@ -201,7 +203,7 @@ public String resourceUri() { /** * Set the resourceUri property: Uri of the resource. - * + * * @param resourceUri the resourceUri value to set. * @return the Datasource object itself. */ @@ -212,7 +214,7 @@ public Datasource withResourceUri(String resourceUri) { /** * Get the resourceProperties property: Properties specific to data source. - * + * * @return the resourceProperties value. */ public BaseResourceProperties resourceProperties() { @@ -221,7 +223,7 @@ public BaseResourceProperties resourceProperties() { /** * Set the resourceProperties property: Properties specific to data source. - * + * * @param resourceProperties the resourceProperties value to set. * @return the Datasource object itself. */ @@ -232,14 +234,13 @@ public Datasource withResourceProperties(BaseResourceProperties resourceProperti /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (resourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property resourceId in model Datasource")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property resourceId in model Datasource")); } if (resourceProperties() != null) { resourceProperties().validate(); 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 2bfbd3e770f2..1cbd879da7f8 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 @@ -10,8 +10,8 @@ /** * DatasourceSet - * - *

DatasourceSet details of datasource to be backed up. + * + * DatasourceSet details of datasource to be backed up. */ @Fluent public final class DatasourceSet { @@ -64,13 +64,15 @@ public final class DatasourceSet { @JsonProperty(value = "resourceProperties") private BaseResourceProperties resourceProperties; - /** Creates an instance of DatasourceSet class. */ + /** + * Creates an instance of DatasourceSet class. + */ public DatasourceSet() { } /** * Get the datasourceType property: DatasourceType of the resource. - * + * * @return the datasourceType value. */ public String datasourceType() { @@ -79,7 +81,7 @@ public String datasourceType() { /** * Set the datasourceType property: DatasourceType of the resource. - * + * * @param datasourceType the datasourceType value to set. * @return the DatasourceSet object itself. */ @@ -90,7 +92,7 @@ public DatasourceSet withDatasourceType(String datasourceType) { /** * Get the objectType property: Type of Datasource object, used to initialize the right inherited type. - * + * * @return the objectType value. */ public String objectType() { @@ -99,7 +101,7 @@ public String objectType() { /** * Set the objectType property: Type of Datasource object, used to initialize the right inherited type. - * + * * @param objectType the objectType value to set. * @return the DatasourceSet object itself. */ @@ -111,7 +113,7 @@ public DatasourceSet withObjectType(String objectType) { /** * Get the resourceId property: Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure * resources, this will be the ID created by backup service via Fabric/Vault. - * + * * @return the resourceId value. */ public String resourceId() { @@ -121,7 +123,7 @@ public String resourceId() { /** * Set the resourceId property: Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure * resources, this will be the ID created by backup service via Fabric/Vault. - * + * * @param resourceId the resourceId value to set. * @return the DatasourceSet object itself. */ @@ -132,7 +134,7 @@ public DatasourceSet withResourceId(String resourceId) { /** * Get the resourceLocation property: Location of datasource. - * + * * @return the resourceLocation value. */ public String resourceLocation() { @@ -141,7 +143,7 @@ public String resourceLocation() { /** * Set the resourceLocation property: Location of datasource. - * + * * @param resourceLocation the resourceLocation value to set. * @return the DatasourceSet object itself. */ @@ -152,7 +154,7 @@ public DatasourceSet withResourceLocation(String resourceLocation) { /** * Get the resourceName property: Unique identifier of the resource in the context of parent. - * + * * @return the resourceName value. */ public String resourceName() { @@ -161,7 +163,7 @@ public String resourceName() { /** * Set the resourceName property: Unique identifier of the resource in the context of parent. - * + * * @param resourceName the resourceName value to set. * @return the DatasourceSet object itself. */ @@ -172,7 +174,7 @@ public DatasourceSet withResourceName(String resourceName) { /** * Get the resourceType property: Resource Type of Datasource. - * + * * @return the resourceType value. */ public String resourceType() { @@ -181,7 +183,7 @@ public String resourceType() { /** * Set the resourceType property: Resource Type of Datasource. - * + * * @param resourceType the resourceType value to set. * @return the DatasourceSet object itself. */ @@ -192,7 +194,7 @@ public DatasourceSet withResourceType(String resourceType) { /** * Get the resourceUri property: Uri of the resource. - * + * * @return the resourceUri value. */ public String resourceUri() { @@ -201,7 +203,7 @@ public String resourceUri() { /** * Set the resourceUri property: Uri of the resource. - * + * * @param resourceUri the resourceUri value to set. * @return the DatasourceSet object itself. */ @@ -212,7 +214,7 @@ public DatasourceSet withResourceUri(String resourceUri) { /** * Get the resourceProperties property: Properties specific to data source set. - * + * * @return the resourceProperties value. */ public BaseResourceProperties resourceProperties() { @@ -221,7 +223,7 @@ public BaseResourceProperties resourceProperties() { /** * Set the resourceProperties property: Properties specific to data source set. - * + * * @param resourceProperties the resourceProperties value to set. * @return the DatasourceSet object itself. */ @@ -232,14 +234,13 @@ public DatasourceSet withResourceProperties(BaseResourceProperties resourcePrope /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (resourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property resourceId in model DatasourceSet")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property resourceId in model DatasourceSet")); } if (resourceProperties() != null) { resourceProperties().validate(); 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 1993d6b2b862..a2180c4c1d94 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 @@ -9,8 +9,8 @@ /** * Day - * - *

Day of the week. + * + * Day of the week. */ @Fluent public final class Day { @@ -26,13 +26,15 @@ public final class Day { @JsonProperty(value = "isLast") private Boolean isLast; - /** Creates an instance of Day class. */ + /** + * Creates an instance of Day class. + */ public Day() { } /** * Get the date property: Date of the month. - * + * * @return the date value. */ public Integer date() { @@ -41,7 +43,7 @@ public Integer date() { /** * Set the date property: Date of the month. - * + * * @param date the date value to set. * @return the Day object itself. */ @@ -52,7 +54,7 @@ public Day withDate(Integer date) { /** * Get the isLast property: Whether Date is last date of month. - * + * * @return the isLast value. */ public Boolean isLast() { @@ -61,7 +63,7 @@ public Boolean isLast() { /** * Set the isLast property: Whether Date is last date of month. - * + * * @param isLast the isLast value to set. * @return the Day object itself. */ @@ -72,7 +74,7 @@ public Day withIsLast(Boolean isLast) { /** * 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/DayOfWeek.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DayOfWeek.java index 200d39bacbb4..6915c0448846 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DayOfWeek.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DayOfWeek.java @@ -8,32 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DayOfWeek. */ +/** + * Defines values for DayOfWeek. + */ public final class DayOfWeek extends ExpandableStringEnum { - /** Static value Friday for DayOfWeek. */ + /** + * Static value Friday for DayOfWeek. + */ public static final DayOfWeek FRIDAY = fromString("Friday"); - /** Static value Monday for DayOfWeek. */ + /** + * Static value Monday for DayOfWeek. + */ public static final DayOfWeek MONDAY = fromString("Monday"); - /** Static value Saturday for DayOfWeek. */ + /** + * Static value Saturday for DayOfWeek. + */ public static final DayOfWeek SATURDAY = fromString("Saturday"); - /** Static value Sunday for DayOfWeek. */ + /** + * Static value Sunday for DayOfWeek. + */ public static final DayOfWeek SUNDAY = fromString("Sunday"); - /** Static value Thursday for DayOfWeek. */ + /** + * Static value Thursday for DayOfWeek. + */ public static final DayOfWeek THURSDAY = fromString("Thursday"); - /** Static value Tuesday for DayOfWeek. */ + /** + * Static value Tuesday for DayOfWeek. + */ public static final DayOfWeek TUESDAY = fromString("Tuesday"); - /** Static value Wednesday for DayOfWeek. */ + /** + * Static value Wednesday for DayOfWeek. + */ public static final DayOfWeek WEDNESDAY = fromString("Wednesday"); /** * Creates a new instance of DayOfWeek value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +58,7 @@ public DayOfWeek() { /** * Creates or finds a DayOfWeek from its string representation. - * + * * @param name a name to look for. * @return the corresponding DayOfWeek. */ @@ -53,7 +69,7 @@ public static DayOfWeek fromString(String name) { /** * Gets known DayOfWeek values. - * + * * @return known DayOfWeek values. */ public static Collection values() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DefaultResourceProperties.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DefaultResourceProperties.java new file mode 100644 index 000000000000..ca7bf2508a0a --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DefaultResourceProperties.java @@ -0,0 +1,33 @@ +// 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.Immutable; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Default source properties. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") +@JsonTypeName("DefaultResourceProperties") +@Immutable +public final class DefaultResourceProperties extends BaseResourceProperties { + /** + * Creates an instance of DefaultResourceProperties class. + */ + public DefaultResourceProperties() { + } + + /** + * 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/DeleteOption.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeleteOption.java index 72517480bf2d..7ca424e1b9bd 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 @@ -13,8 +13,8 @@ /** * DeleteOption - * - *

Delete Option. + * + * Delete Option. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, @@ -22,7 +22,7 @@ property = "objectType", defaultImpl = DeleteOption.class) @JsonTypeName("DeleteOption") -@JsonSubTypes({@JsonSubTypes.Type(name = "AbsoluteDeleteOption", value = AbsoluteDeleteOption.class)}) +@JsonSubTypes({ @JsonSubTypes.Type(name = "AbsoluteDeleteOption", value = AbsoluteDeleteOption.class) }) @Fluent public class DeleteOption { /* @@ -31,13 +31,15 @@ public class DeleteOption { @JsonProperty(value = "duration", required = true) private String duration; - /** Creates an instance of DeleteOption class. */ + /** + * Creates an instance of DeleteOption class. + */ public DeleteOption() { } /** * Get the duration property: Duration of deletion after given timespan. - * + * * @return the duration value. */ public String duration() { @@ -46,7 +48,7 @@ public String duration() { /** * Set the duration property: Duration of deletion after given timespan. - * + * * @param duration the duration value to set. * @return the DeleteOption object itself. */ @@ -57,14 +59,13 @@ public DeleteOption withDuration(String duration) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (duration() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property duration in model DeleteOption")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property duration in model DeleteOption")); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletedBackupInstance.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletedBackupInstance.java index 022fb0320215..6cc1c8581c6a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletedBackupInstance.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletedBackupInstance.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Deleted Backup Instance. */ +/** + * Deleted Backup Instance. + */ @Fluent public final class DeletedBackupInstance extends BackupInstance { /* @@ -16,69 +18,87 @@ public final class DeletedBackupInstance extends BackupInstance { @JsonProperty(value = "deletionInfo", access = JsonProperty.Access.WRITE_ONLY) private DeletionInfo deletionInfo; - /** Creates an instance of DeletedBackupInstance class. */ + /** + * Creates an instance of DeletedBackupInstance class. + */ public DeletedBackupInstance() { } /** * Get the deletionInfo property: Deletion info of Backup Instance. - * + * * @return the deletionInfo value. */ public DeletionInfo deletionInfo() { return this.deletionInfo; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DeletedBackupInstance withFriendlyName(String friendlyName) { super.withFriendlyName(friendlyName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DeletedBackupInstance withDataSourceInfo(Datasource dataSourceInfo) { super.withDataSourceInfo(dataSourceInfo); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DeletedBackupInstance withDataSourceSetInfo(DatasourceSet dataSourceSetInfo) { super.withDataSourceSetInfo(dataSourceSetInfo); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DeletedBackupInstance withPolicyInfo(PolicyInfo policyInfo) { super.withPolicyInfo(policyInfo); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DeletedBackupInstance withDatasourceAuthCredentials(AuthCredentials datasourceAuthCredentials) { super.withDatasourceAuthCredentials(datasourceAuthCredentials); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DeletedBackupInstance withValidationType(ValidationType validationType) { super.withValidationType(validationType); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DeletedBackupInstance withIdentityDetails(IdentityDetails identityDetails) { super.withIdentityDetails(identityDetails); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DeletedBackupInstance withObjectType(String objectType) { super.withObjectType(objectType); @@ -87,7 +107,7 @@ public DeletedBackupInstance withObjectType(String objectType) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletedBackupInstanceResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletedBackupInstanceResource.java index e2fc079d83df..88348044051d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletedBackupInstanceResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletedBackupInstanceResource.java @@ -7,46 +7,48 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.dataprotection.fluent.models.DeletedBackupInstanceResourceInner; -/** An immutable client-side representation of DeletedBackupInstanceResource. */ +/** + * An immutable client-side representation of DeletedBackupInstanceResource. + */ public interface DeletedBackupInstanceResource { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the properties property: DeletedBackupInstanceResource properties. - * + * * @return the properties value. */ DeletedBackupInstance properties(); /** * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.DeletedBackupInstanceResourceInner object. - * + * * @return the inner object. */ DeletedBackupInstanceResourceInner innerModel(); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletedBackupInstanceResourceList.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletedBackupInstanceResourceList.java index 79cdbfb79b26..946b6d1b674d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletedBackupInstanceResourceList.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletedBackupInstanceResourceList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of DeletedBackupInstance resources. */ +/** + * List of DeletedBackupInstance resources. + */ @Fluent public final class DeletedBackupInstanceResourceList extends DppResourceList { /* @@ -18,13 +20,15 @@ public final class DeletedBackupInstanceResourceList extends DppResourceList { @JsonProperty(value = "value") private List value; - /** Creates an instance of DeletedBackupInstanceResourceList class. */ + /** + * Creates an instance of DeletedBackupInstanceResourceList class. + */ public DeletedBackupInstanceResourceList() { } /** * Get the value property: List of resources. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: List of resources. - * + * * @param value the value value to set. * @return the DeletedBackupInstanceResourceList object itself. */ @@ -42,7 +46,9 @@ public DeletedBackupInstanceResourceList withValue(List getWithResponse( - String resourceGroupName, String vaultName, String backupInstanceName, Context context); + Response getWithResponse(String resourceGroupName, String vaultName, + String backupInstanceName, Context context); /** * Gets a deleted backup instance with name in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -65,7 +67,7 @@ Response getWithResponse( /** * The undelete operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. @@ -77,7 +79,7 @@ Response getWithResponse( /** * The undelete operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the deleted backup instance. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletionInfo.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletionInfo.java index 727c9f31e3a7..7f99cf61e53e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletionInfo.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletionInfo.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Deletion Info. */ +/** + * Deletion Info. + */ @Immutable public final class DeletionInfo { /* @@ -34,13 +36,15 @@ public final class DeletionInfo { @JsonProperty(value = "deleteActivityID", access = JsonProperty.Access.WRITE_ONLY) private String deleteActivityId; - /** Creates an instance of DeletionInfo class. */ + /** + * Creates an instance of DeletionInfo class. + */ public DeletionInfo() { } /** * Get the deletionTime property: Specifies time of deletion. - * + * * @return the deletionTime value. */ public String deletionTime() { @@ -49,7 +53,7 @@ public String deletionTime() { /** * Get the billingEndDate property: Specifies billing end date. - * + * * @return the billingEndDate value. */ public String billingEndDate() { @@ -58,7 +62,7 @@ public String billingEndDate() { /** * Get the scheduledPurgeTime property: Specifies purge time. - * + * * @return the scheduledPurgeTime value. */ public String scheduledPurgeTime() { @@ -67,7 +71,7 @@ public String scheduledPurgeTime() { /** * Get the deleteActivityId property: Delete activity ID for troubleshooting purpose. - * + * * @return the deleteActivityId value. */ public String deleteActivityId() { @@ -76,7 +80,7 @@ public String deleteActivityId() { /** * 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/DppBaseResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppBaseResource.java index 699fcd7053da..e179a38b693d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppBaseResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppBaseResource.java @@ -6,18 +6,20 @@ import com.azure.resourcemanager.dataprotection.fluent.models.DppBaseResourceInner; -/** An immutable client-side representation of DppBaseResource. */ +/** + * An immutable client-side representation of DppBaseResource. + */ public interface DppBaseResource { /** * Gets the id property: Resource Id represents the complete path to the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: Resource name associated with the resource. - * + * * @return the name value. */ String name(); @@ -25,14 +27,14 @@ public interface DppBaseResource { /** * Gets the type property: Resource type represents the complete path of the form * Namespace/ResourceType/ResourceType/... - * + * * @return the type value. */ String type(); /** * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.DppBaseResourceInner object. - * + * * @return the inner object. */ DppBaseResourceInner innerModel(); 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 bdede7ddba76..b5cc507d4bdf 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Base for all lists of V2 resources. */ +/** + * Base for all lists of V2 resources. + */ @Fluent public final class DppBaseResourceList { /* @@ -24,13 +26,15 @@ public final class DppBaseResourceList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of DppBaseResourceList class. */ + /** + * Creates an instance of DppBaseResourceList class. + */ public DppBaseResourceList() { } /** * Get the value property: List of Dpp resources. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: List of Dpp resources. - * + * * @param value the value value to set. * @return the DppBaseResourceList object itself. */ @@ -51,7 +55,7 @@ public DppBaseResourceList withValue(List value) { /** * Get the nextLink property: The uri to fetch the next page of resources. Call ListNext() fetches next page of * resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -61,7 +65,7 @@ public String nextLink() { /** * Set the nextLink property: The uri to fetch the next page of resources. Call ListNext() fetches next page of * resources. - * + * * @param nextLink the nextLink value to set. * @return the DppBaseResourceList object itself. */ @@ -72,7 +76,7 @@ public DppBaseResourceList withNextLink(String nextLink) { /** * 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/DppBaseTrackedResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppBaseTrackedResource.java index 1e05d38e3dfb..a55099aca5ee 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppBaseTrackedResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppBaseTrackedResource.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The DppBaseTrackedResource model. */ +/** + * The DppBaseTrackedResource model. + */ @Fluent public class DppBaseTrackedResource extends Resource { /* @@ -25,13 +27,15 @@ public class DppBaseTrackedResource extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of DppBaseTrackedResource class. */ + /** + * Creates an instance of DppBaseTrackedResource class. + */ public DppBaseTrackedResource() { } /** * Get the etag property: Optional ETag. - * + * * @return the etag value. */ public String etag() { @@ -40,7 +44,7 @@ public String etag() { /** * Set the etag property: Optional ETag. - * + * * @param etag the etag value to set. * @return the DppBaseTrackedResource object itself. */ @@ -51,21 +55,25 @@ public DppBaseTrackedResource withEtag(String etag) { /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DppBaseTrackedResource withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DppBaseTrackedResource withTags(Map tags) { super.withTags(tags); @@ -74,7 +82,7 @@ public DppBaseTrackedResource withTags(Map tags) { /** * 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/DppIdentityDetails.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppIdentityDetails.java index bdb24a117afc..f60c1825910d 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 @@ -11,8 +11,8 @@ /** * DppIdentityDetails - * - *

Identity details. + * + * Identity details. */ @Fluent public final class DppIdentityDetails { @@ -42,14 +42,16 @@ public final class DppIdentityDetails { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; - /** Creates an instance of DppIdentityDetails class. */ + /** + * Creates an instance of DppIdentityDetails class. + */ public DppIdentityDetails() { } /** - * Get the principalId property: The object ID of the service principal object for the managed identity that is used - * to grant role-based access to an Azure resource. - * + * Get the principalId property: The object ID of the service principal object for the managed identity that is + * used to grant role-based access to an Azure resource. + * * @return the principalId value. */ public String principalId() { @@ -59,7 +61,7 @@ public String principalId() { /** * Get the tenantId property: A Globally Unique Identifier (GUID) that represents the Azure AD tenant where the * resource is now a member. - * + * * @return the tenantId value. */ public String tenantId() { @@ -69,7 +71,7 @@ public String tenantId() { /** * Get the type property: The identityType which can be either SystemAssigned, UserAssigned, * 'SystemAssigned,UserAssigned' or None. - * + * * @return the type value. */ public String type() { @@ -79,7 +81,7 @@ public String type() { /** * Set the type property: The identityType which can be either SystemAssigned, UserAssigned, * 'SystemAssigned,UserAssigned' or None. - * + * * @param type the type value to set. * @return the DppIdentityDetails object itself. */ @@ -90,7 +92,7 @@ public DppIdentityDetails withType(String type) { /** * Get the userAssignedIdentities property: Gets or sets the user assigned identities. - * + * * @return the userAssignedIdentities value. */ public Map userAssignedIdentities() { @@ -99,7 +101,7 @@ public Map userAssignedIdentities() { /** * Set the userAssignedIdentities property: Gets or sets the user assigned identities. - * + * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the DppIdentityDetails object itself. */ @@ -110,19 +112,16 @@ public DppIdentityDetails withUserAssignedIdentities(Map { - if (e != null) { - e.validate(); - } - }); + userAssignedIdentities().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppProxyResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppProxyResource.java index 90a3807af04d..604ac4e7dff4 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppProxyResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppProxyResource.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The DppProxyResource model. */ +/** + * The DppProxyResource model. + */ @Fluent public class DppProxyResource extends ProxyResource { /* @@ -27,13 +29,15 @@ public class DppProxyResource extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of DppProxyResource class. */ + /** + * Creates an instance of DppProxyResource class. + */ public DppProxyResource() { } /** * Get the tags property: Proxy Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -42,7 +46,7 @@ public Map tags() { /** * Set the tags property: Proxy Resource tags. - * + * * @param tags the tags value to set. * @return the DppProxyResource object itself. */ @@ -53,7 +57,7 @@ public DppProxyResource withTags(Map tags) { /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -62,7 +66,7 @@ public SystemData systemData() { /** * 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/DppResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppResource.java index e6fadd3ad760..a3ae53b63a77 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 @@ -11,8 +11,8 @@ /** * DppResource - * - *

Resource class. + * + * Resource class. */ @Immutable public class DppResource extends ProxyResource { @@ -22,13 +22,15 @@ public class DppResource extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of DppResource class. */ + /** + * Creates an instance of DppResource class. + */ public DppResource() { } /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -37,7 +39,7 @@ public SystemData systemData() { /** * 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/DppResourceGuardProxies.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppResourceGuardProxies.java index 99253ca734c5..f80968c93607 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppResourceGuardProxies.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppResourceGuardProxies.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of DppResourceGuardProxies. */ +/** + * Resource collection API of DppResourceGuardProxies. + */ public interface DppResourceGuardProxies { /** * Returns the list of ResourceGuardProxies associated with the vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,7 +26,7 @@ public interface DppResourceGuardProxies { /** * Returns the list of ResourceGuardProxies associated with the vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -37,7 +39,7 @@ public interface DppResourceGuardProxies { /** * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -46,14 +48,14 @@ public interface DppResourceGuardProxies { * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs - * along with {@link Response}. + * along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context); + Response getWithResponse(String resourceGroupName, String vaultName, + String resourceGuardProxyName, Context context); /** * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -66,7 +68,7 @@ Response getWithResponse( /** * Deletes the ResourceGuardProxy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -76,12 +78,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context); + Response deleteWithResponse(String resourceGroupName, String vaultName, String resourceGuardProxyName, + Context context); /** * Deletes the ResourceGuardProxy. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -93,7 +95,7 @@ Response deleteWithResponse( /** * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -104,16 +106,12 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of Unlock Delete API along with {@link Response}. */ - Response unlockDeleteWithResponse( - String resourceGroupName, - String vaultName, - String resourceGuardProxyName, - UnlockDeleteRequest parameters, - Context context); + Response unlockDeleteWithResponse(String resourceGroupName, String vaultName, + String resourceGuardProxyName, UnlockDeleteRequest parameters, Context context); /** * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param resourceGuardProxyName name of the resource guard proxy. @@ -123,37 +121,37 @@ Response unlockDeleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of Unlock Delete API. */ - UnlockDeleteResponse unlockDelete( - String resourceGroupName, String vaultName, String resourceGuardProxyName, UnlockDeleteRequest parameters); + UnlockDeleteResponse unlockDelete(String resourceGroupName, String vaultName, String resourceGuardProxyName, + UnlockDeleteRequest parameters); /** * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs - * along with {@link Response}. + * along with {@link Response}. */ ResourceGuardProxyBaseResource getById(String id); /** * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs - * along with {@link Response}. + * along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** * Deletes the ResourceGuardProxy. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -163,7 +161,7 @@ UnlockDeleteResponse unlockDelete( /** * Deletes the ResourceGuardProxy. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -175,7 +173,7 @@ UnlockDeleteResponse unlockDelete( /** * Begins definition for a new ResourceGuardProxyBaseResource resource. - * + * * @param name resource name. * @return the first stage of the new ResourceGuardProxyBaseResource definition. */ 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 9e4e097b9ef7..8a313b75437b 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 @@ -9,8 +9,8 @@ /** * List Resource - * - *

ListResource. + * + * ListResource. */ @Fluent public class DppResourceList { @@ -20,14 +20,16 @@ public class DppResourceList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of DppResourceList class. */ + /** + * Creates an instance of DppResourceList class. + */ public DppResourceList() { } /** * Get the nextLink property: The uri to fetch the next page of resources. Call ListNext() fetches next page of * resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -37,7 +39,7 @@ public String nextLink() { /** * Set the nextLink property: The uri to fetch the next page of resources. Call ListNext() fetches next page of * resources. - * + * * @param nextLink the nextLink value to set. * @return the DppResourceList object itself. */ @@ -48,7 +50,7 @@ public DppResourceList withNextLink(String nextLink) { /** * 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/DppTrackedResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppTrackedResource.java index a4598531e26f..dc7dd0a5e049 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 @@ -8,26 +8,30 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The DppTrackedResource model. */ +/** + * The DppTrackedResource model. + */ @Fluent public class DppTrackedResource extends DppBaseTrackedResource { /* * DppIdentityDetails - * + * * Input Managed Identity Details */ @JsonProperty(value = "identity") private DppIdentityDetails identity; - /** Creates an instance of DppTrackedResource class. */ + /** + * Creates an instance of DppTrackedResource class. + */ public DppTrackedResource() { } /** * Get the identity property: DppIdentityDetails - * - *

Input Managed Identity Details. - * + * + * Input Managed Identity Details. + * * @return the identity value. */ public DppIdentityDetails identity() { @@ -36,9 +40,9 @@ public DppIdentityDetails identity() { /** * Set the identity property: DppIdentityDetails - * - *

Input Managed Identity Details. - * + * + * Input Managed Identity Details. + * * @param identity the identity value to set. * @return the DppTrackedResource object itself. */ @@ -47,21 +51,27 @@ public DppTrackedResource withIdentity(DppIdentityDetails identity) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DppTrackedResource withEtag(String etag) { super.withEtag(etag); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DppTrackedResource withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DppTrackedResource withTags(Map tags) { super.withTags(tags); @@ -70,7 +80,7 @@ public DppTrackedResource withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 f75c3fd89915..0e5fdf3a36c9 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The DppTrackedResourceList model. */ +/** + * The DppTrackedResourceList model. + */ @Fluent public class DppTrackedResourceList { /* @@ -16,14 +18,16 @@ public class DppTrackedResourceList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of DppTrackedResourceList class. */ + /** + * Creates an instance of DppTrackedResourceList class. + */ public DppTrackedResourceList() { } /** * Get the nextLink property: The uri to fetch the next page of resources. Call ListNext() fetches next page of * resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -33,7 +37,7 @@ public String nextLink() { /** * Set the nextLink property: The uri to fetch the next page of resources. Call ListNext() fetches next page of * resources. - * + * * @param nextLink the nextLink value to set. * @return the DppTrackedResourceList object itself. */ @@ -44,7 +48,7 @@ public DppTrackedResourceList withNextLink(String nextLink) { /** * 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/DppWorkerRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppWorkerRequest.java index 17b8e3b48768..a664b831009b 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 @@ -10,7 +10,9 @@ import java.util.List; import java.util.Map; -/** The DppWorkerRequest model. */ +/** + * The DppWorkerRequest model. + */ @Fluent public class DppWorkerRequest { /* @@ -57,13 +59,15 @@ public class DppWorkerRequest { @JsonProperty(value = "httpMethod") private String httpMethod; - /** Creates an instance of DppWorkerRequest class. */ + /** + * Creates an instance of DppWorkerRequest class. + */ public DppWorkerRequest() { } /** * Get the subscriptionId property: The subscriptionId property. - * + * * @return the subscriptionId value. */ public String subscriptionId() { @@ -72,7 +76,7 @@ public String subscriptionId() { /** * Set the subscriptionId property: The subscriptionId property. - * + * * @param subscriptionId the subscriptionId value to set. * @return the DppWorkerRequest object itself. */ @@ -83,7 +87,7 @@ public DppWorkerRequest withSubscriptionId(String subscriptionId) { /** * Get the uri property: The uri property. - * + * * @return the uri value. */ public String uri() { @@ -92,7 +96,7 @@ public String uri() { /** * Set the uri property: The uri property. - * + * * @param uri the uri value to set. * @return the DppWorkerRequest object itself. */ @@ -104,7 +108,7 @@ public DppWorkerRequest withUri(String uri) { /** * Get the headers property: Dictionary of * <components·ikn5y4·schemas·dppworkerrequest·properties·headers·additionalproperties>. - * + * * @return the headers value. */ public Map> headers() { @@ -114,7 +118,7 @@ public Map> headers() { /** * Set the headers property: Dictionary of * <components·ikn5y4·schemas·dppworkerrequest·properties·headers·additionalproperties>. - * + * * @param headers the headers value to set. * @return the DppWorkerRequest object itself. */ @@ -125,7 +129,7 @@ public DppWorkerRequest withHeaders(Map> headers) { /** * Get the supportedGroupVersions property: The supportedGroupVersions property. - * + * * @return the supportedGroupVersions value. */ public List supportedGroupVersions() { @@ -134,7 +138,7 @@ public List supportedGroupVersions() { /** * Set the supportedGroupVersions property: The supportedGroupVersions property. - * + * * @param supportedGroupVersions the supportedGroupVersions value to set. * @return the DppWorkerRequest object itself. */ @@ -145,7 +149,7 @@ public DppWorkerRequest withSupportedGroupVersions(List supportedGroupVe /** * Get the cultureInfo property: The cultureInfo property. - * + * * @return the cultureInfo value. */ public String cultureInfo() { @@ -154,7 +158,7 @@ public String cultureInfo() { /** * Set the cultureInfo property: The cultureInfo property. - * + * * @param cultureInfo the cultureInfo value to set. * @return the DppWorkerRequest object itself. */ @@ -165,7 +169,7 @@ public DppWorkerRequest withCultureInfo(String cultureInfo) { /** * Get the parameters property: Dictionary of <string>. - * + * * @return the parameters value. */ public Map parameters() { @@ -174,7 +178,7 @@ public Map parameters() { /** * Set the parameters property: Dictionary of <string>. - * + * * @param parameters the parameters value to set. * @return the DppWorkerRequest object itself. */ @@ -185,7 +189,7 @@ public DppWorkerRequest withParameters(Map parameters) { /** * Get the httpMethod property: The httpMethod property. - * + * * @return the httpMethod value. */ public String httpMethod() { @@ -194,7 +198,7 @@ public String httpMethod() { /** * Set the httpMethod property: The httpMethod property. - * + * * @param httpMethod the httpMethod value to set. * @return the DppWorkerRequest object itself. */ @@ -205,7 +209,7 @@ public DppWorkerRequest withHttpMethod(String httpMethod) { /** * 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/ExistingResourcePolicy.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExistingResourcePolicy.java index 51c2f29d6971..a97c836108ed 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExistingResourcePolicy.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExistingResourcePolicy.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Gets or sets the Conflict Policy property. This property sets policy during conflict of resources during restore. */ +/** + * Gets or sets the Conflict Policy property. This property sets policy during conflict of resources during restore. + */ public final class ExistingResourcePolicy extends ExpandableStringEnum { - /** Static value Skip for ExistingResourcePolicy. */ + /** + * Static value Skip for ExistingResourcePolicy. + */ public static final ExistingResourcePolicy SKIP = fromString("Skip"); - /** Static value Patch for ExistingResourcePolicy. */ + /** + * Static value Patch for ExistingResourcePolicy. + */ public static final ExistingResourcePolicy PATCH = fromString("Patch"); /** * Creates a new instance of ExistingResourcePolicy value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ExistingResourcePolicy() { /** * Creates or finds a ExistingResourcePolicy from its string representation. - * + * * @param name a name to look for. * @return the corresponding ExistingResourcePolicy. */ @@ -38,7 +44,7 @@ public static ExistingResourcePolicy fromString(String name) { /** * Gets known ExistingResourcePolicy values. - * + * * @return known ExistingResourcePolicy values. */ public static Collection values() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobs.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobs.java index af1f23053d47..1c81c7af46b4 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobs.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobs.java @@ -6,11 +6,13 @@ import com.azure.core.util.Context; -/** Resource collection API of ExportJobs. */ +/** + * Resource collection API of ExportJobs. + */ public interface ExportJobs { /** * Triggers export of jobs and returns an OperationID to track. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -21,7 +23,7 @@ public interface ExportJobs { /** * Triggers export of jobs and returns an OperationID to track. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. 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 db3ec8726ea2..f6837ecb4790 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 @@ -7,13 +7,15 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ExportJobsOperationResults. */ +/** + * Resource collection API of ExportJobsOperationResults. + */ public interface ExportJobsOperationResults { /** * Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId OperationID which represents the export job. @@ -23,14 +25,14 @@ public interface ExportJobsOperationResults { * @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 along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String vaultName, String operationId, Context context); + Response getWithResponse(String resourceGroupName, String vaultName, String operationId, + Context context); /** * Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId OperationID which represents the export job. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobsResult.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobsResult.java index 2263f8eb650c..72c8fca39353 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobsResult.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ExportJobsResult.java @@ -6,39 +6,41 @@ import com.azure.resourcemanager.dataprotection.fluent.models.ExportJobsResultInner; -/** An immutable client-side representation of ExportJobsResult. */ +/** + * An immutable client-side representation of ExportJobsResult. + */ public interface ExportJobsResult { /** * Gets the blobUrl property: URL of the blob into which the serialized string of list of jobs is exported. - * + * * @return the blobUrl value. */ String blobUrl(); /** * Gets the blobSasKey property: SAS key to access the blob. - * + * * @return the blobSasKey value. */ String blobSasKey(); /** * Gets the excelFileBlobUrl property: URL of the blob into which the ExcelFile is uploaded. - * + * * @return the excelFileBlobUrl value. */ String excelFileBlobUrl(); /** * Gets the excelFileBlobSasKey property: SAS key to access the ExcelFile blob. - * + * * @return the excelFileBlobSasKey value. */ String excelFileBlobSasKey(); /** * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.ExportJobsResultInner object. - * + * * @return the inner object. */ ExportJobsResultInner innerModel(); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureSettings.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureSettings.java index 529c68eda2d7..52318cbf6663 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureSettings.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureSettings.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Class containing feature settings of vault. */ +/** + * Class containing feature settings of vault. + */ @Fluent public final class FeatureSettings { /* @@ -22,13 +24,15 @@ public final class FeatureSettings { @JsonProperty(value = "crossRegionRestoreSettings") private CrossRegionRestoreSettings crossRegionRestoreSettings; - /** Creates an instance of FeatureSettings class. */ + /** + * Creates an instance of FeatureSettings class. + */ public FeatureSettings() { } /** * Get the crossSubscriptionRestoreSettings property: CrossSubscriptionRestore Settings. - * + * * @return the crossSubscriptionRestoreSettings value. */ public CrossSubscriptionRestoreSettings crossSubscriptionRestoreSettings() { @@ -37,19 +41,19 @@ public CrossSubscriptionRestoreSettings crossSubscriptionRestoreSettings() { /** * Set the crossSubscriptionRestoreSettings property: CrossSubscriptionRestore Settings. - * + * * @param crossSubscriptionRestoreSettings the crossSubscriptionRestoreSettings value to set. * @return the FeatureSettings object itself. */ - public FeatureSettings withCrossSubscriptionRestoreSettings( - CrossSubscriptionRestoreSettings crossSubscriptionRestoreSettings) { + public FeatureSettings + withCrossSubscriptionRestoreSettings(CrossSubscriptionRestoreSettings crossSubscriptionRestoreSettings) { this.crossSubscriptionRestoreSettings = crossSubscriptionRestoreSettings; return this; } /** * Get the crossRegionRestoreSettings property: The crossRegionRestoreSettings property. - * + * * @return the crossRegionRestoreSettings value. */ public CrossRegionRestoreSettings crossRegionRestoreSettings() { @@ -58,7 +62,7 @@ public CrossRegionRestoreSettings crossRegionRestoreSettings() { /** * Set the crossRegionRestoreSettings property: The crossRegionRestoreSettings property. - * + * * @param crossRegionRestoreSettings the crossRegionRestoreSettings value to set. * @return the FeatureSettings object itself. */ @@ -69,7 +73,7 @@ public FeatureSettings withCrossRegionRestoreSettings(CrossRegionRestoreSettings /** * 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/FeatureSupportStatus.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureSupportStatus.java index 3b9a0686995e..9b381692118a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureSupportStatus.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureSupportStatus.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** feature support status. */ +/** + * feature support status. + */ public final class FeatureSupportStatus extends ExpandableStringEnum { - /** Static value Invalid for FeatureSupportStatus. */ + /** + * Static value Invalid for FeatureSupportStatus. + */ public static final FeatureSupportStatus INVALID = fromString("Invalid"); - /** Static value NotSupported for FeatureSupportStatus. */ + /** + * Static value NotSupported for FeatureSupportStatus. + */ public static final FeatureSupportStatus NOT_SUPPORTED = fromString("NotSupported"); - /** Static value AlphaPreview for FeatureSupportStatus. */ + /** + * Static value AlphaPreview for FeatureSupportStatus. + */ public static final FeatureSupportStatus ALPHA_PREVIEW = fromString("AlphaPreview"); - /** Static value PrivatePreview for FeatureSupportStatus. */ + /** + * Static value PrivatePreview for FeatureSupportStatus. + */ public static final FeatureSupportStatus PRIVATE_PREVIEW = fromString("PrivatePreview"); - /** Static value PublicPreview for FeatureSupportStatus. */ + /** + * Static value PublicPreview for FeatureSupportStatus. + */ public static final FeatureSupportStatus PUBLIC_PREVIEW = fromString("PublicPreview"); - /** Static value GenerallyAvailable for FeatureSupportStatus. */ + /** + * Static value GenerallyAvailable for FeatureSupportStatus. + */ public static final FeatureSupportStatus GENERALLY_AVAILABLE = fromString("GenerallyAvailable"); /** * Creates a new instance of FeatureSupportStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public FeatureSupportStatus() { /** * Creates or finds a FeatureSupportStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding FeatureSupportStatus. */ @@ -50,7 +64,7 @@ public static FeatureSupportStatus fromString(String name) { /** * Gets known FeatureSupportStatus values. - * + * * @return known FeatureSupportStatus values. */ public static Collection values() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureType.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureType.java index 1716e5ef7a0c..2fad343e5756 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureType.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** backup support feature type. */ +/** + * backup support feature type. + */ public final class FeatureType extends ExpandableStringEnum { - /** Static value Invalid for FeatureType. */ + /** + * Static value Invalid for FeatureType. + */ public static final FeatureType INVALID = fromString("Invalid"); - /** Static value DataSourceType for FeatureType. */ + /** + * Static value DataSourceType for FeatureType. + */ public static final FeatureType DATA_SOURCE_TYPE = fromString("DataSourceType"); /** * Creates a new instance of FeatureType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public FeatureType() { /** * Creates or finds a FeatureType from its string representation. - * + * * @param name a name to look for. * @return the corresponding FeatureType. */ @@ -38,7 +44,7 @@ public static FeatureType fromString(String name) { /** * Gets known FeatureType values. - * + * * @return known FeatureType values. */ public static Collection values() { 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 15c706271102..dc7e972e15b3 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Base class for feature object. */ +/** + * Base class for feature object. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("FeatureValidationRequest") @Fluent @@ -26,13 +28,15 @@ public final class FeatureValidationRequest extends FeatureValidationRequestBase @JsonProperty(value = "featureName") private String featureName; - /** Creates an instance of FeatureValidationRequest class. */ + /** + * Creates an instance of FeatureValidationRequest class. + */ public FeatureValidationRequest() { } /** * Get the featureType property: backup support feature type. - * + * * @return the featureType value. */ public FeatureType featureType() { @@ -41,7 +45,7 @@ public FeatureType featureType() { /** * Set the featureType property: backup support feature type. - * + * * @param featureType the featureType value to set. * @return the FeatureValidationRequest object itself. */ @@ -52,7 +56,7 @@ public FeatureValidationRequest withFeatureType(FeatureType featureType) { /** * Get the featureName property: backup support feature name. - * + * * @return the featureName value. */ public String featureName() { @@ -61,7 +65,7 @@ public String featureName() { /** * Set the featureName property: backup support feature name. - * + * * @param featureName the featureName value to set. * @return the FeatureValidationRequest object itself. */ @@ -72,7 +76,7 @@ public FeatureValidationRequest withFeatureName(String featureName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 2f83bb3866e4..c204d49d4d6e 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 @@ -9,23 +9,27 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Base class for Backup Feature support. */ +/** + * Base class for Backup Feature support. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType", defaultImpl = FeatureValidationRequestBase.class) @JsonTypeName("FeatureValidationRequestBase") -@JsonSubTypes({@JsonSubTypes.Type(name = "FeatureValidationRequest", value = FeatureValidationRequest.class)}) +@JsonSubTypes({ @JsonSubTypes.Type(name = "FeatureValidationRequest", value = FeatureValidationRequest.class) }) @Immutable public class FeatureValidationRequestBase { - /** Creates an instance of FeatureValidationRequestBase class. */ + /** + * Creates an instance of FeatureValidationRequestBase class. + */ public FeatureValidationRequestBase() { } /** * 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/FeatureValidationResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationResponse.java index 173894919d6b..741088c50f22 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 @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Feature Validation Response. */ +/** + * Feature Validation Response. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("FeatureValidationResponse") @Fluent @@ -28,13 +30,15 @@ public final class FeatureValidationResponse extends FeatureValidationResponseBa @JsonProperty(value = "features") private List features; - /** Creates an instance of FeatureValidationResponse class. */ + /** + * Creates an instance of FeatureValidationResponse class. + */ public FeatureValidationResponse() { } /** * Get the featureType property: backup support feature type. - * + * * @return the featureType value. */ public FeatureType featureType() { @@ -43,7 +47,7 @@ public FeatureType featureType() { /** * Set the featureType property: backup support feature type. - * + * * @param featureType the featureType value to set. * @return the FeatureValidationResponse object itself. */ @@ -54,7 +58,7 @@ public FeatureValidationResponse withFeatureType(FeatureType featureType) { /** * Get the features property: Response features. - * + * * @return the features value. */ public List features() { @@ -63,7 +67,7 @@ public List features() { /** * Set the features property: Response features. - * + * * @param features the features value to set. * @return the FeatureValidationResponse object itself. */ @@ -74,7 +78,7 @@ public FeatureValidationResponse withFeatures(List features) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationResponseBase.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationResponseBase.java index 1d462443c14b..5e0d8d7b8ed8 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationResponseBase.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureValidationResponseBase.java @@ -6,11 +6,13 @@ import com.azure.resourcemanager.dataprotection.fluent.models.FeatureValidationResponseBaseInner; -/** An immutable client-side representation of FeatureValidationResponseBase. */ +/** + * An immutable client-side representation of FeatureValidationResponseBase. + */ public interface FeatureValidationResponseBase { /** * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.FeatureValidationResponseBaseInner object. - * + * * @return the inner object. */ FeatureValidationResponseBaseInner innerModel(); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchCrossRegionRestoreJobs.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchCrossRegionRestoreJobs.java new file mode 100644 index 000000000000..f85f57a35c72 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchCrossRegionRestoreJobs.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of FetchCrossRegionRestoreJobs. + */ +public interface FetchCrossRegionRestoreJobs { + /** + * Fetches the Cross Region Restore Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 azureBackup Job Resource Class along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String location, + CrossRegionRestoreJobRequest parameters, Context context); + + /** + * Fetches the Cross Region Restore Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 azureBackup Job Resource Class. + */ + AzureBackupJobResource get(String resourceGroupName, String location, CrossRegionRestoreJobRequest parameters); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchCrossRegionRestoreJobsOperations.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchCrossRegionRestoreJobsOperations.java new file mode 100644 index 000000000000..2a359fc69cc7 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchCrossRegionRestoreJobsOperations.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.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of FetchCrossRegionRestoreJobsOperations. + */ +public interface FetchCrossRegionRestoreJobsOperations { + /** + * Fetches list of Cross Region Restore job belonging to the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 list of AzureBackup Job resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String location, + CrossRegionRestoreJobsRequest parameters); + + /** + * Fetches list of Cross Region Restore job belonging to the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for operation. + * @param filter OData filter options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String location, + CrossRegionRestoreJobsRequest parameters, String filter, Context context); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchSecondaryRPsRequestParameters.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchSecondaryRPsRequestParameters.java new file mode 100644 index 000000000000..d22d0afe4492 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchSecondaryRPsRequestParameters.java @@ -0,0 +1,82 @@ +// 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; + +/** + * Information about BI whose secondary RecoveryPoints are requested + * Source region and + * BI ARM path. + */ +@Fluent +public final class FetchSecondaryRPsRequestParameters { + /* + * Source region in which BackupInstance is located + */ + @JsonProperty(value = "sourceRegion") + private String sourceRegion; + + /* + * ARM Path of BackupInstance + */ + @JsonProperty(value = "sourceBackupInstanceId") + private String sourceBackupInstanceId; + + /** + * Creates an instance of FetchSecondaryRPsRequestParameters class. + */ + public FetchSecondaryRPsRequestParameters() { + } + + /** + * Get the sourceRegion property: Source region in which BackupInstance is located. + * + * @return the sourceRegion value. + */ + public String sourceRegion() { + return this.sourceRegion; + } + + /** + * Set the sourceRegion property: Source region in which BackupInstance is located. + * + * @param sourceRegion the sourceRegion value to set. + * @return the FetchSecondaryRPsRequestParameters object itself. + */ + public FetchSecondaryRPsRequestParameters withSourceRegion(String sourceRegion) { + this.sourceRegion = sourceRegion; + return this; + } + + /** + * Get the sourceBackupInstanceId property: ARM Path of BackupInstance. + * + * @return the sourceBackupInstanceId value. + */ + public String sourceBackupInstanceId() { + return this.sourceBackupInstanceId; + } + + /** + * Set the sourceBackupInstanceId property: ARM Path of BackupInstance. + * + * @param sourceBackupInstanceId the sourceBackupInstanceId value to set. + * @return the FetchSecondaryRPsRequestParameters object itself. + */ + public FetchSecondaryRPsRequestParameters withSourceBackupInstanceId(String sourceBackupInstanceId) { + this.sourceBackupInstanceId = sourceBackupInstanceId; + 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/FetchSecondaryRecoveryPoints.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchSecondaryRecoveryPoints.java new file mode 100644 index 000000000000..a37eea5895ee --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchSecondaryRecoveryPoints.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.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of FetchSecondaryRecoveryPoints. + */ +public interface FetchSecondaryRecoveryPoints { + /** + * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region + * Restore. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @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 azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String location, + FetchSecondaryRPsRequestParameters parameters); + + /** + * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region + * Restore. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param parameters Request body for operation. + * @param filter OData filter options. + * @param skipToken skipToken Filter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String location, + FetchSecondaryRPsRequestParameters parameters, String filter, String skipToken, Context context); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/IdentityDetails.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/IdentityDetails.java index 2c786f6b6115..2d406bafef35 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/IdentityDetails.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/IdentityDetails.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The IdentityDetails model. */ +/** + * The IdentityDetails model. + */ @Fluent public final class IdentityDetails { /* @@ -22,13 +24,15 @@ public final class IdentityDetails { @JsonProperty(value = "userAssignedIdentityArmUrl") private String userAssignedIdentityArmUrl; - /** Creates an instance of IdentityDetails class. */ + /** + * Creates an instance of IdentityDetails class. + */ public IdentityDetails() { } /** * Get the useSystemAssignedIdentity property: Specifies if the BI is protected by System Identity. - * + * * @return the useSystemAssignedIdentity value. */ public Boolean useSystemAssignedIdentity() { @@ -37,7 +41,7 @@ public Boolean useSystemAssignedIdentity() { /** * Set the useSystemAssignedIdentity property: Specifies if the BI is protected by System Identity. - * + * * @param useSystemAssignedIdentity the useSystemAssignedIdentity value to set. * @return the IdentityDetails object itself. */ @@ -48,7 +52,7 @@ public IdentityDetails withUseSystemAssignedIdentity(Boolean useSystemAssignedId /** * Get the userAssignedIdentityArmUrl property: ARM URL for User Assigned Identity. - * + * * @return the userAssignedIdentityArmUrl value. */ public String userAssignedIdentityArmUrl() { @@ -57,7 +61,7 @@ public String userAssignedIdentityArmUrl() { /** * Set the userAssignedIdentityArmUrl property: ARM URL for User Assigned Identity. - * + * * @param userAssignedIdentityArmUrl the userAssignedIdentityArmUrl value to set. * @return the IdentityDetails object itself. */ @@ -68,7 +72,7 @@ public IdentityDetails withUserAssignedIdentityArmUrl(String userAssignedIdentit /** * 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/ImmediateCopyOption.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ImmediateCopyOption.java index 6a00574ddf04..ce2a1799ef53 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 @@ -10,20 +10,22 @@ /** * ImmediateCopyOption - * - *

Immediate copy Option. + * + * Immediate copy Option. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("ImmediateCopyOption") @Immutable public final class ImmediateCopyOption extends CopyOption { - /** Creates an instance of ImmediateCopyOption class. */ + /** + * Creates an instance of ImmediateCopyOption class. + */ public ImmediateCopyOption() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ImmutabilitySettings.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ImmutabilitySettings.java index f6dcaf1aa7bb..564e9acf9d9b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ImmutabilitySettings.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ImmutabilitySettings.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Immutability Settings at vault level. */ +/** + * Immutability Settings at vault level. + */ @Fluent public final class ImmutabilitySettings { /* @@ -16,13 +18,15 @@ public final class ImmutabilitySettings { @JsonProperty(value = "state") private ImmutabilityState state; - /** Creates an instance of ImmutabilitySettings class. */ + /** + * Creates an instance of ImmutabilitySettings class. + */ public ImmutabilitySettings() { } /** * Get the state property: Immutability state. - * + * * @return the state value. */ public ImmutabilityState state() { @@ -31,7 +35,7 @@ public ImmutabilityState state() { /** * Set the state property: Immutability state. - * + * * @param state the state value to set. * @return the ImmutabilitySettings object itself. */ @@ -42,7 +46,7 @@ public ImmutabilitySettings withState(ImmutabilityState state) { /** * 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/ImmutabilityState.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ImmutabilityState.java index 71c7f449b664..fa1508cd29e0 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ImmutabilityState.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ImmutabilityState.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Immutability state. */ +/** + * Immutability state. + */ public final class ImmutabilityState extends ExpandableStringEnum { - /** Static value Disabled for ImmutabilityState. */ + /** + * Static value Disabled for ImmutabilityState. + */ public static final ImmutabilityState DISABLED = fromString("Disabled"); - /** Static value Unlocked for ImmutabilityState. */ + /** + * Static value Unlocked for ImmutabilityState. + */ public static final ImmutabilityState UNLOCKED = fromString("Unlocked"); - /** Static value Locked for ImmutabilityState. */ + /** + * Static value Locked for ImmutabilityState. + */ public static final ImmutabilityState LOCKED = fromString("Locked"); /** * Creates a new instance of ImmutabilityState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public ImmutabilityState() { /** * Creates or finds a ImmutabilityState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ImmutabilityState. */ @@ -41,7 +49,7 @@ public static ImmutabilityState fromString(String name) { /** * Gets known ImmutabilityState values. - * + * * @return known ImmutabilityState values. */ public static Collection values() { 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 bfbaed0af543..8c1fa52ea231 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 @@ -11,13 +11,13 @@ /** * InnerError - * - *

Inner Error. + * + * Inner Error. */ @Fluent public final class InnerError { /* - * Any Key value pairs that can be provided to the client for additional verbose information. + * Any Key value pairs that can be provided to the client for additional verbose information. */ @JsonProperty(value = "additionalInfo") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) @@ -31,20 +31,22 @@ public final class InnerError { /* * InnerError - * + * * Child Inner Error, to allow Nesting. */ @JsonProperty(value = "embeddedInnerError") private InnerError embeddedInnerError; - /** Creates an instance of InnerError class. */ + /** + * Creates an instance of InnerError class. + */ public InnerError() { } /** * Get the additionalInfo property: Any Key value pairs that can be provided to the client for additional verbose * information. - * + * * @return the additionalInfo value. */ public Map additionalInfo() { @@ -54,7 +56,7 @@ public Map additionalInfo() { /** * Set the additionalInfo property: Any Key value pairs that can be provided to the client for additional verbose * information. - * + * * @param additionalInfo the additionalInfo value to set. * @return the InnerError object itself. */ @@ -65,7 +67,7 @@ public InnerError withAdditionalInfo(Map additionalInfo) { /** * Get the code property: Unique code for this error. - * + * * @return the code value. */ public String code() { @@ -74,7 +76,7 @@ public String code() { /** * Set the code property: Unique code for this error. - * + * * @param code the code value to set. * @return the InnerError object itself. */ @@ -85,9 +87,9 @@ public InnerError withCode(String code) { /** * Get the embeddedInnerError property: InnerError - * - *

Child Inner Error, to allow Nesting. - * + * + * Child Inner Error, to allow Nesting. + * * @return the embeddedInnerError value. */ public InnerError embeddedInnerError() { @@ -96,9 +98,9 @@ public InnerError embeddedInnerError() { /** * Set the embeddedInnerError property: InnerError - * - *

Child Inner Error, to allow Nesting. - * + * + * Child Inner Error, to allow Nesting. + * * @param embeddedInnerError the embeddedInnerError value to set. * @return the InnerError object itself. */ @@ -109,7 +111,7 @@ public InnerError withEmbeddedInnerError(InnerError embeddedInnerError) { /** * 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/ItemLevelRestoreCriteria.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ItemLevelRestoreCriteria.java index 309aa5e25b58..61d11023705a 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Class to contain criteria for item level restore. */ +/** + * Class to contain criteria for item level restore. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -23,17 +25,21 @@ name = "KubernetesStorageClassRestoreCriteria", value = KubernetesStorageClassRestoreCriteria.class), @JsonSubTypes.Type(name = "KubernetesPVRestoreCriteria", value = KubernetesPVRestoreCriteria.class), - @JsonSubTypes.Type(name = "KubernetesClusterRestoreCriteria", value = KubernetesClusterRestoreCriteria.class) -}) + @JsonSubTypes.Type(name = "KubernetesClusterRestoreCriteria", value = KubernetesClusterRestoreCriteria.class), + @JsonSubTypes.Type( + name = "KubernetesClusterVaultTierRestoreCriteria", + value = KubernetesClusterVaultTierRestoreCriteria.class) }) @Immutable public class ItemLevelRestoreCriteria { - /** Creates an instance of ItemLevelRestoreCriteria class. */ + /** + * Creates an instance of ItemLevelRestoreCriteria class. + */ public ItemLevelRestoreCriteria() { } /** * 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/ItemLevelRestoreTargetInfo.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ItemLevelRestoreTargetInfo.java index 5d0c619404eb..41df9a49e2f7 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 @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Restore target info for Item level restore operation. */ +/** + * Restore target info for Item level restore operation. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("ItemLevelRestoreTargetInfo") @Fluent @@ -24,7 +26,7 @@ public final class ItemLevelRestoreTargetInfo extends RestoreTargetInfoBase { /* * Datasource - * + * * Information of target DS */ @JsonProperty(value = "datasourceInfo", required = true) @@ -32,7 +34,7 @@ public final class ItemLevelRestoreTargetInfo extends RestoreTargetInfoBase { /* * DatasourceSet - * + * * Information of target DS Set */ @JsonProperty(value = "datasourceSetInfo") @@ -44,13 +46,15 @@ public final class ItemLevelRestoreTargetInfo extends RestoreTargetInfoBase { @JsonProperty(value = "datasourceAuthCredentials") private AuthCredentials datasourceAuthCredentials; - /** Creates an instance of ItemLevelRestoreTargetInfo class. */ + /** + * Creates an instance of ItemLevelRestoreTargetInfo class. + */ public ItemLevelRestoreTargetInfo() { } /** * Get the restoreCriteria property: Restore Criteria. - * + * * @return the restoreCriteria value. */ public List restoreCriteria() { @@ -59,7 +63,7 @@ public List restoreCriteria() { /** * Set the restoreCriteria property: Restore Criteria. - * + * * @param restoreCriteria the restoreCriteria value to set. * @return the ItemLevelRestoreTargetInfo object itself. */ @@ -70,9 +74,9 @@ public ItemLevelRestoreTargetInfo withRestoreCriteria(ListInformation of target DS. - * + * + * Information of target DS. + * * @return the datasourceInfo value. */ public Datasource datasourceInfo() { @@ -81,9 +85,9 @@ public Datasource datasourceInfo() { /** * Set the datasourceInfo property: Datasource - * - *

Information of target DS. - * + * + * Information of target DS. + * * @param datasourceInfo the datasourceInfo value to set. * @return the ItemLevelRestoreTargetInfo object itself. */ @@ -94,9 +98,9 @@ public ItemLevelRestoreTargetInfo withDatasourceInfo(Datasource datasourceInfo) /** * Get the datasourceSetInfo property: DatasourceSet - * - *

Information of target DS Set. - * + * + * Information of target DS Set. + * * @return the datasourceSetInfo value. */ public DatasourceSet datasourceSetInfo() { @@ -105,9 +109,9 @@ public DatasourceSet datasourceSetInfo() { /** * Set the datasourceSetInfo property: DatasourceSet - * - *

Information of target DS Set. - * + * + * Information of target DS Set. + * * @param datasourceSetInfo the datasourceSetInfo value to set. * @return the ItemLevelRestoreTargetInfo object itself. */ @@ -118,7 +122,7 @@ public ItemLevelRestoreTargetInfo withDatasourceSetInfo(DatasourceSet datasource /** * Get the datasourceAuthCredentials property: Credentials to use to authenticate with data source provider. - * + * * @return the datasourceAuthCredentials value. */ public AuthCredentials datasourceAuthCredentials() { @@ -127,7 +131,7 @@ public AuthCredentials datasourceAuthCredentials() { /** * Set the datasourceAuthCredentials property: Credentials to use to authenticate with data source provider. - * + * * @param datasourceAuthCredentials the datasourceAuthCredentials value to set. * @return the ItemLevelRestoreTargetInfo object itself. */ @@ -136,14 +140,18 @@ public ItemLevelRestoreTargetInfo withDatasourceAuthCredentials(AuthCredentials return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ItemLevelRestoreTargetInfo withRecoveryOption(RecoveryOption recoveryOption) { super.withRecoveryOption(recoveryOption); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ItemLevelRestoreTargetInfo withRestoreLocation(String restoreLocation) { super.withRestoreLocation(restoreLocation); @@ -152,25 +160,21 @@ public ItemLevelRestoreTargetInfo withRestoreLocation(String restoreLocation) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (restoreCriteria() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property restoreCriteria in model ItemLevelRestoreTargetInfo")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property restoreCriteria in model ItemLevelRestoreTargetInfo")); } else { restoreCriteria().forEach(e -> e.validate()); } if (datasourceInfo() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property datasourceInfo in model ItemLevelRestoreTargetInfo")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property datasourceInfo in model ItemLevelRestoreTargetInfo")); } else { datasourceInfo().validate(); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ItemPathBasedRestoreCriteria.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ItemPathBasedRestoreCriteria.java index 71c1139f7d2d..4b86e7e045d0 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ItemPathBasedRestoreCriteria.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ItemPathBasedRestoreCriteria.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Prefix criteria to be used to during restore. */ +/** + * Prefix criteria to be used to during restore. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("ItemPathBasedRestoreCriteria") @Fluent @@ -36,14 +38,16 @@ public final class ItemPathBasedRestoreCriteria extends ItemLevelRestoreCriteria @JsonProperty(value = "subItemPathPrefix") private List subItemPathPrefix; - /** Creates an instance of ItemPathBasedRestoreCriteria class. */ + /** + * Creates an instance of ItemPathBasedRestoreCriteria class. + */ public ItemPathBasedRestoreCriteria() { } /** - * Get the itemPath property: The path of the item to be restored. It could be the full path of the item or the path - * relative to the backup item. - * + * Get the itemPath property: The path of the item to be restored. It could be the full path of the item or the + * path relative to the backup item. + * * @return the itemPath value. */ public String itemPath() { @@ -51,9 +55,9 @@ public String itemPath() { } /** - * Set the itemPath property: The path of the item to be restored. It could be the full path of the item or the path - * relative to the backup item. - * + * Set the itemPath property: The path of the item to be restored. It could be the full path of the item or the + * path relative to the backup item. + * * @param itemPath the itemPath value to set. * @return the ItemPathBasedRestoreCriteria object itself. */ @@ -63,8 +67,9 @@ public ItemPathBasedRestoreCriteria withItemPath(String itemPath) { } /** - * Get the isPathRelativeToBackupItem property: Flag to specify if the path is relative to backup item or full path. - * + * Get the isPathRelativeToBackupItem property: Flag to specify if the path is relative to backup item or full + * path. + * * @return the isPathRelativeToBackupItem value. */ public boolean isPathRelativeToBackupItem() { @@ -72,8 +77,9 @@ public boolean isPathRelativeToBackupItem() { } /** - * Set the isPathRelativeToBackupItem property: Flag to specify if the path is relative to backup item or full path. - * + * Set the isPathRelativeToBackupItem property: Flag to specify if the path is relative to backup item or full + * path. + * * @param isPathRelativeToBackupItem the isPathRelativeToBackupItem value to set. * @return the ItemPathBasedRestoreCriteria object itself. */ @@ -85,7 +91,7 @@ public ItemPathBasedRestoreCriteria withIsPathRelativeToBackupItem(boolean isPat /** * Get the subItemPathPrefix property: The list of prefix strings to be used as filter criteria during restore. * These are relative to the item path specified. - * + * * @return the subItemPathPrefix value. */ public List subItemPathPrefix() { @@ -95,7 +101,7 @@ public List subItemPathPrefix() { /** * Set the subItemPathPrefix property: The list of prefix strings to be used as filter criteria during restore. * These are relative to the item path specified. - * + * * @param subItemPathPrefix the subItemPathPrefix value to set. * @return the ItemPathBasedRestoreCriteria object itself. */ @@ -106,17 +112,15 @@ public ItemPathBasedRestoreCriteria withSubItemPathPrefix(List subItemPa /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (itemPath() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property itemPath in model ItemPathBasedRestoreCriteria")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property itemPath in model ItemPathBasedRestoreCriteria")); } } 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 e9b4659723c0..46a39b1685b3 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 @@ -10,7 +10,9 @@ import java.util.List; import java.util.Map; -/** Extended Information about the job. */ +/** + * Extended Information about the job. + */ @Fluent public final class JobExtendedInfo { /* @@ -56,13 +58,21 @@ public final class JobExtendedInfo { @JsonProperty(value = "targetRecoverPoint", access = JsonProperty.Access.WRITE_ONLY) private RestoreJobRecoveryPointDetails targetRecoverPoint; - /** Creates an instance of JobExtendedInfo class. */ + /* + * A List, detailing the warnings related to the job + */ + @JsonProperty(value = "warningDetails", access = JsonProperty.Access.WRITE_ONLY) + private List warningDetails; + + /** + * Creates an instance of JobExtendedInfo class. + */ public JobExtendedInfo() { } /** * Get the additionalDetails property: Job's Additional Details. - * + * * @return the additionalDetails value. */ public Map additionalDetails() { @@ -71,7 +81,7 @@ public Map additionalDetails() { /** * Set the additionalDetails property: Job's Additional Details. - * + * * @param additionalDetails the additionalDetails value to set. * @return the JobExtendedInfo object itself. */ @@ -82,7 +92,7 @@ public JobExtendedInfo withAdditionalDetails(Map additionalDetai /** * Get the backupInstanceState property: State of the Backup Instance. - * + * * @return the backupInstanceState value. */ public String backupInstanceState() { @@ -91,7 +101,7 @@ public String backupInstanceState() { /** * Get the dataTransferredInBytes property: Number of bytes transferred. - * + * * @return the dataTransferredInBytes value. */ public Double dataTransferredInBytes() { @@ -100,7 +110,7 @@ public Double dataTransferredInBytes() { /** * Get the recoveryDestination property: Destination where restore is done. - * + * * @return the recoveryDestination value. */ public String recoveryDestination() { @@ -109,7 +119,7 @@ public String recoveryDestination() { /** * Get the sourceRecoverPoint property: Details of the Source Recovery Point. - * + * * @return the sourceRecoverPoint value. */ public RestoreJobRecoveryPointDetails sourceRecoverPoint() { @@ -118,7 +128,7 @@ public RestoreJobRecoveryPointDetails sourceRecoverPoint() { /** * Get the subTasks property: List of Sub Tasks of the job. - * + * * @return the subTasks value. */ public List subTasks() { @@ -127,16 +137,25 @@ public List subTasks() { /** * Get the targetRecoverPoint property: Details of the Target Recovery Point. - * + * * @return the targetRecoverPoint value. */ public RestoreJobRecoveryPointDetails targetRecoverPoint() { return this.targetRecoverPoint; } + /** + * Get the warningDetails property: A List, detailing the warnings related to the job. + * + * @return the warningDetails value. + */ + public List warningDetails() { + return this.warningDetails; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -149,5 +168,8 @@ public void validate() { if (targetRecoverPoint() != null) { targetRecoverPoint().validate(); } + if (warningDetails() != null) { + warningDetails().forEach(e -> e.validate()); + } } } 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 6a8128edd244..bcb8c3d1ec87 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 @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Details of Job's Sub Task. */ +/** + * Details of Job's Sub Task. + */ @Fluent public final class JobSubTask { /* @@ -44,13 +46,15 @@ public final class JobSubTask { @JsonProperty(value = "taskStatus", required = true) private String taskStatus; - /** Creates an instance of JobSubTask class. */ + /** + * Creates an instance of JobSubTask class. + */ public JobSubTask() { } /** * Get the additionalDetails property: Additional details of Sub Tasks. - * + * * @return the additionalDetails value. */ public Map additionalDetails() { @@ -59,7 +63,7 @@ public Map additionalDetails() { /** * Set the additionalDetails property: Additional details of Sub Tasks. - * + * * @param additionalDetails the additionalDetails value to set. * @return the JobSubTask object itself. */ @@ -70,7 +74,7 @@ public JobSubTask withAdditionalDetails(Map additionalDetails) { /** * Get the taskId property: Task Id of the Sub Task. - * + * * @return the taskId value. */ public int taskId() { @@ -79,7 +83,7 @@ public int taskId() { /** * Set the taskId property: Task Id of the Sub Task. - * + * * @param taskId the taskId value to set. * @return the JobSubTask object itself. */ @@ -90,7 +94,7 @@ public JobSubTask withTaskId(int taskId) { /** * Get the taskName property: Name of the Sub Task. - * + * * @return the taskName value. */ public String taskName() { @@ -99,7 +103,7 @@ public String taskName() { /** * Set the taskName property: Name of the Sub Task. - * + * * @param taskName the taskName value to set. * @return the JobSubTask object itself. */ @@ -110,7 +114,7 @@ public JobSubTask withTaskName(String taskName) { /** * Get the taskProgress property: Progress of the Sub Task. - * + * * @return the taskProgress value. */ public String taskProgress() { @@ -119,7 +123,7 @@ public String taskProgress() { /** * Get the taskStatus property: Status of the Sub Task. - * + * * @return the taskStatus value. */ public String taskStatus() { @@ -128,7 +132,7 @@ public String taskStatus() { /** * Set the taskStatus property: Status of the Sub Task. - * + * * @param taskStatus the taskStatus value to set. * @return the JobSubTask object itself. */ @@ -139,19 +143,17 @@ public JobSubTask withTaskStatus(String taskStatus) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (taskName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property taskName in model JobSubTask")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property taskName in model JobSubTask")); } if (taskStatus() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property taskStatus in model JobSubTask")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property taskStatus in model JobSubTask")); } } 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 0e5de723efe8..160b05ccb9ac 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Jobs. */ +/** + * Resource collection API of Jobs. + */ public interface Jobs { /** * Returns list of jobs belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,7 +26,7 @@ public interface Jobs { /** * Returns list of jobs belonging to a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param context The context to associate with this operation. @@ -37,7 +39,7 @@ public interface Jobs { /** * Gets a job with id in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param jobId The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). @@ -47,12 +49,12 @@ public interface Jobs { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a job with id in a backup vault along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String vaultName, String jobId, Context context); + Response getWithResponse(String resourceGroupName, String vaultName, String jobId, + Context context); /** * Gets a job with id in a backup vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param jobId The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterBackupDatasourceParameters.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterBackupDatasourceParameters.java index 22fcff7f1bf7..4867e38f8b2d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterBackupDatasourceParameters.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterBackupDatasourceParameters.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Parameters for Kubernetes Cluster Backup Datasource. */ +/** + * Parameters for Kubernetes Cluster Backup Datasource. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("KubernetesClusterBackupDatasourceParameters") @Fluent @@ -67,14 +69,16 @@ public final class KubernetesClusterBackupDatasourceParameters extends BackupDat @JsonProperty(value = "backupHookReferences") private List backupHookReferences; - /** Creates an instance of KubernetesClusterBackupDatasourceParameters class. */ + /** + * Creates an instance of KubernetesClusterBackupDatasourceParameters class. + */ public KubernetesClusterBackupDatasourceParameters() { } /** * Get the snapshotVolumes property: Gets or sets the volume snapshot property. This property if enabled will take * volume snapshots during backup. - * + * * @return the snapshotVolumes value. */ public boolean snapshotVolumes() { @@ -84,7 +88,7 @@ public boolean snapshotVolumes() { /** * Set the snapshotVolumes property: Gets or sets the volume snapshot property. This property if enabled will take * volume snapshots during backup. - * + * * @param snapshotVolumes the snapshotVolumes value to set. * @return the KubernetesClusterBackupDatasourceParameters object itself. */ @@ -94,9 +98,9 @@ public KubernetesClusterBackupDatasourceParameters withSnapshotVolumes(boolean s } /** - * Get the includeClusterScopeResources property: Gets or sets the include cluster resources property. This property - * if enabled will include cluster scope resources during backup. - * + * Get the includeClusterScopeResources property: Gets or sets the include cluster resources property. This + * property if enabled will include cluster scope resources during backup. + * * @return the includeClusterScopeResources value. */ public boolean includeClusterScopeResources() { @@ -104,14 +108,14 @@ public boolean includeClusterScopeResources() { } /** - * Set the includeClusterScopeResources property: Gets or sets the include cluster resources property. This property - * if enabled will include cluster scope resources during backup. - * + * Set the includeClusterScopeResources property: Gets or sets the include cluster resources property. This + * property if enabled will include cluster scope resources during backup. + * * @param includeClusterScopeResources the includeClusterScopeResources value to set. * @return the KubernetesClusterBackupDatasourceParameters object itself. */ - public KubernetesClusterBackupDatasourceParameters withIncludeClusterScopeResources( - boolean includeClusterScopeResources) { + public KubernetesClusterBackupDatasourceParameters + withIncludeClusterScopeResources(boolean includeClusterScopeResources) { this.includeClusterScopeResources = includeClusterScopeResources; return this; } @@ -119,7 +123,7 @@ public KubernetesClusterBackupDatasourceParameters withIncludeClusterScopeResour /** * Get the includedNamespaces property: Gets or sets the include namespaces property. This property sets the * namespaces to be included during backup. - * + * * @return the includedNamespaces value. */ public List includedNamespaces() { @@ -129,7 +133,7 @@ public List includedNamespaces() { /** * Set the includedNamespaces property: Gets or sets the include namespaces property. This property sets the * namespaces to be included during backup. - * + * * @param includedNamespaces the includedNamespaces value to set. * @return the KubernetesClusterBackupDatasourceParameters object itself. */ @@ -141,7 +145,7 @@ public KubernetesClusterBackupDatasourceParameters withIncludedNamespaces(List excludedNamespaces() { @@ -151,7 +155,7 @@ public List excludedNamespaces() { /** * Set the excludedNamespaces property: Gets or sets the exclude namespaces property. This property sets the * namespaces to be excluded during backup. - * + * * @param excludedNamespaces the excludedNamespaces value to set. * @return the KubernetesClusterBackupDatasourceParameters object itself. */ @@ -163,7 +167,7 @@ public KubernetesClusterBackupDatasourceParameters withExcludedNamespaces(List includedResourceTypes() { @@ -173,7 +177,7 @@ public List includedResourceTypes() { /** * Set the includedResourceTypes property: Gets or sets the include resource types property. This property sets the * resource types to be included during backup. - * + * * @param includedResourceTypes the includedResourceTypes value to set. * @return the KubernetesClusterBackupDatasourceParameters object itself. */ @@ -185,7 +189,7 @@ public KubernetesClusterBackupDatasourceParameters withIncludedResourceTypes(Lis /** * Get the excludedResourceTypes property: Gets or sets the exclude resource types property. This property sets the * resource types to be excluded during backup. - * + * * @return the excludedResourceTypes value. */ public List excludedResourceTypes() { @@ -195,7 +199,7 @@ public List excludedResourceTypes() { /** * Set the excludedResourceTypes property: Gets or sets the exclude resource types property. This property sets the * resource types to be excluded during backup. - * + * * @param excludedResourceTypes the excludedResourceTypes value to set. * @return the KubernetesClusterBackupDatasourceParameters object itself. */ @@ -207,7 +211,7 @@ public KubernetesClusterBackupDatasourceParameters withExcludedResourceTypes(Lis /** * Get the labelSelectors property: Gets or sets the LabelSelectors property. This property sets the resource with * such label selectors to be included during backup. - * + * * @return the labelSelectors value. */ public List labelSelectors() { @@ -217,7 +221,7 @@ public List labelSelectors() { /** * Set the labelSelectors property: Gets or sets the LabelSelectors property. This property sets the resource with * such label selectors to be included during backup. - * + * * @param labelSelectors the labelSelectors value to set. * @return the KubernetesClusterBackupDatasourceParameters object itself. */ @@ -229,7 +233,7 @@ public KubernetesClusterBackupDatasourceParameters withLabelSelectors(List backupHookReferences() { @@ -239,19 +243,19 @@ public List backupHookReferences() { /** * Set the backupHookReferences property: Gets or sets the backup hook references. This property sets the hook * reference to be executed during backup. - * + * * @param backupHookReferences the backupHookReferences value to set. * @return the KubernetesClusterBackupDatasourceParameters object itself. */ - public KubernetesClusterBackupDatasourceParameters withBackupHookReferences( - List backupHookReferences) { + public KubernetesClusterBackupDatasourceParameters + withBackupHookReferences(List backupHookReferences) { this.backupHookReferences = backupHookReferences; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterRestoreCriteria.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterRestoreCriteria.java index 691a4ca2a693..0224fdc4e7a9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterRestoreCriteria.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterRestoreCriteria.java @@ -12,7 +12,9 @@ import java.util.List; import java.util.Map; -/** kubernetes Cluster Backup target info for restore operation. */ +/** + * kubernetes Cluster Backup target info for restore operation. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("KubernetesClusterRestoreCriteria") @Fluent @@ -84,14 +86,16 @@ public final class KubernetesClusterRestoreCriteria extends ItemLevelRestoreCrit @JsonProperty(value = "restoreHookReferences") private List restoreHookReferences; - /** Creates an instance of KubernetesClusterRestoreCriteria class. */ + /** + * Creates an instance of KubernetesClusterRestoreCriteria class. + */ public KubernetesClusterRestoreCriteria() { } /** - * Get the includeClusterScopeResources property: Gets or sets the include cluster resources property. This property - * if enabled will include cluster scope resources during restore. - * + * Get the includeClusterScopeResources property: Gets or sets the include cluster resources property. This + * property if enabled will include cluster scope resources during restore. + * * @return the includeClusterScopeResources value. */ public boolean includeClusterScopeResources() { @@ -99,9 +103,9 @@ public boolean includeClusterScopeResources() { } /** - * Set the includeClusterScopeResources property: Gets or sets the include cluster resources property. This property - * if enabled will include cluster scope resources during restore. - * + * Set the includeClusterScopeResources property: Gets or sets the include cluster resources property. This + * property if enabled will include cluster scope resources during restore. + * * @param includeClusterScopeResources the includeClusterScopeResources value to set. * @return the KubernetesClusterRestoreCriteria object itself. */ @@ -113,7 +117,7 @@ public KubernetesClusterRestoreCriteria withIncludeClusterScopeResources(boolean /** * Get the includedNamespaces property: Gets or sets the include namespaces property. This property sets the * namespaces to be included during restore. - * + * * @return the includedNamespaces value. */ public List includedNamespaces() { @@ -123,7 +127,7 @@ public List includedNamespaces() { /** * Set the includedNamespaces property: Gets or sets the include namespaces property. This property sets the * namespaces to be included during restore. - * + * * @param includedNamespaces the includedNamespaces value to set. * @return the KubernetesClusterRestoreCriteria object itself. */ @@ -135,7 +139,7 @@ public KubernetesClusterRestoreCriteria withIncludedNamespaces(List incl /** * Get the excludedNamespaces property: Gets or sets the exclude namespaces property. This property sets the * namespaces to be excluded during restore. - * + * * @return the excludedNamespaces value. */ public List excludedNamespaces() { @@ -145,7 +149,7 @@ public List excludedNamespaces() { /** * Set the excludedNamespaces property: Gets or sets the exclude namespaces property. This property sets the * namespaces to be excluded during restore. - * + * * @param excludedNamespaces the excludedNamespaces value to set. * @return the KubernetesClusterRestoreCriteria object itself. */ @@ -157,7 +161,7 @@ public KubernetesClusterRestoreCriteria withExcludedNamespaces(List excl /** * Get the includedResourceTypes property: Gets or sets the include resource types property. This property sets the * resource types to be included during restore. - * + * * @return the includedResourceTypes value. */ public List includedResourceTypes() { @@ -167,7 +171,7 @@ public List includedResourceTypes() { /** * Set the includedResourceTypes property: Gets or sets the include resource types property. This property sets the * resource types to be included during restore. - * + * * @param includedResourceTypes the includedResourceTypes value to set. * @return the KubernetesClusterRestoreCriteria object itself. */ @@ -179,7 +183,7 @@ public KubernetesClusterRestoreCriteria withIncludedResourceTypes(List i /** * Get the excludedResourceTypes property: Gets or sets the exclude resource types property. This property sets the * resource types to be excluded during restore. - * + * * @return the excludedResourceTypes value. */ public List excludedResourceTypes() { @@ -189,7 +193,7 @@ public List excludedResourceTypes() { /** * Set the excludedResourceTypes property: Gets or sets the exclude resource types property. This property sets the * resource types to be excluded during restore. - * + * * @param excludedResourceTypes the excludedResourceTypes value to set. * @return the KubernetesClusterRestoreCriteria object itself. */ @@ -201,7 +205,7 @@ public KubernetesClusterRestoreCriteria withExcludedResourceTypes(List e /** * Get the labelSelectors property: Gets or sets the LabelSelectors property. This property sets the resource with * such label selectors to be included during restore. - * + * * @return the labelSelectors value. */ public List labelSelectors() { @@ -211,7 +215,7 @@ public List labelSelectors() { /** * Set the labelSelectors property: Gets or sets the LabelSelectors property. This property sets the resource with * such label selectors to be included during restore. - * + * * @param labelSelectors the labelSelectors value to set. * @return the KubernetesClusterRestoreCriteria object itself. */ @@ -221,9 +225,9 @@ public KubernetesClusterRestoreCriteria withLabelSelectors(List labelSel } /** - * Get the persistentVolumeRestoreMode property: Gets or sets the PV (Persistent Volume) Restore Mode property. This - * property sets whether volumes needs to be restored. - * + * Get the persistentVolumeRestoreMode property: Gets or sets the PV (Persistent Volume) Restore Mode property. + * This property sets whether volumes needs to be restored. + * * @return the persistentVolumeRestoreMode value. */ public PersistentVolumeRestoreMode persistentVolumeRestoreMode() { @@ -231,14 +235,14 @@ public PersistentVolumeRestoreMode persistentVolumeRestoreMode() { } /** - * Set the persistentVolumeRestoreMode property: Gets or sets the PV (Persistent Volume) Restore Mode property. This - * property sets whether volumes needs to be restored. - * + * Set the persistentVolumeRestoreMode property: Gets or sets the PV (Persistent Volume) Restore Mode property. + * This property sets whether volumes needs to be restored. + * * @param persistentVolumeRestoreMode the persistentVolumeRestoreMode value to set. * @return the KubernetesClusterRestoreCriteria object itself. */ - public KubernetesClusterRestoreCriteria withPersistentVolumeRestoreMode( - PersistentVolumeRestoreMode persistentVolumeRestoreMode) { + public KubernetesClusterRestoreCriteria + withPersistentVolumeRestoreMode(PersistentVolumeRestoreMode persistentVolumeRestoreMode) { this.persistentVolumeRestoreMode = persistentVolumeRestoreMode; return this; } @@ -246,7 +250,7 @@ public KubernetesClusterRestoreCriteria withPersistentVolumeRestoreMode( /** * Get the conflictPolicy property: Gets or sets the Conflict Policy property. This property sets policy during * conflict of resources during restore. - * + * * @return the conflictPolicy value. */ public ExistingResourcePolicy conflictPolicy() { @@ -256,7 +260,7 @@ public ExistingResourcePolicy conflictPolicy() { /** * Set the conflictPolicy property: Gets or sets the Conflict Policy property. This property sets policy during * conflict of resources during restore. - * + * * @param conflictPolicy the conflictPolicy value to set. * @return the KubernetesClusterRestoreCriteria object itself. */ @@ -266,9 +270,9 @@ public KubernetesClusterRestoreCriteria withConflictPolicy(ExistingResourcePolic } /** - * Get the namespaceMappings property: Gets or sets the Namespace Mappings property. This property sets if namespace - * needs to be change during restore. - * + * Get the namespaceMappings property: Gets or sets the Namespace Mappings property. This property sets if + * namespace needs to be change during restore. + * * @return the namespaceMappings value. */ public Map namespaceMappings() { @@ -276,9 +280,9 @@ public Map namespaceMappings() { } /** - * Set the namespaceMappings property: Gets or sets the Namespace Mappings property. This property sets if namespace - * needs to be change during restore. - * + * Set the namespaceMappings property: Gets or sets the Namespace Mappings property. This property sets if + * namespace needs to be change during restore. + * * @param namespaceMappings the namespaceMappings value to set. * @return the KubernetesClusterRestoreCriteria object itself. */ @@ -290,7 +294,7 @@ public KubernetesClusterRestoreCriteria withNamespaceMappings(Map restoreHookReferences() { @@ -300,19 +304,19 @@ public List restoreHookReferences() { /** * Set the restoreHookReferences property: Gets or sets the restore hook references. This property sets the hook * reference to be executed during restore. - * + * * @param restoreHookReferences the restoreHookReferences value to set. * @return the KubernetesClusterRestoreCriteria object itself. */ - public KubernetesClusterRestoreCriteria withRestoreHookReferences( - List restoreHookReferences) { + public KubernetesClusterRestoreCriteria + withRestoreHookReferences(List restoreHookReferences) { this.restoreHookReferences = restoreHookReferences; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterVaultTierRestoreCriteria.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterVaultTierRestoreCriteria.java new file mode 100644 index 000000000000..7bc3caf0f6f7 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterVaultTierRestoreCriteria.java @@ -0,0 +1,391 @@ +// 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.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; +import java.util.Map; + +/** + * kubernetes Cluster Backup target info for restore operation from vault. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") +@JsonTypeName("KubernetesClusterVaultTierRestoreCriteria") +@Fluent +public final class KubernetesClusterVaultTierRestoreCriteria extends ItemLevelRestoreCriteria { + /* + * Gets or sets the include cluster resources property. This property if enabled will include cluster scope + * resources during restore from vault. + */ + @JsonProperty(value = "includeClusterScopeResources", required = true) + private boolean includeClusterScopeResources; + + /* + * Gets or sets the include namespaces property. This property sets the namespaces to be included during restore + * from vault. + */ + @JsonProperty(value = "includedNamespaces") + private List includedNamespaces; + + /* + * Gets or sets the exclude namespaces property. This property sets the namespaces to be excluded during restore + * from vault. + */ + @JsonProperty(value = "excludedNamespaces") + private List excludedNamespaces; + + /* + * Gets or sets the include resource types property. This property sets the resource types to be included during + * restore from vault. + */ + @JsonProperty(value = "includedResourceTypes") + private List includedResourceTypes; + + /* + * Gets or sets the exclude resource types property. This property sets the resource types to be excluded during + * restore from vault. + */ + @JsonProperty(value = "excludedResourceTypes") + private List excludedResourceTypes; + + /* + * Gets or sets the LabelSelectors property. This property sets the resource with such label selectors to be + * included during restore from vault. + */ + @JsonProperty(value = "labelSelectors") + private List labelSelectors; + + /* + * Gets or sets the PV (Persistent Volume) Restore Mode property. This property sets whether volumes needs to be + * restored from vault. + */ + @JsonProperty(value = "persistentVolumeRestoreMode") + private PersistentVolumeRestoreMode persistentVolumeRestoreMode; + + /* + * Gets or sets the Conflict Policy property. This property sets policy during conflict of resources during restore + * from vault. + */ + @JsonProperty(value = "conflictPolicy") + private ExistingResourcePolicy conflictPolicy; + + /* + * Gets or sets the Namespace Mappings property. This property sets if namespace needs to be change during restore + * from vault. + */ + @JsonProperty(value = "namespaceMappings") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map namespaceMappings; + + /* + * Gets or sets the restore hook references. This property sets the hook reference to be executed during restore + * from vault. + */ + @JsonProperty(value = "restoreHookReferences") + private List restoreHookReferences; + + /* + * Gets or sets the staging RG Id for creating staging disks and snapshots during restore from vault. + */ + @JsonProperty(value = "stagingResourceGroupId") + private String stagingResourceGroupId; + + /* + * Gets or sets the staging Storage Account Id for creating backup extension object store data during restore from + * vault. + */ + @JsonProperty(value = "stagingStorageAccountId") + private String stagingStorageAccountId; + + /** + * Creates an instance of KubernetesClusterVaultTierRestoreCriteria class. + */ + public KubernetesClusterVaultTierRestoreCriteria() { + } + + /** + * Get the includeClusterScopeResources property: Gets or sets the include cluster resources property. This + * property if enabled will include cluster scope resources during restore from vault. + * + * @return the includeClusterScopeResources value. + */ + public boolean includeClusterScopeResources() { + return this.includeClusterScopeResources; + } + + /** + * Set the includeClusterScopeResources property: Gets or sets the include cluster resources property. This + * property if enabled will include cluster scope resources during restore from vault. + * + * @param includeClusterScopeResources the includeClusterScopeResources value to set. + * @return the KubernetesClusterVaultTierRestoreCriteria object itself. + */ + public KubernetesClusterVaultTierRestoreCriteria + withIncludeClusterScopeResources(boolean includeClusterScopeResources) { + this.includeClusterScopeResources = includeClusterScopeResources; + return this; + } + + /** + * Get the includedNamespaces property: Gets or sets the include namespaces property. This property sets the + * namespaces to be included during restore from vault. + * + * @return the includedNamespaces value. + */ + public List includedNamespaces() { + return this.includedNamespaces; + } + + /** + * Set the includedNamespaces property: Gets or sets the include namespaces property. This property sets the + * namespaces to be included during restore from vault. + * + * @param includedNamespaces the includedNamespaces value to set. + * @return the KubernetesClusterVaultTierRestoreCriteria object itself. + */ + public KubernetesClusterVaultTierRestoreCriteria withIncludedNamespaces(List includedNamespaces) { + this.includedNamespaces = includedNamespaces; + return this; + } + + /** + * Get the excludedNamespaces property: Gets or sets the exclude namespaces property. This property sets the + * namespaces to be excluded during restore from vault. + * + * @return the excludedNamespaces value. + */ + public List excludedNamespaces() { + return this.excludedNamespaces; + } + + /** + * Set the excludedNamespaces property: Gets or sets the exclude namespaces property. This property sets the + * namespaces to be excluded during restore from vault. + * + * @param excludedNamespaces the excludedNamespaces value to set. + * @return the KubernetesClusterVaultTierRestoreCriteria object itself. + */ + public KubernetesClusterVaultTierRestoreCriteria withExcludedNamespaces(List excludedNamespaces) { + this.excludedNamespaces = excludedNamespaces; + return this; + } + + /** + * Get the includedResourceTypes property: Gets or sets the include resource types property. This property sets the + * resource types to be included during restore from vault. + * + * @return the includedResourceTypes value. + */ + public List includedResourceTypes() { + return this.includedResourceTypes; + } + + /** + * Set the includedResourceTypes property: Gets or sets the include resource types property. This property sets the + * resource types to be included during restore from vault. + * + * @param includedResourceTypes the includedResourceTypes value to set. + * @return the KubernetesClusterVaultTierRestoreCriteria object itself. + */ + public KubernetesClusterVaultTierRestoreCriteria withIncludedResourceTypes(List includedResourceTypes) { + this.includedResourceTypes = includedResourceTypes; + return this; + } + + /** + * Get the excludedResourceTypes property: Gets or sets the exclude resource types property. This property sets the + * resource types to be excluded during restore from vault. + * + * @return the excludedResourceTypes value. + */ + public List excludedResourceTypes() { + return this.excludedResourceTypes; + } + + /** + * Set the excludedResourceTypes property: Gets or sets the exclude resource types property. This property sets the + * resource types to be excluded during restore from vault. + * + * @param excludedResourceTypes the excludedResourceTypes value to set. + * @return the KubernetesClusterVaultTierRestoreCriteria object itself. + */ + public KubernetesClusterVaultTierRestoreCriteria withExcludedResourceTypes(List excludedResourceTypes) { + this.excludedResourceTypes = excludedResourceTypes; + return this; + } + + /** + * Get the labelSelectors property: Gets or sets the LabelSelectors property. This property sets the resource with + * such label selectors to be included during restore from vault. + * + * @return the labelSelectors value. + */ + public List labelSelectors() { + return this.labelSelectors; + } + + /** + * Set the labelSelectors property: Gets or sets the LabelSelectors property. This property sets the resource with + * such label selectors to be included during restore from vault. + * + * @param labelSelectors the labelSelectors value to set. + * @return the KubernetesClusterVaultTierRestoreCriteria object itself. + */ + public KubernetesClusterVaultTierRestoreCriteria withLabelSelectors(List labelSelectors) { + this.labelSelectors = labelSelectors; + return this; + } + + /** + * Get the persistentVolumeRestoreMode property: Gets or sets the PV (Persistent Volume) Restore Mode property. + * This property sets whether volumes needs to be restored from vault. + * + * @return the persistentVolumeRestoreMode value. + */ + public PersistentVolumeRestoreMode persistentVolumeRestoreMode() { + return this.persistentVolumeRestoreMode; + } + + /** + * Set the persistentVolumeRestoreMode property: Gets or sets the PV (Persistent Volume) Restore Mode property. + * This property sets whether volumes needs to be restored from vault. + * + * @param persistentVolumeRestoreMode the persistentVolumeRestoreMode value to set. + * @return the KubernetesClusterVaultTierRestoreCriteria object itself. + */ + public KubernetesClusterVaultTierRestoreCriteria + withPersistentVolumeRestoreMode(PersistentVolumeRestoreMode persistentVolumeRestoreMode) { + this.persistentVolumeRestoreMode = persistentVolumeRestoreMode; + return this; + } + + /** + * Get the conflictPolicy property: Gets or sets the Conflict Policy property. This property sets policy during + * conflict of resources during restore from vault. + * + * @return the conflictPolicy value. + */ + public ExistingResourcePolicy conflictPolicy() { + return this.conflictPolicy; + } + + /** + * Set the conflictPolicy property: Gets or sets the Conflict Policy property. This property sets policy during + * conflict of resources during restore from vault. + * + * @param conflictPolicy the conflictPolicy value to set. + * @return the KubernetesClusterVaultTierRestoreCriteria object itself. + */ + public KubernetesClusterVaultTierRestoreCriteria withConflictPolicy(ExistingResourcePolicy conflictPolicy) { + this.conflictPolicy = conflictPolicy; + return this; + } + + /** + * Get the namespaceMappings property: Gets or sets the Namespace Mappings property. This property sets if + * namespace needs to be change during restore from vault. + * + * @return the namespaceMappings value. + */ + public Map namespaceMappings() { + return this.namespaceMappings; + } + + /** + * Set the namespaceMappings property: Gets or sets the Namespace Mappings property. This property sets if + * namespace needs to be change during restore from vault. + * + * @param namespaceMappings the namespaceMappings value to set. + * @return the KubernetesClusterVaultTierRestoreCriteria object itself. + */ + public KubernetesClusterVaultTierRestoreCriteria withNamespaceMappings(Map namespaceMappings) { + this.namespaceMappings = namespaceMappings; + return this; + } + + /** + * Get the restoreHookReferences property: Gets or sets the restore hook references. This property sets the hook + * reference to be executed during restore from vault. + * + * @return the restoreHookReferences value. + */ + public List restoreHookReferences() { + return this.restoreHookReferences; + } + + /** + * Set the restoreHookReferences property: Gets or sets the restore hook references. This property sets the hook + * reference to be executed during restore from vault. + * + * @param restoreHookReferences the restoreHookReferences value to set. + * @return the KubernetesClusterVaultTierRestoreCriteria object itself. + */ + public KubernetesClusterVaultTierRestoreCriteria + withRestoreHookReferences(List restoreHookReferences) { + this.restoreHookReferences = restoreHookReferences; + return this; + } + + /** + * Get the stagingResourceGroupId property: Gets or sets the staging RG Id for creating staging disks and snapshots + * during restore from vault. + * + * @return the stagingResourceGroupId value. + */ + public String stagingResourceGroupId() { + return this.stagingResourceGroupId; + } + + /** + * Set the stagingResourceGroupId property: Gets or sets the staging RG Id for creating staging disks and snapshots + * during restore from vault. + * + * @param stagingResourceGroupId the stagingResourceGroupId value to set. + * @return the KubernetesClusterVaultTierRestoreCriteria object itself. + */ + public KubernetesClusterVaultTierRestoreCriteria withStagingResourceGroupId(String stagingResourceGroupId) { + this.stagingResourceGroupId = stagingResourceGroupId; + return this; + } + + /** + * Get the stagingStorageAccountId property: Gets or sets the staging Storage Account Id for creating backup + * extension object store data during restore from vault. + * + * @return the stagingStorageAccountId value. + */ + public String stagingStorageAccountId() { + return this.stagingStorageAccountId; + } + + /** + * Set the stagingStorageAccountId property: Gets or sets the staging Storage Account Id for creating backup + * extension object store data during restore from vault. + * + * @param stagingStorageAccountId the stagingStorageAccountId value to set. + * @return the KubernetesClusterVaultTierRestoreCriteria object itself. + */ + public KubernetesClusterVaultTierRestoreCriteria withStagingStorageAccountId(String stagingStorageAccountId) { + this.stagingStorageAccountId = stagingStorageAccountId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (restoreHookReferences() != null) { + restoreHookReferences().forEach(e -> e.validate()); + } + } +} 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 index 954476a6d6b8..da3b045cacaf 100644 --- 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Item Level kubernetes persistent volume target info for restore operation. */ +/** + * Item Level kubernetes persistent volume target info for restore operation. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("KubernetesPVRestoreCriteria") @Fluent @@ -26,13 +28,15 @@ public final class KubernetesPVRestoreCriteria extends ItemLevelRestoreCriteria @JsonProperty(value = "storageClassName") private String storageClassName; - /** Creates an instance of KubernetesPVRestoreCriteria class. */ + /** + * Creates an instance of KubernetesPVRestoreCriteria class. + */ public KubernetesPVRestoreCriteria() { } /** * Get the name property: Selected persistent volume claim name. - * + * * @return the name value. */ public String name() { @@ -41,7 +45,7 @@ public String name() { /** * Set the name property: Selected persistent volume claim name. - * + * * @param name the name value to set. * @return the KubernetesPVRestoreCriteria object itself. */ @@ -52,7 +56,7 @@ public KubernetesPVRestoreCriteria withName(String name) { /** * Get the storageClassName property: Selected storage class name for restore operation. - * + * * @return the storageClassName value. */ public String storageClassName() { @@ -61,7 +65,7 @@ public String storageClassName() { /** * Set the storageClassName property: Selected storage class name for restore operation. - * + * * @param storageClassName the storageClassName value to set. * @return the KubernetesPVRestoreCriteria object itself. */ @@ -72,7 +76,7 @@ public KubernetesPVRestoreCriteria withStorageClassName(String storageClassName) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 index 10853595058c..c09e0a0fad53 100644 --- 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Item Level kubernetes storage class target info for restore operation. */ +/** + * Item Level kubernetes storage class target info for restore operation. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("KubernetesStorageClassRestoreCriteria") @Fluent @@ -26,13 +28,15 @@ public final class KubernetesStorageClassRestoreCriteria extends ItemLevelRestor @JsonProperty(value = "provisioner") private String provisioner; - /** Creates an instance of KubernetesStorageClassRestoreCriteria class. */ + /** + * Creates an instance of KubernetesStorageClassRestoreCriteria class. + */ public KubernetesStorageClassRestoreCriteria() { } /** * Get the selectedStorageClassName property: Selected storage class name. - * + * * @return the selectedStorageClassName value. */ public String selectedStorageClassName() { @@ -41,7 +45,7 @@ public String selectedStorageClassName() { /** * Set the selectedStorageClassName property: Selected storage class name. - * + * * @param selectedStorageClassName the selectedStorageClassName value to set. * @return the KubernetesStorageClassRestoreCriteria object itself. */ @@ -52,7 +56,7 @@ public KubernetesStorageClassRestoreCriteria withSelectedStorageClassName(String /** * Get the provisioner property: Provisioner of the storage class. - * + * * @return the provisioner value. */ public String provisioner() { @@ -61,7 +65,7 @@ public String provisioner() { /** * Set the provisioner property: Provisioner of the storage class. - * + * * @param provisioner the provisioner value to set. * @return the KubernetesStorageClassRestoreCriteria object itself. */ @@ -72,7 +76,7 @@ public KubernetesStorageClassRestoreCriteria withProvisioner(String provisioner) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 index 6aadbff1f949..f7f2d2fc6a1f 100644 --- 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Monitoring Settings. */ +/** + * Monitoring Settings. + */ @Fluent public final class MonitoringSettings { /* @@ -16,13 +18,15 @@ public final class MonitoringSettings { @JsonProperty(value = "azureMonitorAlertSettings") private AzureMonitorAlertSettings azureMonitorAlertSettings; - /** Creates an instance of MonitoringSettings class. */ + /** + * Creates an instance of MonitoringSettings class. + */ public MonitoringSettings() { } /** * Get the azureMonitorAlertSettings property: Settings for Azure Monitor based alerts. - * + * * @return the azureMonitorAlertSettings value. */ public AzureMonitorAlertSettings azureMonitorAlertSettings() { @@ -31,7 +35,7 @@ public AzureMonitorAlertSettings azureMonitorAlertSettings() { /** * Set the azureMonitorAlertSettings property: Settings for Azure Monitor based alerts. - * + * * @param azureMonitorAlertSettings the azureMonitorAlertSettings value to set. * @return the MonitoringSettings object itself. */ @@ -42,7 +46,7 @@ public MonitoringSettings withAzureMonitorAlertSettings(AzureMonitorAlertSetting /** * 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/Month.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Month.java index ceabf4e6ceba..09a650cef33d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Month.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Month.java @@ -8,47 +8,73 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Month. */ +/** + * Defines values for Month. + */ public final class Month extends ExpandableStringEnum { - /** Static value April for Month. */ + /** + * Static value April for Month. + */ public static final Month APRIL = fromString("April"); - /** Static value August for Month. */ + /** + * Static value August for Month. + */ public static final Month AUGUST = fromString("August"); - /** Static value December for Month. */ + /** + * Static value December for Month. + */ public static final Month DECEMBER = fromString("December"); - /** Static value February for Month. */ + /** + * Static value February for Month. + */ public static final Month FEBRUARY = fromString("February"); - /** Static value January for Month. */ + /** + * Static value January for Month. + */ public static final Month JANUARY = fromString("January"); - /** Static value July for Month. */ + /** + * Static value July for Month. + */ public static final Month JULY = fromString("July"); - /** Static value June for Month. */ + /** + * Static value June for Month. + */ public static final Month JUNE = fromString("June"); - /** Static value March for Month. */ + /** + * Static value March for Month. + */ public static final Month MARCH = fromString("March"); - /** Static value May for Month. */ + /** + * Static value May for Month. + */ public static final Month MAY = fromString("May"); - /** Static value November for Month. */ + /** + * Static value November for Month. + */ public static final Month NOVEMBER = fromString("November"); - /** Static value October for Month. */ + /** + * Static value October for Month. + */ public static final Month OCTOBER = fromString("October"); - /** Static value September for Month. */ + /** + * Static value September for Month. + */ public static final Month SEPTEMBER = fromString("September"); /** * Creates a new instance of Month value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -57,7 +83,7 @@ public Month() { /** * Creates or finds a Month from its string representation. - * + * * @param name a name to look for. * @return the corresponding Month. */ @@ -68,7 +94,7 @@ public static Month fromString(String name) { /** * Gets known Month values. - * + * * @return known Month values. */ public static Collection values() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/NamespacedNameResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/NamespacedNameResource.java index f07692305c57..13cd3bc40e28 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/NamespacedNameResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/NamespacedNameResource.java @@ -9,8 +9,8 @@ /** * NamespacedNameResource - * - *

Class to refer resources which contains namespace and name. + * + * Class to refer resources which contains namespace and name. */ @Fluent public final class NamespacedNameResource { @@ -26,13 +26,15 @@ public final class NamespacedNameResource { @JsonProperty(value = "namespace") private String namespace; - /** Creates an instance of NamespacedNameResource class. */ + /** + * Creates an instance of NamespacedNameResource class. + */ public NamespacedNameResource() { } /** * Get the name property: Name of the resource. - * + * * @return the name value. */ public String name() { @@ -41,7 +43,7 @@ public String name() { /** * Set the name property: Name of the resource. - * + * * @param name the name value to set. * @return the NamespacedNameResource object itself. */ @@ -52,7 +54,7 @@ public NamespacedNameResource withName(String name) { /** * Get the namespace property: Namespace in which the resource exists. - * + * * @return the namespace value. */ public String namespace() { @@ -61,7 +63,7 @@ public String namespace() { /** * Set the namespace property: Namespace in which the resource exists. - * + * * @param namespace the namespace value to set. * @return the NamespacedNameResource object itself. */ @@ -72,7 +74,7 @@ public NamespacedNameResource withNamespace(String namespace) { /** * 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/OperationExtendedInfo.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationExtendedInfo.java index 79837086e970..cf4d3b08ccf2 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 @@ -12,8 +12,8 @@ /** * OperationExtendedInfo - * - *

Operation Extended Info. + * + * Operation Extended Info. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, @@ -21,16 +21,18 @@ property = "objectType", defaultImpl = OperationExtendedInfo.class) @JsonTypeName("OperationExtendedInfo") -@JsonSubTypes({@JsonSubTypes.Type(name = "OperationJobExtendedInfo", value = OperationJobExtendedInfoInner.class)}) +@JsonSubTypes({ @JsonSubTypes.Type(name = "OperationJobExtendedInfo", value = OperationJobExtendedInfoInner.class) }) @Immutable public class OperationExtendedInfo { - /** Creates an instance of OperationExtendedInfo class. */ + /** + * Creates an instance of OperationExtendedInfo class. + */ public OperationExtendedInfo() { } /** * 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/OperationJobExtendedInfo.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationJobExtendedInfo.java index c2afd9b32654..565964f30e4e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationJobExtendedInfo.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationJobExtendedInfo.java @@ -6,18 +6,20 @@ import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner; -/** An immutable client-side representation of OperationJobExtendedInfo. */ +/** + * An immutable client-side representation of OperationJobExtendedInfo. + */ public interface OperationJobExtendedInfo { /** - * Gets the jobId property: Arm Id of the job created for this operation. - * + * Gets the jobId property: Name or Arm Id of the job created for this operation. + * * @return the jobId value. */ String jobId(); /** * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner object. - * + * * @return the inner object. */ OperationJobExtendedInfoInner innerModel(); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationResource.java index c85341454b51..d83277cc9cb8 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationResource.java @@ -8,27 +8,29 @@ import com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner; import java.time.OffsetDateTime; -/** An immutable client-side representation of OperationResource. */ +/** + * An immutable client-side representation of OperationResource. + */ public interface OperationResource { /** * Gets the endTime property: End time of the operation. - * + * * @return the endTime value. */ OffsetDateTime endTime(); /** * Gets the error property: Required if status == failed or status == canceled. This is the OData v4 error format, - * used by the RPC and will go into the v2.2 Azure REST API guidelines. The full set of optional properties (e.g. - * inner errors / details) can be found in the "Error Response" section. - * + * used by the RPC and will go into the v2.2 Azure REST API guidelines. + * The full set of optional properties (e.g. inner errors / details) can be found in the "Error Response" section. + * * @return the error value. */ ManagementError error(); /** * Gets the id property: It should match what is used to GET the operation result. - * + * * @return the id value. */ String id(); @@ -36,37 +38,37 @@ public interface OperationResource { /** * Gets the name property: It must match the last segment of the "id" field, and will typically be a GUID / system * generated value. - * + * * @return the name value. */ String name(); /** * Gets the properties property: OperationExtendedInfo - * - *

End time of the operation. - * + * + * End time of the operation. + * * @return the properties value. */ OperationExtendedInfo properties(); /** * Gets the startTime property: Start time of the operation. - * + * * @return the startTime value. */ OffsetDateTime startTime(); /** * Gets the status property: The status property. - * + * * @return the status value. */ String status(); /** * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner object. - * + * * @return the inner object. */ OperationResourceInner innerModel(); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationResults.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationResults.java index 9a17691f138d..72082bf86b34 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationResults.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationResults.java @@ -7,13 +7,15 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of OperationResults. */ +/** + * Resource collection API of OperationResults. + */ public interface OperationResults { /** * Gets the operation status for a resource. - * - *

Gets the operation result for a resource. - * + * + * Gets the operation result for a resource. + * * @param operationId The operationId parameter. * @param location The location parameter. * @param context The context to associate with this operation. @@ -26,9 +28,9 @@ public interface OperationResults { /** * Gets the operation status for a resource. - * - *

Gets the operation result for a resource. - * + * + * Gets the operation result for a resource. + * * @param operationId The operationId parameter. * @param location The location parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 4d5f30fe1499..2d51d8043959 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 @@ -9,7 +9,9 @@ import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; -/** The OperationResultsGetHeaders model. */ +/** + * The OperationResultsGetHeaders model. + */ @Fluent public final class OperationResultsGetHeaders { /* @@ -35,7 +37,7 @@ public final class OperationResultsGetHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of OperationResultsGetHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public OperationResultsGetHeaders(HttpHeaders rawHeaders) { @@ -49,7 +51,7 @@ public OperationResultsGetHeaders(HttpHeaders rawHeaders) { /** * Get the retryAfter property: The Retry-After property. - * + * * @return the retryAfter value. */ public Integer retryAfter() { @@ -58,7 +60,7 @@ public Integer retryAfter() { /** * Set the retryAfter property: The Retry-After property. - * + * * @param retryAfter the retryAfter value to set. * @return the OperationResultsGetHeaders object itself. */ @@ -69,7 +71,7 @@ public OperationResultsGetHeaders withRetryAfter(Integer retryAfter) { /** * Get the azureAsyncOperation property: The Azure-AsyncOperation property. - * + * * @return the azureAsyncOperation value. */ public String azureAsyncOperation() { @@ -78,7 +80,7 @@ public String azureAsyncOperation() { /** * Set the azureAsyncOperation property: The Azure-AsyncOperation property. - * + * * @param azureAsyncOperation the azureAsyncOperation value to set. * @return the OperationResultsGetHeaders object itself. */ @@ -89,7 +91,7 @@ public OperationResultsGetHeaders withAzureAsyncOperation(String azureAsyncOpera /** * Get the location property: The Location property. - * + * * @return the location value. */ public String location() { @@ -98,7 +100,7 @@ public String location() { /** * Set the location property: The Location property. - * + * * @param location the location value to set. * @return the OperationResultsGetHeaders object itself. */ @@ -109,7 +111,7 @@ public OperationResultsGetHeaders withLocation(String location) { /** * 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/OperationResultsGetResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationResultsGetResponse.java index b07a9699bfdc..f61960edd4c5 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationResultsGetResponse.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/OperationResultsGetResponse.java @@ -9,30 +9,28 @@ import com.azure.core.http.rest.ResponseBase; import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner; -/** Contains all response data for the get operation. */ +/** + * Contains all response data for the get operation. + */ public final class OperationResultsGetResponse extends ResponseBase { /** * Creates an instance of OperationResultsGetResponse. - * + * * @param request the request which resulted in this OperationResultsGetResponse. * @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 OperationResultsGetResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - OperationJobExtendedInfoInner value, - OperationResultsGetHeaders headers) { + public OperationResultsGetResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, + OperationJobExtendedInfoInner value, OperationResultsGetHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } /** * Gets the deserialized response body. - * + * * @return the deserialized response body. */ @Override 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 4c353155a084..83952eafc304 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 @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of OperationStatus. */ +/** + * Resource collection API of OperationStatus. + */ public interface OperationStatus { /** * Gets the operation status for a resource. - * + * * @param location The location parameter. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -24,7 +26,7 @@ public interface OperationStatus { /** * Gets the operation status for a resource. - * + * * @param location The location parameter. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 index 901107f3708c..27b54138487e 100644 --- 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 @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of OperationStatusBackupVaultContexts. */ +/** + * 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. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. @@ -21,12 +23,12 @@ public interface OperationStatusBackupVaultContexts { * @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); + Response getWithResponse(String resourceGroupName, String vaultName, String operationId, + Context context); /** * Gets the operation status for an operation over a BackupVault's context. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param operationId The operationId parameter. 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 index a371a5c44faf..25983371a3dd 100644 --- 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 @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of OperationStatusResourceGroupContexts. */ +/** + * 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. The name is case insensitive. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -20,12 +22,12 @@ public interface OperationStatusResourceGroupContexts { * @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); + Response getByResourceGroupWithResponse(String resourceGroupName, String operationId, + Context context); /** * Gets the operation status for an operation over a ResourceGroup's context. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 index fda5d105a278..f2ed0b9c5e08 100644 --- 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Backup Vault Contract for Patch Backup Vault API. */ +/** + * Backup Vault Contract for Patch Backup Vault API. + */ @Fluent public final class PatchBackupVaultInput { /* @@ -28,13 +30,15 @@ public final class PatchBackupVaultInput { @JsonProperty(value = "featureSettings") private FeatureSettings featureSettings; - /** Creates an instance of PatchBackupVaultInput class. */ + /** + * Creates an instance of PatchBackupVaultInput class. + */ public PatchBackupVaultInput() { } /** * Get the monitoringSettings property: Monitoring Settings. - * + * * @return the monitoringSettings value. */ public MonitoringSettings monitoringSettings() { @@ -43,7 +47,7 @@ public MonitoringSettings monitoringSettings() { /** * Set the monitoringSettings property: Monitoring Settings. - * + * * @param monitoringSettings the monitoringSettings value to set. * @return the PatchBackupVaultInput object itself. */ @@ -54,7 +58,7 @@ public PatchBackupVaultInput withMonitoringSettings(MonitoringSettings monitorin /** * Get the securitySettings property: Security Settings. - * + * * @return the securitySettings value. */ public SecuritySettings securitySettings() { @@ -63,7 +67,7 @@ public SecuritySettings securitySettings() { /** * Set the securitySettings property: Security Settings. - * + * * @param securitySettings the securitySettings value to set. * @return the PatchBackupVaultInput object itself. */ @@ -74,7 +78,7 @@ public PatchBackupVaultInput withSecuritySettings(SecuritySettings securitySetti /** * Get the featureSettings property: Feature Settings. - * + * * @return the featureSettings value. */ public FeatureSettings featureSettings() { @@ -83,7 +87,7 @@ public FeatureSettings featureSettings() { /** * Set the featureSettings property: Feature Settings. - * + * * @param featureSettings the featureSettings value to set. * @return the PatchBackupVaultInput object itself. */ @@ -94,7 +98,7 @@ public PatchBackupVaultInput withFeatureSettings(FeatureSettings featureSettings /** * 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/PatchResourceGuardInput.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PatchResourceGuardInput.java index 0e27810196c7..d56fc7658e6b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PatchResourceGuardInput.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PatchResourceGuardInput.java @@ -11,8 +11,8 @@ /** * PatchResourceGuardInput - * - *

Patch Request content for Microsoft.DataProtection Resource Guard resources. + * + * Patch Request content for Microsoft.DataProtection Resource Guard resources. */ @Fluent public final class PatchResourceGuardInput { @@ -23,13 +23,15 @@ public final class PatchResourceGuardInput { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of PatchResourceGuardInput class. */ + /** + * Creates an instance of PatchResourceGuardInput class. + */ public PatchResourceGuardInput() { } /** * Get the tags property: Resource Guard tags. - * + * * @return the tags value. */ public Map tags() { @@ -38,7 +40,7 @@ public Map tags() { /** * Set the tags property: Resource Guard tags. - * + * * @param tags the tags value to set. * @return the PatchResourceGuardInput object itself. */ @@ -49,7 +51,7 @@ public PatchResourceGuardInput withTags(Map tags) { /** * 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/PatchResourceRequestInput.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PatchResourceRequestInput.java index b77419e1e08e..46149ddb3cd4 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 @@ -11,14 +11,14 @@ /** * PatchResourceRequestInput - * - *

Patch Request content for Microsoft.DataProtection resources. + * + * Patch Request content for Microsoft.DataProtection resources. */ @Fluent public final class PatchResourceRequestInput { /* * DppIdentityDetails - * + * * Input Managed Identity Details */ @JsonProperty(value = "identity") @@ -37,15 +37,17 @@ public final class PatchResourceRequestInput { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of PatchResourceRequestInput class. */ + /** + * Creates an instance of PatchResourceRequestInput class. + */ public PatchResourceRequestInput() { } /** * Get the identity property: DppIdentityDetails - * - *

Input Managed Identity Details. - * + * + * Input Managed Identity Details. + * * @return the identity value. */ public DppIdentityDetails identity() { @@ -54,9 +56,9 @@ public DppIdentityDetails identity() { /** * Set the identity property: DppIdentityDetails - * - *

Input Managed Identity Details. - * + * + * Input Managed Identity Details. + * * @param identity the identity value to set. * @return the PatchResourceRequestInput object itself. */ @@ -67,7 +69,7 @@ public PatchResourceRequestInput withIdentity(DppIdentityDetails identity) { /** * Get the properties property: Resource properties. - * + * * @return the properties value. */ public PatchBackupVaultInput properties() { @@ -76,7 +78,7 @@ public PatchBackupVaultInput properties() { /** * Set the properties property: Resource properties. - * + * * @param properties the properties value to set. * @return the PatchResourceRequestInput object itself. */ @@ -87,7 +89,7 @@ public PatchResourceRequestInput withProperties(PatchBackupVaultInput properties /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -96,7 +98,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the PatchResourceRequestInput object itself. */ @@ -107,7 +109,7 @@ public PatchResourceRequestInput withTags(Map tags) { /** * 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/PersistentVolumeRestoreMode.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PersistentVolumeRestoreMode.java index 7694a30a5ef9..a7af4f6b4c0f 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PersistentVolumeRestoreMode.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/PersistentVolumeRestoreMode.java @@ -13,16 +13,20 @@ * restored. */ public final class PersistentVolumeRestoreMode extends ExpandableStringEnum { - /** Static value RestoreWithVolumeData for PersistentVolumeRestoreMode. */ + /** + * Static value RestoreWithVolumeData for PersistentVolumeRestoreMode. + */ public static final PersistentVolumeRestoreMode RESTORE_WITH_VOLUME_DATA = fromString("RestoreWithVolumeData"); - /** Static value RestoreWithoutVolumeData for PersistentVolumeRestoreMode. */ - public static final PersistentVolumeRestoreMode RESTORE_WITHOUT_VOLUME_DATA = - fromString("RestoreWithoutVolumeData"); + /** + * Static value RestoreWithoutVolumeData for PersistentVolumeRestoreMode. + */ + public static final PersistentVolumeRestoreMode RESTORE_WITHOUT_VOLUME_DATA + = fromString("RestoreWithoutVolumeData"); /** * Creates a new instance of PersistentVolumeRestoreMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -31,7 +35,7 @@ public PersistentVolumeRestoreMode() { /** * Creates or finds a PersistentVolumeRestoreMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding PersistentVolumeRestoreMode. */ @@ -42,7 +46,7 @@ public static PersistentVolumeRestoreMode fromString(String name) { /** * Gets known PersistentVolumeRestoreMode values. - * + * * @return known PersistentVolumeRestoreMode values. */ public static Collection values() { 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 6e0493346665..21ff1aeee156 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 @@ -10,8 +10,8 @@ /** * PolicyInfo - * - *

Policy Info in backupInstance. + * + * Policy Info in backupInstance. */ @Fluent public final class PolicyInfo { @@ -33,13 +33,15 @@ public final class PolicyInfo { @JsonProperty(value = "policyParameters") private PolicyParameters policyParameters; - /** Creates an instance of PolicyInfo class. */ + /** + * Creates an instance of PolicyInfo class. + */ public PolicyInfo() { } /** * Get the policyId property: The policyId property. - * + * * @return the policyId value. */ public String policyId() { @@ -48,7 +50,7 @@ public String policyId() { /** * Set the policyId property: The policyId property. - * + * * @param policyId the policyId value to set. * @return the PolicyInfo object itself. */ @@ -59,7 +61,7 @@ public PolicyInfo withPolicyId(String policyId) { /** * Get the policyVersion property: The policyVersion property. - * + * * @return the policyVersion value. */ public String policyVersion() { @@ -68,7 +70,7 @@ public String policyVersion() { /** * Get the policyParameters property: Policy parameters for the backup instance. - * + * * @return the policyParameters value. */ public PolicyParameters policyParameters() { @@ -77,7 +79,7 @@ public PolicyParameters policyParameters() { /** * Set the policyParameters property: Policy parameters for the backup instance. - * + * * @param policyParameters the policyParameters value to set. * @return the PolicyInfo object itself. */ @@ -88,14 +90,13 @@ public PolicyInfo withPolicyParameters(PolicyParameters policyParameters) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (policyId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property policyId in model PolicyInfo")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property policyId in model PolicyInfo")); } if (policyParameters() != null) { policyParameters().validate(); 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 a621f0162ea6..9150ebb5bb99 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Parameters in Policy. */ +/** + * Parameters in Policy. + */ @Fluent public final class PolicyParameters { /* @@ -23,13 +25,15 @@ public final class PolicyParameters { @JsonProperty(value = "backupDatasourceParametersList") private List backupDatasourceParametersList; - /** Creates an instance of PolicyParameters class. */ + /** + * Creates an instance of PolicyParameters class. + */ public PolicyParameters() { } /** * Get the dataStoreParametersList property: Gets or sets the DataStore Parameters. - * + * * @return the dataStoreParametersList value. */ public List dataStoreParametersList() { @@ -38,7 +42,7 @@ public List dataStoreParametersList() { /** * Set the dataStoreParametersList property: Gets or sets the DataStore Parameters. - * + * * @param dataStoreParametersList the dataStoreParametersList value to set. * @return the PolicyParameters object itself. */ @@ -49,7 +53,7 @@ public PolicyParameters withDataStoreParametersList(List da /** * Get the backupDatasourceParametersList property: Gets or sets the Backup Data Source Parameters. - * + * * @return the backupDatasourceParametersList value. */ public List backupDatasourceParametersList() { @@ -58,19 +62,19 @@ public List backupDatasourceParametersList() { /** * Set the backupDatasourceParametersList property: Gets or sets the Backup Data Source Parameters. - * + * * @param backupDatasourceParametersList the backupDatasourceParametersList value to set. * @return the PolicyParameters object itself. */ - public PolicyParameters withBackupDatasourceParametersList( - List backupDatasourceParametersList) { + public PolicyParameters + withBackupDatasourceParametersList(List backupDatasourceParametersList) { this.backupDatasourceParametersList = backupDatasourceParametersList; 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/ProtectionStatusDetails.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ProtectionStatusDetails.java index 91f923810240..1da8157e1871 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 @@ -9,8 +9,8 @@ /** * ProtectionStatusDetails - * - *

Protection status details. + * + * Protection status details. */ @Fluent public final class ProtectionStatusDetails { @@ -26,13 +26,15 @@ public final class ProtectionStatusDetails { @JsonProperty(value = "status") private Status status; - /** Creates an instance of ProtectionStatusDetails class. */ + /** + * Creates an instance of ProtectionStatusDetails class. + */ public ProtectionStatusDetails() { } /** * Get the errorDetails property: Specifies the protection status error of the resource. - * + * * @return the errorDetails value. */ public UserFacingError errorDetails() { @@ -41,7 +43,7 @@ public UserFacingError errorDetails() { /** * Set the errorDetails property: Specifies the protection status error of the resource. - * + * * @param errorDetails the errorDetails value to set. * @return the ProtectionStatusDetails object itself. */ @@ -52,7 +54,7 @@ public ProtectionStatusDetails withErrorDetails(UserFacingError errorDetails) { /** * Get the status property: Specifies the protection status of the resource. - * + * * @return the status value. */ public Status status() { @@ -61,7 +63,7 @@ public Status status() { /** * Set the status property: Specifies the protection status of the resource. - * + * * @param status the status value to set. * @return the ProtectionStatusDetails object itself. */ @@ -72,7 +74,7 @@ public ProtectionStatusDetails withStatus(Status status) { /** * 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/ProvisioningState.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ProvisioningState.java index a587d1b22c37..5e30e2823f82 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ProvisioningState.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ProvisioningState.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Provisioning state of the BackupVault resource. */ +/** + * Provisioning state of the BackupVault resource. + */ public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Failed for ProvisioningState. */ + /** + * Static value Failed for ProvisioningState. + */ public static final ProvisioningState FAILED = fromString("Failed"); - /** Static value Provisioning for ProvisioningState. */ + /** + * Static value Provisioning for ProvisioningState. + */ public static final ProvisioningState PROVISIONING = fromString("Provisioning"); - /** Static value Succeeded for ProvisioningState. */ + /** + * Static value Succeeded for ProvisioningState. + */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Unknown for ProvisioningState. */ + /** + * Static value Unknown for ProvisioningState. + */ public static final ProvisioningState UNKNOWN = fromString("Unknown"); - /** Static value Updating for ProvisioningState. */ + /** + * Static value Updating for ProvisioningState. + */ public static final ProvisioningState UPDATING = fromString("Updating"); /** * Creates a new instance of ProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public ProvisioningState() { /** * Creates or finds a ProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningState. */ @@ -47,7 +59,7 @@ public static ProvisioningState fromString(String name) { /** * Gets known ProvisioningState values. - * + * * @return known ProvisioningState values. */ public static Collection values() { 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 20cc4ff6c47d..5e4452ff363a 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Item Level target info for restore operation. */ +/** + * Item Level target info for restore operation. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("RangeBasedItemLevelRestoreCriteria") @Fluent @@ -26,13 +28,15 @@ public final class RangeBasedItemLevelRestoreCriteria extends ItemLevelRestoreCr @JsonProperty(value = "maxMatchingValue") private String maxMatchingValue; - /** Creates an instance of RangeBasedItemLevelRestoreCriteria class. */ + /** + * Creates an instance of RangeBasedItemLevelRestoreCriteria class. + */ public RangeBasedItemLevelRestoreCriteria() { } /** * Get the minMatchingValue property: minimum value for range prefix match. - * + * * @return the minMatchingValue value. */ public String minMatchingValue() { @@ -41,7 +45,7 @@ public String minMatchingValue() { /** * Set the minMatchingValue property: minimum value for range prefix match. - * + * * @param minMatchingValue the minMatchingValue value to set. * @return the RangeBasedItemLevelRestoreCriteria object itself. */ @@ -52,7 +56,7 @@ public RangeBasedItemLevelRestoreCriteria withMinMatchingValue(String minMatchin /** * Get the maxMatchingValue property: maximum value for range prefix match. - * + * * @return the maxMatchingValue value. */ public String maxMatchingValue() { @@ -61,7 +65,7 @@ public String maxMatchingValue() { /** * Set the maxMatchingValue property: maximum value for range prefix match. - * + * * @param maxMatchingValue the maxMatchingValue value to set. * @return the RangeBasedItemLevelRestoreCriteria object itself. */ @@ -72,7 +76,7 @@ public RangeBasedItemLevelRestoreCriteria withMaxMatchingValue(String maxMatchin /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryOption.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryOption.java index cc79a3807e4a..43177432d4cd 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryOption.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryOption.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Recovery Option. */ +/** + * Recovery Option. + */ public final class RecoveryOption extends ExpandableStringEnum { - /** Static value FailIfExists for RecoveryOption. */ + /** + * Static value FailIfExists for RecoveryOption. + */ public static final RecoveryOption FAIL_IF_EXISTS = fromString("FailIfExists"); /** * Creates a new instance of RecoveryOption value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public RecoveryOption() { /** * Creates or finds a RecoveryOption from its string representation. - * + * * @param name a name to look for. * @return the corresponding RecoveryOption. */ @@ -35,7 +39,7 @@ public static RecoveryOption fromString(String name) { /** * Gets known RecoveryOption values. - * + * * @return known RecoveryOption values. */ public static Collection values() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryPointCompletionState.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryPointCompletionState.java new file mode 100644 index 000000000000..414b939cd9c4 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryPointCompletionState.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Specifies recovery point completeness. Partial (i.e., only some of the intended items were backed up), or Completed + * (i.e., ALL intended items were backed up). + */ +public final class RecoveryPointCompletionState extends ExpandableStringEnum { + /** + * Static value Completed for RecoveryPointCompletionState. + */ + public static final RecoveryPointCompletionState COMPLETED = fromString("Completed"); + + /** + * Static value Partial for RecoveryPointCompletionState. + */ + public static final RecoveryPointCompletionState PARTIAL = fromString("Partial"); + + /** + * Creates a new instance of RecoveryPointCompletionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RecoveryPointCompletionState() { + } + + /** + * Creates or finds a RecoveryPointCompletionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecoveryPointCompletionState. + */ + @JsonCreator + public static RecoveryPointCompletionState fromString(String name) { + return fromString(name, RecoveryPointCompletionState.class); + } + + /** + * Gets known RecoveryPointCompletionState values. + * + * @return known RecoveryPointCompletionState values. + */ + public static Collection values() { + return values(RecoveryPointCompletionState.class); + } +} 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 4501779d907b..1751d2ccddcb 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 @@ -10,8 +10,8 @@ /** * RecoveryPointDataStoreDetails - * - *

RecoveryPoint datastore details. + * + * RecoveryPoint datastore details. */ @Fluent public final class RecoveryPointDataStoreDetails { @@ -69,13 +69,15 @@ public final class RecoveryPointDataStoreDetails { @JsonProperty(value = "rehydrationStatus", access = JsonProperty.Access.WRITE_ONLY) private RehydrationStatus rehydrationStatus; - /** Creates an instance of RecoveryPointDataStoreDetails class. */ + /** + * Creates an instance of RecoveryPointDataStoreDetails class. + */ public RecoveryPointDataStoreDetails() { } /** * Get the creationTime property: The creationTime property. - * + * * @return the creationTime value. */ public OffsetDateTime creationTime() { @@ -84,7 +86,7 @@ public OffsetDateTime creationTime() { /** * Set the creationTime property: The creationTime property. - * + * * @param creationTime the creationTime value to set. * @return the RecoveryPointDataStoreDetails object itself. */ @@ -95,7 +97,7 @@ public RecoveryPointDataStoreDetails withCreationTime(OffsetDateTime creationTim /** * Get the expiryTime property: The expiryTime property. - * + * * @return the expiryTime value. */ public OffsetDateTime expiryTime() { @@ -104,7 +106,7 @@ public OffsetDateTime expiryTime() { /** * Set the expiryTime property: The expiryTime property. - * + * * @param expiryTime the expiryTime value to set. * @return the RecoveryPointDataStoreDetails object itself. */ @@ -115,7 +117,7 @@ public RecoveryPointDataStoreDetails withExpiryTime(OffsetDateTime expiryTime) { /** * Get the id property: The id property. - * + * * @return the id value. */ public String id() { @@ -124,7 +126,7 @@ public String id() { /** * Set the id property: The id property. - * + * * @param id the id value to set. * @return the RecoveryPointDataStoreDetails object itself. */ @@ -135,7 +137,7 @@ public RecoveryPointDataStoreDetails withId(String id) { /** * Get the metadata property: The metaData property. - * + * * @return the metadata value. */ public String metadata() { @@ -144,7 +146,7 @@ public String metadata() { /** * Set the metadata property: The metaData property. - * + * * @param metadata the metadata value to set. * @return the RecoveryPointDataStoreDetails object itself. */ @@ -155,7 +157,7 @@ public RecoveryPointDataStoreDetails withMetadata(String metadata) { /** * Get the state property: The state property. - * + * * @return the state value. */ public String state() { @@ -164,7 +166,7 @@ public String state() { /** * Set the state property: The state property. - * + * * @param state the state value to set. * @return the RecoveryPointDataStoreDetails object itself. */ @@ -175,7 +177,7 @@ public RecoveryPointDataStoreDetails withState(String state) { /** * Get the type property: The type property. - * + * * @return the type value. */ public String type() { @@ -184,7 +186,7 @@ public String type() { /** * Set the type property: The type property. - * + * * @param type the type value to set. * @return the RecoveryPointDataStoreDetails object itself. */ @@ -195,7 +197,7 @@ public RecoveryPointDataStoreDetails withType(String type) { /** * Get the visible property: The visible property. - * + * * @return the visible value. */ public Boolean visible() { @@ -204,7 +206,7 @@ public Boolean visible() { /** * Set the visible property: The visible property. - * + * * @param visible the visible value to set. * @return the RecoveryPointDataStoreDetails object itself. */ @@ -215,7 +217,7 @@ public RecoveryPointDataStoreDetails withVisible(Boolean visible) { /** * Get the rehydrationExpiryTime property: The rehydrationExpiryTime property. - * + * * @return the rehydrationExpiryTime value. */ public OffsetDateTime rehydrationExpiryTime() { @@ -224,7 +226,7 @@ public OffsetDateTime rehydrationExpiryTime() { /** * Get the rehydrationStatus property: The rehydrationStatus property. - * + * * @return the rehydrationStatus value. */ public RehydrationStatus rehydrationStatus() { @@ -233,7 +235,7 @@ public RehydrationStatus rehydrationStatus() { /** * 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/RecoveryPoints.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RecoveryPoints.java index 08fe4b44975b..4d51ab027a46 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of RecoveryPoints. */ +/** + * Resource collection API of RecoveryPoints. + */ public interface RecoveryPoints { /** * Returns a list of Recovery Points for a DataSource in a vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -21,12 +23,12 @@ public interface RecoveryPoints { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String vaultName, String backupInstanceName); + PagedIterable list(String resourceGroupName, String vaultName, + String backupInstanceName); /** * Returns a list of Recovery Points for a DataSource in a vault. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -38,17 +40,12 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, - String vaultName, - String backupInstanceName, - String filter, - String skipToken, - Context context); + PagedIterable list(String resourceGroupName, String vaultName, + String backupInstanceName, String filter, String skipToken, Context context); /** * Gets a Recovery Point using recoveryPointId for a Datasource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -59,12 +56,12 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Recovery Point using recoveryPointId for a Datasource along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String vaultName, String backupInstanceName, String recoveryPointId, Context context); + Response getWithResponse(String resourceGroupName, String vaultName, + String backupInstanceName, String recoveryPointId, Context context); /** * Gets a Recovery Point using recoveryPointId for a Datasource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -74,6 +71,6 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Recovery Point using recoveryPointId for a Datasource. */ - AzureBackupRecoveryPointResource get( - String resourceGroupName, String vaultName, String backupInstanceName, String recoveryPointId); + AzureBackupRecoveryPointResource get(String resourceGroupName, String vaultName, String backupInstanceName, + String recoveryPointId); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RehydrationPriority.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RehydrationPriority.java index f2094721ee2d..8ea0d23a22cd 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RehydrationPriority.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RehydrationPriority.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Priority to be used for rehydration. Values High or Standard. */ +/** + * Priority to be used for rehydration. Values High or Standard. + */ public final class RehydrationPriority extends ExpandableStringEnum { - /** Static value Invalid for RehydrationPriority. */ + /** + * Static value Invalid for RehydrationPriority. + */ public static final RehydrationPriority INVALID = fromString("Invalid"); - /** Static value High for RehydrationPriority. */ + /** + * Static value High for RehydrationPriority. + */ public static final RehydrationPriority HIGH = fromString("High"); - /** Static value Standard for RehydrationPriority. */ + /** + * Static value Standard for RehydrationPriority. + */ public static final RehydrationPriority STANDARD = fromString("Standard"); /** * Creates a new instance of RehydrationPriority value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public RehydrationPriority() { /** * Creates or finds a RehydrationPriority from its string representation. - * + * * @param name a name to look for. * @return the corresponding RehydrationPriority. */ @@ -41,7 +49,7 @@ public static RehydrationPriority fromString(String name) { /** * Gets known RehydrationPriority values. - * + * * @return known RehydrationPriority values. */ public static Collection values() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RehydrationStatus.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RehydrationStatus.java index 644e0e45ca3e..1b08f39bf8c8 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RehydrationStatus.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RehydrationStatus.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RehydrationStatus. */ +/** + * Defines values for RehydrationStatus. + */ public final class RehydrationStatus extends ExpandableStringEnum { - /** Static value CREATE_IN_PROGRESS for RehydrationStatus. */ + /** + * Static value CREATE_IN_PROGRESS for RehydrationStatus. + */ public static final RehydrationStatus CREATE_IN_PROGRESS = fromString("CREATE_IN_PROGRESS"); - /** Static value COMPLETED for RehydrationStatus. */ + /** + * Static value COMPLETED for RehydrationStatus. + */ public static final RehydrationStatus COMPLETED = fromString("COMPLETED"); - /** Static value DELETE_IN_PROGRESS for RehydrationStatus. */ + /** + * Static value DELETE_IN_PROGRESS for RehydrationStatus. + */ public static final RehydrationStatus DELETE_IN_PROGRESS = fromString("DELETE_IN_PROGRESS"); - /** Static value DELETED for RehydrationStatus. */ + /** + * Static value DELETED for RehydrationStatus. + */ public static final RehydrationStatus DELETED = fromString("DELETED"); - /** Static value FAILED for RehydrationStatus. */ + /** + * Static value FAILED for RehydrationStatus. + */ public static final RehydrationStatus FAILED = fromString("FAILED"); /** * Creates a new instance of RehydrationStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public RehydrationStatus() { /** * Creates or finds a RehydrationStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding RehydrationStatus. */ @@ -47,7 +59,7 @@ public static RehydrationStatus fromString(String name) { /** * Gets known RehydrationStatus values. - * + * * @return known RehydrationStatus values. */ public static Collection values() { 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 cbc030faf4c6..214c5ef4aca9 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The ResourceGuard model. */ +/** + * The ResourceGuard model. + */ @Fluent public final class ResourceGuard { /* @@ -41,13 +43,15 @@ public final class ResourceGuard { @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; - /** Creates an instance of ResourceGuard class. */ + /** + * Creates an instance of ResourceGuard class. + */ public ResourceGuard() { } /** * Get the provisioningState property: Provisioning state of the BackupVault resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -56,7 +60,7 @@ public ProvisioningState provisioningState() { /** * Get the allowAutoApprovals property: This flag indicates whether auto approval is allowed or not. - * + * * @return the allowAutoApprovals value. */ public Boolean allowAutoApprovals() { @@ -66,7 +70,7 @@ public Boolean allowAutoApprovals() { /** * Get the resourceGuardOperations property: {readonly} List of operation details those are protected by the * ResourceGuard resource. - * + * * @return the resourceGuardOperations value. */ public List resourceGuardOperations() { @@ -74,9 +78,9 @@ public List resourceGuardOperations() { } /** - * Get the vaultCriticalOperationExclusionList property: List of critical operations which are not protected by this - * resourceGuard. - * + * Get the vaultCriticalOperationExclusionList property: List of critical operations which are not protected by + * this resourceGuard. + * * @return the vaultCriticalOperationExclusionList value. */ public List vaultCriticalOperationExclusionList() { @@ -84,9 +88,9 @@ public List vaultCriticalOperationExclusionList() { } /** - * Set the vaultCriticalOperationExclusionList property: List of critical operations which are not protected by this - * resourceGuard. - * + * Set the vaultCriticalOperationExclusionList property: List of critical operations which are not protected by + * this resourceGuard. + * * @param vaultCriticalOperationExclusionList the vaultCriticalOperationExclusionList value to set. * @return the ResourceGuard object itself. */ @@ -97,7 +101,7 @@ public ResourceGuard withVaultCriticalOperationExclusionList(List vaultC /** * Get the description property: Description about the pre-req steps to perform all the critical operations. - * + * * @return the description value. */ public String description() { @@ -106,7 +110,7 @@ public String description() { /** * 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/ResourceGuardOperation.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardOperation.java index 1ebe997b113c..81a90e29e3e4 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** This class contains all the details about a critical operation. */ +/** + * This class contains all the details about a critical operation. + */ @Immutable public final class ResourceGuardOperation { /* @@ -22,13 +24,15 @@ public final class ResourceGuardOperation { @JsonProperty(value = "requestResourceType", access = JsonProperty.Access.WRITE_ONLY) private String requestResourceType; - /** Creates an instance of ResourceGuardOperation class. */ + /** + * Creates an instance of ResourceGuardOperation class. + */ public ResourceGuardOperation() { } /** * Get the vaultCriticalOperation property: Name of the critical operation. - * + * * @return the vaultCriticalOperation value. */ public String vaultCriticalOperation() { @@ -37,7 +41,7 @@ public String vaultCriticalOperation() { /** * Get the requestResourceType property: Type of resource request. - * + * * @return the requestResourceType value. */ public String requestResourceType() { @@ -46,7 +50,7 @@ public String requestResourceType() { /** * 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/ResourceGuardOperationDetail.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardOperationDetail.java index 9f5046df9fe8..92428363bc00 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardOperationDetail.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardOperationDetail.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** VaultCritical Operation protected by a resource guard. */ +/** + * VaultCritical Operation protected by a resource guard. + */ @Fluent public final class ResourceGuardOperationDetail { /* @@ -22,13 +24,15 @@ public final class ResourceGuardOperationDetail { @JsonProperty(value = "defaultResourceRequest") private String defaultResourceRequest; - /** Creates an instance of ResourceGuardOperationDetail class. */ + /** + * Creates an instance of ResourceGuardOperationDetail class. + */ public ResourceGuardOperationDetail() { } /** * Get the vaultCriticalOperation property: The vaultCriticalOperation property. - * + * * @return the vaultCriticalOperation value. */ public String vaultCriticalOperation() { @@ -37,7 +41,7 @@ public String vaultCriticalOperation() { /** * Set the vaultCriticalOperation property: The vaultCriticalOperation property. - * + * * @param vaultCriticalOperation the vaultCriticalOperation value to set. * @return the ResourceGuardOperationDetail object itself. */ @@ -48,7 +52,7 @@ public ResourceGuardOperationDetail withVaultCriticalOperation(String vaultCriti /** * Get the defaultResourceRequest property: The defaultResourceRequest property. - * + * * @return the defaultResourceRequest value. */ public String defaultResourceRequest() { @@ -57,7 +61,7 @@ public String defaultResourceRequest() { /** * Set the defaultResourceRequest property: The defaultResourceRequest property. - * + * * @param defaultResourceRequest the defaultResourceRequest value to set. * @return the ResourceGuardOperationDetail object itself. */ @@ -68,7 +72,7 @@ public ResourceGuardOperationDetail withDefaultResourceRequest(String defaultRes /** * 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/ResourceGuardProxyBase.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBase.java index 5a041a34378f..cfb17a3dfe01 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBase.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBase.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** ResourceGuardProxyBase object, used in ResourceGuardProxyBaseResource. */ +/** + * ResourceGuardProxyBase object, used in ResourceGuardProxyBaseResource. + */ @Fluent public final class ResourceGuardProxyBase { /* @@ -35,13 +37,15 @@ public final class ResourceGuardProxyBase { @JsonProperty(value = "description") private String description; - /** Creates an instance of ResourceGuardProxyBase class. */ + /** + * Creates an instance of ResourceGuardProxyBase class. + */ public ResourceGuardProxyBase() { } /** * Get the resourceGuardResourceId property: The resourceGuardResourceId property. - * + * * @return the resourceGuardResourceId value. */ public String resourceGuardResourceId() { @@ -50,7 +54,7 @@ public String resourceGuardResourceId() { /** * Set the resourceGuardResourceId property: The resourceGuardResourceId property. - * + * * @param resourceGuardResourceId the resourceGuardResourceId value to set. * @return the ResourceGuardProxyBase object itself. */ @@ -61,7 +65,7 @@ public ResourceGuardProxyBase withResourceGuardResourceId(String resourceGuardRe /** * Get the resourceGuardOperationDetails property: The resourceGuardOperationDetails property. - * + * * @return the resourceGuardOperationDetails value. */ public List resourceGuardOperationDetails() { @@ -70,19 +74,19 @@ public List resourceGuardOperationDetails() { /** * Set the resourceGuardOperationDetails property: The resourceGuardOperationDetails property. - * + * * @param resourceGuardOperationDetails the resourceGuardOperationDetails value to set. * @return the ResourceGuardProxyBase object itself. */ - public ResourceGuardProxyBase withResourceGuardOperationDetails( - List resourceGuardOperationDetails) { + public ResourceGuardProxyBase + withResourceGuardOperationDetails(List resourceGuardOperationDetails) { this.resourceGuardOperationDetails = resourceGuardOperationDetails; return this; } /** * Get the lastUpdatedTime property: The lastUpdatedTime property. - * + * * @return the lastUpdatedTime value. */ public String lastUpdatedTime() { @@ -91,7 +95,7 @@ public String lastUpdatedTime() { /** * Set the lastUpdatedTime property: The lastUpdatedTime property. - * + * * @param lastUpdatedTime the lastUpdatedTime value to set. * @return the ResourceGuardProxyBase object itself. */ @@ -102,7 +106,7 @@ public ResourceGuardProxyBase withLastUpdatedTime(String lastUpdatedTime) { /** * Get the description property: The description property. - * + * * @return the description value. */ public String description() { @@ -111,7 +115,7 @@ public String description() { /** * Set the description property: The description property. - * + * * @param description the description value to set. * @return the ResourceGuardProxyBase object itself. */ @@ -122,7 +126,7 @@ public ResourceGuardProxyBase withDescription(String description) { /** * 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/ResourceGuardProxyBaseResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBaseResource.java index de477383edc8..af77ea23d75f 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBaseResource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBaseResource.java @@ -9,73 +9,83 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardProxyBaseResourceInner; -/** An immutable client-side representation of ResourceGuardProxyBaseResource. */ +/** + * An immutable client-side representation of ResourceGuardProxyBaseResource. + */ public interface ResourceGuardProxyBaseResource { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the properties property: ResourceGuardProxyBaseResource properties. - * + * * @return the properties value. */ ResourceGuardProxyBase properties(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardProxyBaseResourceInner object. - * + * * @return the inner object. */ ResourceGuardProxyBaseResourceInner innerModel(); - /** The entirety of the ResourceGuardProxyBaseResource definition. */ + /** + * The entirety of the ResourceGuardProxyBaseResource definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The ResourceGuardProxyBaseResource definition stages. */ + /** + * The ResourceGuardProxyBaseResource definition stages. + */ interface DefinitionStages { - /** The first stage of the ResourceGuardProxyBaseResource definition. */ + /** + * The first stage of the ResourceGuardProxyBaseResource definition. + */ interface Blank extends WithParentResource { } - /** The stage of the ResourceGuardProxyBaseResource definition allowing to specify parent resource. */ + /** + * The stage of the ResourceGuardProxyBaseResource definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, vaultName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @return the next definition stage. @@ -90,25 +100,27 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ ResourceGuardProxyBaseResource create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ResourceGuardProxyBaseResource create(Context context); } - /** The stage of the ResourceGuardProxyBaseResource definition allowing to specify properties. */ + /** + * The stage of the ResourceGuardProxyBaseResource definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: ResourceGuardProxyBaseResource properties. - * + * * @param properties ResourceGuardProxyBaseResource properties. * @return the next definition stage. */ @@ -118,36 +130,42 @@ interface WithProperties { /** * Begins update for the ResourceGuardProxyBaseResource resource. - * + * * @return the stage of resource update. */ ResourceGuardProxyBaseResource.Update update(); - /** The template for ResourceGuardProxyBaseResource update. */ + /** + * The template for ResourceGuardProxyBaseResource update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ ResourceGuardProxyBaseResource apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ResourceGuardProxyBaseResource apply(Context context); } - /** The ResourceGuardProxyBaseResource update stages. */ + /** + * The ResourceGuardProxyBaseResource update stages. + */ interface UpdateStages { - /** The stage of the ResourceGuardProxyBaseResource update allowing to specify properties. */ + /** + * The stage of the ResourceGuardProxyBaseResource update allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: ResourceGuardProxyBaseResource properties. - * + * * @param properties ResourceGuardProxyBaseResource properties. * @return the next definition stage. */ @@ -157,14 +175,14 @@ interface WithProperties { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ResourceGuardProxyBaseResource refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -172,7 +190,7 @@ interface WithProperties { /** * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. - * + * * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -184,7 +202,7 @@ interface WithProperties { /** * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. - * + * * @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. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBaseResourceList.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBaseResourceList.java index 650c360c2488..b098fd7bc6ab 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBaseResourceList.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBaseResourceList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of ResourceGuardProxyBase resources. */ +/** + * List of ResourceGuardProxyBase resources. + */ @Fluent public final class ResourceGuardProxyBaseResourceList extends DppResourceList { /* @@ -18,13 +20,15 @@ public final class ResourceGuardProxyBaseResourceList extends DppResourceList { @JsonProperty(value = "value") private List value; - /** Creates an instance of ResourceGuardProxyBaseResourceList class. */ + /** + * Creates an instance of ResourceGuardProxyBaseResourceList class. + */ public ResourceGuardProxyBaseResourceList() { } /** * Get the value property: List of resources. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: List of resources. - * + * * @param value the value value to set. * @return the ResourceGuardProxyBaseResourceList object itself. */ @@ -42,7 +46,9 @@ public ResourceGuardProxyBaseResourceList withValue(List tags(); /** * Gets the etag property: Optional ETag. - * + * * @return the etag value. */ String etag(); /** * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the properties property: ResourceGuardResource properties. - * + * * @return the properties value. */ ResourceGuard properties(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardResourceInner object. - * + * * @return the inner object. */ ResourceGuardResourceInner innerModel(); - /** The entirety of the ResourceGuardResource definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the ResourceGuardResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The ResourceGuardResource definition stages. */ + /** + * The ResourceGuardResource definition stages. + */ interface DefinitionStages { - /** The first stage of the ResourceGuardResource definition. */ + /** + * The first stage of the ResourceGuardResource definition. + */ interface Blank extends WithLocation { } - /** The stage of the ResourceGuardResource definition allowing to specify location. */ + /** + * The stage of the ResourceGuardResource definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -122,18 +129,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the ResourceGuardResource definition allowing to specify parent resource. */ + /** + * The stage of the ResourceGuardResource definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ @@ -148,47 +157,53 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithEtag, DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ ResourceGuardResource create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ResourceGuardResource create(Context context); } - /** The stage of the ResourceGuardResource definition allowing to specify tags. */ + /** + * The stage of the ResourceGuardResource definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the ResourceGuardResource definition allowing to specify etag. */ + /** + * The stage of the ResourceGuardResource definition allowing to specify etag. + */ interface WithEtag { /** * Specifies the etag property: Optional ETag.. - * + * * @param etag Optional ETag. * @return the next definition stage. */ WithCreate withEtag(String etag); } - /** The stage of the ResourceGuardResource definition allowing to specify properties. */ + /** + * The stage of the ResourceGuardResource definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: ResourceGuardResource properties. - * + * * @param properties ResourceGuardResource properties. * @return the next definition stage. */ @@ -198,36 +213,42 @@ interface WithProperties { /** * Begins update for the ResourceGuardResource resource. - * + * * @return the stage of resource update. */ ResourceGuardResource.Update update(); - /** The template for ResourceGuardResource update. */ + /** + * The template for ResourceGuardResource update. + */ interface Update extends UpdateStages.WithTags { /** * Executes the update request. - * + * * @return the updated resource. */ ResourceGuardResource apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ResourceGuardResource apply(Context context); } - /** The ResourceGuardResource update stages. */ + /** + * The ResourceGuardResource update stages. + */ interface UpdateStages { - /** The stage of the ResourceGuardResource update allowing to specify tags. */ + /** + * The stage of the ResourceGuardResource update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource Guard tags.. - * + * * @param tags Resource Guard tags. * @return the next definition stage. */ @@ -237,14 +258,14 @@ interface WithTags { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ResourceGuardResource refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ 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 343237d8a7bf..28dd92c5c4ea 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of ResourceGuard resources. */ +/** + * List of ResourceGuard resources. + */ @Fluent public final class ResourceGuardResourceList extends DppTrackedResourceList { /* @@ -18,13 +20,15 @@ public final class ResourceGuardResourceList extends DppTrackedResourceList { @JsonProperty(value = "value") private List value; - /** Creates an instance of ResourceGuardResourceList class. */ + /** + * Creates an instance of ResourceGuardResourceList class. + */ public ResourceGuardResourceList() { } /** * Get the value property: List of resources. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: List of resources. - * + * * @param value the value value to set. * @return the ResourceGuardResourceList object itself. */ @@ -42,7 +46,9 @@ public ResourceGuardResourceList withValue(List valu return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ResourceGuardResourceList withNextLink(String nextLink) { super.withNextLink(nextLink); @@ -51,7 +57,7 @@ public ResourceGuardResourceList withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 f0a979951eff..410816c3e10f 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ResourceGuards. */ +/** + * Resource collection API of ResourceGuards. + */ public interface ResourceGuards { /** * Returns ResourceGuards collection belonging to a subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}. @@ -21,7 +23,7 @@ public interface ResourceGuards { /** * Returns ResourceGuards collection belonging to a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,7 +34,7 @@ public interface ResourceGuards { /** * Returns ResourceGuards collection belonging to a ResourceGroup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -43,7 +45,7 @@ public interface ResourceGuards { /** * Returns ResourceGuards collection belonging to a ResourceGroup. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -55,7 +57,7 @@ public interface ResourceGuards { /** * Returns a ResourceGuard belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param context The context to associate with this operation. @@ -64,12 +66,12 @@ public interface ResourceGuards { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceGuardsName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceGuardsName, + Context context); /** * Returns a ResourceGuard belonging to a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -81,7 +83,7 @@ Response getByResourceGroupWithResponse( /** * Deletes a ResourceGuard resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @param context The context to associate with this operation. @@ -90,12 +92,12 @@ Response getByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteByResourceGroupWithResponse( - String resourceGroupName, String resourceGuardsName, Context context); + Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceGuardsName, + Context context); /** * Deletes a ResourceGuard resource from the resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The name of ResourceGuard. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -107,7 +109,7 @@ Response deleteByResourceGroupWithResponse( /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -115,13 +117,13 @@ Response deleteByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ - PagedIterable getDisableSoftDeleteRequestsObjects( - String resourceGroupName, String resourceGuardsName); + PagedIterable getDisableSoftDeleteRequestsObjects(String resourceGroupName, + String resourceGuardsName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -130,13 +132,13 @@ PagedIterable getDisableSoftDeleteRequestsObjects( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ - PagedIterable getDisableSoftDeleteRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context); + PagedIterable getDisableSoftDeleteRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -144,13 +146,13 @@ PagedIterable getDisableSoftDeleteRequestsObjects( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ - PagedIterable getDeleteResourceGuardProxyRequestsObjects( - String resourceGroupName, String resourceGuardsName); + PagedIterable getDeleteResourceGuardProxyRequestsObjects(String resourceGroupName, + String resourceGuardsName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -159,13 +161,13 @@ PagedIterable getDeleteResourceGuardProxyRequestsObjects( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ - PagedIterable getDeleteResourceGuardProxyRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context); + PagedIterable getDeleteResourceGuardProxyRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -173,13 +175,13 @@ PagedIterable getDeleteResourceGuardProxyRequestsObjects( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ - PagedIterable getBackupSecurityPinRequestsObjects( - String resourceGroupName, String resourceGuardsName); + PagedIterable getBackupSecurityPinRequestsObjects(String resourceGroupName, + String resourceGuardsName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -188,13 +190,13 @@ PagedIterable getBackupSecurityPinRequestsObjects( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ - PagedIterable getBackupSecurityPinRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context); + PagedIterable getBackupSecurityPinRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -202,13 +204,13 @@ PagedIterable getBackupSecurityPinRequestsObjects( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ - PagedIterable getDeleteProtectedItemRequestsObjects( - String resourceGroupName, String resourceGuardsName); + PagedIterable getDeleteProtectedItemRequestsObjects(String resourceGroupName, + String resourceGuardsName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -217,13 +219,13 @@ PagedIterable getDeleteProtectedItemRequestsObjects( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ - PagedIterable getDeleteProtectedItemRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context); + PagedIterable getDeleteProtectedItemRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -231,13 +233,13 @@ PagedIterable getDeleteProtectedItemRequestsObjects( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ - PagedIterable getUpdateProtectionPolicyRequestsObjects( - String resourceGroupName, String resourceGuardsName); + PagedIterable getUpdateProtectionPolicyRequestsObjects(String resourceGroupName, + String resourceGuardsName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -246,13 +248,13 @@ PagedIterable getUpdateProtectionPolicyRequestsObjects( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ - PagedIterable getUpdateProtectionPolicyRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context); + PagedIterable getUpdateProtectionPolicyRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -260,13 +262,13 @@ PagedIterable getUpdateProtectionPolicyRequestsObjects( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ - PagedIterable getUpdateProtectedItemRequestsObjects( - String resourceGroupName, String resourceGuardsName); + PagedIterable getUpdateProtectedItemRequestsObjects(String resourceGroupName, + String resourceGuardsName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param context The context to associate with this operation. @@ -275,13 +277,13 @@ PagedIterable getUpdateProtectedItemRequestsObjects( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base for all lists of V2 resources as paginated response with {@link PagedIterable}. */ - PagedIterable getUpdateProtectedItemRequestsObjects( - String resourceGroupName, String resourceGuardsName, Context context); + PagedIterable getUpdateProtectedItemRequestsObjects(String resourceGroupName, + String resourceGuardsName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -291,13 +293,13 @@ PagedIterable getUpdateProtectedItemRequestsObjects( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ - Response getDefaultDisableSoftDeleteRequestsObjectWithResponse( - String resourceGroupName, String resourceGuardsName, String requestName, Context context); + Response getDefaultDisableSoftDeleteRequestsObjectWithResponse(String resourceGroupName, + String resourceGuardsName, String requestName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -306,13 +308,13 @@ Response getDefaultDisableSoftDeleteRequestsObjectWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base resource under Microsoft.DataProtection provider namespace. */ - DppBaseResource getDefaultDisableSoftDeleteRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName); + DppBaseResource getDefaultDisableSoftDeleteRequestsObject(String resourceGroupName, String resourceGuardsName, + String requestName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -322,13 +324,13 @@ DppBaseResource getDefaultDisableSoftDeleteRequestsObject( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ - Response getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse( - String resourceGroupName, String resourceGuardsName, String requestName, Context context); + Response getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse(String resourceGroupName, + String resourceGuardsName, String requestName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -337,13 +339,13 @@ Response getDefaultDeleteResourceGuardProxyRequestsObjectWithRe * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base resource under Microsoft.DataProtection provider namespace. */ - DppBaseResource getDefaultDeleteResourceGuardProxyRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName); + DppBaseResource getDefaultDeleteResourceGuardProxyRequestsObject(String resourceGroupName, + String resourceGuardsName, String requestName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -353,13 +355,13 @@ DppBaseResource getDefaultDeleteResourceGuardProxyRequestsObject( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ - Response getDefaultBackupSecurityPinRequestsObjectWithResponse( - String resourceGroupName, String resourceGuardsName, String requestName, Context context); + Response getDefaultBackupSecurityPinRequestsObjectWithResponse(String resourceGroupName, + String resourceGuardsName, String requestName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -368,13 +370,13 @@ Response getDefaultBackupSecurityPinRequestsObjectWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base resource under Microsoft.DataProtection provider namespace. */ - DppBaseResource getDefaultBackupSecurityPinRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName); + DppBaseResource getDefaultBackupSecurityPinRequestsObject(String resourceGroupName, String resourceGuardsName, + String requestName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -384,13 +386,13 @@ DppBaseResource getDefaultBackupSecurityPinRequestsObject( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ - Response getDefaultDeleteProtectedItemRequestsObjectWithResponse( - String resourceGroupName, String resourceGuardsName, String requestName, Context context); + Response getDefaultDeleteProtectedItemRequestsObjectWithResponse(String resourceGroupName, + String resourceGuardsName, String requestName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -399,13 +401,13 @@ Response getDefaultDeleteProtectedItemRequestsObjectWithRespons * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base resource under Microsoft.DataProtection provider namespace. */ - DppBaseResource getDefaultDeleteProtectedItemRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName); + DppBaseResource getDefaultDeleteProtectedItemRequestsObject(String resourceGroupName, String resourceGuardsName, + String requestName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -415,13 +417,13 @@ DppBaseResource getDefaultDeleteProtectedItemRequestsObject( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ - Response getDefaultUpdateProtectionPolicyRequestsObjectWithResponse( - String resourceGroupName, String resourceGuardsName, String requestName, Context context); + Response getDefaultUpdateProtectionPolicyRequestsObjectWithResponse(String resourceGroupName, + String resourceGuardsName, String requestName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -430,13 +432,13 @@ Response getDefaultUpdateProtectionPolicyRequestsObjectWithResp * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base resource under Microsoft.DataProtection provider namespace. */ - DppBaseResource getDefaultUpdateProtectionPolicyRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName); + DppBaseResource getDefaultUpdateProtectionPolicyRequestsObject(String resourceGroupName, String resourceGuardsName, + String requestName); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -446,13 +448,13 @@ DppBaseResource getDefaultUpdateProtectionPolicyRequestsObject( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}. */ - Response getDefaultUpdateProtectedItemRequestsObjectWithResponse( - String resourceGroupName, String resourceGuardsName, String requestName, Context context); + Response getDefaultUpdateProtectedItemRequestsObjectWithResponse(String resourceGroupName, + String resourceGuardsName, String requestName, Context context); /** * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard * resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardsName The resourceGuardsName parameter. * @param requestName The requestName parameter. @@ -461,12 +463,12 @@ Response getDefaultUpdateProtectedItemRequestsObjectWithRespons * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base resource under Microsoft.DataProtection provider namespace. */ - DppBaseResource getDefaultUpdateProtectedItemRequestsObject( - String resourceGroupName, String resourceGuardsName, String requestName); + DppBaseResource getDefaultUpdateProtectedItemRequestsObject(String resourceGroupName, String resourceGuardsName, + String requestName); /** * Returns a ResourceGuard belonging to a resource group. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -477,7 +479,7 @@ DppBaseResource getDefaultUpdateProtectedItemRequestsObject( /** * Returns a ResourceGuard belonging to a resource group. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -489,7 +491,7 @@ DppBaseResource getDefaultUpdateProtectedItemRequestsObject( /** * Deletes a ResourceGuard resource from the resource group. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -499,7 +501,7 @@ DppBaseResource getDefaultUpdateProtectedItemRequestsObject( /** * Deletes a ResourceGuard resource from the resource group. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -511,7 +513,7 @@ DppBaseResource getDefaultUpdateProtectedItemRequestsObject( /** * Begins definition for a new ResourceGuardResource resource. - * + * * @param name resource name. * @return the first stage of the new ResourceGuardResource definition. */ 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 667f4b0b865f..14bc28756b97 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** ResourceMoveDetails will be returned in response to GetResource call from ARM. */ +/** + * ResourceMoveDetails will be returned in response to GetResource call from ARM. + */ @Fluent public final class ResourceMoveDetails { /* @@ -40,13 +42,15 @@ public final class ResourceMoveDetails { @JsonProperty(value = "targetResourcePath") private String targetResourcePath; - /** Creates an instance of ResourceMoveDetails class. */ + /** + * Creates an instance of ResourceMoveDetails class. + */ public ResourceMoveDetails() { } /** * Get the operationId property: CorrelationId of latest ResourceMove operation attempted. - * + * * @return the operationId value. */ public String operationId() { @@ -55,7 +59,7 @@ public String operationId() { /** * Set the operationId property: CorrelationId of latest ResourceMove operation attempted. - * + * * @param operationId the operationId value to set. * @return the ResourceMoveDetails object itself. */ @@ -66,7 +70,7 @@ public ResourceMoveDetails withOperationId(String operationId) { /** * Get the startTimeUtc property: Start time in UTC of latest ResourceMove operation attempted. ISO 8601 format. - * + * * @return the startTimeUtc value. */ public String startTimeUtc() { @@ -75,7 +79,7 @@ public String startTimeUtc() { /** * Set the startTimeUtc property: Start time in UTC of latest ResourceMove operation attempted. ISO 8601 format. - * + * * @param startTimeUtc the startTimeUtc value to set. * @return the ResourceMoveDetails object itself. */ @@ -87,7 +91,7 @@ public ResourceMoveDetails withStartTimeUtc(String startTimeUtc) { /** * Get the completionTimeUtc property: Completion time in UTC of latest ResourceMove operation attempted. ISO 8601 * format. - * + * * @return the completionTimeUtc value. */ public String completionTimeUtc() { @@ -97,7 +101,7 @@ public String completionTimeUtc() { /** * Set the completionTimeUtc property: Completion time in UTC of latest ResourceMove operation attempted. ISO 8601 * format. - * + * * @param completionTimeUtc the completionTimeUtc value to set. * @return the ResourceMoveDetails object itself. */ @@ -108,7 +112,7 @@ public ResourceMoveDetails withCompletionTimeUtc(String completionTimeUtc) { /** * Get the sourceResourcePath property: ARM resource path of source resource. - * + * * @return the sourceResourcePath value. */ public String sourceResourcePath() { @@ -117,7 +121,7 @@ public String sourceResourcePath() { /** * Set the sourceResourcePath property: ARM resource path of source resource. - * + * * @param sourceResourcePath the sourceResourcePath value to set. * @return the ResourceMoveDetails object itself. */ @@ -128,7 +132,7 @@ public ResourceMoveDetails withSourceResourcePath(String sourceResourcePath) { /** * Get the targetResourcePath property: ARM resource path of target resource used in latest ResourceMove operation. - * + * * @return the targetResourcePath value. */ public String targetResourcePath() { @@ -137,7 +141,7 @@ public String targetResourcePath() { /** * Set the targetResourcePath property: ARM resource path of target resource used in latest ResourceMove operation. - * + * * @param targetResourcePath the targetResourcePath value to set. * @return the ResourceMoveDetails object itself. */ @@ -148,7 +152,7 @@ public ResourceMoveDetails withTargetResourcePath(String targetResourcePath) { /** * 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/ResourceMoveState.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceMoveState.java index 1a950d720019..e9438668b555 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceMoveState.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceMoveState.java @@ -8,41 +8,63 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Resource move state for backup vault. */ +/** + * Resource move state for backup vault. + */ public final class ResourceMoveState extends ExpandableStringEnum { - /** Static value Unknown for ResourceMoveState. */ + /** + * Static value Unknown for ResourceMoveState. + */ public static final ResourceMoveState UNKNOWN = fromString("Unknown"); - /** Static value InProgress for ResourceMoveState. */ + /** + * Static value InProgress for ResourceMoveState. + */ public static final ResourceMoveState IN_PROGRESS = fromString("InProgress"); - /** Static value PrepareFailed for ResourceMoveState. */ + /** + * Static value PrepareFailed for ResourceMoveState. + */ public static final ResourceMoveState PREPARE_FAILED = fromString("PrepareFailed"); - /** Static value CommitFailed for ResourceMoveState. */ + /** + * Static value CommitFailed for ResourceMoveState. + */ public static final ResourceMoveState COMMIT_FAILED = fromString("CommitFailed"); - /** Static value Failed for ResourceMoveState. */ + /** + * Static value Failed for ResourceMoveState. + */ public static final ResourceMoveState FAILED = fromString("Failed"); - /** Static value PrepareTimedout for ResourceMoveState. */ + /** + * Static value PrepareTimedout for ResourceMoveState. + */ public static final ResourceMoveState PREPARE_TIMEDOUT = fromString("PrepareTimedout"); - /** Static value CommitTimedout for ResourceMoveState. */ + /** + * Static value CommitTimedout for ResourceMoveState. + */ public static final ResourceMoveState COMMIT_TIMEDOUT = fromString("CommitTimedout"); - /** Static value CriticalFailure for ResourceMoveState. */ + /** + * Static value CriticalFailure for ResourceMoveState. + */ public static final ResourceMoveState CRITICAL_FAILURE = fromString("CriticalFailure"); - /** Static value PartialSuccess for ResourceMoveState. */ + /** + * Static value PartialSuccess for ResourceMoveState. + */ public static final ResourceMoveState PARTIAL_SUCCESS = fromString("PartialSuccess"); - /** Static value MoveSucceeded for ResourceMoveState. */ + /** + * Static value MoveSucceeded for ResourceMoveState. + */ public static final ResourceMoveState MOVE_SUCCEEDED = fromString("MoveSucceeded"); /** * Creates a new instance of ResourceMoveState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -51,7 +73,7 @@ public ResourceMoveState() { /** * Creates or finds a ResourceMoveState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ResourceMoveState. */ @@ -62,7 +84,7 @@ public static ResourceMoveState fromString(String name) { /** * Gets known ResourceMoveState values. - * + * * @return known ResourceMoveState values. */ public static Collection values() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourcePropertiesObjectType.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourcePropertiesObjectType.java new file mode 100644 index 000000000000..64eec7e342f6 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourcePropertiesObjectType.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of the specific object - used for deserializing. + */ +public final class ResourcePropertiesObjectType extends ExpandableStringEnum { + /** + * Static value DefaultResourceProperties for ResourcePropertiesObjectType. + */ + public static final ResourcePropertiesObjectType DEFAULT_RESOURCE_PROPERTIES + = fromString("DefaultResourceProperties"); + + /** + * Creates a new instance of ResourcePropertiesObjectType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourcePropertiesObjectType() { + } + + /** + * Creates or finds a ResourcePropertiesObjectType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourcePropertiesObjectType. + */ + @JsonCreator + public static ResourcePropertiesObjectType fromString(String name) { + return fromString(name, ResourcePropertiesObjectType.class); + } + + /** + * Gets known ResourcePropertiesObjectType values. + * + * @return known ResourcePropertiesObjectType values. + */ + public static Collection values() { + return values(ResourcePropertiesObjectType.class); + } +} 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 a52c205c406a..3a7fe0539980 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 @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The RestorableTimeRange model. */ +/** + * The RestorableTimeRange model. + */ @Fluent public final class RestorableTimeRange { /* @@ -29,13 +31,15 @@ public final class RestorableTimeRange { @JsonProperty(value = "objectType") private String objectType; - /** Creates an instance of RestorableTimeRange class. */ + /** + * Creates an instance of RestorableTimeRange class. + */ public RestorableTimeRange() { } /** * Get the startTime property: Start time for the available restore range. - * + * * @return the startTime value. */ public String startTime() { @@ -44,7 +48,7 @@ public String startTime() { /** * Set the startTime property: Start time for the available restore range. - * + * * @param startTime the startTime value to set. * @return the RestorableTimeRange object itself. */ @@ -55,7 +59,7 @@ public RestorableTimeRange withStartTime(String startTime) { /** * Get the endTime property: End time for the available restore range. - * + * * @return the endTime value. */ public String endTime() { @@ -64,7 +68,7 @@ public String endTime() { /** * Set the endTime property: End time for the available restore range. - * + * * @param endTime the endTime value to set. * @return the RestorableTimeRange object itself. */ @@ -75,7 +79,7 @@ public RestorableTimeRange withEndTime(String endTime) { /** * Get the objectType property: The objectType property. - * + * * @return the objectType value. */ public String objectType() { @@ -84,7 +88,7 @@ public String objectType() { /** * Set the objectType property: The objectType property. - * + * * @param objectType the objectType value to set. * @return the RestorableTimeRange object itself. */ @@ -95,19 +99,17 @@ public RestorableTimeRange withObjectType(String objectType) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (startTime() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property startTime in model RestorableTimeRange")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property startTime in model RestorableTimeRange")); } if (endTime() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property endTime in model RestorableTimeRange")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property endTime in model RestorableTimeRange")); } } 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 5772f5aade00..737ae782f71f 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 @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of RestorableTimeRanges. */ +/** + * Resource collection API of RestorableTimeRanges. + */ public interface RestorableTimeRanges { /** * The find operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -22,16 +24,13 @@ public interface RestorableTimeRanges { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list Restore Ranges Response along with {@link Response}. */ - Response findWithResponse( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupFindRestorableTimeRangesRequest parameters, + Response findWithResponse(String resourceGroupName, + String vaultName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters, Context context); /** * The find operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the backup vault. * @param backupInstanceName The name of the backup instance. @@ -41,9 +40,6 @@ Response findWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list Restore Ranges Response. */ - AzureBackupFindRestorableTimeRangesResponseResource find( - String resourceGroupName, - String vaultName, - String backupInstanceName, - AzureBackupFindRestorableTimeRangesRequest parameters); + AzureBackupFindRestorableTimeRangesResponseResource find(String resourceGroupName, String vaultName, + String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters); } 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 900f384c5963..05b7519fd9cf 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 @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Class encapsulating restore as files target parameters. */ +/** + * Class encapsulating restore as files target parameters. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("RestoreFilesTargetInfo") @Fluent @@ -21,13 +23,15 @@ public final class RestoreFilesTargetInfo extends RestoreTargetInfoBase { @JsonProperty(value = "targetDetails", required = true) private TargetDetails targetDetails; - /** Creates an instance of RestoreFilesTargetInfo class. */ + /** + * Creates an instance of RestoreFilesTargetInfo class. + */ public RestoreFilesTargetInfo() { } /** * Get the targetDetails property: Destination of RestoreAsFiles operation, when destination is not a datasource. - * + * * @return the targetDetails value. */ public TargetDetails targetDetails() { @@ -36,7 +40,7 @@ public TargetDetails targetDetails() { /** * Set the targetDetails property: Destination of RestoreAsFiles operation, when destination is not a datasource. - * + * * @param targetDetails the targetDetails value to set. * @return the RestoreFilesTargetInfo object itself. */ @@ -45,14 +49,18 @@ public RestoreFilesTargetInfo withTargetDetails(TargetDetails targetDetails) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public RestoreFilesTargetInfo withRecoveryOption(RecoveryOption recoveryOption) { super.withRecoveryOption(recoveryOption); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public RestoreFilesTargetInfo withRestoreLocation(String restoreLocation) { super.withRestoreLocation(restoreLocation); @@ -61,17 +69,15 @@ public RestoreFilesTargetInfo withRestoreLocation(String restoreLocation) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (targetDetails() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetDetails in model RestoreFilesTargetInfo")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property targetDetails in model RestoreFilesTargetInfo")); } else { targetDetails().validate(); } 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 b2219de941df..44f420cb486d 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** The RestoreJobRecoveryPointDetails model. */ +/** + * The RestoreJobRecoveryPointDetails model. + */ @Fluent public final class RestoreJobRecoveryPointDetails { /* @@ -23,13 +25,15 @@ public final class RestoreJobRecoveryPointDetails { @JsonProperty(value = "recoveryPointTime") private OffsetDateTime recoveryPointTime; - /** Creates an instance of RestoreJobRecoveryPointDetails class. */ + /** + * Creates an instance of RestoreJobRecoveryPointDetails class. + */ public RestoreJobRecoveryPointDetails() { } /** * Get the recoveryPointId property: The recoveryPointID property. - * + * * @return the recoveryPointId value. */ public String recoveryPointId() { @@ -38,7 +42,7 @@ public String recoveryPointId() { /** * Set the recoveryPointId property: The recoveryPointID property. - * + * * @param recoveryPointId the recoveryPointId value to set. * @return the RestoreJobRecoveryPointDetails object itself. */ @@ -49,7 +53,7 @@ public RestoreJobRecoveryPointDetails withRecoveryPointId(String recoveryPointId /** * Get the recoveryPointTime property: The recoveryPointTime property. - * + * * @return the recoveryPointTime value. */ public OffsetDateTime recoveryPointTime() { @@ -58,7 +62,7 @@ public OffsetDateTime recoveryPointTime() { /** * Set the recoveryPointTime property: The recoveryPointTime property. - * + * * @param recoveryPointTime the recoveryPointTime value to set. * @return the RestoreJobRecoveryPointDetails object itself. */ @@ -69,7 +73,7 @@ public RestoreJobRecoveryPointDetails withRecoveryPointTime(OffsetDateTime recov /** * 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/RestoreSourceDataStoreType.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreSourceDataStoreType.java index 410926f355d8..8eaae38fca00 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreSourceDataStoreType.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreSourceDataStoreType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Gets or sets the type of the source data store. */ +/** + * Gets or sets the type of the source data store. + */ public final class RestoreSourceDataStoreType extends ExpandableStringEnum { - /** Static value OperationalStore for RestoreSourceDataStoreType. */ + /** + * Static value OperationalStore for RestoreSourceDataStoreType. + */ public static final RestoreSourceDataStoreType OPERATIONAL_STORE = fromString("OperationalStore"); - /** Static value VaultStore for RestoreSourceDataStoreType. */ + /** + * Static value VaultStore for RestoreSourceDataStoreType. + */ public static final RestoreSourceDataStoreType VAULT_STORE = fromString("VaultStore"); - /** Static value ArchiveStore for RestoreSourceDataStoreType. */ + /** + * Static value ArchiveStore for RestoreSourceDataStoreType. + */ public static final RestoreSourceDataStoreType ARCHIVE_STORE = fromString("ArchiveStore"); /** * Creates a new instance of RestoreSourceDataStoreType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public RestoreSourceDataStoreType() { /** * Creates or finds a RestoreSourceDataStoreType from its string representation. - * + * * @param name a name to look for. * @return the corresponding RestoreSourceDataStoreType. */ @@ -41,7 +49,7 @@ public static RestoreSourceDataStoreType fromString(String name) { /** * Gets known RestoreSourceDataStoreType values. - * + * * @return known RestoreSourceDataStoreType values. */ public static Collection values() { 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 37d31a513bcd..4d54510b5427 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 @@ -10,14 +10,16 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Class encapsulating restore target parameters. */ +/** + * Class encapsulating restore target parameters. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("RestoreTargetInfo") @Fluent public final class RestoreTargetInfo extends RestoreTargetInfoBase { /* * Datasource - * + * * Information of target DS */ @JsonProperty(value = "datasourceInfo", required = true) @@ -25,7 +27,7 @@ public final class RestoreTargetInfo extends RestoreTargetInfoBase { /* * DatasourceSet - * + * * Information of target DS Set */ @JsonProperty(value = "datasourceSetInfo") @@ -37,15 +39,17 @@ public final class RestoreTargetInfo extends RestoreTargetInfoBase { @JsonProperty(value = "datasourceAuthCredentials") private AuthCredentials datasourceAuthCredentials; - /** Creates an instance of RestoreTargetInfo class. */ + /** + * Creates an instance of RestoreTargetInfo class. + */ public RestoreTargetInfo() { } /** * Get the datasourceInfo property: Datasource - * - *

Information of target DS. - * + * + * Information of target DS. + * * @return the datasourceInfo value. */ public Datasource datasourceInfo() { @@ -54,9 +58,9 @@ public Datasource datasourceInfo() { /** * Set the datasourceInfo property: Datasource - * - *

Information of target DS. - * + * + * Information of target DS. + * * @param datasourceInfo the datasourceInfo value to set. * @return the RestoreTargetInfo object itself. */ @@ -67,9 +71,9 @@ public RestoreTargetInfo withDatasourceInfo(Datasource datasourceInfo) { /** * Get the datasourceSetInfo property: DatasourceSet - * - *

Information of target DS Set. - * + * + * Information of target DS Set. + * * @return the datasourceSetInfo value. */ public DatasourceSet datasourceSetInfo() { @@ -78,9 +82,9 @@ public DatasourceSet datasourceSetInfo() { /** * Set the datasourceSetInfo property: DatasourceSet - * - *

Information of target DS Set. - * + * + * Information of target DS Set. + * * @param datasourceSetInfo the datasourceSetInfo value to set. * @return the RestoreTargetInfo object itself. */ @@ -91,7 +95,7 @@ public RestoreTargetInfo withDatasourceSetInfo(DatasourceSet datasourceSetInfo) /** * Get the datasourceAuthCredentials property: Credentials to use to authenticate with data source provider. - * + * * @return the datasourceAuthCredentials value. */ public AuthCredentials datasourceAuthCredentials() { @@ -100,7 +104,7 @@ public AuthCredentials datasourceAuthCredentials() { /** * Set the datasourceAuthCredentials property: Credentials to use to authenticate with data source provider. - * + * * @param datasourceAuthCredentials the datasourceAuthCredentials value to set. * @return the RestoreTargetInfo object itself. */ @@ -109,14 +113,18 @@ public RestoreTargetInfo withDatasourceAuthCredentials(AuthCredentials datasourc return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public RestoreTargetInfo withRecoveryOption(RecoveryOption recoveryOption) { super.withRecoveryOption(recoveryOption); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public RestoreTargetInfo withRestoreLocation(String restoreLocation) { super.withRestoreLocation(restoreLocation); @@ -125,17 +133,15 @@ public RestoreTargetInfo withRestoreLocation(String restoreLocation) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (datasourceInfo() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property datasourceInfo in model RestoreTargetInfo")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property datasourceInfo in model RestoreTargetInfo")); } else { datasourceInfo().validate(); } 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 cc8c75d19b30..483355522205 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 @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Base class common to RestoreTargetInfo and RestoreFilesTargetInfo. */ +/** + * Base class common to RestoreTargetInfo and RestoreFilesTargetInfo. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -21,8 +23,7 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "ItemLevelRestoreTargetInfo", value = ItemLevelRestoreTargetInfo.class), @JsonSubTypes.Type(name = "RestoreFilesTargetInfo", value = RestoreFilesTargetInfo.class), - @JsonSubTypes.Type(name = "RestoreTargetInfo", value = RestoreTargetInfo.class) -}) + @JsonSubTypes.Type(name = "RestoreTargetInfo", value = RestoreTargetInfo.class) }) @Fluent public class RestoreTargetInfoBase { /* @@ -37,13 +38,15 @@ public class RestoreTargetInfoBase { @JsonProperty(value = "restoreLocation") private String restoreLocation; - /** Creates an instance of RestoreTargetInfoBase class. */ + /** + * Creates an instance of RestoreTargetInfoBase class. + */ public RestoreTargetInfoBase() { } /** * Get the recoveryOption property: Recovery Option. - * + * * @return the recoveryOption value. */ public RecoveryOption recoveryOption() { @@ -52,7 +55,7 @@ public RecoveryOption recoveryOption() { /** * Set the recoveryOption property: Recovery Option. - * + * * @param recoveryOption the recoveryOption value to set. * @return the RestoreTargetInfoBase object itself. */ @@ -63,7 +66,7 @@ public RestoreTargetInfoBase withRecoveryOption(RecoveryOption recoveryOption) { /** * Get the restoreLocation property: Target Restore region. - * + * * @return the restoreLocation value. */ public String restoreLocation() { @@ -72,7 +75,7 @@ public String restoreLocation() { /** * Set the restoreLocation property: Target Restore region. - * + * * @param restoreLocation the restoreLocation value to set. * @return the RestoreTargetInfoBase object itself. */ @@ -83,15 +86,13 @@ public RestoreTargetInfoBase withRestoreLocation(String restoreLocation) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (recoveryOption() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property recoveryOption in model RestoreTargetInfoBase")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property recoveryOption in model RestoreTargetInfoBase")); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreTargetLocationType.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreTargetLocationType.java index 6bdf50c39e34..1dd5104263a8 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreTargetLocationType.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/RestoreTargetLocationType.java @@ -9,22 +9,28 @@ import java.util.Collection; /** - * Denotes the target location where the data will be restored, string value for the enum - * {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType}. + * Denotes the target location where the data will be restored, + * string value for the enum {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType}. */ public final class RestoreTargetLocationType extends ExpandableStringEnum { - /** Static value Invalid for RestoreTargetLocationType. */ + /** + * Static value Invalid for RestoreTargetLocationType. + */ public static final RestoreTargetLocationType INVALID = fromString("Invalid"); - /** Static value AzureBlobs for RestoreTargetLocationType. */ + /** + * Static value AzureBlobs for RestoreTargetLocationType. + */ public static final RestoreTargetLocationType AZURE_BLOBS = fromString("AzureBlobs"); - /** Static value AzureFiles for RestoreTargetLocationType. */ + /** + * Static value AzureFiles for RestoreTargetLocationType. + */ public static final RestoreTargetLocationType AZURE_FILES = fromString("AzureFiles"); /** * Creates a new instance of RestoreTargetLocationType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +39,7 @@ public RestoreTargetLocationType() { /** * Creates or finds a RestoreTargetLocationType from its string representation. - * + * * @param name a name to look for. * @return the corresponding RestoreTargetLocationType. */ @@ -44,7 +50,7 @@ public static RestoreTargetLocationType fromString(String name) { /** * Gets known RestoreTargetLocationType values. - * + * * @return known RestoreTargetLocationType values. */ public static Collection values() { 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 4e7a9fcffff0..03fbcc23bf0f 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 @@ -10,8 +10,8 @@ /** * RetentionTag - * - *

Retention tag. + * + * Retention tag. */ @Fluent public final class RetentionTag { @@ -33,13 +33,15 @@ public final class RetentionTag { @JsonProperty(value = "tagName", required = true) private String tagName; - /** Creates an instance of RetentionTag class. */ + /** + * Creates an instance of RetentionTag class. + */ public RetentionTag() { } /** * Get the etag property: Retention Tag version. - * + * * @return the etag value. */ public String etag() { @@ -48,7 +50,7 @@ public String etag() { /** * Get the id property: Retention Tag version. - * + * * @return the id value. */ public String id() { @@ -57,7 +59,7 @@ public String id() { /** * Get the tagName property: Retention Tag Name to relate it to retention rule. - * + * * @return the tagName value. */ public String tagName() { @@ -66,7 +68,7 @@ public String tagName() { /** * Set the tagName property: Retention Tag Name to relate it to retention rule. - * + * * @param tagName the tagName value to set. * @return the RetentionTag object itself. */ @@ -77,14 +79,13 @@ public RetentionTag withTagName(String tagName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (tagName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property tagName in model RetentionTag")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property tagName in model RetentionTag")); } } 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 5d2e41413026..5bd24eeba29d 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 @@ -13,15 +13,15 @@ /** * ScheduleBasedBackupCriteria - * - *

Schedule based backup criteria. + * + * Schedule based backup criteria. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("ScheduleBasedBackupCriteria") @Fluent public final class ScheduleBasedBackupCriteria extends BackupCriteria { /* - * it contains absolute values like "AllBackup"\ / "FirstOfDay"\ / "FirstOfWeek"\ / "FirstOfMonth" + * it contains absolute values like "AllBackup"\ / "FirstOfDay"\ / "FirstOfWeek"\ / "FirstOfMonth" * and should be part of AbsoluteMarker enum */ @JsonProperty(value = "absoluteCriteria") @@ -57,14 +57,17 @@ public final class ScheduleBasedBackupCriteria extends BackupCriteria { @JsonProperty(value = "weeksOfTheMonth") private List weeksOfTheMonth; - /** Creates an instance of ScheduleBasedBackupCriteria class. */ + /** + * Creates an instance of ScheduleBasedBackupCriteria class. + */ public ScheduleBasedBackupCriteria() { } /** - * Get the absoluteCriteria property: it contains absolute values like "AllBackup"\ / "FirstOfDay"\ / "FirstOfWeek"\ - * / "FirstOfMonth" and should be part of AbsoluteMarker enum. - * + * Get the absoluteCriteria property: it contains absolute values like "AllBackup"\ / "FirstOfDay"\ / + * "FirstOfWeek"\ / "FirstOfMonth" + * and should be part of AbsoluteMarker enum. + * * @return the absoluteCriteria value. */ public List absoluteCriteria() { @@ -72,9 +75,10 @@ public List absoluteCriteria() { } /** - * Set the absoluteCriteria property: it contains absolute values like "AllBackup"\ / "FirstOfDay"\ / "FirstOfWeek"\ - * / "FirstOfMonth" and should be part of AbsoluteMarker enum. - * + * Set the absoluteCriteria property: it contains absolute values like "AllBackup"\ / "FirstOfDay"\ / + * "FirstOfWeek"\ / "FirstOfMonth" + * and should be part of AbsoluteMarker enum. + * * @param absoluteCriteria the absoluteCriteria value to set. * @return the ScheduleBasedBackupCriteria object itself. */ @@ -85,7 +89,7 @@ public ScheduleBasedBackupCriteria withAbsoluteCriteria(List abs /** * Get the daysOfMonth property: This is day of the month from 1 to 28 other wise last of month. - * + * * @return the daysOfMonth value. */ public List daysOfMonth() { @@ -94,7 +98,7 @@ public List daysOfMonth() { /** * Set the daysOfMonth property: This is day of the month from 1 to 28 other wise last of month. - * + * * @param daysOfMonth the daysOfMonth value to set. * @return the ScheduleBasedBackupCriteria object itself. */ @@ -105,7 +109,7 @@ public ScheduleBasedBackupCriteria withDaysOfMonth(List daysOfMonth) { /** * Get the daysOfTheWeek property: It should be Sunday/Monday/T..../Saturday. - * + * * @return the daysOfTheWeek value. */ public List daysOfTheWeek() { @@ -114,7 +118,7 @@ public List daysOfTheWeek() { /** * Set the daysOfTheWeek property: It should be Sunday/Monday/T..../Saturday. - * + * * @param daysOfTheWeek the daysOfTheWeek value to set. * @return the ScheduleBasedBackupCriteria object itself. */ @@ -125,7 +129,7 @@ public ScheduleBasedBackupCriteria withDaysOfTheWeek(List daysOfTheWe /** * Get the monthsOfYear property: It should be January/February/....../December. - * + * * @return the monthsOfYear value. */ public List monthsOfYear() { @@ -134,7 +138,7 @@ public List monthsOfYear() { /** * Set the monthsOfYear property: It should be January/February/....../December. - * + * * @param monthsOfYear the monthsOfYear value to set. * @return the ScheduleBasedBackupCriteria object itself. */ @@ -145,7 +149,7 @@ public ScheduleBasedBackupCriteria withMonthsOfYear(List monthsOfYear) { /** * Get the scheduleTimes property: List of schedule times for backup. - * + * * @return the scheduleTimes value. */ public List scheduleTimes() { @@ -154,7 +158,7 @@ public List scheduleTimes() { /** * Set the scheduleTimes property: List of schedule times for backup. - * + * * @param scheduleTimes the scheduleTimes value to set. * @return the ScheduleBasedBackupCriteria object itself. */ @@ -165,7 +169,7 @@ public ScheduleBasedBackupCriteria withScheduleTimes(List schedu /** * Get the weeksOfTheMonth property: It should be First/Second/Third/Fourth/Last. - * + * * @return the weeksOfTheMonth value. */ public List weeksOfTheMonth() { @@ -174,7 +178,7 @@ public List weeksOfTheMonth() { /** * Set the weeksOfTheMonth property: It should be First/Second/Third/Fourth/Last. - * + * * @param weeksOfTheMonth the weeksOfTheMonth value to set. * @return the ScheduleBasedBackupCriteria object itself. */ @@ -185,7 +189,7 @@ public ScheduleBasedBackupCriteria withWeeksOfTheMonth(List weeksOfT /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 40a5440ce131..5eff2f95585a 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 @@ -13,8 +13,8 @@ /** * ScheduleBasedTriggerContext - * - *

Schedule based trigger context. + * + * Schedule based trigger context. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("ScheduleBasedTriggerContext") @@ -22,7 +22,7 @@ public final class ScheduleBasedTriggerContext extends TriggerContext { /* * BackupSchedule - * + * * Schedule for this backup */ @JsonProperty(value = "schedule", required = true) @@ -34,15 +34,17 @@ public final class ScheduleBasedTriggerContext extends TriggerContext { @JsonProperty(value = "taggingCriteria", required = true) private List taggingCriteria; - /** Creates an instance of ScheduleBasedTriggerContext class. */ + /** + * Creates an instance of ScheduleBasedTriggerContext class. + */ public ScheduleBasedTriggerContext() { } /** * Get the schedule property: BackupSchedule - * - *

Schedule for this backup. - * + * + * Schedule for this backup. + * * @return the schedule value. */ public BackupSchedule schedule() { @@ -51,9 +53,9 @@ public BackupSchedule schedule() { /** * Set the schedule property: BackupSchedule - * - *

Schedule for this backup. - * + * + * Schedule for this backup. + * * @param schedule the schedule value to set. * @return the ScheduleBasedTriggerContext object itself. */ @@ -64,7 +66,7 @@ public ScheduleBasedTriggerContext withSchedule(BackupSchedule schedule) { /** * Get the taggingCriteria property: List of tags that can be applicable for given schedule. - * + * * @return the taggingCriteria value. */ public List taggingCriteria() { @@ -73,7 +75,7 @@ public List taggingCriteria() { /** * Set the taggingCriteria property: List of tags that can be applicable for given schedule. - * + * * @param taggingCriteria the taggingCriteria value to set. * @return the ScheduleBasedTriggerContext object itself. */ @@ -84,25 +86,21 @@ public ScheduleBasedTriggerContext withTaggingCriteria(List tag /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (schedule() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property schedule in model ScheduleBasedTriggerContext")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property schedule in model ScheduleBasedTriggerContext")); } else { schedule().validate(); } if (taggingCriteria() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property taggingCriteria in model ScheduleBasedTriggerContext")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property taggingCriteria in model ScheduleBasedTriggerContext")); } else { taggingCriteria().forEach(e -> e.validate()); } 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 f26464b3d8d3..6f31af57c981 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Secret store based authentication credentials. */ +/** + * Secret store based authentication credentials. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") @JsonTypeName("SecretStoreBasedAuthCredentials") @Fluent @@ -20,13 +22,15 @@ public final class SecretStoreBasedAuthCredentials extends AuthCredentials { @JsonProperty(value = "secretStoreResource") private SecretStoreResource secretStoreResource; - /** Creates an instance of SecretStoreBasedAuthCredentials class. */ + /** + * Creates an instance of SecretStoreBasedAuthCredentials class. + */ public SecretStoreBasedAuthCredentials() { } /** * Get the secretStoreResource property: Secret store resource. - * + * * @return the secretStoreResource value. */ public SecretStoreResource secretStoreResource() { @@ -35,7 +39,7 @@ public SecretStoreResource secretStoreResource() { /** * Set the secretStoreResource property: Secret store resource. - * + * * @param secretStoreResource the secretStoreResource value to set. * @return the SecretStoreBasedAuthCredentials object itself. */ @@ -46,7 +50,7 @@ public SecretStoreBasedAuthCredentials withSecretStoreResource(SecretStoreResour /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 d8f0913175ee..68c5e3d064e5 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 @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Class representing a secret store resource. */ +/** + * Class representing a secret store resource. + */ @Fluent public final class SecretStoreResource { /* @@ -29,13 +31,15 @@ public final class SecretStoreResource { @JsonProperty(value = "value") private String value; - /** Creates an instance of SecretStoreResource class. */ + /** + * Creates an instance of SecretStoreResource class. + */ public SecretStoreResource() { } /** * Get the uri property: Uri to get to the resource. - * + * * @return the uri value. */ public String uri() { @@ -44,7 +48,7 @@ public String uri() { /** * Set the uri property: Uri to get to the resource. - * + * * @param uri the uri value to set. * @return the SecretStoreResource object itself. */ @@ -55,7 +59,7 @@ public SecretStoreResource withUri(String uri) { /** * Get the secretStoreType property: Gets or sets the type of secret store. - * + * * @return the secretStoreType value. */ public SecretStoreType secretStoreType() { @@ -64,7 +68,7 @@ public SecretStoreType secretStoreType() { /** * Set the secretStoreType property: Gets or sets the type of secret store. - * + * * @param secretStoreType the secretStoreType value to set. * @return the SecretStoreResource object itself. */ @@ -75,7 +79,7 @@ public SecretStoreResource withSecretStoreType(SecretStoreType secretStoreType) /** * Get the value property: Gets or sets value stored in secret store resource. - * + * * @return the value value. */ public String value() { @@ -84,7 +88,7 @@ public String 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. */ @@ -95,15 +99,13 @@ public SecretStoreResource withValue(String value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (secretStoreType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property secretStoreType in model SecretStoreResource")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property secretStoreType in model SecretStoreResource")); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecretStoreType.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecretStoreType.java index 9420751b1eae..9c6ed0f57f86 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecretStoreType.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecretStoreType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Gets or sets the type of secret store. */ +/** + * Gets or sets the type of secret store. + */ public final class SecretStoreType extends ExpandableStringEnum { - /** Static value Invalid for SecretStoreType. */ + /** + * Static value Invalid for SecretStoreType. + */ public static final SecretStoreType INVALID = fromString("Invalid"); - /** Static value AzureKeyVault for SecretStoreType. */ + /** + * Static value AzureKeyVault for SecretStoreType. + */ public static final SecretStoreType AZURE_KEY_VAULT = fromString("AzureKeyVault"); /** * Creates a new instance of SecretStoreType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public SecretStoreType() { /** * Creates or finds a SecretStoreType from its string representation. - * + * * @param name a name to look for. * @return the corresponding SecretStoreType. */ @@ -38,7 +44,7 @@ public static SecretStoreType fromString(String name) { /** * Gets known SecretStoreType values. - * + * * @return known SecretStoreType values. */ public static Collection values() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecureScoreLevel.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecureScoreLevel.java index aabf158c6736..f2a040d2428f 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecureScoreLevel.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecureScoreLevel.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Secure Score of Backup Vault. */ +/** + * Secure Score of Backup Vault. + */ public final class SecureScoreLevel extends ExpandableStringEnum { - /** Static value None for SecureScoreLevel. */ + /** + * Static value None for SecureScoreLevel. + */ public static final SecureScoreLevel NONE = fromString("None"); - /** Static value Minimum for SecureScoreLevel. */ + /** + * Static value Minimum for SecureScoreLevel. + */ public static final SecureScoreLevel MINIMUM = fromString("Minimum"); - /** Static value Adequate for SecureScoreLevel. */ + /** + * Static value Adequate for SecureScoreLevel. + */ public static final SecureScoreLevel ADEQUATE = fromString("Adequate"); - /** Static value Maximum for SecureScoreLevel. */ + /** + * Static value Maximum for SecureScoreLevel. + */ public static final SecureScoreLevel MAXIMUM = fromString("Maximum"); - /** Static value NotSupported for SecureScoreLevel. */ + /** + * Static value NotSupported for SecureScoreLevel. + */ public static final SecureScoreLevel NOT_SUPPORTED = fromString("NotSupported"); /** * Creates a new instance of SecureScoreLevel value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public SecureScoreLevel() { /** * Creates or finds a SecureScoreLevel from its string representation. - * + * * @param name a name to look for. * @return the corresponding SecureScoreLevel. */ @@ -47,7 +59,7 @@ public static SecureScoreLevel fromString(String name) { /** * Gets known SecureScoreLevel values. - * + * * @return known SecureScoreLevel values. */ public static Collection values() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecuritySettings.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecuritySettings.java index eb039420e2a4..efbd024d1c54 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecuritySettings.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecuritySettings.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Class containing security settings of vault. */ +/** + * Class containing security settings of vault. + */ @Fluent public final class SecuritySettings { /* @@ -22,13 +24,15 @@ public final class SecuritySettings { @JsonProperty(value = "immutabilitySettings") private ImmutabilitySettings immutabilitySettings; - /** Creates an instance of SecuritySettings class. */ + /** + * Creates an instance of SecuritySettings class. + */ public SecuritySettings() { } /** * Get the softDeleteSettings property: Soft delete related settings. - * + * * @return the softDeleteSettings value. */ public SoftDeleteSettings softDeleteSettings() { @@ -37,7 +41,7 @@ public SoftDeleteSettings softDeleteSettings() { /** * Set the softDeleteSettings property: Soft delete related settings. - * + * * @param softDeleteSettings the softDeleteSettings value to set. * @return the SecuritySettings object itself. */ @@ -48,7 +52,7 @@ public SecuritySettings withSoftDeleteSettings(SoftDeleteSettings softDeleteSett /** * Get the immutabilitySettings property: Immutability Settings at vault level. - * + * * @return the immutabilitySettings value. */ public ImmutabilitySettings immutabilitySettings() { @@ -57,7 +61,7 @@ public ImmutabilitySettings immutabilitySettings() { /** * Set the immutabilitySettings property: Immutability Settings at vault level. - * + * * @param immutabilitySettings the immutabilitySettings value to set. * @return the SecuritySettings object itself. */ @@ -68,7 +72,7 @@ public SecuritySettings withImmutabilitySettings(ImmutabilitySettings immutabili /** * 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/SoftDeleteSettings.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SoftDeleteSettings.java index 832935db4c8c..b03d09c65922 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SoftDeleteSettings.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SoftDeleteSettings.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Soft delete related settings. */ +/** + * Soft delete related settings. + */ @Fluent public final class SoftDeleteSettings { /* @@ -22,13 +24,15 @@ public final class SoftDeleteSettings { @JsonProperty(value = "retentionDurationInDays") private Double retentionDurationInDays; - /** Creates an instance of SoftDeleteSettings class. */ + /** + * Creates an instance of SoftDeleteSettings class. + */ public SoftDeleteSettings() { } /** * Get the state property: State of soft delete. - * + * * @return the state value. */ public SoftDeleteState state() { @@ -37,7 +41,7 @@ public SoftDeleteState state() { /** * Set the state property: State of soft delete. - * + * * @param state the state value to set. * @return the SoftDeleteSettings object itself. */ @@ -48,7 +52,7 @@ public SoftDeleteSettings withState(SoftDeleteState state) { /** * Get the retentionDurationInDays property: Soft delete retention duration. - * + * * @return the retentionDurationInDays value. */ public Double retentionDurationInDays() { @@ -57,7 +61,7 @@ public Double retentionDurationInDays() { /** * Set the retentionDurationInDays property: Soft delete retention duration. - * + * * @param retentionDurationInDays the retentionDurationInDays value to set. * @return the SoftDeleteSettings object itself. */ @@ -68,7 +72,7 @@ public SoftDeleteSettings withRetentionDurationInDays(Double retentionDurationIn /** * 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/SoftDeleteState.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SoftDeleteState.java index f84747dfe156..71903a90f75c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SoftDeleteState.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SoftDeleteState.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** State of soft delete. */ +/** + * State of soft delete. + */ public final class SoftDeleteState extends ExpandableStringEnum { - /** Static value Off for SoftDeleteState. */ + /** + * Static value Off for SoftDeleteState. + */ public static final SoftDeleteState OFF = fromString("Off"); - /** Static value On for SoftDeleteState. */ + /** + * Static value On for SoftDeleteState. + */ public static final SoftDeleteState ON = fromString("On"); - /** Static value AlwaysOn for SoftDeleteState. */ + /** + * Static value AlwaysOn for SoftDeleteState. + */ public static final SoftDeleteState ALWAYS_ON = fromString("AlwaysOn"); /** * Creates a new instance of SoftDeleteState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public SoftDeleteState() { /** * Creates or finds a SoftDeleteState from its string representation. - * + * * @param name a name to look for. * @return the corresponding SoftDeleteState. */ @@ -41,7 +49,7 @@ public static SoftDeleteState fromString(String name) { /** * Gets known SoftDeleteState values. - * + * * @return known SoftDeleteState values. */ public static Collection values() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SourceDataStoreType.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SourceDataStoreType.java index d48f9988db6b..44c97d3d638f 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SourceDataStoreType.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SourceDataStoreType.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Gets or sets the type of the source data store. */ +/** + * Gets or sets the type of the source data store. + */ public final class SourceDataStoreType extends ExpandableStringEnum { - /** Static value ArchiveStore for SourceDataStoreType. */ + /** + * Static value ArchiveStore for SourceDataStoreType. + */ public static final SourceDataStoreType ARCHIVE_STORE = fromString("ArchiveStore"); - /** Static value SnapshotStore for SourceDataStoreType. */ + /** + * Static value SnapshotStore for SourceDataStoreType. + */ public static final SourceDataStoreType SNAPSHOT_STORE = fromString("SnapshotStore"); - /** Static value OperationalStore for SourceDataStoreType. */ + /** + * Static value OperationalStore for SourceDataStoreType. + */ public static final SourceDataStoreType OPERATIONAL_STORE = fromString("OperationalStore"); - /** Static value VaultStore for SourceDataStoreType. */ + /** + * Static value VaultStore for SourceDataStoreType. + */ public static final SourceDataStoreType VAULT_STORE = fromString("VaultStore"); /** * Creates a new instance of SourceDataStoreType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public SourceDataStoreType() { /** * Creates or finds a SourceDataStoreType from its string representation. - * + * * @param name a name to look for. * @return the corresponding SourceDataStoreType. */ @@ -44,7 +54,7 @@ public static SourceDataStoreType fromString(String name) { /** * Gets known SourceDataStoreType values. - * + * * @return known SourceDataStoreType values. */ public static Collection values() { 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 7bf67354c07b..6737860ff5b8 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 @@ -11,14 +11,14 @@ /** * SourceLifeCycle - * - *

Source LifeCycle. + * + * Source LifeCycle. */ @Fluent public final class SourceLifeCycle { /* * DeleteOption - * + * * Delete Option */ @JsonProperty(value = "deleteAfter", required = true) @@ -26,7 +26,7 @@ public final class SourceLifeCycle { /* * DataStoreInfoBase - * + * * DataStoreInfo base */ @JsonProperty(value = "sourceDataStore", required = true) @@ -38,15 +38,17 @@ public final class SourceLifeCycle { @JsonProperty(value = "targetDataStoreCopySettings") private List targetDataStoreCopySettings; - /** Creates an instance of SourceLifeCycle class. */ + /** + * Creates an instance of SourceLifeCycle class. + */ public SourceLifeCycle() { } /** * Get the deleteAfter property: DeleteOption - * - *

Delete Option. - * + * + * Delete Option. + * * @return the deleteAfter value. */ public DeleteOption deleteAfter() { @@ -55,9 +57,9 @@ public DeleteOption deleteAfter() { /** * Set the deleteAfter property: DeleteOption - * - *

Delete Option. - * + * + * Delete Option. + * * @param deleteAfter the deleteAfter value to set. * @return the SourceLifeCycle object itself. */ @@ -68,9 +70,9 @@ public SourceLifeCycle withDeleteAfter(DeleteOption deleteAfter) { /** * Get the sourceDataStore property: DataStoreInfoBase - * - *

DataStoreInfo base. - * + * + * DataStoreInfo base. + * * @return the sourceDataStore value. */ public DataStoreInfoBase sourceDataStore() { @@ -79,9 +81,9 @@ public DataStoreInfoBase sourceDataStore() { /** * Set the sourceDataStore property: DataStoreInfoBase - * - *

DataStoreInfo base. - * + * + * DataStoreInfo base. + * * @param sourceDataStore the sourceDataStore value to set. * @return the SourceLifeCycle object itself. */ @@ -92,7 +94,7 @@ public SourceLifeCycle withSourceDataStore(DataStoreInfoBase sourceDataStore) { /** * Get the targetDataStoreCopySettings property: The targetDataStoreCopySettings property. - * + * * @return the targetDataStoreCopySettings value. */ public List targetDataStoreCopySettings() { @@ -101,7 +103,7 @@ public List targetDataStoreCopySettings() { /** * Set the targetDataStoreCopySettings property: The targetDataStoreCopySettings property. - * + * * @param targetDataStoreCopySettings the targetDataStoreCopySettings value to set. * @return the SourceLifeCycle object itself. */ @@ -112,21 +114,19 @@ public SourceLifeCycle withTargetDataStoreCopySettings(List t /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (deleteAfter() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property deleteAfter in model SourceLifeCycle")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property deleteAfter in model SourceLifeCycle")); } else { deleteAfter().validate(); } if (sourceDataStore() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property sourceDataStore in model SourceLifeCycle")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property sourceDataStore in model SourceLifeCycle")); } else { sourceDataStore().validate(); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Status.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Status.java index 0224eb8256bb..512c05196d1e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Status.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Status.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Specifies the protection status of the resource. */ +/** + * Specifies the protection status of the resource. + */ public final class Status extends ExpandableStringEnum { - /** Static value ConfiguringProtection for Status. */ + /** + * Static value ConfiguringProtection for Status. + */ public static final Status CONFIGURING_PROTECTION = fromString("ConfiguringProtection"); - /** Static value ConfiguringProtectionFailed for Status. */ + /** + * Static value ConfiguringProtectionFailed for Status. + */ public static final Status CONFIGURING_PROTECTION_FAILED = fromString("ConfiguringProtectionFailed"); - /** Static value ProtectionConfigured for Status. */ + /** + * Static value ProtectionConfigured for Status. + */ public static final Status PROTECTION_CONFIGURED = fromString("ProtectionConfigured"); - /** Static value ProtectionStopped for Status. */ + /** + * Static value ProtectionStopped for Status. + */ public static final Status PROTECTION_STOPPED = fromString("ProtectionStopped"); - /** Static value SoftDeleted for Status. */ + /** + * Static value SoftDeleted for Status. + */ public static final Status SOFT_DELETED = fromString("SoftDeleted"); - /** Static value SoftDeleting for Status. */ + /** + * Static value SoftDeleting for Status. + */ public static final Status SOFT_DELETING = fromString("SoftDeleting"); /** * Creates a new instance of Status value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public Status() { /** * Creates or finds a Status from its string representation. - * + * * @param name a name to look for. * @return the corresponding Status. */ @@ -50,7 +64,7 @@ public static Status fromString(String name) { /** * Gets known Status values. - * + * * @return known Status values. */ public static Collection values() { 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 3b71b803caf9..0ab9cdac76b4 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 @@ -9,8 +9,8 @@ /** * StorageSetting - * - *

Storage setting. + * + * Storage setting. */ @Fluent public final class StorageSetting { @@ -26,13 +26,15 @@ public final class StorageSetting { @JsonProperty(value = "type") private StorageSettingTypes type; - /** Creates an instance of StorageSetting class. */ + /** + * Creates an instance of StorageSetting class. + */ public StorageSetting() { } /** * Get the datastoreType property: Gets or sets the type of the datastore. - * + * * @return the datastoreType value. */ public StorageSettingStoreTypes datastoreType() { @@ -41,7 +43,7 @@ public StorageSettingStoreTypes datastoreType() { /** * Set the datastoreType property: Gets or sets the type of the datastore. - * + * * @param datastoreType the datastoreType value to set. * @return the StorageSetting object itself. */ @@ -52,7 +54,7 @@ public StorageSetting withDatastoreType(StorageSettingStoreTypes datastoreType) /** * Get the type property: Gets or sets the type. - * + * * @return the type value. */ public StorageSettingTypes type() { @@ -61,7 +63,7 @@ public StorageSettingTypes type() { /** * Set the type property: Gets or sets the type. - * + * * @param type the type value to set. * @return the StorageSetting object itself. */ @@ -72,7 +74,7 @@ public StorageSetting withType(StorageSettingTypes type) { /** * 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/StorageSettingStoreTypes.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/StorageSettingStoreTypes.java index 5fb76d3e53cf..a0af1b1475d5 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/StorageSettingStoreTypes.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/StorageSettingStoreTypes.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Gets or sets the type of the datastore. */ +/** + * Gets or sets the type of the datastore. + */ public final class StorageSettingStoreTypes extends ExpandableStringEnum { - /** Static value ArchiveStore for StorageSettingStoreTypes. */ + /** + * Static value ArchiveStore for StorageSettingStoreTypes. + */ public static final StorageSettingStoreTypes ARCHIVE_STORE = fromString("ArchiveStore"); - /** Static value OperationalStore for StorageSettingStoreTypes. */ + /** + * Static value OperationalStore for StorageSettingStoreTypes. + */ public static final StorageSettingStoreTypes OPERATIONAL_STORE = fromString("OperationalStore"); - /** Static value VaultStore for StorageSettingStoreTypes. */ + /** + * Static value VaultStore for StorageSettingStoreTypes. + */ public static final StorageSettingStoreTypes VAULT_STORE = fromString("VaultStore"); /** * Creates a new instance of StorageSettingStoreTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public StorageSettingStoreTypes() { /** * Creates or finds a StorageSettingStoreTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding StorageSettingStoreTypes. */ @@ -41,7 +49,7 @@ public static StorageSettingStoreTypes fromString(String name) { /** * Gets known StorageSettingStoreTypes values. - * + * * @return known StorageSettingStoreTypes values. */ public static Collection values() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/StorageSettingTypes.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/StorageSettingTypes.java index 2602a0a5584a..973195aafba2 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/StorageSettingTypes.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/StorageSettingTypes.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Gets or sets the type. */ +/** + * Gets or sets the type. + */ public final class StorageSettingTypes extends ExpandableStringEnum { - /** Static value GeoRedundant for StorageSettingTypes. */ + /** + * Static value GeoRedundant for StorageSettingTypes. + */ public static final StorageSettingTypes GEO_REDUNDANT = fromString("GeoRedundant"); - /** Static value LocallyRedundant for StorageSettingTypes. */ + /** + * Static value LocallyRedundant for StorageSettingTypes. + */ public static final StorageSettingTypes LOCALLY_REDUNDANT = fromString("LocallyRedundant"); - /** Static value ZoneRedundant for StorageSettingTypes. */ + /** + * Static value ZoneRedundant for StorageSettingTypes. + */ public static final StorageSettingTypes ZONE_REDUNDANT = fromString("ZoneRedundant"); /** * Creates a new instance of StorageSettingTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public StorageSettingTypes() { /** * Creates or finds a StorageSettingTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding StorageSettingTypes. */ @@ -41,7 +49,7 @@ public static StorageSettingTypes fromString(String name) { /** * Gets known StorageSettingTypes values. - * + * * @return known StorageSettingTypes values. */ public static Collection values() { 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 c380630bcaac..cd3ff01fb900 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Elements class for feature request. */ +/** + * Elements class for feature request. + */ @Fluent public final class SupportedFeature { /* @@ -29,13 +31,15 @@ public final class SupportedFeature { @JsonProperty(value = "exposureControlledFeatures") private List exposureControlledFeatures; - /** Creates an instance of SupportedFeature class. */ + /** + * Creates an instance of SupportedFeature class. + */ public SupportedFeature() { } /** * Get the featureName property: support feature type. - * + * * @return the featureName value. */ public String featureName() { @@ -44,7 +48,7 @@ public String featureName() { /** * Set the featureName property: support feature type. - * + * * @param featureName the featureName value to set. * @return the SupportedFeature object itself. */ @@ -55,7 +59,7 @@ public SupportedFeature withFeatureName(String featureName) { /** * Get the supportStatus property: feature support status. - * + * * @return the supportStatus value. */ public FeatureSupportStatus supportStatus() { @@ -64,7 +68,7 @@ public FeatureSupportStatus supportStatus() { /** * Set the supportStatus property: feature support status. - * + * * @param supportStatus the supportStatus value to set. * @return the SupportedFeature object itself. */ @@ -75,7 +79,7 @@ public SupportedFeature withSupportStatus(FeatureSupportStatus supportStatus) { /** * Get the exposureControlledFeatures property: support feature type. - * + * * @return the exposureControlledFeatures value. */ public List exposureControlledFeatures() { @@ -84,7 +88,7 @@ public List exposureControlledFeatures() { /** * Set the exposureControlledFeatures property: support feature type. - * + * * @param exposureControlledFeatures the exposureControlledFeatures value to set. * @return the SupportedFeature object itself. */ @@ -95,7 +99,7 @@ public SupportedFeature withExposureControlledFeatures(List exposureCont /** * 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/SyncBackupInstanceRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SyncBackupInstanceRequest.java index 7be89495a4be..e1678e969542 100644 --- 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Sync BackupInstance Request. */ +/** + * Sync BackupInstance Request. + */ @Fluent public final class SyncBackupInstanceRequest { /* @@ -16,13 +18,15 @@ public final class SyncBackupInstanceRequest { @JsonProperty(value = "syncType") private SyncType syncType; - /** Creates an instance of SyncBackupInstanceRequest class. */ + /** + * Creates an instance of SyncBackupInstanceRequest class. + */ public SyncBackupInstanceRequest() { } /** * 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() { @@ -31,7 +35,7 @@ public SyncType 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. */ @@ -42,7 +46,7 @@ public SyncBackupInstanceRequest withSyncType(SyncType syncType) { /** * 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 index d7f3a7cd872a..15bdfecc78e8 100644 --- 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 @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Field indicating sync type e.g. to sync only in case of failure or in all cases. */ +/** + * Field indicating sync type e.g. to sync only in case of failure or in all cases. + */ public final class SyncType extends ExpandableStringEnum { - /** Static value Default for SyncType. */ + /** + * Static value Default for SyncType. + */ public static final SyncType DEFAULT = fromString("Default"); - /** Static value ForceResync for SyncType. */ + /** + * Static value ForceResync for SyncType. + */ public static final SyncType FORCE_RESYNC = fromString("ForceResync"); /** * Creates a new instance of SyncType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public SyncType() { /** * Creates or finds a SyncType from its string representation. - * + * * @param name a name to look for. * @return the corresponding SyncType. */ @@ -38,7 +44,7 @@ public static SyncType fromString(String name) { /** * Gets known SyncType values. - * + * * @return known SyncType values. */ public static Collection values() { 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 62970d22adbe..282e544bcb41 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 @@ -11,8 +11,8 @@ /** * TaggingCriteria - * - *

Tagging criteria. + * + * Tagging criteria. */ @Fluent public final class TaggingCriteria { @@ -36,19 +36,21 @@ public final class TaggingCriteria { /* * RetentionTag - * + * * Retention tag information */ @JsonProperty(value = "tagInfo", required = true) private RetentionTag tagInfo; - /** Creates an instance of TaggingCriteria class. */ + /** + * Creates an instance of TaggingCriteria class. + */ public TaggingCriteria() { } /** * Get the criteria property: Criteria which decides whether the tag can be applied to a triggered backup. - * + * * @return the criteria value. */ public List criteria() { @@ -57,7 +59,7 @@ public List criteria() { /** * Set the criteria property: Criteria which decides whether the tag can be applied to a triggered backup. - * + * * @param criteria the criteria value to set. * @return the TaggingCriteria object itself. */ @@ -68,7 +70,7 @@ public TaggingCriteria withCriteria(List criteria) { /** * Get the isDefault property: Specifies if tag is default. - * + * * @return the isDefault value. */ public boolean isDefault() { @@ -77,7 +79,7 @@ public boolean isDefault() { /** * Set the isDefault property: Specifies if tag is default. - * + * * @param isDefault the isDefault value to set. * @return the TaggingCriteria object itself. */ @@ -88,7 +90,7 @@ public TaggingCriteria withIsDefault(boolean isDefault) { /** * Get the taggingPriority property: Retention Tag priority. - * + * * @return the taggingPriority value. */ public long taggingPriority() { @@ -97,7 +99,7 @@ public long taggingPriority() { /** * Set the taggingPriority property: Retention Tag priority. - * + * * @param taggingPriority the taggingPriority value to set. * @return the TaggingCriteria object itself. */ @@ -108,9 +110,9 @@ public TaggingCriteria withTaggingPriority(long taggingPriority) { /** * Get the tagInfo property: RetentionTag - * - *

Retention tag information. - * + * + * Retention tag information. + * * @return the tagInfo value. */ public RetentionTag tagInfo() { @@ -119,9 +121,9 @@ public RetentionTag tagInfo() { /** * Set the tagInfo property: RetentionTag - * - *

Retention tag information. - * + * + * Retention tag information. + * * @param tagInfo the tagInfo value to set. * @return the TaggingCriteria object itself. */ @@ -132,7 +134,7 @@ public TaggingCriteria withTagInfo(RetentionTag tagInfo) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -140,9 +142,8 @@ public void validate() { criteria().forEach(e -> e.validate()); } if (tagInfo() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property tagInfo in model TaggingCriteria")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property tagInfo in model TaggingCriteria")); } else { tagInfo().validate(); } 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 cff851fd6bd6..700bf308167f 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 @@ -10,14 +10,14 @@ /** * TargetCopySetting - * - *

Target copy settings. + * + * Target copy settings. */ @Fluent public final class TargetCopySetting { /* * CopyOption - * + * * It can be CustomCopyOption or ImmediateCopyOption. */ @JsonProperty(value = "copyAfter", required = true) @@ -25,21 +25,23 @@ public final class TargetCopySetting { /* * DataStoreInfoBase - * + * * Info of target datastore */ @JsonProperty(value = "dataStore", required = true) private DataStoreInfoBase dataStore; - /** Creates an instance of TargetCopySetting class. */ + /** + * Creates an instance of TargetCopySetting class. + */ public TargetCopySetting() { } /** * Get the copyAfter property: CopyOption - * - *

It can be CustomCopyOption or ImmediateCopyOption. - * + * + * It can be CustomCopyOption or ImmediateCopyOption. + * * @return the copyAfter value. */ public CopyOption copyAfter() { @@ -48,9 +50,9 @@ public CopyOption copyAfter() { /** * Set the copyAfter property: CopyOption - * - *

It can be CustomCopyOption or ImmediateCopyOption. - * + * + * It can be CustomCopyOption or ImmediateCopyOption. + * * @param copyAfter the copyAfter value to set. * @return the TargetCopySetting object itself. */ @@ -61,9 +63,9 @@ public TargetCopySetting withCopyAfter(CopyOption copyAfter) { /** * Get the dataStore property: DataStoreInfoBase - * - *

Info of target datastore. - * + * + * Info of target datastore. + * * @return the dataStore value. */ public DataStoreInfoBase dataStore() { @@ -72,9 +74,9 @@ public DataStoreInfoBase dataStore() { /** * Set the dataStore property: DataStoreInfoBase - * - *

Info of target datastore. - * + * + * Info of target datastore. + * * @param dataStore the dataStore value to set. * @return the TargetCopySetting object itself. */ @@ -85,21 +87,19 @@ public TargetCopySetting withDataStore(DataStoreInfoBase dataStore) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (copyAfter() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property copyAfter in model TargetCopySetting")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property copyAfter in model TargetCopySetting")); } else { copyAfter().validate(); } if (dataStore() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property dataStore in model TargetCopySetting")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property dataStore in model TargetCopySetting")); } else { dataStore().validate(); } 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 b51f55c50fc5..ebc11d8c3ccf 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 @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Class encapsulating target details, used where the destination is not a datasource. */ +/** + * Class encapsulating target details, used where the destination is not a datasource. + */ @Fluent public final class TargetDetails { /* @@ -40,14 +42,16 @@ public final class TargetDetails { @JsonProperty(value = "targetResourceArmId") private String targetResourceArmId; - /** Creates an instance of TargetDetails class. */ + /** + * Creates an instance of TargetDetails class. + */ public TargetDetails() { } /** - * Get the filePrefix property: Restore operation may create multiple files inside location pointed by Url Below - * will be the common prefix for all of them. - * + * Get the filePrefix property: Restore operation may create multiple files inside location pointed by Url + * Below will be the common prefix for all of them. + * * @return the filePrefix value. */ public String filePrefix() { @@ -55,9 +59,9 @@ public String filePrefix() { } /** - * Set the filePrefix property: Restore operation may create multiple files inside location pointed by Url Below - * will be the common prefix for all of them. - * + * Set the filePrefix property: Restore operation may create multiple files inside location pointed by Url + * Below will be the common prefix for all of them. + * * @param filePrefix the filePrefix value to set. * @return the TargetDetails object itself. */ @@ -67,9 +71,10 @@ public TargetDetails withFilePrefix(String filePrefix) { } /** - * Get the restoreTargetLocationType property: Denotes the target location where the data will be restored, string - * value for the enum {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType}. - * + * Get the restoreTargetLocationType property: Denotes the target location where the data will be restored, + * string value for the enum + * {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType}. + * * @return the restoreTargetLocationType value. */ public RestoreTargetLocationType restoreTargetLocationType() { @@ -77,9 +82,10 @@ public RestoreTargetLocationType restoreTargetLocationType() { } /** - * Set the restoreTargetLocationType property: Denotes the target location where the data will be restored, string - * value for the enum {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType}. - * + * Set the restoreTargetLocationType property: Denotes the target location where the data will be restored, + * string value for the enum + * {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType}. + * * @param restoreTargetLocationType the restoreTargetLocationType value to set. * @return the TargetDetails object itself. */ @@ -90,7 +96,7 @@ public TargetDetails withRestoreTargetLocationType(RestoreTargetLocationType res /** * Get the url property: Url denoting the restore destination. It can point to container / file share etc. - * + * * @return the url value. */ public String url() { @@ -99,7 +105,7 @@ public String url() { /** * Set the url property: Url denoting the restore destination. It can point to container / file share etc. - * + * * @param url the url value to set. * @return the TargetDetails object itself. */ @@ -110,9 +116,10 @@ public TargetDetails withUrl(String url) { /** * Get the targetResourceArmId property: Full ARM Id denoting the restore destination. It is the ARM Id pointing to - * container / file share This is optional if the target subscription can be identified with the URL field. If not + * container / file share + * This is optional if the target subscription can be identified with the URL field. If not * then this is needed if CrossSubscriptionRestore field of BackupVault is in any of the disabled states. - * + * * @return the targetResourceArmId value. */ public String targetResourceArmId() { @@ -121,9 +128,10 @@ public String targetResourceArmId() { /** * Set the targetResourceArmId property: Full ARM Id denoting the restore destination. It is the ARM Id pointing to - * container / file share This is optional if the target subscription can be identified with the URL field. If not + * container / file share + * This is optional if the target subscription can be identified with the URL field. If not * then this is needed if CrossSubscriptionRestore field of BackupVault is in any of the disabled states. - * + * * @param targetResourceArmId the targetResourceArmId value to set. * @return the TargetDetails object itself. */ @@ -134,25 +142,21 @@ public TargetDetails withTargetResourceArmId(String targetResourceArmId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (filePrefix() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property filePrefix in model TargetDetails")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property filePrefix in model TargetDetails")); } if (restoreTargetLocationType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property restoreTargetLocationType in model TargetDetails")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property restoreTargetLocationType in model TargetDetails")); } if (url() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property url in model TargetDetails")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property url in model TargetDetails")); } } 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 ec95b25d8124..c5498066efdc 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 @@ -10,28 +10,30 @@ /** * TriggerBackupRequest - * - *

Trigger backup request. + * + * Trigger backup request. */ @Fluent public final class TriggerBackupRequest { /* * AdHocBackupRuleOptions - * + * * Name for the Rule of the Policy which needs to be applied for this backup */ @JsonProperty(value = "backupRuleOptions", required = true) private AdHocBackupRuleOptions backupRuleOptions; - /** Creates an instance of TriggerBackupRequest class. */ + /** + * Creates an instance of TriggerBackupRequest class. + */ public TriggerBackupRequest() { } /** * Get the backupRuleOptions property: AdHocBackupRuleOptions - * - *

Name for the Rule of the Policy which needs to be applied for this backup. - * + * + * Name for the Rule of the Policy which needs to be applied for this backup. + * * @return the backupRuleOptions value. */ public AdHocBackupRuleOptions backupRuleOptions() { @@ -40,9 +42,9 @@ public AdHocBackupRuleOptions backupRuleOptions() { /** * Set the backupRuleOptions property: AdHocBackupRuleOptions - * - *

Name for the Rule of the Policy which needs to be applied for this backup. - * + * + * Name for the Rule of the Policy which needs to be applied for this backup. + * * @param backupRuleOptions the backupRuleOptions value to set. * @return the TriggerBackupRequest object itself. */ @@ -53,15 +55,13 @@ public TriggerBackupRequest withBackupRuleOptions(AdHocBackupRuleOptions backupR /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (backupRuleOptions() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property backupRuleOptions in model TriggerBackupRequest")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property backupRuleOptions in model TriggerBackupRequest")); } else { backupRuleOptions().validate(); } 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 6d31be04c6be..bd8fabd2297b 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 @@ -11,8 +11,8 @@ /** * TriggerContext - * - *

Trigger context. + * + * Trigger context. */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, @@ -22,17 +22,18 @@ @JsonTypeName("TriggerContext") @JsonSubTypes({ @JsonSubTypes.Type(name = "AdhocBasedTriggerContext", value = AdhocBasedTriggerContext.class), - @JsonSubTypes.Type(name = "ScheduleBasedTriggerContext", value = ScheduleBasedTriggerContext.class) -}) + @JsonSubTypes.Type(name = "ScheduleBasedTriggerContext", value = ScheduleBasedTriggerContext.class) }) @Immutable public class TriggerContext { - /** Creates an instance of TriggerContext class. */ + /** + * Creates an instance of TriggerContext class. + */ public TriggerContext() { } /** * 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/UnlockDeleteRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UnlockDeleteRequest.java index fe324d2d291e..d94878e104ce 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UnlockDeleteRequest.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UnlockDeleteRequest.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Request body of unlock delete API. */ +/** + * Request body of unlock delete API. + */ @Fluent public final class UnlockDeleteRequest { /* @@ -23,13 +25,15 @@ public final class UnlockDeleteRequest { @JsonProperty(value = "resourceToBeDeleted") private String resourceToBeDeleted; - /** Creates an instance of UnlockDeleteRequest class. */ + /** + * Creates an instance of UnlockDeleteRequest class. + */ public UnlockDeleteRequest() { } /** * Get the resourceGuardOperationRequests property: The resourceGuardOperationRequests property. - * + * * @return the resourceGuardOperationRequests value. */ public List resourceGuardOperationRequests() { @@ -38,7 +42,7 @@ public List resourceGuardOperationRequests() { /** * Set the resourceGuardOperationRequests property: The resourceGuardOperationRequests property. - * + * * @param resourceGuardOperationRequests the resourceGuardOperationRequests value to set. * @return the UnlockDeleteRequest object itself. */ @@ -49,7 +53,7 @@ public UnlockDeleteRequest withResourceGuardOperationRequests(List resou /** * Get the resourceToBeDeleted property: The resourceToBeDeleted property. - * + * * @return the resourceToBeDeleted value. */ public String resourceToBeDeleted() { @@ -58,7 +62,7 @@ public String resourceToBeDeleted() { /** * Set the resourceToBeDeleted property: The resourceToBeDeleted property. - * + * * @param resourceToBeDeleted the resourceToBeDeleted value to set. * @return the UnlockDeleteRequest object itself. */ @@ -69,7 +73,7 @@ public UnlockDeleteRequest withResourceToBeDeleted(String resourceToBeDeleted) { /** * 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/UnlockDeleteResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UnlockDeleteResponse.java index 70ba49be1512..adb2f66514d3 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UnlockDeleteResponse.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UnlockDeleteResponse.java @@ -6,18 +6,20 @@ import com.azure.resourcemanager.dataprotection.fluent.models.UnlockDeleteResponseInner; -/** An immutable client-side representation of UnlockDeleteResponse. */ +/** + * An immutable client-side representation of UnlockDeleteResponse. + */ public interface UnlockDeleteResponse { /** * Gets the unlockDeleteExpiryTime property: This is the time when unlock delete privileges will get expired. - * + * * @return the unlockDeleteExpiryTime value. */ String unlockDeleteExpiryTime(); /** * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.UnlockDeleteResponseInner object. - * + * * @return the inner object. */ UnlockDeleteResponseInner innerModel(); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserAssignedIdentity.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserAssignedIdentity.java index 3617fa48ee17..9a42587b12ac 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserAssignedIdentity.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserAssignedIdentity.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; -/** User assigned identity properties. */ +/** + * User assigned identity properties. + */ @Immutable public final class UserAssignedIdentity { /* @@ -23,13 +25,15 @@ public final class UserAssignedIdentity { @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private UUID clientId; - /** Creates an instance of UserAssignedIdentity class. */ + /** + * Creates an instance of UserAssignedIdentity class. + */ public UserAssignedIdentity() { } /** * Get the principalId property: The principal ID of the assigned identity. - * + * * @return the principalId value. */ public UUID principalId() { @@ -38,7 +42,7 @@ public UUID principalId() { /** * Get the clientId property: The client ID of the assigned identity. - * + * * @return the clientId value. */ public UUID clientId() { @@ -47,7 +51,7 @@ public UUID clientId() { /** * 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/UserFacingError.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserFacingError.java index f23fe2526be7..f55f6839e4dc 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 @@ -10,7 +10,9 @@ import java.util.List; import java.util.Map; -/** Error object used by layers that have access to localized content, and propagate that to user. */ +/** + * Error object used by layers that have access to localized content, and propagate that to user. + */ @Fluent public final class UserFacingError { /* @@ -27,7 +29,7 @@ public final class UserFacingError { /* * InnerError - * + * * Inner Error */ @JsonProperty(value = "innerError") @@ -70,13 +72,15 @@ public final class UserFacingError { @JsonProperty(value = "target") private String target; - /** Creates an instance of UserFacingError class. */ + /** + * Creates an instance of UserFacingError class. + */ public UserFacingError() { } /** * Get the code property: Unique code for this error. - * + * * @return the code value. */ public String code() { @@ -85,7 +89,7 @@ public String code() { /** * Set the code property: Unique code for this error. - * + * * @param code the code value to set. * @return the UserFacingError object itself. */ @@ -96,7 +100,7 @@ public UserFacingError withCode(String code) { /** * Get the details property: Additional related Errors. - * + * * @return the details value. */ public List details() { @@ -105,7 +109,7 @@ public List details() { /** * Set the details property: Additional related Errors. - * + * * @param details the details value to set. * @return the UserFacingError object itself. */ @@ -116,9 +120,9 @@ public UserFacingError withDetails(List details) { /** * Get the innerError property: InnerError - * - *

Inner Error. - * + * + * Inner Error. + * * @return the innerError value. */ public InnerError innerError() { @@ -127,9 +131,9 @@ public InnerError innerError() { /** * Set the innerError property: InnerError - * - *

Inner Error. - * + * + * Inner Error. + * * @param innerError the innerError value to set. * @return the UserFacingError object itself. */ @@ -140,7 +144,7 @@ public UserFacingError withInnerError(InnerError innerError) { /** * Get the isRetryable property: Whether the operation will be retryable or not. - * + * * @return the isRetryable value. */ public Boolean isRetryable() { @@ -149,7 +153,7 @@ public Boolean isRetryable() { /** * Set the isRetryable property: Whether the operation will be retryable or not. - * + * * @param isRetryable the isRetryable value to set. * @return the UserFacingError object itself. */ @@ -160,7 +164,7 @@ public UserFacingError withIsRetryable(Boolean isRetryable) { /** * Get the isUserError property: Whether the operation is due to a user error or service error. - * + * * @return the isUserError value. */ public Boolean isUserError() { @@ -169,7 +173,7 @@ public Boolean isUserError() { /** * Set the isUserError property: Whether the operation is due to a user error or service error. - * + * * @param isUserError the isUserError value to set. * @return the UserFacingError object itself. */ @@ -180,7 +184,7 @@ public UserFacingError withIsUserError(Boolean isUserError) { /** * Get the properties property: Any key value pairs that can be injected inside error object. - * + * * @return the properties value. */ public Map properties() { @@ -189,7 +193,7 @@ public Map properties() { /** * Set the properties property: Any key value pairs that can be injected inside error object. - * + * * @param properties the properties value to set. * @return the UserFacingError object itself. */ @@ -200,7 +204,7 @@ public UserFacingError withProperties(Map properties) { /** * Get the message property: The message property. - * + * * @return the message value. */ public String message() { @@ -209,7 +213,7 @@ public String message() { /** * Set the message property: The message property. - * + * * @param message the message value to set. * @return the UserFacingError object itself. */ @@ -220,7 +224,7 @@ public UserFacingError withMessage(String message) { /** * Get the recommendedAction property: RecommendedAction � localized. - * + * * @return the recommendedAction value. */ public List recommendedAction() { @@ -229,7 +233,7 @@ public List recommendedAction() { /** * Set the recommendedAction property: RecommendedAction � localized. - * + * * @param recommendedAction the recommendedAction value to set. * @return the UserFacingError object itself. */ @@ -240,7 +244,7 @@ public UserFacingError withRecommendedAction(List recommendedAction) { /** * Get the target property: Target of the error. - * + * * @return the target value. */ public String target() { @@ -249,7 +253,7 @@ public String target() { /** * Set the target property: Target of the error. - * + * * @param target the target value to set. * @return the UserFacingError object itself. */ @@ -260,7 +264,7 @@ public UserFacingError withTarget(String target) { /** * 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/UserFacingWarningDetail.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserFacingWarningDetail.java new file mode 100644 index 000000000000..08eabacd8462 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserFacingWarningDetail.java @@ -0,0 +1,89 @@ +// 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.JsonProperty; + +/** + * Warning object used by layers that have access to localized content, and propagate that to user. + */ +@Fluent +public final class UserFacingWarningDetail { + /* + * Name of resource for which warning is raised. + */ + @JsonProperty(value = "resourceName") + private String resourceName; + + /* + * Error details for the warning. + */ + @JsonProperty(value = "warning", required = true) + private UserFacingError warning; + + /** + * Creates an instance of UserFacingWarningDetail class. + */ + public UserFacingWarningDetail() { + } + + /** + * Get the resourceName property: Name of resource for which warning is raised. + * + * @return the resourceName value. + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Set the resourceName property: Name of resource for which warning is raised. + * + * @param resourceName the resourceName value to set. + * @return the UserFacingWarningDetail object itself. + */ + public UserFacingWarningDetail withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + /** + * Get the warning property: Error details for the warning. + * + * @return the warning value. + */ + public UserFacingError warning() { + return this.warning; + } + + /** + * Set the warning property: Error details for the warning. + * + * @param warning the warning value to set. + * @return the UserFacingWarningDetail object itself. + */ + public UserFacingWarningDetail withWarning(UserFacingError warning) { + this.warning = warning; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (warning() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property warning in model UserFacingWarningDetail")); + } else { + warning().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(UserFacingWarningDetail.class); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidateCrossRegionRestoreRequestObject.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidateCrossRegionRestoreRequestObject.java new file mode 100644 index 000000000000..eef89144896d --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidateCrossRegionRestoreRequestObject.java @@ -0,0 +1,103 @@ +// 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.JsonProperty; + +/** + * Cross Region Restore Request Object. + */ +@Fluent +public final class ValidateCrossRegionRestoreRequestObject { + /* + * AzureBackupRestoreRequest + * + * Gets or sets the restore request object. + */ + @JsonProperty(value = "restoreRequestObject", required = true) + private AzureBackupRestoreRequest restoreRequestObject; + + /* + * Cross region restore details. + */ + @JsonProperty(value = "crossRegionRestoreDetails", required = true) + private CrossRegionRestoreDetails crossRegionRestoreDetails; + + /** + * Creates an instance of ValidateCrossRegionRestoreRequestObject class. + */ + public ValidateCrossRegionRestoreRequestObject() { + } + + /** + * Get the restoreRequestObject property: AzureBackupRestoreRequest + * + * Gets or sets the restore request object. + * + * @return the restoreRequestObject value. + */ + public AzureBackupRestoreRequest restoreRequestObject() { + return this.restoreRequestObject; + } + + /** + * Set the restoreRequestObject property: AzureBackupRestoreRequest + * + * Gets or sets the restore request object. + * + * @param restoreRequestObject the restoreRequestObject value to set. + * @return the ValidateCrossRegionRestoreRequestObject object itself. + */ + public ValidateCrossRegionRestoreRequestObject + withRestoreRequestObject(AzureBackupRestoreRequest restoreRequestObject) { + this.restoreRequestObject = restoreRequestObject; + return this; + } + + /** + * Get the crossRegionRestoreDetails property: Cross region restore details. + * + * @return the crossRegionRestoreDetails value. + */ + public CrossRegionRestoreDetails crossRegionRestoreDetails() { + return this.crossRegionRestoreDetails; + } + + /** + * Set the crossRegionRestoreDetails property: Cross region restore details. + * + * @param crossRegionRestoreDetails the crossRegionRestoreDetails value to set. + * @return the ValidateCrossRegionRestoreRequestObject object itself. + */ + public ValidateCrossRegionRestoreRequestObject + withCrossRegionRestoreDetails(CrossRegionRestoreDetails crossRegionRestoreDetails) { + this.crossRegionRestoreDetails = crossRegionRestoreDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (restoreRequestObject() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property restoreRequestObject in model ValidateCrossRegionRestoreRequestObject")); + } else { + restoreRequestObject().validate(); + } + if (crossRegionRestoreDetails() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property crossRegionRestoreDetails in model ValidateCrossRegionRestoreRequestObject")); + } else { + crossRegionRestoreDetails().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ValidateCrossRegionRestoreRequestObject.class); +} 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 5c1cdfb33665..98f6038292b2 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 @@ -10,8 +10,8 @@ /** * ValidateForBackupRequest - * - *

Validate for backup request. + * + * Validate for backup request. */ @Fluent public final class ValidateForBackupRequest { @@ -21,13 +21,15 @@ public final class ValidateForBackupRequest { @JsonProperty(value = "backupInstance", required = true) private BackupInstance backupInstance; - /** Creates an instance of ValidateForBackupRequest class. */ + /** + * Creates an instance of ValidateForBackupRequest class. + */ public ValidateForBackupRequest() { } /** * Get the backupInstance property: Backup Instance. - * + * * @return the backupInstance value. */ public BackupInstance backupInstance() { @@ -36,7 +38,7 @@ public BackupInstance backupInstance() { /** * Set the backupInstance property: Backup Instance. - * + * * @param backupInstance the backupInstance value to set. * @return the ValidateForBackupRequest object itself. */ @@ -47,15 +49,13 @@ public ValidateForBackupRequest withBackupInstance(BackupInstance backupInstance /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (backupInstance() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property backupInstance in model ValidateForBackupRequest")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property backupInstance in model ValidateForBackupRequest")); } else { backupInstance().validate(); } 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 3308e273678b..547c1fd5f9c4 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 @@ -10,28 +10,30 @@ /** * ValidateRestoreRequestObject - * - *

Validate restore request object. + * + * Validate restore request object. */ @Fluent public final class ValidateRestoreRequestObject { /* * AzureBackupRestoreRequest - * + * * Gets or sets the restore request object. */ @JsonProperty(value = "restoreRequestObject", required = true) private AzureBackupRestoreRequest restoreRequestObject; - /** Creates an instance of ValidateRestoreRequestObject class. */ + /** + * Creates an instance of ValidateRestoreRequestObject class. + */ public ValidateRestoreRequestObject() { } /** * Get the restoreRequestObject property: AzureBackupRestoreRequest - * - *

Gets or sets the restore request object. - * + * + * Gets or sets the restore request object. + * * @return the restoreRequestObject value. */ public AzureBackupRestoreRequest restoreRequestObject() { @@ -40,9 +42,9 @@ public AzureBackupRestoreRequest restoreRequestObject() { /** * Set the restoreRequestObject property: AzureBackupRestoreRequest - * - *

Gets or sets the restore request object. - * + * + * Gets or sets the restore request object. + * * @param restoreRequestObject the restoreRequestObject value to set. * @return the ValidateRestoreRequestObject object itself. */ @@ -53,15 +55,13 @@ public ValidateRestoreRequestObject withRestoreRequestObject(AzureBackupRestoreR /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (restoreRequestObject() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property restoreRequestObject in model ValidateRestoreRequestObject")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property restoreRequestObject in model ValidateRestoreRequestObject")); } else { restoreRequestObject().validate(); } 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 index 210c3cb04155..98ef49949393 100644 --- 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 @@ -13,15 +13,19 @@ * again. */ public final class ValidationType extends ExpandableStringEnum { - /** Static value ShallowValidation for ValidationType. */ + /** + * Static value ShallowValidation for ValidationType. + */ public static final ValidationType SHALLOW_VALIDATION = fromString("ShallowValidation"); - /** Static value DeepValidation for ValidationType. */ + /** + * Static value DeepValidation for ValidationType. + */ public static final ValidationType DEEP_VALIDATION = fromString("DeepValidation"); /** * Creates a new instance of ValidationType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +34,7 @@ public ValidationType() { /** * Creates or finds a ValidationType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ValidationType. */ @@ -41,7 +45,7 @@ public static ValidationType fromString(String name) { /** * Gets known ValidationType values. - * + * * @return known ValidationType values. */ public static Collection values() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/WeekNumber.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/WeekNumber.java index eea86669fb89..e146f8961641 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/WeekNumber.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/WeekNumber.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for WeekNumber. */ +/** + * Defines values for WeekNumber. + */ public final class WeekNumber extends ExpandableStringEnum { - /** Static value First for WeekNumber. */ + /** + * Static value First for WeekNumber. + */ public static final WeekNumber FIRST = fromString("First"); - /** Static value Fourth for WeekNumber. */ + /** + * Static value Fourth for WeekNumber. + */ public static final WeekNumber FOURTH = fromString("Fourth"); - /** Static value Last for WeekNumber. */ + /** + * Static value Last for WeekNumber. + */ public static final WeekNumber LAST = fromString("Last"); - /** Static value Second for WeekNumber. */ + /** + * Static value Second for WeekNumber. + */ public static final WeekNumber SECOND = fromString("Second"); - /** Static value Third for WeekNumber. */ + /** + * Static value Third for WeekNumber. + */ public static final WeekNumber THIRD = fromString("Third"); /** * Creates a new instance of WeekNumber value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public WeekNumber() { /** * Creates or finds a WeekNumber from its string representation. - * + * * @param name a name to look for. * @return the corresponding WeekNumber. */ @@ -47,7 +59,7 @@ public static WeekNumber fromString(String name) { /** * Gets known WeekNumber values. - * + * * @return known WeekNumber values. */ public static Collection values() { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/package-info.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/package-info.java index ba817d86188e..a7f91bcda406 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/package-info.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/package-info.java @@ -3,6 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for DataProtectionClient. Open API 2.0 Specs for Azure Data Protection service. + * Package containing the data models for DataProtectionClient. + * Open API 2.0 Specs for Azure Data Protection service. */ package com.azure.resourcemanager.dataprotection.models; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/package-info.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/package-info.java index c90a2b2bfd24..395dd4982325 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/package-info.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for DataProtectionClient. Open API 2.0 Specs for Azure Data Protection service. */ +/** + * Package containing the classes for DataProtectionClient. + * Open API 2.0 Specs for Azure Data Protection service. + */ package com.azure.resourcemanager.dataprotection; diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/module-info.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/module-info.java index 97dbdf7bf57c..c418baa438d9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/module-info.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/module-info.java @@ -10,10 +10,6 @@ exports com.azure.resourcemanager.dataprotection.fluent.models; exports com.azure.resourcemanager.dataprotection.models; - opens com.azure.resourcemanager.dataprotection.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.dataprotection.models to - com.azure.core, - com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.dataprotection.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.dataprotection.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dataprotection/proxy-config.json b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dataprotection/proxy-config.json new file mode 100644 index 000000000000..adaa95645477 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dataprotection/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.dataprotection.implementation.BackupVaultsClientImpl$BackupVaultsService" ], [ "com.azure.resourcemanager.dataprotection.implementation.OperationResultsClientImpl$OperationResultsService" ], [ "com.azure.resourcemanager.dataprotection.implementation.OperationStatusClientImpl$OperationStatusService" ], [ "com.azure.resourcemanager.dataprotection.implementation.OperationStatusBackupVaultContextsClientImpl$OperationStatusBackupVaultContextsService" ], [ "com.azure.resourcemanager.dataprotection.implementation.OperationStatusResourceGroupContextsClientImpl$OperationStatusResourceGroupContextsService" ], [ "com.azure.resourcemanager.dataprotection.implementation.BackupVaultOperationResultsClientImpl$BackupVaultOperationResultsService" ], [ "com.azure.resourcemanager.dataprotection.implementation.DataProtectionsClientImpl$DataProtectionsService" ], [ "com.azure.resourcemanager.dataprotection.implementation.DataProtectionOperationsClientImpl$DataProtectionOperationsService" ], [ "com.azure.resourcemanager.dataprotection.implementation.BackupPoliciesClientImpl$BackupPoliciesService" ], [ "com.azure.resourcemanager.dataprotection.implementation.BackupInstancesClientImpl$BackupInstancesService" ], [ "com.azure.resourcemanager.dataprotection.implementation.RecoveryPointsClientImpl$RecoveryPointsService" ], [ "com.azure.resourcemanager.dataprotection.implementation.FetchSecondaryRecoveryPointsClientImpl$FetchSecondaryRecoveryPointsService" ], [ "com.azure.resourcemanager.dataprotection.implementation.FetchCrossRegionRestoreJobsClientImpl$FetchCrossRegionRestoreJobsService" ], [ "com.azure.resourcemanager.dataprotection.implementation.FetchCrossRegionRestoreJobsOperationsClientImpl$FetchCrossRegionRestoreJobsOperationsService" ], [ "com.azure.resourcemanager.dataprotection.implementation.JobsClientImpl$JobsService" ], [ "com.azure.resourcemanager.dataprotection.implementation.RestorableTimeRangesClientImpl$RestorableTimeRangesService" ], [ "com.azure.resourcemanager.dataprotection.implementation.ExportJobsClientImpl$ExportJobsService" ], [ "com.azure.resourcemanager.dataprotection.implementation.ExportJobsOperationResultsClientImpl$ExportJobsOperationResultsService" ], [ "com.azure.resourcemanager.dataprotection.implementation.DeletedBackupInstancesClientImpl$DeletedBackupInstancesService" ], [ "com.azure.resourcemanager.dataprotection.implementation.ResourceGuardsClientImpl$ResourceGuardsService" ], [ "com.azure.resourcemanager.dataprotection.implementation.DppResourceGuardProxiesClientImpl$DppResourceGuardProxiesService" ] ] \ No newline at end of file diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dataprotection/reflect-config.json b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dataprotection/reflect-config.json new file mode 100644 index 000000000000..4fa93a68541e --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dataprotection/reflect-config.json @@ -0,0 +1,941 @@ +[ { + "name" : "com.azure.resourcemanager.dataprotection.models.BackupVaultResourceList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.BackupVault", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.MonitoringSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ResourceMoveDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.SecuritySettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.StorageSetting", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.FeatureSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DppTrackedResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DppIdentityDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.UserAssignedIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DppBaseTrackedResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DppResourceList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.OperationExtendedInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.PatchResourceRequestInput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.PatchBackupVaultInput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.CheckNameAvailabilityResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.FeatureValidationRequestBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.FeatureValidationResponseBaseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ClientDiscoveryResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.ClientDiscoveryValueForSingleApiInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ClientDiscoveryDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForServiceSpecification", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForLogSpecification", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.BaseBackupPolicyResourceList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.BaseBackupPolicyResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.BaseBackupPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DppResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.BackupInstanceResourceList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.BackupInstanceResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.BackupInstance", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.Datasource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.BaseResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DatasourceSet", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.PolicyInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.PolicyParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DataStoreParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.BackupDatasourceParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ProtectionStatusDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.UserFacingError", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.InnerError", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AuthCredentials", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.IdentityDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DppProxyResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AdHocBackupRuleOptions", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AdhocBackupTriggerOption", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointResourceList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPoint", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.FetchSecondaryRPsRequestParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreRequestObject", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.RestoreTargetInfoBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ValidateCrossRegionRestoreRequestObject", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureBackupJob", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.JobExtendedInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.RestoreJobRecoveryPointDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.JobSubTask", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.UserFacingWarningDetail", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobsRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureBackupJobResourceList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureBackupRehydrationRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupFindRestorableTimeRangesResponseResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.RestorableTimeRange", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.ExportJobsResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DeletedBackupInstanceResourceList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.DeletedBackupInstanceResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DeletedBackupInstance", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DeletionInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ResourceGuardResourceList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ResourceGuard", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ResourceGuardOperation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DppTrackedResourceList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.PatchResourceGuardInput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DppBaseResourceList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.DppBaseResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBaseResourceList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardProxyBaseResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ResourceGuardOperationDetail", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.UnlockDeleteRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.fluent.models.UnlockDeleteResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AbsoluteDeleteOption", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DeleteOption", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AdhocBasedTaggingCriteria", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.RetentionTag", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AdhocBasedTriggerContext", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.TriggerContext", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureBackupDiscreteRecoveryPoint", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.RecoveryPointDataStoreDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequestResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DppWorkerRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureBackupParams", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.BackupParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointBasedRestoreRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreWithRehydrationRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryTimeBasedRestoreRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureBackupRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DataStoreInfoBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.BasePolicyRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureOperationalStoreParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.KubernetesClusterBackupDatasourceParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.NamespacedNameResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.BlobBackupDatasourceParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AzureRetentionRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.SourceLifeCycle", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.TargetCopySetting", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.CopyOption", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.BackupCriteria", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.BackupPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.BackupSchedule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.CopyOnExpiryOption", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.CustomCopyOption", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.Day", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DefaultResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.FeatureValidationRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.FeatureValidationResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.SupportedFeature", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ImmediateCopyOption", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ItemLevelRestoreCriteria", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ItemLevelRestoreTargetInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ItemPathBasedRestoreCriteria", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.RangeBasedItemLevelRestoreCriteria", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.KubernetesStorageClassRestoreCriteria", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.KubernetesPVRestoreCriteria", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.KubernetesClusterRestoreCriteria", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.KubernetesClusterVaultTierRestoreCriteria", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.RestoreFilesTargetInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.TargetDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.RestoreTargetInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ScheduleBasedBackupCriteria", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ScheduleBasedTriggerContext", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.TaggingCriteria", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.SecretStoreBasedAuthCredentials", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.SecretStoreResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.OperationResultsGetHeaders", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.BackupVaultOperationResultsGetHeaders", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AlertsState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ResourceMoveState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.SoftDeleteState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ImmutabilityState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.StorageSettingTypes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.SecureScoreLevel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ResourcePropertiesObjectType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DataStoreTypes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.Status", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.CurrentProtectionState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ValidationType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.RecoveryOption", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.SourceDataStoreType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.RehydrationPriority", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.SyncType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.RestoreSourceDataStoreType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.RehydrationStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.RecoveryPointCompletionState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.FeatureType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.FeatureSupportStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.PersistentVolumeRestoreMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.ExistingResourcePolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.RestoreTargetLocationType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.AbsoluteMarker", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.DayOfWeek", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.Month", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.WeekNumber", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.dataprotection.models.SecretStoreType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file 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 208ca31a5420..2352a7cfb923 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 @@ -8,28 +8,24 @@ import com.azure.resourcemanager.dataprotection.models.AdhocBackupTriggerOption; import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest; -/** Samples for BackupInstances AdhocBackup. */ +/** + * Samples for BackupInstances AdhocBackup. + */ public final class BackupInstancesAdhocBackupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerBackup.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/TriggerBackup.json */ /** * Sample code: Trigger Adhoc Backup. - * + * * @param manager Entry point to DataProtectionManager. */ public static void triggerAdhocBackup(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .adhocBackup( - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - new TriggerBackupRequest() - .withBackupRuleOptions( - new AdHocBackupRuleOptions() - .withRuleName("BackupWeekly") - .withTriggerOption(new AdhocBackupTriggerOption().withRetentionTagOverride("yearly"))), - com.azure.core.util.Context.NONE); + manager.backupInstances().adhocBackup("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", + new TriggerBackupRequest().withBackupRuleOptions(new AdHocBackupRuleOptions().withRuleName("BackupWeekly") + .withTriggerOption(new AdhocBackupTriggerOption().withRetentionTagOverride("yearly"))), + com.azure.core.util.Context.NONE); } } 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 1edcd381958f..0034ea80be4d 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 @@ -19,69 +19,50 @@ import java.util.HashMap; import java.util.Map; -/** Samples for BackupInstances CreateOrUpdate. */ +/** + * Samples for BackupInstances CreateOrUpdate. + */ public final class BackupInstancesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/PutBackupInstance.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/PutBackupInstance.json */ /** * Sample code: Create BackupInstance. - * + * * @param manager Entry point to DataProtectionManager. */ public static void createBackupInstance(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .define("testInstance1") + manager.backupInstances().define("testInstance1") .withExistingBackupVault("000pikumar", "PratikPrivatePreviewVault1") .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .withProperties( - new BackupInstance() - .withFriendlyName("harshitbi2") - .withDataSourceInfo( - new Datasource() - .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withObjectType("Datasource") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") - .withResourceLocation("") - .withResourceName("testdb") - .withResourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withResourceUri("")) - .withDataSourceSetInfo( - new DatasourceSet() - .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withObjectType("DatasourceSet") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") - .withResourceLocation("") - .withResourceName("viveksipgtest") - .withResourceType("Microsoft.DBforPostgreSQL/servers") - .withResourceUri("")) - .withPolicyInfo( - new PolicyInfo() - .withPolicyId( - "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/Backupvaults/PratikPrivatePreviewVault1/backupPolicies/PratikPolicy1") - .withPolicyParameters( - new PolicyParameters() - .withDataStoreParametersList( - Arrays - .asList( - new AzureOperationalStoreParameters() - .withDataStoreType(DataStoreTypes.OPERATIONAL_STORE) - .withResourceGroupId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest"))))) - .withDatasourceAuthCredentials( - new SecretStoreBasedAuthCredentials() - .withSecretStoreResource( - new SecretStoreResource() - .withUri("https://samplevault.vault.azure.net/secrets/credentials") - .withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT))) - .withValidationType(ValidationType.SHALLOW_VALIDATION) - .withObjectType("BackupInstance")) + .withProperties(new BackupInstance().withFriendlyName("harshitbi2").withDataSourceInfo(new Datasource() + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases").withObjectType("Datasource") + .withResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") + .withResourceLocation("").withResourceName("testdb") + .withResourceType("Microsoft.DBforPostgreSQL/servers/databases").withResourceUri("")) + .withDataSourceSetInfo(new DatasourceSet() + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases").withObjectType("DatasourceSet") + .withResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") + .withResourceLocation("").withResourceName("viveksipgtest") + .withResourceType("Microsoft.DBforPostgreSQL/servers").withResourceUri("")) + .withPolicyInfo(new PolicyInfo().withPolicyId( + "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/Backupvaults/PratikPrivatePreviewVault1/backupPolicies/PratikPolicy1") + .withPolicyParameters(new PolicyParameters() + .withDataStoreParametersList(Arrays.asList(new AzureOperationalStoreParameters() + .withDataStoreType(DataStoreTypes.OPERATIONAL_STORE).withResourceGroupId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest"))))) + .withDatasourceAuthCredentials(new SecretStoreBasedAuthCredentials().withSecretStoreResource( + new SecretStoreResource().withUri("https://samplevault.vault.azure.net/secrets/credentials") + .withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT))) + .withValidationType(ValidationType.SHALLOW_VALIDATION).withObjectType("BackupInstance")) .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); 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 7eb642f78792..c9a4ed9d1ed6 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 @@ -4,19 +4,22 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for BackupInstances Delete. */ +/** + * Samples for BackupInstances Delete. + */ public final class BackupInstancesDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/DeleteBackupInstance.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/DeleteBackupInstance.json */ /** * Sample code: Delete BackupInstance. - * + * * @param manager Entry point to DataProtectionManager. */ public static void deleteBackupInstance(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .delete("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", com.azure.core.util.Context.NONE); + manager.backupInstances().delete("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", + com.azure.core.util.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 index 0dd48d28d5d6..328116f22056 100644 --- 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 @@ -4,25 +4,25 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for BackupInstances GetBackupInstanceOperationResult. */ +/** + * Samples for BackupInstances GetBackupInstanceOperationResult. + */ public final class BackupInstancesGetBackupInstanceOperationResultSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/GetBackupInstanceOperationResult.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/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==", - com.azure.core.util.Context.NONE); + public static void + getBackupInstanceOperationResult(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupInstances().getBackupInstanceOperationResultWithResponse("SampleResourceGroup", "swaggerExample", + "testInstance1", + "YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==", + com.azure.core.util.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 7fb8a8b3d4d1..38288bda36ab 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 @@ -4,20 +4,22 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for BackupInstances Get. */ +/** + * Samples for BackupInstances Get. + */ public final class BackupInstancesGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/GetBackupInstance.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/GetBackupInstance.json */ /** * Sample code: Get BackupInstance. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getBackupInstance(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .getWithResponse( - "000pikumar", "PratikPrivatePreviewVault1", "testInstance1", com.azure.core.util.Context.NONE); + manager.backupInstances().getWithResponse("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", + com.azure.core.util.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 32d7daf747ec..48b7a6390587 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 @@ -4,18 +4,22 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for BackupInstances List. */ +/** + * Samples for BackupInstances List. + */ public final class BackupInstancesListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ListBackupInstances.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/ListBackupInstances.json */ /** * Sample code: List BackupInstances in a Vault. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listBackupInstancesInAVault( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + public static void + listBackupInstancesInAVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager.backupInstances().list("000pikumar", "PratikPrivatePreviewVault1", com.azure.core.util.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 index abf56619c96a..dc9f5fc3f76c 100644 --- 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for BackupInstances ResumeBackups. */ +/** + * Samples for BackupInstances ResumeBackups. + */ public final class BackupInstancesResumeBackupsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ResumeBackups.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/ResumeBackups.json */ /** * Sample code: ResumeBackups. - * + * * @param manager Entry point to DataProtectionManager. */ public static void resumeBackups(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { 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 index 01090850fc76..f35c81d95ba1 100644 --- 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for BackupInstances ResumeProtection. */ +/** + * Samples for BackupInstances ResumeProtection. + */ public final class BackupInstancesResumeProtectionSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ResumeProtection.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/ResumeProtection.json */ /** * Sample code: ResumeProtection. - * + * * @param manager Entry point to DataProtectionManager. */ public static void resumeProtection(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { 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 index b86b859dea2f..ba3e162c4827 100644 --- 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for BackupInstances StopProtection. */ +/** + * Samples for BackupInstances StopProtection. + */ public final class BackupInstancesStopProtectionSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/StopProtection.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/StopProtection.json */ /** * Sample code: StopProtection. - * + * * @param manager Entry point to DataProtectionManager. */ public static void stopProtection(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { 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 index 4732c58049a1..ff918791d677 100644 --- 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for BackupInstances SuspendBackups. */ +/** + * Samples for BackupInstances SuspendBackups. + */ public final class BackupInstancesSuspendBackupsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/SuspendBackups.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/SuspendBackups.json */ /** * Sample code: SuspendBackups. - * + * * @param manager Entry point to DataProtectionManager. */ public static void suspendBackups(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { 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 index 8c4bcaa07231..d3f277f70c43 100644 --- 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 @@ -7,24 +7,22 @@ import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest; import com.azure.resourcemanager.dataprotection.models.SyncType; -/** Samples for BackupInstances SyncBackupInstance. */ +/** + * Samples for BackupInstances SyncBackupInstance. + */ public final class BackupInstancesSyncBackupInstanceSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/SyncBackupInstance.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/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), - com.azure.core.util.Context.NONE); + manager.backupInstances().syncBackupInstance("testrg", "testvault", "testbi", + new SyncBackupInstanceRequest().withSyncType(SyncType.DEFAULT), com.azure.core.util.Context.NONE); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerCrossRegionRestoreSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerCrossRegionRestoreSamples.java new file mode 100644 index 000000000000..0da2c457acf8 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerCrossRegionRestoreSamples.java @@ -0,0 +1,64 @@ +// 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.resourcemanager.dataprotection.models.AzureBackupRecoveryPointBasedRestoreRequest; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreDetails; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreRequestObject; +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.RestoreTargetInfo; +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.SourceDataStoreType; + +/** + * Samples for BackupInstances TriggerCrossRegionRestore. + */ +public final class BackupInstancesTriggerCrossRegionRestoreSamples { + /* + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * CrossRegionRestore/TriggerCrossRegionRestore.json + */ + /** + * Sample code: Trigger Cross Region Restore. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void + triggerCrossRegionRestore(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupInstances().triggerCrossRegionRestore("000pikumar", "EastAsia", + new CrossRegionRestoreRequestObject().withRestoreRequestObject( + new AzureBackupRecoveryPointBasedRestoreRequest().withRestoreTargetInfo(new RestoreTargetInfo() + .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS).withRestoreLocation("southeastasia") + .withDatasourceInfo(new Datasource() + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases").withObjectType("Datasource") + .withResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb") + .withResourceLocation("").withResourceName("targetdb") + .withResourceType("Microsoft.DBforPostgreSQL/servers/databases").withResourceUri("")) + .withDatasourceSetInfo(new DatasourceSet() + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") + .withObjectType("DatasourceSet") + .withResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") + .withResourceLocation("").withResourceName("viveksipgtest") + .withResourceType("Microsoft.DBforPostgreSQL/servers").withResourceUri("")) + .withDatasourceAuthCredentials(new SecretStoreBasedAuthCredentials().withSecretStoreResource( + new SecretStoreResource().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")) + .withCrossRegionRestoreDetails( + new CrossRegionRestoreDetails().withSourceRegion("east asia").withSourceBackupInstanceId( + "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/backupVaults/PratikPrivatePreviewVault1/BackupInstances/harshitbi1")), + com.azure.core.util.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 14489854a763..cecb9e0d5b81 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 @@ -7,27 +7,24 @@ import com.azure.resourcemanager.dataprotection.models.AzureBackupRehydrationRequest; import com.azure.resourcemanager.dataprotection.models.RehydrationPriority; -/** Samples for BackupInstances TriggerRehydrate. */ +/** + * Samples for BackupInstances TriggerRehydrate. + */ public final class BackupInstancesTriggerRehydrateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRehydrate.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/TriggerRehydrate.json */ /** * Sample code: Trigger Rehydrate. - * + * * @param manager Entry point to DataProtectionManager. */ public static void triggerRehydrate(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .triggerRehydrate( - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - new AzureBackupRehydrationRequest() - .withRecoveryPointId("hardcodedRP") - .withRehydrationPriority(RehydrationPriority.HIGH) - .withRehydrationRetentionDuration("7D"), - com.azure.core.util.Context.NONE); + manager.backupInstances().triggerRehydrate("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", + new AzureBackupRehydrationRequest().withRecoveryPointId("hardcodedRP") + .withRehydrationPriority(RehydrationPriority.HIGH).withRehydrationRetentionDuration("7D"), + com.azure.core.util.Context.NONE); } } 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 958aafe207f7..f8ac99b79455 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 @@ -19,140 +19,101 @@ import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType; import com.azure.resourcemanager.dataprotection.models.TargetDetails; -/** Samples for BackupInstances TriggerRestore. */ +/** + * Samples for BackupInstances TriggerRestore. + */ public final class BackupInstancesTriggerRestoreSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRestoreAsFiles.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/TriggerRestoreAsFiles.json */ /** * Sample code: Trigger Restore As Files. - * + * * @param manager Entry point to DataProtectionManager. */ public static void triggerRestoreAsFiles(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .triggerRestore( - "000pikumar", - "PrivatePreviewVault1", - "testInstance1", - new AzureBackupRecoveryPointBasedRestoreRequest() - .withRestoreTargetInfo( - new RestoreFilesTargetInfo() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("southeastasia") - .withTargetDetails( - new TargetDetails() - .withFilePrefix("restoredblob") - .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"), - com.azure.core.util.Context.NONE); + manager.backupInstances().triggerRestore("000pikumar", "PrivatePreviewVault1", "testInstance1", + new AzureBackupRecoveryPointBasedRestoreRequest() + .withRestoreTargetInfo(new RestoreFilesTargetInfo().withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) + .withRestoreLocation("southeastasia") + .withTargetDetails(new TargetDetails().withFilePrefix("restoredblob") + .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"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRestoreWithRehydration.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/TriggerRestoreWithRehydration.json */ /** * Sample code: Trigger Restore With Rehydration. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void triggerRestoreWithRehydration( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .triggerRestore( - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - new AzureBackupRestoreWithRehydrationRequest() - .withRestoreTargetInfo( - new RestoreTargetInfo() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("southeastasia") - .withDatasourceInfo( - new Datasource() - .withDatasourceType("OssDB") - .withObjectType("Datasource") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") - .withResourceLocation("") - .withResourceName("testdb") - .withResourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withResourceUri("")) - .withDatasourceSetInfo( - new DatasourceSet() - .withDatasourceType("OssDB") - .withObjectType("DatasourceSet") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") - .withResourceLocation("") - .withResourceName("viveksipgtest") - .withResourceType("Microsoft.DBforPostgreSQL/servers") - .withResourceUri(""))) - .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE) - .withSourceResourceId( + public static void + triggerRestoreWithRehydration(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupInstances().triggerRestore("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", + new AzureBackupRestoreWithRehydrationRequest().withRestoreTargetInfo(new RestoreTargetInfo() + .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS).withRestoreLocation("southeastasia") + .withDatasourceInfo(new Datasource().withDatasourceType("OssDB").withObjectType("Datasource") + .withResourceId( "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") - .withRecoveryPointId("hardcodedRP") - .withRehydrationPriority(RehydrationPriority.HIGH) - .withRehydrationRetentionDuration("7D"), - com.azure.core.util.Context.NONE); + .withResourceLocation("").withResourceName("testdb") + .withResourceType("Microsoft.DBforPostgreSQL/servers/databases").withResourceUri("")) + .withDatasourceSetInfo(new DatasourceSet().withDatasourceType("OssDB").withObjectType("DatasourceSet") + .withResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") + .withResourceLocation("").withResourceName("viveksipgtest") + .withResourceType("Microsoft.DBforPostgreSQL/servers").withResourceUri(""))) + .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"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRestore.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/TriggerRestore.json */ /** * Sample code: Trigger Restore. - * + * * @param manager Entry point to DataProtectionManager. */ public static void triggerRestore(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .triggerRestore( - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - new AzureBackupRecoveryPointBasedRestoreRequest() - .withRestoreTargetInfo( - new RestoreTargetInfo() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("southeastasia") - .withDatasourceInfo( - new Datasource() - .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withObjectType("Datasource") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb") - .withResourceLocation("") - .withResourceName("targetdb") - .withResourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withResourceUri("")) - .withDatasourceSetInfo( - new DatasourceSet() - .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withObjectType("DatasourceSet") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") - .withResourceLocation("") - .withResourceName("viveksipgtest") - .withResourceType("Microsoft.DBforPostgreSQL/servers") - .withResourceUri("")) - .withDatasourceAuthCredentials( - new SecretStoreBasedAuthCredentials() - .withSecretStoreResource( - new SecretStoreResource() - .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"), - com.azure.core.util.Context.NONE); + manager.backupInstances().triggerRestore("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", + new AzureBackupRecoveryPointBasedRestoreRequest().withRestoreTargetInfo(new RestoreTargetInfo() + .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS).withRestoreLocation("southeastasia") + .withDatasourceInfo(new Datasource().withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") + .withObjectType("Datasource") + .withResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb") + .withResourceLocation("").withResourceName("targetdb") + .withResourceType("Microsoft.DBforPostgreSQL/servers/databases").withResourceUri("")) + .withDatasourceSetInfo(new DatasourceSet() + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases").withObjectType("DatasourceSet") + .withResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") + .withResourceLocation("").withResourceName("viveksipgtest") + .withResourceType("Microsoft.DBforPostgreSQL/servers").withResourceUri("")) + .withDatasourceAuthCredentials(new SecretStoreBasedAuthCredentials().withSecretStoreResource( + new SecretStoreResource().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"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateCrossRegionRestoreSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateCrossRegionRestoreSamples.java new file mode 100644 index 000000000000..a4536ad0fb60 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateCrossRegionRestoreSamples.java @@ -0,0 +1,64 @@ +// 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.resourcemanager.dataprotection.models.AzureBackupRecoveryPointBasedRestoreRequest; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreDetails; +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.RestoreTargetInfo; +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.SourceDataStoreType; +import com.azure.resourcemanager.dataprotection.models.ValidateCrossRegionRestoreRequestObject; + +/** + * Samples for BackupInstances ValidateCrossRegionRestore. + */ +public final class BackupInstancesValidateCrossRegionRestoreSamples { + /* + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * CrossRegionRestore/ValidateCrossRegionRestore.json + */ + /** + * Sample code: Validate Cross Region Restore. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void + validateCrossRegionRestore(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupInstances().validateCrossRegionRestore("000pikumar", "EastAsia", + new ValidateCrossRegionRestoreRequestObject().withRestoreRequestObject( + new AzureBackupRecoveryPointBasedRestoreRequest().withRestoreTargetInfo(new RestoreTargetInfo() + .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS).withRestoreLocation("southeastasia") + .withDatasourceInfo(new Datasource() + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases").withObjectType("Datasource") + .withResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb") + .withResourceLocation("").withResourceName("targetdb") + .withResourceType("Microsoft.DBforPostgreSQL/servers/databases").withResourceUri("")) + .withDatasourceSetInfo(new DatasourceSet() + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") + .withObjectType("DatasourceSet") + .withResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") + .withResourceLocation("").withResourceName("viveksipgtest") + .withResourceType("Microsoft.DBforPostgreSQL/servers").withResourceUri("")) + .withDatasourceAuthCredentials(new SecretStoreBasedAuthCredentials().withSecretStoreResource( + new SecretStoreResource().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")) + .withCrossRegionRestoreDetails( + new CrossRegionRestoreDetails().withSourceRegion("east asia").withSourceBackupInstanceId( + "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/backupVaults/PratikPrivatePreviewVault1/BackupInstances/harshitbi1")), + com.azure.core.util.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 f57b299a0804..b4d700ac27af 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 @@ -13,57 +13,39 @@ import com.azure.resourcemanager.dataprotection.models.SecretStoreType; import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest; -/** Samples for BackupInstances ValidateForBackup. */ +/** + * Samples for BackupInstances ValidateForBackup. + */ public final class BackupInstancesValidateForBackupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ValidateForBackup.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/ValidateForBackup.json */ /** * Sample code: Validate For Backup. - * + * * @param manager Entry point to DataProtectionManager. */ public static void validateForBackup(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .validateForBackup( - "000pikumar", - "PratikPrivatePreviewVault1", - new ValidateForBackupRequest() - .withBackupInstance( - new BackupInstance() - .withFriendlyName("harshitbi2") - .withDataSourceInfo( - new Datasource() - .withDatasourceType("OssDB") - .withObjectType("Datasource") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") - .withResourceLocation("") - .withResourceName("testdb") - .withResourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withResourceUri("")) - .withDataSourceSetInfo( - new DatasourceSet() - .withDatasourceType("OssDB") - .withObjectType("DatasourceSet") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") - .withResourceLocation("") - .withResourceName("viveksipgtest") - .withResourceType("Microsoft.DBforPostgreSQL/servers") - .withResourceUri("")) - .withPolicyInfo( - new PolicyInfo() - .withPolicyId( - "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/Backupvaults/PratikPrivatePreviewVault1/backupPolicies/PratikPolicy1")) - .withDatasourceAuthCredentials( - new SecretStoreBasedAuthCredentials() - .withSecretStoreResource( - new SecretStoreResource() - .withUri("https://samplevault.vault.azure.net/secrets/credentials") - .withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT))) - .withObjectType("BackupInstance")), - com.azure.core.util.Context.NONE); + manager.backupInstances().validateForBackup("000pikumar", "PratikPrivatePreviewVault1", + new ValidateForBackupRequest().withBackupInstance(new BackupInstance().withFriendlyName("harshitbi2") + .withDataSourceInfo(new Datasource().withDatasourceType("OssDB").withObjectType("Datasource") + .withResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb") + .withResourceLocation("").withResourceName("testdb") + .withResourceType("Microsoft.DBforPostgreSQL/servers/databases").withResourceUri("")) + .withDataSourceSetInfo(new DatasourceSet().withDatasourceType("OssDB").withObjectType("DatasourceSet") + .withResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") + .withResourceLocation("").withResourceName("viveksipgtest") + .withResourceType("Microsoft.DBforPostgreSQL/servers").withResourceUri("")) + .withPolicyInfo(new PolicyInfo().withPolicyId( + "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/Backupvaults/PratikPrivatePreviewVault1/backupPolicies/PratikPolicy1")) + .withDatasourceAuthCredentials(new SecretStoreBasedAuthCredentials().withSecretStoreResource( + new SecretStoreResource().withUri("https://samplevault.vault.azure.net/secrets/credentials") + .withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT))) + .withObjectType("BackupInstance")), + com.azure.core.util.Context.NONE); } } 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 a89e8dfde033..95c852dfb9b9 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 @@ -15,60 +15,45 @@ import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType; import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject; -/** Samples for BackupInstances ValidateForRestore. */ +/** + * Samples for BackupInstances ValidateForRestore. + */ public final class BackupInstancesValidateForRestoreSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ValidateRestore.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/ValidateRestore.json */ /** * Sample code: Validate Restore. - * + * * @param manager Entry point to DataProtectionManager. */ public static void validateRestore(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupInstances() - .validateForRestore( - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - new ValidateRestoreRequestObject() - .withRestoreRequestObject( - new AzureBackupRecoveryPointBasedRestoreRequest() - .withRestoreTargetInfo( - new RestoreTargetInfo() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("southeastasia") - .withDatasourceInfo( - new Datasource() - .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withObjectType("Datasource") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb") - .withResourceLocation("") - .withResourceName("targetdb") - .withResourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withResourceUri("")) - .withDatasourceSetInfo( - new DatasourceSet() - .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") - .withObjectType("DatasourceSet") - .withResourceId( - "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") - .withResourceLocation("") - .withResourceName("viveksipgtest") - .withResourceType("Microsoft.DBforPostgreSQL/servers") - .withResourceUri("")) - .withDatasourceAuthCredentials( - new SecretStoreBasedAuthCredentials() - .withSecretStoreResource( - new SecretStoreResource() - .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")), - com.azure.core.util.Context.NONE); + manager.backupInstances().validateForRestore("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", + new ValidateRestoreRequestObject().withRestoreRequestObject( + new AzureBackupRecoveryPointBasedRestoreRequest().withRestoreTargetInfo(new RestoreTargetInfo() + .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS).withRestoreLocation("southeastasia") + .withDatasourceInfo(new Datasource() + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases").withObjectType("Datasource") + .withResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb") + .withResourceLocation("").withResourceName("targetdb") + .withResourceType("Microsoft.DBforPostgreSQL/servers/databases").withResourceUri("")) + .withDatasourceSetInfo(new DatasourceSet() + .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases") + .withObjectType("DatasourceSet") + .withResourceId( + "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest") + .withResourceLocation("").withResourceName("viveksipgtest") + .withResourceType("Microsoft.DBforPostgreSQL/servers").withResourceUri("")) + .withDatasourceAuthCredentials(new SecretStoreBasedAuthCredentials().withSecretStoreResource( + new SecretStoreResource().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")), + com.azure.core.util.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 22f12b55df1b..f5c2a1dbe9cf 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 @@ -21,88 +21,71 @@ import java.time.OffsetDateTime; import java.util.Arrays; -/** Samples for BackupPolicies CreateOrUpdate. */ +/** + * Samples for BackupPolicies CreateOrUpdate. + */ public final class BackupPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/CreateOrUpdateBackupPolicy.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/PolicyCRUD/ + * CreateOrUpdateBackupPolicy.json */ /** * Sample code: CreateOrUpdate BackupPolicy. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void createOrUpdateBackupPolicy( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + public static void + createOrUpdateBackupPolicy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager - .backupPolicies() - .define("OSSDBPolicy") - .withExistingBackupVault("000pikumar", "PrivatePreviewVault") + .backupPolicies().define( + "OSSDBPolicy") + .withExistingBackupVault("000pikumar", + "PrivatePreviewVault") .withProperties( new BackupPolicy() - .withDatasourceTypes(Arrays.asList("OssDB")) + .withDatasourceTypes( + Arrays.asList("OssDB")) .withPolicyRules( Arrays .asList( - new AzureBackupRule() - .withName("BackupWeekly") + new AzureBackupRule().withName("BackupWeekly") .withBackupParameters(new AzureBackupParams().withBackupType("Full")) .withDataStore( - new DataStoreInfoBase() - .withDataStoreType(DataStoreTypes.VAULT_STORE) + new DataStoreInfoBase().withDataStoreType(DataStoreTypes.VAULT_STORE) .withObjectType("DataStoreInfoBase")) .withTrigger( new ScheduleBasedTriggerContext() - .withSchedule( - new BackupSchedule() - .withRepeatingTimeIntervals( - Arrays.asList("R/2019-11-20T08:00:00-08:00/P1W"))) + .withSchedule(new BackupSchedule().withRepeatingTimeIntervals( + Arrays.asList("R/2019-11-20T08:00:00-08:00/P1W"))) .withTaggingCriteria( - Arrays - .asList( - new TaggingCriteria() - .withIsDefault(true) - .withTaggingPriority(99L) - .withTagInfo(new RetentionTag().withTagName("Default")), - new TaggingCriteria() - .withCriteria( - Arrays - .asList( - new ScheduleBasedBackupCriteria() - .withDaysOfTheWeek( - Arrays.asList(DayOfWeek.SUNDAY)) - .withScheduleTimes( - Arrays - .asList( - OffsetDateTime - .parse( - "2019-03-01T13:00:00Z"))))) - .withIsDefault(false) - .withTaggingPriority(20L) - .withTagInfo(new RetentionTag().withTagName("Weekly"))))), - new AzureRetentionRule() - .withName("Default") - .withIsDefault(true) + Arrays.asList( + new TaggingCriteria() + .withIsDefault(true).withTaggingPriority(99L) + .withTagInfo(new RetentionTag().withTagName("Default")), + new TaggingCriteria() + .withCriteria(Arrays.asList(new ScheduleBasedBackupCriteria() + .withDaysOfTheWeek(Arrays.asList(DayOfWeek.SUNDAY)) + .withScheduleTimes(Arrays + .asList(OffsetDateTime.parse("2019-03-01T13:00:00Z"))))) + .withIsDefault(false).withTaggingPriority(20L) + .withTagInfo(new RetentionTag().withTagName("Weekly"))))), + new AzureRetentionRule().withName("Default").withIsDefault(true) .withLifecycles( Arrays - .asList( - new SourceLifeCycle() - .withDeleteAfter(new AbsoluteDeleteOption().withDuration("P1W")) - .withSourceDataStore( - new DataStoreInfoBase() - .withDataStoreType(DataStoreTypes.VAULT_STORE) - .withObjectType("DataStoreInfoBase")))), - new AzureRetentionRule() - .withName("Weekly") - .withIsDefault(false) + .asList(new SourceLifeCycle() + .withDeleteAfter(new AbsoluteDeleteOption().withDuration("P1W")) + .withSourceDataStore(new DataStoreInfoBase() + .withDataStoreType(DataStoreTypes.VAULT_STORE) + .withObjectType("DataStoreInfoBase")))), + new AzureRetentionRule().withName("Weekly").withIsDefault(false) .withLifecycles( Arrays - .asList( - new SourceLifeCycle() - .withDeleteAfter(new AbsoluteDeleteOption().withDuration("P12W")) - .withSourceDataStore( - new DataStoreInfoBase() - .withDataStoreType(DataStoreTypes.VAULT_STORE) - .withObjectType("DataStoreInfoBase"))))))) + .asList(new SourceLifeCycle() + .withDeleteAfter(new AbsoluteDeleteOption().withDuration("P12W")) + .withSourceDataStore(new DataStoreInfoBase() + .withDataStoreType(DataStoreTypes.VAULT_STORE) + .withObjectType("DataStoreInfoBase"))))))) .create(); } } 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 d75e7a70ba53..e0e7b450b0b4 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 @@ -4,19 +4,22 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for BackupPolicies Delete. */ +/** + * Samples for BackupPolicies Delete. + */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/DeleteBackupPolicy.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/PolicyCRUD/ + * DeleteBackupPolicy.json */ /** * Sample code: Delete BackupPolicy. - * + * * @param manager Entry point to DataProtectionManager. */ public static void deleteBackupPolicy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupPolicies() - .deleteWithResponse("000pikumar", "PrivatePreviewVault", "OSSDBPolicy", com.azure.core.util.Context.NONE); + manager.backupPolicies().deleteWithResponse("000pikumar", "PrivatePreviewVault", "OSSDBPolicy", + com.azure.core.util.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 7c5d1004e44f..366ab1e5d9eb 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 @@ -4,19 +4,22 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for BackupPolicies Get. */ +/** + * Samples for BackupPolicies Get. + */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/GetBackupPolicy.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/PolicyCRUD/ + * GetBackupPolicy.json */ /** * Sample code: Get BackupPolicy. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getBackupPolicy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupPolicies() - .getWithResponse("000pikumar", "PrivatePreviewVault", "OSSDBPolicy", com.azure.core.util.Context.NONE); + manager.backupPolicies().getWithResponse("000pikumar", "PrivatePreviewVault", "OSSDBPolicy", + com.azure.core.util.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 29a9f7fb8dc1..f65931607f18 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for BackupPolicies List. */ +/** + * Samples for BackupPolicies List. + */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/ListBackupPolicy.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/PolicyCRUD/ + * ListBackupPolicy.json */ /** * Sample code: List BackupPolicy. - * + * * @param manager Entry point to DataProtectionManager. */ public static void listBackupPolicy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { 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 a6ddabc610c9..5c35b44cc334 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 @@ -4,23 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for BackupVaultOperationResults Get. */ +/** + * Samples for BackupVaultOperationResults Get. + */ public final class BackupVaultOperationResultsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetOperationResultPatch.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/ + * GetOperationResultPatch.json */ /** * Sample code: GetOperationResult Patch. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getOperationResultPatch(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupVaultOperationResults() - .getWithResponse( - "SampleResourceGroup", - "swaggerExample", - "YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==", - com.azure.core.util.Context.NONE); + manager.backupVaultOperationResults().getWithResponse("SampleResourceGroup", "swaggerExample", + "YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==", + com.azure.core.util.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 cfa63552b2f1..e8afac603531 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 @@ -6,26 +6,25 @@ import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityRequest; -/** Samples for BackupVaults CheckNameAvailability. */ +/** + * Samples for BackupVaults CheckNameAvailability. + */ public final class BackupVaultsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/CheckBackupVaultsNameAvailability.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/ + * CheckBackupVaultsNameAvailability.json */ /** * Sample code: Check BackupVaults name availability. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void checkBackupVaultsNameAvailability( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupVaults() - .checkNameAvailabilityWithResponse( - "SampleResourceGroup", - "westus", - new CheckNameAvailabilityRequest() - .withName("swaggerExample") - .withType("Microsoft.DataProtection/BackupVaults"), + public static void + checkBackupVaultsNameAvailability(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupVaults() + .checkNameAvailabilityWithResponse("SampleResourceGroup", "westus", new CheckNameAvailabilityRequest() + .withName("swaggerExample").withType("Microsoft.DataProtection/BackupVaults"), com.azure.core.util.Context.NONE); } } 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 3977ad8c51a1..7c730fdfb167 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 @@ -22,91 +22,66 @@ import java.util.HashMap; import java.util.Map; -/** Samples for BackupVaults CreateOrUpdate. */ +/** + * Samples for BackupVaults CreateOrUpdate. + */ public final class BackupVaultsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/PutBackupVault.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/ + * PutBackupVault.json */ /** * Sample code: Create BackupVault. - * + * * @param manager Entry point to DataProtectionManager. */ public static void createBackupVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupVaults() - .define("swaggerExample") - .withRegion("WestUS") + manager.backupVaults().define("swaggerExample").withRegion("WestUS") .withExistingResourceGroup("SampleResourceGroup") - .withProperties( - new BackupVault() - .withMonitoringSettings( - new MonitoringSettings() - .withAzureMonitorAlertSettings( - new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED))) - .withSecuritySettings( - new SecuritySettings() - .withSoftDeleteSettings( - new SoftDeleteSettings() - .withState(SoftDeleteState.fromString("Enabled")) - .withRetentionDurationInDays(14.0D))) - .withStorageSettings( - Arrays - .asList( - new StorageSetting() - .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) - .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) - .withFeatureSettings( - new FeatureSettings() - .withCrossRegionRestoreSettings( - new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED)))) - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .withIdentity(new DppIdentityDetails().withType("None")) + .withProperties(new BackupVault() + .withMonitoringSettings(new MonitoringSettings().withAzureMonitorAlertSettings( + new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED))) + .withSecuritySettings(new SecuritySettings().withSoftDeleteSettings(new SoftDeleteSettings() + .withState(SoftDeleteState.fromString("Enabled")).withRetentionDurationInDays(14.0D))) + .withStorageSettings( + Arrays.asList(new StorageSetting().withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) + .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) + .withFeatureSettings(new FeatureSettings().withCrossRegionRestoreSettings( + new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED)))) + .withTags(mapOf("key1", "fakeTokenPlaceholder")).withIdentity(new DppIdentityDetails().withType("None")) .create(); } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/PutBackupVaultWithMSI.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/ + * PutBackupVaultWithMSI.json */ /** * Sample code: Create BackupVault With MSI. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void createBackupVaultWithMSI( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupVaults() - .define("swaggerExample") - .withRegion("WestUS") + public static void + createBackupVaultWithMSI(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.backupVaults().define("swaggerExample").withRegion("WestUS") .withExistingResourceGroup("SampleResourceGroup") - .withProperties( - new BackupVault() - .withMonitoringSettings( - new MonitoringSettings() - .withAzureMonitorAlertSettings( - new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED))) - .withSecuritySettings( - new SecuritySettings() - .withSoftDeleteSettings( - new SoftDeleteSettings() - .withState(SoftDeleteState.fromString("Enabled")) - .withRetentionDurationInDays(14.0D))) - .withStorageSettings( - Arrays - .asList( - new StorageSetting() - .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) - .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) - .withFeatureSettings( - new FeatureSettings() - .withCrossRegionRestoreSettings( - new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED)))) + .withProperties(new BackupVault() + .withMonitoringSettings(new MonitoringSettings().withAzureMonitorAlertSettings( + new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED))) + .withSecuritySettings(new SecuritySettings().withSoftDeleteSettings(new SoftDeleteSettings() + .withState(SoftDeleteState.fromString("Enabled")).withRetentionDurationInDays(14.0D))) + .withStorageSettings( + Arrays.asList(new StorageSetting().withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) + .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) + .withFeatureSettings(new FeatureSettings().withCrossRegionRestoreSettings( + new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED)))) .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .withIdentity(new DppIdentityDetails().withType("systemAssigned")) - .create(); + .withIdentity(new DppIdentityDetails().withType("systemAssigned")).create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); 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 0ae4c14ca1a2..428129ba04aa 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for BackupVaults Delete. */ +/** + * Samples for BackupVaults Delete. + */ public final class BackupVaultsDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/DeleteBackupVault.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/ + * DeleteBackupVault.json */ /** * Sample code: Delete BackupVault. - * + * * @param manager Entry point to DataProtectionManager. */ public static void deleteBackupVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { 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 123dbedf3192..4d57803f4309 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 @@ -4,33 +4,37 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for BackupVaults GetByResourceGroup. */ +/** + * Samples for BackupVaults GetByResourceGroup. + */ public final class BackupVaultsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVault.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/ + * GetBackupVault.json */ /** * Sample code: Get BackupVault. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getBackupVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupVaults() - .getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + manager.backupVaults().getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVaultWithMSI.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/ + * GetBackupVaultWithMSI.json */ /** * Sample code: Get BackupVault With MSI. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getBackupVaultWithMSI(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .backupVaults() - .getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + manager.backupVaults().getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", + com.azure.core.util.Context.NONE); } } 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 8c2d566f1a1a..c5a6aaeb4c7d 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 @@ -4,18 +4,22 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for BackupVaults ListByResourceGroup. */ +/** + * Samples for BackupVaults ListByResourceGroup. + */ public final class BackupVaultsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVaultsInResourceGroup.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/ + * GetBackupVaultsInResourceGroup.json */ /** * Sample code: Get BackupVaults in ResourceGroup. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getBackupVaultsInResourceGroup( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + public static void + getBackupVaultsInResourceGroup(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager.backupVaults().listByResourceGroup("SampleResourceGroup", com.azure.core.util.Context.NONE); } } 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 9f3b83b1156d..8e955ee9f0c6 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 @@ -4,18 +4,22 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for BackupVaults List. */ +/** + * Samples for BackupVaults List. + */ public final class BackupVaultsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVaultsInSubscription.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/ + * GetBackupVaultsInSubscription.json */ /** * Sample code: Get BackupVaults in Subscription. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getBackupVaultsInSubscription( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + public static void + getBackupVaultsInSubscription(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager.backupVaults().list(com.azure.core.util.Context.NONE); } } 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 7b0b00a4ac60..1d7a47e2a170 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 @@ -12,35 +12,32 @@ import java.util.HashMap; import java.util.Map; -/** Samples for BackupVaults Update. */ +/** + * Samples for BackupVaults Update. + */ public final class BackupVaultsUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/PatchBackupVault.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/ + * PatchBackupVault.json */ /** * Sample code: Patch BackupVault. - * + * * @param manager Entry point to DataProtectionManager. */ public static void patchBackupVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - BackupVaultResource resource = - manager - .backupVaults() - .getByResourceGroupWithResponse( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf("newKey", "fakeTokenPlaceholder")) - .withProperties( - new PatchBackupVaultInput() - .withMonitoringSettings( - new MonitoringSettings() - .withAzureMonitorAlertSettings( - new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED)))) + BackupVaultResource resource = manager.backupVaults() + .getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("newKey", "fakeTokenPlaceholder")) + .withProperties(new PatchBackupVaultInput() + .withMonitoringSettings(new MonitoringSettings().withAzureMonitorAlertSettings( + new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED)))) .apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); 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 2c129ffb8653..e4fa56e2e58d 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 @@ -7,23 +7,24 @@ import com.azure.resourcemanager.dataprotection.models.FeatureType; import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequest; -/** Samples for DataProtection CheckFeatureSupport. */ +/** + * Samples for DataProtection CheckFeatureSupport. + */ public final class DataProtectionCheckFeatureSupportSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/CheckfeatureSupport.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * CheckfeatureSupport.json */ /** * Sample code: Check Azure Vm Backup Feature Support. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void checkAzureVmBackupFeatureSupport( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .dataProtections() - .checkFeatureSupportWithResponse( - "WestUS", - new FeatureValidationRequest().withFeatureType(FeatureType.DATA_SOURCE_TYPE), - com.azure.core.util.Context.NONE); + public static void + checkAzureVmBackupFeatureSupport(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.dataProtections().checkFeatureSupportWithResponse("WestUS", + new FeatureValidationRequest().withFeatureType(FeatureType.DATA_SOURCE_TYPE), + com.azure.core.util.Context.NONE); } } 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 f6cd03c51a61..bd461d982436 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for DataProtectionOperations List. */ +/** + * Samples for DataProtectionOperations List. + */ public final class DataProtectionOperationsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/Operations/List.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/Operations/List + * .json */ /** * Sample code: Returns the list of supported REST operations. - * + * * @param manager Entry point to DataProtectionManager. */ public static void returnsTheListOfSupportedRESTOperations( diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesGetSamples.java index 07fac63e4ea4..5a1afb879b6d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesGetSamples.java @@ -4,21 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for DeletedBackupInstances Get. */ +/** + * Samples for DeletedBackupInstances Get. + */ public final class DeletedBackupInstancesGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * DeletedBackupInstanceOperations/GetDeletedBackupInstance.json */ /** * Sample code: Get DeletedBackupInstance. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getDeletedBackupInstance( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .deletedBackupInstances() - .getWithResponse( - "000pikumar", "PratikPrivatePreviewVault1", "testInstance1", com.azure.core.util.Context.NONE); + public static void + getDeletedBackupInstance(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.deletedBackupInstances().getWithResponse("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesListSamples.java index 575dde67d21c..2a98a6015774 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesListSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for DeletedBackupInstances List. */ +/** + * Samples for DeletedBackupInstances List. + */ public final class DeletedBackupInstancesListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * DeletedBackupInstanceOperations/ListDeletedBackupInstances.json */ /** * Sample code: List DeletedBackupInstances in a Vault. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listDeletedBackupInstancesInAVault( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .deletedBackupInstances() - .list("000pikumar", "PratikPrivatePreviewVault1", com.azure.core.util.Context.NONE); + public static void + listDeletedBackupInstancesInAVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.deletedBackupInstances().list("000pikumar", "PratikPrivatePreviewVault1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteSamples.java index dfed1a2d7c4c..faf1e42c2f9c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for DeletedBackupInstances Undelete. */ +/** + * Samples for DeletedBackupInstances Undelete. + */ public final class DeletedBackupInstancesUndeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json */ /** * Sample code: Undelete Deleted BackupInstance. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void undeleteDeletedBackupInstance( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + public static void + undeleteDeletedBackupInstance(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager.deletedBackupInstances().undelete("testrg", "testvault", "testbi", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyCreateOrUpdateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyCreateOrUpdateSamples.java index 5c553ff7e3aa..9ea76e3d61b2 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyCreateOrUpdateSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyCreateOrUpdateSamples.java @@ -6,26 +6,26 @@ import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase; -/** Samples for DppResourceGuardProxy CreateOrUpdate. */ +/** + * Samples for DppResourceGuardProxy CreateOrUpdate. + */ public final class DppResourceGuardProxyCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardProxyCRUD/PutResourceGuardProxy.json */ /** * Sample code: Create ResourceGuardProxy. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void createResourceGuardProxy( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .dppResourceGuardProxies() - .define("swaggerExample") + public static void + createResourceGuardProxy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.dppResourceGuardProxies().define("swaggerExample") .withExistingBackupVault("SampleResourceGroup", "sampleVault") - .withProperties( - new ResourceGuardProxyBase() - .withResourceGuardResourceId( - "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource")) + .withProperties(new ResourceGuardProxyBase().withResourceGuardResourceId( + "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource")) .create(); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyDeleteSamples.java index f9f5d06172de..04b10624d0de 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyDeleteSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyDeleteSamples.java @@ -4,21 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for DppResourceGuardProxy Delete. */ +/** + * Samples for DppResourceGuardProxy Delete. + */ public final class DppResourceGuardProxyDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json */ /** * Sample code: Delete ResourceGuardProxy. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void deleteResourceGuardProxy( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .dppResourceGuardProxies() - .deleteWithResponse( - "SampleResourceGroup", "sampleVault", "swaggerExample", com.azure.core.util.Context.NONE); + public static void + deleteResourceGuardProxy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.dppResourceGuardProxies().deleteWithResponse("SampleResourceGroup", "sampleVault", "swaggerExample", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyGetSamples.java index f7d85c583de2..bfc23ef8cf2d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyGetSamples.java @@ -4,19 +4,22 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for DppResourceGuardProxy Get. */ +/** + * Samples for DppResourceGuardProxy Get. + */ public final class DppResourceGuardProxyGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardProxyCRUD/GetResourceGuardProxy.json */ /** * Sample code: Get ResourceGuardProxy. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getResourceGuardProxy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .dppResourceGuardProxies() - .getWithResponse("SampleResourceGroup", "sampleVault", "swaggerExample", com.azure.core.util.Context.NONE); + manager.dppResourceGuardProxies().getWithResponse("SampleResourceGroup", "sampleVault", "swaggerExample", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyListSamples.java index 3367b13a747c..3a2335457990 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyListSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for DppResourceGuardProxy List. */ +/** + * Samples for DppResourceGuardProxy List. + */ public final class DppResourceGuardProxyListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardProxyCRUD/ListResourceGuardProxy.json */ /** * Sample code: Get ResourceGuardProxies. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getResourceGuardProxies(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyUnlockDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyUnlockDeleteSamples.java index d8ae569c5a1c..40e0c9aa25b1 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyUnlockDeleteSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyUnlockDeleteSamples.java @@ -7,31 +7,28 @@ import com.azure.resourcemanager.dataprotection.models.UnlockDeleteRequest; import java.util.Arrays; -/** Samples for DppResourceGuardProxy UnlockDelete. */ +/** + * Samples for DppResourceGuardProxy UnlockDelete. + */ public final class DppResourceGuardProxyUnlockDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json */ /** * Sample code: UnlockDelete ResourceGuardProxy. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void unlockDeleteResourceGuardProxy( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .dppResourceGuardProxies() - .unlockDeleteWithResponse( - "SampleResourceGroup", - "sampleVault", - "swaggerExample", - new UnlockDeleteRequest() - .withResourceGuardOperationRequests( - Arrays - .asList( - "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource/deleteBackupInstanceRequests/default")) - .withResourceToBeDeleted( - "/subscriptions/5e13b949-1218-4d18-8b99-7e12155ec4f7/resourceGroups/SampleResourceGroup/providers/Microsoft.DataProtection/backupVaults/sampleVault/backupInstances/TestBI9779f4de"), - com.azure.core.util.Context.NONE); + public static void + unlockDeleteResourceGuardProxy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.dppResourceGuardProxies().unlockDeleteWithResponse("SampleResourceGroup", "sampleVault", + "swaggerExample", + new UnlockDeleteRequest().withResourceGuardOperationRequests(Arrays.asList( + "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource/deleteBackupInstanceRequests/default")) + .withResourceToBeDeleted( + "/subscriptions/5e13b949-1218-4d18-8b99-7e12155ec4f7/resourceGroups/SampleResourceGroup/providers/Microsoft.DataProtection/backupVaults/sampleVault/backupInstances/TestBI9779f4de"), + com.azure.core.util.Context.NONE); } } 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 8250c5f7e91f..ced9ce33846f 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 @@ -4,24 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ExportJobsOperationResult Get. */ +/** + * Samples for ExportJobsOperationResult Get. + */ public final class ExportJobsOperationResultGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/GetExportJobsOperationResult.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/JobCRUD/ + * GetExportJobsOperationResult.json */ /** * Sample code: Get Export Jobs Operation Result. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getExportJobsOperationResult( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .exportJobsOperationResults() - .getWithResponse( - "SwaggerTestRg", - "NetSDKTestRsVault", - "00000000-0000-0000-0000-000000000000", - com.azure.core.util.Context.NONE); + public static void + getExportJobsOperationResult(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.exportJobsOperationResults().getWithResponse("SwaggerTestRg", "NetSDKTestRsVault", + "00000000-0000-0000-0000-000000000000", com.azure.core.util.Context.NONE); } } 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 0454ae339ad8..15e54e7d512c 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ExportJobs Trigger. */ +/** + * Samples for ExportJobs Trigger. + */ public final class ExportJobsTriggerSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/TriggerExportJobs.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/JobCRUD/ + * TriggerExportJobs.json */ /** * Sample code: Trigger Export Jobs. - * + * * @param manager Entry point to DataProtectionManager. */ public static void triggerExportJobs(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/FetchCrossRegionRestoreJobGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/FetchCrossRegionRestoreJobGetSamples.java new file mode 100644 index 000000000000..bf454c2415d1 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/FetchCrossRegionRestoreJobGetSamples.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.resourcemanager.dataprotection.models.CrossRegionRestoreJobRequest; + +/** + * Samples for FetchCrossRegionRestoreJob Get. + */ +public final class FetchCrossRegionRestoreJobGetSamples { + /* + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * CrossRegionRestore/FetchCrossRegionRestoreJob.json + */ + /** + * Sample code: Get Cross Region Restore Job. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void + getCrossRegionRestoreJob(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.fetchCrossRegionRestoreJobs().getWithResponse("BugBash1", "west us", + new CrossRegionRestoreJobRequest().withSourceRegion("east us").withSourceBackupVaultId( + "/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/BugBash1/providers/Microsoft.DataProtection/backupVaults/BugBashVaultForCCYv11") + .withJobId("3c60cb49-63e8-4b21-b9bd-26277b3fdfae"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/FetchCrossRegionRestoreJobsOperationListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/FetchCrossRegionRestoreJobsOperationListSamples.java new file mode 100644 index 000000000000..598a374c547e --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/FetchCrossRegionRestoreJobsOperationListSamples.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.resourcemanager.dataprotection.models.CrossRegionRestoreJobsRequest; + +/** + * Samples for FetchCrossRegionRestoreJobsOperation List. + */ +public final class FetchCrossRegionRestoreJobsOperationListSamples { + /* + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * CrossRegionRestore/FetchCrossRegionRestoreJobs.json + */ + /** + * Sample code: List Cross Region Restore Jobs. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void + listCrossRegionRestoreJobs(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.fetchCrossRegionRestoreJobsOperations().list("BugBash1", "east us", + new CrossRegionRestoreJobsRequest().withSourceRegion("east us").withSourceBackupVaultId( + "/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/BugBash1/providers/Microsoft.DataProtection/backupVaults/BugBashVaultForCCYv11"), + null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/FetchSecondaryRecoveryPointsListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/FetchSecondaryRecoveryPointsListSamples.java new file mode 100644 index 000000000000..f27a8fcd55ed --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/FetchSecondaryRecoveryPointsListSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.generated; + +import com.azure.resourcemanager.dataprotection.models.FetchSecondaryRPsRequestParameters; + +/** + * Samples for FetchSecondaryRecoveryPoints List. + */ +public final class FetchSecondaryRecoveryPointsListSamples { + /* + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * CrossRegionRestore/FetchSecondaryRPs.json + */ + /** + * Sample code: Fetch SecondaryRPs. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void fetchSecondaryRPs(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.fetchSecondaryRecoveryPoints().list("000pikumar", "WestUS", + new FetchSecondaryRPsRequestParameters().withSourceRegion("EastUS").withSourceBackupInstanceId( + "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/HelloTest/providers/Microsoft.DataProtection/backupVaults/HelloTestVault/backupInstances/653213d-c5b3-44f6-a0d9-db3c4f9d8e34"), + null, null, com.azure.core.util.Context.NONE); + } +} 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 0981afc333f3..189d4f4e1684 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 @@ -4,23 +4,22 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for Jobs Get. */ +/** + * Samples for Jobs Get. + */ public final class JobsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/GetJob.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/JobCRUD/GetJob. + * json */ /** * Sample code: Get Job. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getJob(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .jobs() - .getWithResponse( - "BugBash1", - "BugBashVaultForCCYv11", - "3c60cb49-63e8-4b21-b9bd-26277b3fdfae", - com.azure.core.util.Context.NONE); + manager.jobs().getWithResponse("BugBash1", "BugBashVaultForCCYv11", "3c60cb49-63e8-4b21-b9bd-26277b3fdfae", + com.azure.core.util.Context.NONE); } } 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 019c1e0dfc64..1166d57d159c 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for Jobs List. */ +/** + * Samples for Jobs List. + */ public final class JobsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/ListJobs.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/JobCRUD/ + * ListJobs.json */ /** * Sample code: Get Jobs. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getJobs(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { 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 d2906edecf9c..819c3c0093cc 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 @@ -4,22 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for OperationResult Get. */ +/** + * Samples for OperationResult Get. + */ public final class OperationResultGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationResult.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * GetOperationResult.json */ /** * Sample code: Get OperationResult. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getOperationResult(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .operationResults() - .getWithResponse( - "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", - "WestUS", - com.azure.core.util.Context.NONE); + manager.operationResults().getWithResponse( + "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", + "WestUS", com.azure.core.util.Context.NONE); } } 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 index a281b93ad064..0b8f04c731e7 100644 --- 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 @@ -4,23 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for OperationStatusBackupVaultContext Get. */ +/** + * Samples for OperationStatusBackupVaultContext Get. + */ public final class OperationStatusBackupVaultContextGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationStatusVaultContext.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/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==", - com.azure.core.util.Context.NONE); + manager.operationStatusBackupVaultContexts().getWithResponse("SampleResourceGroup", "swaggerExample", + "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", + com.azure.core.util.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 920bf64b2847..ad10837f9eac 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 @@ -4,22 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for OperationStatus Get. */ +/** + * Samples for OperationStatus Get. + */ public final class OperationStatusGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationStatus.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * GetOperationStatus.json */ /** * Sample code: Get OperationStatus. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getOperationStatus(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .operationStatus() - .getWithResponse( - "WestUS", - "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", - com.azure.core.util.Context.NONE); + manager.operationStatus().getWithResponse("WestUS", + "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", + com.azure.core.util.Context.NONE); } } 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 index 03924ca173c4..e781dfd897d1 100644 --- 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 @@ -4,22 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for OperationStatusResourceGroupContext GetByResourceGroup. */ +/** + * Samples for OperationStatusResourceGroupContext GetByResourceGroup. + */ public final class OperationStatusResourceGroupContextGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationStatusRGContext.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/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==", - com.azure.core.util.Context.NONE); + manager.operationStatusResourceGroupContexts().getByResourceGroupWithResponse("SampleResourceGroup", + "MjkxOTMyODMtYTE3My00YzJjLTg5NjctN2E4MDIxNDA3NjA2OzdjNGE2ZWRjLWJjMmItNDRkYi1hYzMzLWY1YzEwNzk5Y2EyOA==", + com.azure.core.util.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 d24c26251eb4..213104a88b26 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 @@ -4,24 +4,22 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for RecoveryPoints Get. */ +/** + * Samples for RecoveryPoints Get. + */ public final class RecoveryPointsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/GetRecoveryPoint.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/GetRecoveryPoint.json */ /** * Sample code: Get Recovery Point. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getRecoveryPoint(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .recoveryPoints() - .getWithResponse( - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - "7fb2cddd-c5b3-44f6-a0d9-db3c4f9d5f25", - com.azure.core.util.Context.NONE); + manager.recoveryPoints().getWithResponse("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", + "7fb2cddd-c5b3-44f6-a0d9-db3c4f9d5f25", com.azure.core.util.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 924e5ba321f9..848533c20a28 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 @@ -4,26 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for RecoveryPoints List. */ +/** + * Samples for RecoveryPoints List. + */ public final class RecoveryPointsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ListRecoveryPoints.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/ListRecoveryPoints.json */ /** * Sample code: List Recovery Points in a Vault. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listRecoveryPointsInAVault( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .recoveryPoints() - .list( - "000pikumar", - "PratikPrivatePreviewVault1", - "testInstance1", - null, - null, - com.azure.core.util.Context.NONE); + public static void + listRecoveryPointsInAVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.recoveryPoints().list("000pikumar", "PratikPrivatePreviewVault1", "testInstance1", null, null, + com.azure.core.util.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 f38dec425fdf..f55169d5a000 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 @@ -4,20 +4,22 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ResourceGuards Delete. */ +/** + * Samples for ResourceGuards Delete. + */ public final class ResourceGuardsDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/DeleteResourceGuard.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/DeleteResourceGuard.json */ /** * Sample code: Delete ResourceGuard. - * + * * @param manager Entry point to DataProtectionManager. */ public static void deleteResourceGuard(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .deleteByResourceGroupWithResponse( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + manager.resourceGuards().deleteByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", + com.azure.core.util.Context.NONE); } } 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 79e6d86acdc5..5c02b5a677c5 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 @@ -4,21 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ResourceGuards GetBackupSecurityPinRequestsObjects. */ +/** + * Samples for ResourceGuards GetBackupSecurityPinRequestsObjects. + */ public final class ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListBackupSecurityPINRequests.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/ListBackupSecurityPINRequests.json */ /** * Sample code: List OperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getBackupSecurityPinRequestsObjects( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + public static void + listOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getBackupSecurityPinRequestsObjects("SampleResourceGroup", "swaggerExample", + com.azure.core.util.Context.NONE); } } 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 fce86eae21d9..ea658b2c19bd 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 @@ -4,19 +4,22 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ResourceGuards GetByResourceGroup. */ +/** + * Samples for ResourceGuards GetByResourceGroup. + */ public final class ResourceGuardsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetResourceGuard.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/GetResourceGuard.json */ /** * Sample code: Get ResourceGuard. - * + * * @param manager Entry point to DataProtectionManager. */ public static void getResourceGuard(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + manager.resourceGuards().getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", + com.azure.core.util.Context.NONE); } } 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 a1990e787936..c66af1cb5758 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 @@ -4,21 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ResourceGuards GetDefaultBackupSecurityPinRequestsObject. */ +/** + * Samples for ResourceGuards GetDefaultBackupSecurityPinRequestsObject. + */ public final class ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getDefaultOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDefaultBackupSecurityPinRequestsObjectWithResponse( - "SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); + public static void + getDefaultOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDefaultBackupSecurityPinRequestsObjectWithResponse("SampleResourceGroup", + "swaggerExample", "default", com.azure.core.util.Context.NONE); } } 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 5fbef308d8b1..3b4f569a3a39 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 @@ -4,21 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ResourceGuards GetDefaultDeleteProtectedItemRequestsObject. */ +/** + * Samples for ResourceGuards GetDefaultDeleteProtectedItemRequestsObject. + */ public final class ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getDefaultOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDefaultDeleteProtectedItemRequestsObjectWithResponse( - "SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); + public static void + getDefaultOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDefaultDeleteProtectedItemRequestsObjectWithResponse("SampleResourceGroup", + "swaggerExample", "default", com.azure.core.util.Context.NONE); } } 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 f11989c0ab28..689c251ab560 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 @@ -4,21 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ResourceGuards GetDefaultDeleteResourceGuardProxyRequestsObject. */ +/** + * Samples for ResourceGuards GetDefaultDeleteResourceGuardProxyRequestsObject. + */ public final class ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getDefaultOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse( - "SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); + public static void + getDefaultOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse("SampleResourceGroup", + "swaggerExample", "default", com.azure.core.util.Context.NONE); } } 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 7f4ae28344cc..20f0a6331ddb 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 @@ -4,21 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ResourceGuards GetDefaultDisableSoftDeleteRequestsObject. */ +/** + * Samples for ResourceGuards GetDefaultDisableSoftDeleteRequestsObject. + */ public final class ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getDefaultOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDefaultDisableSoftDeleteRequestsObjectWithResponse( - "SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); + public static void + getDefaultOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDefaultDisableSoftDeleteRequestsObjectWithResponse("SampleResourceGroup", + "swaggerExample", "default", com.azure.core.util.Context.NONE); } } 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 e55c42b1171f..fb4c985a36c1 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 @@ -4,21 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ResourceGuards GetDefaultUpdateProtectedItemRequestsObject. */ +/** + * Samples for ResourceGuards GetDefaultUpdateProtectedItemRequestsObject. + */ public final class ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getDefaultOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDefaultUpdateProtectedItemRequestsObjectWithResponse( - "SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); + public static void + getDefaultOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDefaultUpdateProtectedItemRequestsObjectWithResponse("SampleResourceGroup", + "swaggerExample", "default", com.azure.core.util.Context.NONE); } } 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 abef4432daea..7f724bd34ca0 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 @@ -4,21 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ResourceGuards GetDefaultUpdateProtectionPolicyRequestsObject. */ +/** + * Samples for ResourceGuards GetDefaultUpdateProtectionPolicyRequestsObject. + */ public final class ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getDefaultOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDefaultUpdateProtectionPolicyRequestsObjectWithResponse( - "SampleResourceGroup", "swaggerExample", "default", com.azure.core.util.Context.NONE); + public static void + getDefaultOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDefaultUpdateProtectionPolicyRequestsObjectWithResponse("SampleResourceGroup", + "swaggerExample", "default", com.azure.core.util.Context.NONE); } } 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 71d1146abc4e..f730ff6ad2fd 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 @@ -4,21 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ResourceGuards GetDeleteProtectedItemRequestsObjects. */ +/** + * Samples for ResourceGuards GetDeleteProtectedItemRequestsObjects. + */ public final class ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/ListDeleteProtectedItemRequests.json */ /** * Sample code: List OperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDeleteProtectedItemRequestsObjects( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + public static void + listOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDeleteProtectedItemRequestsObjects("SampleResourceGroup", "swaggerExample", + com.azure.core.util.Context.NONE); } } 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 c478aa6a60fd..03047b1670f1 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 @@ -4,21 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ResourceGuards GetDeleteResourceGuardProxyRequestsObjects. */ +/** + * Samples for ResourceGuards GetDeleteResourceGuardProxyRequestsObjects. + */ public final class ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json */ /** * Sample code: List OperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDeleteResourceGuardProxyRequestsObjects( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + public static void + listOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDeleteResourceGuardProxyRequestsObjects("SampleResourceGroup", "swaggerExample", + com.azure.core.util.Context.NONE); } } 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 650ce89bc7e2..e34b8d14ea10 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 @@ -4,21 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ResourceGuards GetDisableSoftDeleteRequestsObjects. */ +/** + * Samples for ResourceGuards GetDisableSoftDeleteRequestsObjects. + */ public final class ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/ListDisableSoftDeleteRequests.json */ /** * Sample code: List OperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getDisableSoftDeleteRequestsObjects( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + public static void + listOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getDisableSoftDeleteRequestsObjects("SampleResourceGroup", "swaggerExample", + com.azure.core.util.Context.NONE); } } 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 64d591180669..e69a71083ee4 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 @@ -4,21 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ResourceGuards GetUpdateProtectedItemRequestsObjects. */ +/** + * Samples for ResourceGuards GetUpdateProtectedItemRequestsObjects. + */ public final class ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/ListUpdateProtectedItemRequests.json */ /** * Sample code: List OperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getUpdateProtectedItemRequestsObjects( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + public static void + listOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getUpdateProtectedItemRequestsObjects("SampleResourceGroup", "swaggerExample", + com.azure.core.util.Context.NONE); } } 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 f6ae66da5e08..b414a2169e8b 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 @@ -4,21 +4,23 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ResourceGuards GetUpdateProtectionPolicyRequestsObjects. */ +/** + * Samples for ResourceGuards GetUpdateProtectionPolicyRequestsObjects. + */ public final class ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json */ /** * Sample code: List OperationsRequestObject. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void listOperationsRequestObject( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .getUpdateProtectionPolicyRequestsObjects( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); + public static void + listOperationsRequestObject(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.resourceGuards().getUpdateProtectionPolicyRequestsObjects("SampleResourceGroup", "swaggerExample", + com.azure.core.util.Context.NONE); } } 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 27e3454390c0..f889fd0aee19 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 @@ -4,18 +4,22 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ResourceGuards ListByResourceGroup. */ +/** + * Samples for ResourceGuards ListByResourceGroup. + */ public final class ResourceGuardsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json */ /** * Sample code: Get ResourceGuards in ResourceGroup. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getResourceGuardsInResourceGroup( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + public static void + getResourceGuardsInResourceGroup(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager.resourceGuards().listByResourceGroup("SampleResourceGroup", com.azure.core.util.Context.NONE); } } 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 7caa7f83569d..5f921333ea68 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 @@ -4,18 +4,22 @@ package com.azure.resourcemanager.dataprotection.generated; -/** Samples for ResourceGuards List. */ +/** + * Samples for ResourceGuards List. + */ public final class ResourceGuardsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetResourceGuardsInSubscription.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/GetResourceGuardsInSubscription.json */ /** * Sample code: Get ResourceGuards in Subscription. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void getResourceGuardsInSubscription( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + public static void + getResourceGuardsInSubscription(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { manager.resourceGuards().list(com.azure.core.util.Context.NONE); } } 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 fb5165c388e8..7a2c0ceef939 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 @@ -8,26 +8,28 @@ import java.util.HashMap; import java.util.Map; -/** Samples for ResourceGuards Patch. */ +/** + * Samples for ResourceGuards Patch. + */ public final class ResourceGuardsPatchSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/PatchResourceGuard.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/PatchResourceGuard.json */ /** * Sample code: Patch ResourceGuard. - * + * * @param manager Entry point to DataProtectionManager. */ public static void patchResourceGuard(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - ResourceGuardResource resource = - manager - .resourceGuards() - .getByResourceGroupWithResponse( - "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE) - .getValue(); + ResourceGuardResource resource = manager.resourceGuards() + .getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("newKey", "fakeTokenPlaceholder")).apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); 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 bb9e1147c416..3373fc94bd22 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 @@ -7,26 +7,26 @@ import java.util.HashMap; import java.util.Map; -/** Samples for ResourceGuards Put. */ +/** + * Samples for ResourceGuards Put. + */ public final class ResourceGuardsPutSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/PutResourceGuard.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * ResourceGuardCRUD/PutResourceGuard.json */ /** * Sample code: Create ResourceGuard. - * + * * @param manager Entry point to DataProtectionManager. */ public static void createResourceGuard(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .resourceGuards() - .define("swaggerExample") - .withRegion("WestUS") - .withExistingResourceGroup("SampleResourceGroup") - .withTags(mapOf("key1", "fakeTokenPlaceholder")) - .create(); + manager.resourceGuards().define("swaggerExample").withRegion("WestUS") + .withExistingResourceGroup("SampleResourceGroup").withTags(mapOf("key1", "fakeTokenPlaceholder")).create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); 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 e70ef5fc945c..4e0b828b0466 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 @@ -7,28 +7,26 @@ import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest; import com.azure.resourcemanager.dataprotection.models.RestoreSourceDataStoreType; -/** Samples for RestorableTimeRanges Find. */ +/** + * Samples for RestorableTimeRanges Find. + */ public final class RestorableTimeRangesFindSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/FindRestorableTimeRanges.json + * x-ms-original-file: + * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ + * BackupInstanceOperations/FindRestorableTimeRanges.json */ /** * Sample code: Find Restorable Time Ranges. - * + * * @param manager Entry point to DataProtectionManager. */ - public static void findRestorableTimeRanges( - com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { - manager - .restorableTimeRanges() - .findWithResponse( - "Blob-Backup", - "ZBlobBackupVaultBVTD3", - "zblobbackuptestsa58", - new AzureBackupFindRestorableTimeRangesRequest() - .withSourceDataStoreType(RestoreSourceDataStoreType.OPERATIONAL_STORE) - .withStartTime("2020-10-17T23:28:17.6829685Z") - .withEndTime("2021-02-24T00:35:17.6829685Z"), - com.azure.core.util.Context.NONE); + public static void + findRestorableTimeRanges(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.restorableTimeRanges().findWithResponse("Blob-Backup", "ZBlobBackupVaultBVTD3", "zblobbackuptestsa58", + new AzureBackupFindRestorableTimeRangesRequest() + .withSourceDataStoreType(RestoreSourceDataStoreType.OPERATIONAL_STORE) + .withStartTime("2020-10-17T23:28:17.6829685Z").withEndTime("2021-02-24T00:35:17.6829685Z"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AbsoluteDeleteOptionTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AbsoluteDeleteOptionTests.java deleted file mode 100644 index be68a573dd78..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AbsoluteDeleteOptionTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AbsoluteDeleteOption; -import org.junit.jupiter.api.Assertions; - -public final class AbsoluteDeleteOptionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AbsoluteDeleteOption model = - BinaryData - .fromString("{\"objectType\":\"AbsoluteDeleteOption\",\"duration\":\"dvriiiojnal\"}") - .toObject(AbsoluteDeleteOption.class); - Assertions.assertEquals("dvriiiojnal", model.duration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AbsoluteDeleteOption model = new AbsoluteDeleteOption().withDuration("dvriiiojnal"); - model = BinaryData.fromObject(model).toObject(AbsoluteDeleteOption.class); - Assertions.assertEquals("dvriiiojnal", model.duration()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdHocBackupRuleOptionsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdHocBackupRuleOptionsTests.java deleted file mode 100644 index e620a8a796dd..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdHocBackupRuleOptionsTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AdHocBackupRuleOptions; -import com.azure.resourcemanager.dataprotection.models.AdhocBackupTriggerOption; -import org.junit.jupiter.api.Assertions; - -public final class AdHocBackupRuleOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdHocBackupRuleOptions model = - BinaryData - .fromString("{\"ruleName\":\"hl\",\"triggerOption\":{\"retentionTagOverride\":\"jbhckfrlhr\"}}") - .toObject(AdHocBackupRuleOptions.class); - Assertions.assertEquals("hl", model.ruleName()); - Assertions.assertEquals("jbhckfrlhr", model.triggerOption().retentionTagOverride()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdHocBackupRuleOptions model = - new AdHocBackupRuleOptions() - .withRuleName("hl") - .withTriggerOption(new AdhocBackupTriggerOption().withRetentionTagOverride("jbhckfrlhr")); - model = BinaryData.fromObject(model).toObject(AdHocBackupRuleOptions.class); - Assertions.assertEquals("hl", model.ruleName()); - Assertions.assertEquals("jbhckfrlhr", model.triggerOption().retentionTagOverride()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBackupTriggerOptionTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBackupTriggerOptionTests.java deleted file mode 100644 index 0204805320b9..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBackupTriggerOptionTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AdhocBackupTriggerOption; -import org.junit.jupiter.api.Assertions; - -public final class AdhocBackupTriggerOptionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdhocBackupTriggerOption model = - BinaryData.fromString("{\"retentionTagOverride\":\"bkyvp\"}").toObject(AdhocBackupTriggerOption.class); - Assertions.assertEquals("bkyvp", model.retentionTagOverride()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdhocBackupTriggerOption model = new AdhocBackupTriggerOption().withRetentionTagOverride("bkyvp"); - model = BinaryData.fromObject(model).toObject(AdhocBackupTriggerOption.class); - Assertions.assertEquals("bkyvp", model.retentionTagOverride()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBasedTaggingCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBasedTaggingCriteriaTests.java deleted file mode 100644 index 525255dd5208..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBasedTaggingCriteriaTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AdhocBasedTaggingCriteria; -import com.azure.resourcemanager.dataprotection.models.RetentionTag; -import org.junit.jupiter.api.Assertions; - -public final class AdhocBasedTaggingCriteriaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdhocBasedTaggingCriteria model = - BinaryData - .fromString("{\"tagInfo\":{\"eTag\":\"hahhxvrhmzkwpj\",\"id\":\"wspughftqsxhqx\",\"tagName\":\"j\"}}") - .toObject(AdhocBasedTaggingCriteria.class); - Assertions.assertEquals("j", model.tagInfo().tagName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdhocBasedTaggingCriteria model = - new AdhocBasedTaggingCriteria().withTagInfo(new RetentionTag().withTagName("j")); - model = BinaryData.fromObject(model).toObject(AdhocBasedTaggingCriteria.class); - Assertions.assertEquals("j", model.tagInfo().tagName()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBasedTriggerContextTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBasedTriggerContextTests.java deleted file mode 100644 index 01a82ad23895..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBasedTriggerContextTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AdhocBasedTaggingCriteria; -import com.azure.resourcemanager.dataprotection.models.AdhocBasedTriggerContext; -import com.azure.resourcemanager.dataprotection.models.RetentionTag; -import org.junit.jupiter.api.Assertions; - -public final class AdhocBasedTriggerContextTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdhocBasedTriggerContext model = - BinaryData - .fromString( - "{\"objectType\":\"AdhocBasedTriggerContext\",\"taggingCriteria\":{\"tagInfo\":{\"eTag\":\"o\",\"id\":\"qzudphq\",\"tagName\":\"mvdk\"}}}") - .toObject(AdhocBasedTriggerContext.class); - Assertions.assertEquals("mvdk", model.taggingCriteria().tagInfo().tagName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdhocBasedTriggerContext model = - new AdhocBasedTriggerContext() - .withTaggingCriteria( - new AdhocBasedTaggingCriteria().withTagInfo(new RetentionTag().withTagName("mvdk"))); - model = BinaryData.fromObject(model).toObject(AdhocBasedTriggerContext.class); - Assertions.assertEquals("mvdk", model.taggingCriteria().tagInfo().tagName()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AuthCredentialsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AuthCredentialsTests.java deleted file mode 100644 index d802e8935ec6..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AuthCredentialsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AuthCredentials; - -public final class AuthCredentialsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthCredentials model = - BinaryData.fromString("{\"objectType\":\"AuthCredentials\"}").toObject(AuthCredentials.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthCredentials model = new AuthCredentials(); - model = BinaryData.fromObject(model).toObject(AuthCredentials.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupDiscreteRecoveryPointTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupDiscreteRecoveryPointTests.java deleted file mode 100644 index b822ee91111d..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupDiscreteRecoveryPointTests.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AzureBackupDiscreteRecoveryPoint; -import com.azure.resourcemanager.dataprotection.models.RecoveryPointDataStoreDetails; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AzureBackupDiscreteRecoveryPointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureBackupDiscreteRecoveryPoint model = - BinaryData - .fromString( - "{\"objectType\":\"AzureBackupDiscreteRecoveryPoint\",\"friendlyName\":\"ynwcvtbv\",\"recoveryPointDataStoresDetails\":[{\"creationTime\":\"2021-05-06T12:46:31Z\",\"expiryTime\":\"2021-04-30T18:22:27Z\",\"id\":\"yqiatkzwp\",\"metaData\":\"p\",\"state\":\"cjaesgvvs\",\"type\":\"yajguqfhwygzlv\",\"visible\":false,\"rehydrationExpiryTime\":\"2021-10-30T00:31:15Z\",\"rehydrationStatus\":\"DELETED\"},{\"creationTime\":\"2021-10-16T01:46:34Z\",\"expiryTime\":\"2021-02-14T09:42:03Z\",\"id\":\"rmuhapfcq\",\"metaData\":\"sqxqvp\",\"state\":\"uoymgccelvezry\",\"type\":\"lmfeokerq\",\"visible\":false,\"rehydrationExpiryTime\":\"2021-02-06T22:33:53Z\",\"rehydrationStatus\":\"DELETE_IN_PROGRESS\"},{\"creationTime\":\"2021-02-24T18:35:08Z\",\"expiryTime\":\"2021-02-13T21:16:22Z\",\"id\":\"dkow\",\"metaData\":\"bqpc\",\"state\":\"kbwcc\",\"type\":\"jvcdwxlpqekf\",\"visible\":false,\"rehydrationExpiryTime\":\"2021-05-12T04:10:49Z\",\"rehydrationStatus\":\"FAILED\"}],\"recoveryPointTime\":\"2021-11-08T00:22:08Z\",\"policyName\":\"ngwfqatm\",\"policyVersion\":\"htmdvy\",\"recoveryPointId\":\"ikdgszywkbir\",\"recoveryPointType\":\"uzhlhkjoqrv\",\"retentionTagName\":\"aatjinrvgoupmfi\",\"retentionTagVersion\":\"fggjioolvr\",\"expiryTime\":\"2021-01-31T00:57:49Z\"}") - .toObject(AzureBackupDiscreteRecoveryPoint.class); - Assertions.assertEquals("ynwcvtbv", model.friendlyName()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-05-06T12:46:31Z"), - model.recoveryPointDataStoresDetails().get(0).creationTime()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-04-30T18:22:27Z"), - model.recoveryPointDataStoresDetails().get(0).expiryTime()); - Assertions.assertEquals("yqiatkzwp", model.recoveryPointDataStoresDetails().get(0).id()); - Assertions.assertEquals("p", model.recoveryPointDataStoresDetails().get(0).metadata()); - Assertions.assertEquals("cjaesgvvs", model.recoveryPointDataStoresDetails().get(0).state()); - Assertions.assertEquals("yajguqfhwygzlv", model.recoveryPointDataStoresDetails().get(0).type()); - Assertions.assertEquals(false, model.recoveryPointDataStoresDetails().get(0).visible()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-08T00:22:08Z"), model.recoveryPointTime()); - Assertions.assertEquals("ngwfqatm", model.policyName()); - Assertions.assertEquals("htmdvy", model.policyVersion()); - Assertions.assertEquals("ikdgszywkbir", model.recoveryPointId()); - Assertions.assertEquals("uzhlhkjoqrv", model.recoveryPointType()); - Assertions.assertEquals("aatjinrvgoupmfi", model.retentionTagName()); - Assertions.assertEquals("fggjioolvr", model.retentionTagVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureBackupDiscreteRecoveryPoint model = - new AzureBackupDiscreteRecoveryPoint() - .withFriendlyName("ynwcvtbv") - .withRecoveryPointDataStoresDetails( - Arrays - .asList( - new RecoveryPointDataStoreDetails() - .withCreationTime(OffsetDateTime.parse("2021-05-06T12:46:31Z")) - .withExpiryTime(OffsetDateTime.parse("2021-04-30T18:22:27Z")) - .withId("yqiatkzwp") - .withMetadata("p") - .withState("cjaesgvvs") - .withType("yajguqfhwygzlv") - .withVisible(false), - new RecoveryPointDataStoreDetails() - .withCreationTime(OffsetDateTime.parse("2021-10-16T01:46:34Z")) - .withExpiryTime(OffsetDateTime.parse("2021-02-14T09:42:03Z")) - .withId("rmuhapfcq") - .withMetadata("sqxqvp") - .withState("uoymgccelvezry") - .withType("lmfeokerq") - .withVisible(false), - new RecoveryPointDataStoreDetails() - .withCreationTime(OffsetDateTime.parse("2021-02-24T18:35:08Z")) - .withExpiryTime(OffsetDateTime.parse("2021-02-13T21:16:22Z")) - .withId("dkow") - .withMetadata("bqpc") - .withState("kbwcc") - .withType("jvcdwxlpqekf") - .withVisible(false))) - .withRecoveryPointTime(OffsetDateTime.parse("2021-11-08T00:22:08Z")) - .withPolicyName("ngwfqatm") - .withPolicyVersion("htmdvy") - .withRecoveryPointId("ikdgszywkbir") - .withRecoveryPointType("uzhlhkjoqrv") - .withRetentionTagName("aatjinrvgoupmfi") - .withRetentionTagVersion("fggjioolvr"); - model = BinaryData.fromObject(model).toObject(AzureBackupDiscreteRecoveryPoint.class); - Assertions.assertEquals("ynwcvtbv", model.friendlyName()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-05-06T12:46:31Z"), - model.recoveryPointDataStoresDetails().get(0).creationTime()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-04-30T18:22:27Z"), - model.recoveryPointDataStoresDetails().get(0).expiryTime()); - Assertions.assertEquals("yqiatkzwp", model.recoveryPointDataStoresDetails().get(0).id()); - Assertions.assertEquals("p", model.recoveryPointDataStoresDetails().get(0).metadata()); - Assertions.assertEquals("cjaesgvvs", model.recoveryPointDataStoresDetails().get(0).state()); - Assertions.assertEquals("yajguqfhwygzlv", model.recoveryPointDataStoresDetails().get(0).type()); - Assertions.assertEquals(false, model.recoveryPointDataStoresDetails().get(0).visible()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-08T00:22:08Z"), model.recoveryPointTime()); - Assertions.assertEquals("ngwfqatm", model.policyName()); - Assertions.assertEquals("htmdvy", model.policyVersion()); - Assertions.assertEquals("ikdgszywkbir", model.recoveryPointId()); - Assertions.assertEquals("uzhlhkjoqrv", model.recoveryPointType()); - Assertions.assertEquals("aatjinrvgoupmfi", model.retentionTagName()); - Assertions.assertEquals("fggjioolvr", model.retentionTagVersion()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesRequestResourceTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesRequestResourceTests.java deleted file mode 100644 index 4007149da6b4..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesRequestResourceTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest; -import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequestResource; -import com.azure.resourcemanager.dataprotection.models.RestoreSourceDataStoreType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AzureBackupFindRestorableTimeRangesRequestResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureBackupFindRestorableTimeRangesRequestResource model = - BinaryData - .fromString( - "{\"content\":{\"sourceDataStoreType\":\"OperationalStore\",\"startTime\":\"yijejvegrhbpnaix\",\"endTime\":\"ccbdre\"},\"subscriptionId\":\"hcexdrrvqa\",\"uri\":\"kghtpwijnh\",\"headers\":{\"mtg\":[\"f\",\"cxzbfvoowvr\"],\"pnsxkmcwaek\":[\"ppyostronzmyhgf\"],\"elfk\":[\"jreafxtsgum\",\"jglikkxwslolb\",\"pvuzlmv\"]},\"supportedGroupVersions\":[\"lcrpw\",\"xeznoi\",\"brnjwmw\",\"pn\"],\"cultureInfo\":\"azej\",\"parameters\":{\"ugzxnf\":\"kagfhsxtt\",\"uenvrkp\":\"azpxdtnkdmkqjjl\",\"ibreb\":\"ou\"},\"httpMethod\":\"aysjkixqtnqttez\"}") - .toObject(AzureBackupFindRestorableTimeRangesRequestResource.class); - Assertions.assertEquals("hcexdrrvqa", model.subscriptionId()); - Assertions.assertEquals("kghtpwijnh", model.uri()); - Assertions.assertEquals("f", model.headers().get("mtg").get(0)); - Assertions.assertEquals("lcrpw", model.supportedGroupVersions().get(0)); - Assertions.assertEquals("azej", model.cultureInfo()); - Assertions.assertEquals("kagfhsxtt", model.parameters().get("ugzxnf")); - Assertions.assertEquals("aysjkixqtnqttez", model.httpMethod()); - Assertions.assertEquals(RestoreSourceDataStoreType.OPERATIONAL_STORE, model.content().sourceDataStoreType()); - Assertions.assertEquals("yijejvegrhbpnaix", model.content().startTime()); - Assertions.assertEquals("ccbdre", model.content().endTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureBackupFindRestorableTimeRangesRequestResource model = - new AzureBackupFindRestorableTimeRangesRequestResource() - .withSubscriptionId("hcexdrrvqa") - .withUri("kghtpwijnh") - .withHeaders( - mapOf( - "mtg", - Arrays.asList("f", "cxzbfvoowvr"), - "pnsxkmcwaek", - Arrays.asList("ppyostronzmyhgf"), - "elfk", - Arrays.asList("jreafxtsgum", "jglikkxwslolb", "pvuzlmv"))) - .withSupportedGroupVersions(Arrays.asList("lcrpw", "xeznoi", "brnjwmw", "pn")) - .withCultureInfo("azej") - .withParameters(mapOf("ugzxnf", "kagfhsxtt", "uenvrkp", "azpxdtnkdmkqjjl", "ibreb", "ou")) - .withHttpMethod("aysjkixqtnqttez") - .withContent( - new AzureBackupFindRestorableTimeRangesRequest() - .withSourceDataStoreType(RestoreSourceDataStoreType.OPERATIONAL_STORE) - .withStartTime("yijejvegrhbpnaix") - .withEndTime("ccbdre")); - model = BinaryData.fromObject(model).toObject(AzureBackupFindRestorableTimeRangesRequestResource.class); - Assertions.assertEquals("hcexdrrvqa", model.subscriptionId()); - Assertions.assertEquals("kghtpwijnh", model.uri()); - Assertions.assertEquals("f", model.headers().get("mtg").get(0)); - Assertions.assertEquals("lcrpw", model.supportedGroupVersions().get(0)); - Assertions.assertEquals("azej", model.cultureInfo()); - Assertions.assertEquals("kagfhsxtt", model.parameters().get("ugzxnf")); - Assertions.assertEquals("aysjkixqtnqttez", model.httpMethod()); - Assertions.assertEquals(RestoreSourceDataStoreType.OPERATIONAL_STORE, model.content().sourceDataStoreType()); - Assertions.assertEquals("yijejvegrhbpnaix", model.content().startTime()); - Assertions.assertEquals("ccbdre", model.content().endTime()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesRequestTests.java deleted file mode 100644 index 654b3bfbcf36..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesRequestTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest; -import com.azure.resourcemanager.dataprotection.models.RestoreSourceDataStoreType; -import org.junit.jupiter.api.Assertions; - -public final class AzureBackupFindRestorableTimeRangesRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureBackupFindRestorableTimeRangesRequest model = - BinaryData - .fromString("{\"sourceDataStoreType\":\"VaultStore\",\"startTime\":\"nqpeh\",\"endTime\":\"doy\"}") - .toObject(AzureBackupFindRestorableTimeRangesRequest.class); - Assertions.assertEquals(RestoreSourceDataStoreType.VAULT_STORE, model.sourceDataStoreType()); - Assertions.assertEquals("nqpeh", model.startTime()); - Assertions.assertEquals("doy", model.endTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureBackupFindRestorableTimeRangesRequest model = - new AzureBackupFindRestorableTimeRangesRequest() - .withSourceDataStoreType(RestoreSourceDataStoreType.VAULT_STORE) - .withStartTime("nqpeh") - .withEndTime("doy"); - model = BinaryData.fromObject(model).toObject(AzureBackupFindRestorableTimeRangesRequest.class); - Assertions.assertEquals(RestoreSourceDataStoreType.VAULT_STORE, model.sourceDataStoreType()); - Assertions.assertEquals("nqpeh", model.startTime()); - Assertions.assertEquals("doy", model.endTime()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesResponseResourceInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesResponseResourceInnerTests.java deleted file mode 100644 index 370b0858f118..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesResponseResourceInnerTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupFindRestorableTimeRangesResponseResourceInner; -import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesResponse; -import com.azure.resourcemanager.dataprotection.models.RestorableTimeRange; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AzureBackupFindRestorableTimeRangesResponseResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureBackupFindRestorableTimeRangesResponseResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"restorableTimeRanges\":[{\"startTime\":\"thnzd\",\"endTime\":\"dslgnayqigynduh\",\"objectType\":\"hqlkthumaqo\"},{\"startTime\":\"bgycduiertgccym\",\"endTime\":\"aolps\",\"objectType\":\"qlfmmdnbb\"}],\"objectType\":\"zpswiydmc\"},\"id\":\"hzdxssadbzm\",\"name\":\"vdfznudaodvxzb\",\"type\":\"cblylpstdbhhxsr\"}") - .toObject(AzureBackupFindRestorableTimeRangesResponseResourceInner.class); - Assertions.assertEquals("thnzd", model.properties().restorableTimeRanges().get(0).startTime()); - Assertions.assertEquals("dslgnayqigynduh", model.properties().restorableTimeRanges().get(0).endTime()); - Assertions.assertEquals("hqlkthumaqo", model.properties().restorableTimeRanges().get(0).objectType()); - Assertions.assertEquals("zpswiydmc", model.properties().objectType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureBackupFindRestorableTimeRangesResponseResourceInner model = - new AzureBackupFindRestorableTimeRangesResponseResourceInner() - .withProperties( - new AzureBackupFindRestorableTimeRangesResponse() - .withRestorableTimeRanges( - Arrays - .asList( - new RestorableTimeRange() - .withStartTime("thnzd") - .withEndTime("dslgnayqigynduh") - .withObjectType("hqlkthumaqo"), - new RestorableTimeRange() - .withStartTime("bgycduiertgccym") - .withEndTime("aolps") - .withObjectType("qlfmmdnbb"))) - .withObjectType("zpswiydmc")); - model = BinaryData.fromObject(model).toObject(AzureBackupFindRestorableTimeRangesResponseResourceInner.class); - Assertions.assertEquals("thnzd", model.properties().restorableTimeRanges().get(0).startTime()); - Assertions.assertEquals("dslgnayqigynduh", model.properties().restorableTimeRanges().get(0).endTime()); - Assertions.assertEquals("hqlkthumaqo", model.properties().restorableTimeRanges().get(0).objectType()); - Assertions.assertEquals("zpswiydmc", model.properties().objectType()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesResponseTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesResponseTests.java deleted file mode 100644 index 90c7ec665ea9..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesResponseTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesResponse; -import com.azure.resourcemanager.dataprotection.models.RestorableTimeRange; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AzureBackupFindRestorableTimeRangesResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureBackupFindRestorableTimeRangesResponse model = - BinaryData - .fromString( - "{\"restorableTimeRanges\":[{\"startTime\":\"ucerscdntnevfi\",\"endTime\":\"jmygtdsslswtmwer\",\"objectType\":\"fzp\"},{\"startTime\":\"qsemwabne\",\"endTime\":\"shhszhedplvwiw\",\"objectType\":\"mwmbes\"},{\"startTime\":\"dnkwwtppjflcxog\",\"endTime\":\"okonzmnsikvmkqz\",\"objectType\":\"qkdltfz\"},{\"startTime\":\"mhhv\",\"endTime\":\"gureodkwobdag\",\"objectType\":\"ibqdxbxwakbogqx\"}],\"objectType\":\"lkzgxhuriplbp\"}") - .toObject(AzureBackupFindRestorableTimeRangesResponse.class); - Assertions.assertEquals("ucerscdntnevfi", model.restorableTimeRanges().get(0).startTime()); - Assertions.assertEquals("jmygtdsslswtmwer", model.restorableTimeRanges().get(0).endTime()); - Assertions.assertEquals("fzp", model.restorableTimeRanges().get(0).objectType()); - Assertions.assertEquals("lkzgxhuriplbp", model.objectType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureBackupFindRestorableTimeRangesResponse model = - new AzureBackupFindRestorableTimeRangesResponse() - .withRestorableTimeRanges( - Arrays - .asList( - new RestorableTimeRange() - .withStartTime("ucerscdntnevfi") - .withEndTime("jmygtdsslswtmwer") - .withObjectType("fzp"), - new RestorableTimeRange() - .withStartTime("qsemwabne") - .withEndTime("shhszhedplvwiw") - .withObjectType("mwmbes"), - new RestorableTimeRange() - .withStartTime("dnkwwtppjflcxog") - .withEndTime("okonzmnsikvmkqz") - .withObjectType("qkdltfz"), - new RestorableTimeRange() - .withStartTime("mhhv") - .withEndTime("gureodkwobdag") - .withObjectType("ibqdxbxwakbogqx"))) - .withObjectType("lkzgxhuriplbp"); - model = BinaryData.fromObject(model).toObject(AzureBackupFindRestorableTimeRangesResponse.class); - Assertions.assertEquals("ucerscdntnevfi", model.restorableTimeRanges().get(0).startTime()); - Assertions.assertEquals("jmygtdsslswtmwer", model.restorableTimeRanges().get(0).endTime()); - Assertions.assertEquals("fzp", model.restorableTimeRanges().get(0).objectType()); - Assertions.assertEquals("lkzgxhuriplbp", model.objectType()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupParamsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupParamsTests.java deleted file mode 100644 index 98c112feb588..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupParamsTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AzureBackupParams; -import org.junit.jupiter.api.Assertions; - -public final class AzureBackupParamsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureBackupParams model = - BinaryData - .fromString("{\"objectType\":\"AzureBackupParams\",\"backupType\":\"oiwiithtywub\"}") - .toObject(AzureBackupParams.class); - Assertions.assertEquals("oiwiithtywub", model.backupType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureBackupParams model = new AzureBackupParams().withBackupType("oiwiithtywub"); - model = BinaryData.fromObject(model).toObject(AzureBackupParams.class); - Assertions.assertEquals("oiwiithtywub", model.backupType()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointBasedRestoreRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointBasedRestoreRequestTests.java deleted file mode 100644 index bd51993e042f..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointBasedRestoreRequestTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointBasedRestoreRequest; -import com.azure.resourcemanager.dataprotection.models.IdentityDetails; -import com.azure.resourcemanager.dataprotection.models.RecoveryOption; -import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfoBase; -import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType; -import org.junit.jupiter.api.Assertions; - -public final class AzureBackupRecoveryPointBasedRestoreRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureBackupRecoveryPointBasedRestoreRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureBackupRecoveryPointBasedRestoreRequest\",\"recoveryPointId\":\"cbihwqk\",\"restoreTargetInfo\":{\"objectType\":\"RestoreTargetInfoBase\",\"recoveryOption\":\"FailIfExists\",\"restoreLocation\":\"ntwjch\"},\"sourceDataStoreType\":\"VaultStore\",\"sourceResourceId\":\"oihxumwctondzjlu\",\"identityDetails\":{\"useSystemAssignedIdentity\":true,\"userAssignedIdentityArmUrl\":\"wggytsbwtovvt\"}}") - .toObject(AzureBackupRecoveryPointBasedRestoreRequest.class); - Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.restoreTargetInfo().recoveryOption()); - Assertions.assertEquals("ntwjch", model.restoreTargetInfo().restoreLocation()); - Assertions.assertEquals(SourceDataStoreType.VAULT_STORE, model.sourceDataStoreType()); - Assertions.assertEquals("oihxumwctondzjlu", model.sourceResourceId()); - Assertions.assertEquals(true, model.identityDetails().useSystemAssignedIdentity()); - Assertions.assertEquals("wggytsbwtovvt", model.identityDetails().userAssignedIdentityArmUrl()); - Assertions.assertEquals("cbihwqk", model.recoveryPointId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureBackupRecoveryPointBasedRestoreRequest model = - new AzureBackupRecoveryPointBasedRestoreRequest() - .withRestoreTargetInfo( - new RestoreTargetInfoBase() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("ntwjch")) - .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE) - .withSourceResourceId("oihxumwctondzjlu") - .withIdentityDetails( - new IdentityDetails() - .withUseSystemAssignedIdentity(true) - .withUserAssignedIdentityArmUrl("wggytsbwtovvt")) - .withRecoveryPointId("cbihwqk"); - model = BinaryData.fromObject(model).toObject(AzureBackupRecoveryPointBasedRestoreRequest.class); - Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.restoreTargetInfo().recoveryOption()); - Assertions.assertEquals("ntwjch", model.restoreTargetInfo().restoreLocation()); - Assertions.assertEquals(SourceDataStoreType.VAULT_STORE, model.sourceDataStoreType()); - Assertions.assertEquals("oihxumwctondzjlu", model.sourceResourceId()); - Assertions.assertEquals(true, model.identityDetails().useSystemAssignedIdentity()); - Assertions.assertEquals("wggytsbwtovvt", model.identityDetails().userAssignedIdentityArmUrl()); - Assertions.assertEquals("cbihwqk", model.recoveryPointId()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointResourceInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointResourceInnerTests.java deleted file mode 100644 index db14cc7a98a3..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointResourceInnerTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPoint; - -public final class AzureBackupRecoveryPointResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureBackupRecoveryPointResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"objectType\":\"AzureBackupRecoveryPoint\"},\"id\":\"bm\",\"name\":\"ow\",\"type\":\"wpr\"}") - .toObject(AzureBackupRecoveryPointResourceInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureBackupRecoveryPointResourceInner model = - new AzureBackupRecoveryPointResourceInner().withProperties(new AzureBackupRecoveryPoint()); - model = BinaryData.fromObject(model).toObject(AzureBackupRecoveryPointResourceInner.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointResourceListTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointResourceListTests.java deleted file mode 100644 index e793e070e708..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointResourceListTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPoint; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointResourceList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AzureBackupRecoveryPointResourceListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureBackupRecoveryPointResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"objectType\":\"AzureBackupRecoveryPoint\"},\"id\":\"gjrwjueiotwmcdyt\",\"name\":\"x\",\"type\":\"it\"},{\"properties\":{\"objectType\":\"AzureBackupRecoveryPoint\"},\"id\":\"jawgqwg\",\"name\":\"hniskxfbkpyc\",\"type\":\"klwndnhjdauwhv\"}],\"nextLink\":\"wzbtdhxu\"}") - .toObject(AzureBackupRecoveryPointResourceList.class); - Assertions.assertEquals("wzbtdhxu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureBackupRecoveryPointResourceList model = - new AzureBackupRecoveryPointResourceList() - .withNextLink("wzbtdhxu") - .withValue( - Arrays - .asList( - new AzureBackupRecoveryPointResourceInner().withProperties(new AzureBackupRecoveryPoint()), - new AzureBackupRecoveryPointResourceInner() - .withProperties(new AzureBackupRecoveryPoint()))); - model = BinaryData.fromObject(model).toObject(AzureBackupRecoveryPointResourceList.class); - Assertions.assertEquals("wzbtdhxu", model.nextLink()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointTests.java deleted file mode 100644 index a0e650e9bbce..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPoint; - -public final class AzureBackupRecoveryPointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureBackupRecoveryPoint model = - BinaryData - .fromString("{\"objectType\":\"AzureBackupRecoveryPoint\"}") - .toObject(AzureBackupRecoveryPoint.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureBackupRecoveryPoint model = new AzureBackupRecoveryPoint(); - model = BinaryData.fromObject(model).toObject(AzureBackupRecoveryPoint.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryTimeBasedRestoreRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryTimeBasedRestoreRequestTests.java deleted file mode 100644 index 7b1d314b4c77..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryTimeBasedRestoreRequestTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryTimeBasedRestoreRequest; -import com.azure.resourcemanager.dataprotection.models.IdentityDetails; -import com.azure.resourcemanager.dataprotection.models.RecoveryOption; -import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfoBase; -import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType; -import org.junit.jupiter.api.Assertions; - -public final class AzureBackupRecoveryTimeBasedRestoreRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureBackupRecoveryTimeBasedRestoreRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureBackupRecoveryTimeBasedRestoreRequest\",\"recoveryPointTime\":\"ronasxift\",\"restoreTargetInfo\":{\"objectType\":\"RestoreTargetInfoBase\",\"recoveryOption\":\"FailIfExists\",\"restoreLocation\":\"yzhftwesgogczh\"},\"sourceDataStoreType\":\"ArchiveStore\",\"sourceResourceId\":\"xkr\",\"identityDetails\":{\"useSystemAssignedIdentity\":true,\"userAssignedIdentityArmUrl\":\"mossxkkgthrrghxj\"}}") - .toObject(AzureBackupRecoveryTimeBasedRestoreRequest.class); - Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.restoreTargetInfo().recoveryOption()); - Assertions.assertEquals("yzhftwesgogczh", model.restoreTargetInfo().restoreLocation()); - Assertions.assertEquals(SourceDataStoreType.ARCHIVE_STORE, model.sourceDataStoreType()); - Assertions.assertEquals("xkr", model.sourceResourceId()); - Assertions.assertEquals(true, model.identityDetails().useSystemAssignedIdentity()); - Assertions.assertEquals("mossxkkgthrrghxj", model.identityDetails().userAssignedIdentityArmUrl()); - Assertions.assertEquals("ronasxift", model.recoveryPointTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureBackupRecoveryTimeBasedRestoreRequest model = - new AzureBackupRecoveryTimeBasedRestoreRequest() - .withRestoreTargetInfo( - new RestoreTargetInfoBase() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("yzhftwesgogczh")) - .withSourceDataStoreType(SourceDataStoreType.ARCHIVE_STORE) - .withSourceResourceId("xkr") - .withIdentityDetails( - new IdentityDetails() - .withUseSystemAssignedIdentity(true) - .withUserAssignedIdentityArmUrl("mossxkkgthrrghxj")) - .withRecoveryPointTime("ronasxift"); - model = BinaryData.fromObject(model).toObject(AzureBackupRecoveryTimeBasedRestoreRequest.class); - Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.restoreTargetInfo().recoveryOption()); - Assertions.assertEquals("yzhftwesgogczh", model.restoreTargetInfo().restoreLocation()); - Assertions.assertEquals(SourceDataStoreType.ARCHIVE_STORE, model.sourceDataStoreType()); - Assertions.assertEquals("xkr", model.sourceResourceId()); - Assertions.assertEquals(true, model.identityDetails().useSystemAssignedIdentity()); - Assertions.assertEquals("mossxkkgthrrghxj", model.identityDetails().userAssignedIdentityArmUrl()); - Assertions.assertEquals("ronasxift", model.recoveryPointTime()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRehydrationRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRehydrationRequestTests.java deleted file mode 100644 index f0499b3c6759..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRehydrationRequestTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRehydrationRequest; -import com.azure.resourcemanager.dataprotection.models.RehydrationPriority; -import org.junit.jupiter.api.Assertions; - -public final class AzureBackupRehydrationRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureBackupRehydrationRequest model = - BinaryData - .fromString( - "{\"recoveryPointId\":\"qlveualupjmkh\",\"rehydrationPriority\":\"High\",\"rehydrationRetentionDuration\":\"bbcswsrtjri\"}") - .toObject(AzureBackupRehydrationRequest.class); - Assertions.assertEquals("qlveualupjmkh", model.recoveryPointId()); - Assertions.assertEquals(RehydrationPriority.HIGH, model.rehydrationPriority()); - Assertions.assertEquals("bbcswsrtjri", model.rehydrationRetentionDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureBackupRehydrationRequest model = - new AzureBackupRehydrationRequest() - .withRecoveryPointId("qlveualupjmkh") - .withRehydrationPriority(RehydrationPriority.HIGH) - .withRehydrationRetentionDuration("bbcswsrtjri"); - model = BinaryData.fromObject(model).toObject(AzureBackupRehydrationRequest.class); - Assertions.assertEquals("qlveualupjmkh", model.recoveryPointId()); - Assertions.assertEquals(RehydrationPriority.HIGH, model.rehydrationPriority()); - Assertions.assertEquals("bbcswsrtjri", model.rehydrationRetentionDuration()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRestoreRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRestoreRequestTests.java deleted file mode 100644 index 62ad5574eb7f..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRestoreRequestTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest; -import com.azure.resourcemanager.dataprotection.models.IdentityDetails; -import com.azure.resourcemanager.dataprotection.models.RecoveryOption; -import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfoBase; -import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType; -import org.junit.jupiter.api.Assertions; - -public final class AzureBackupRestoreRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureBackupRestoreRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureBackupRestoreRequest\",\"restoreTargetInfo\":{\"objectType\":\"RestoreTargetInfoBase\",\"recoveryOption\":\"FailIfExists\",\"restoreLocation\":\"bpbewtghfgb\"},\"sourceDataStoreType\":\"ArchiveStore\",\"sourceResourceId\":\"wxzvlvqhjkb\",\"identityDetails\":{\"useSystemAssignedIdentity\":false,\"userAssignedIdentityArmUrl\":\"nmxiebwwaloayqc\"}}") - .toObject(AzureBackupRestoreRequest.class); - Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.restoreTargetInfo().recoveryOption()); - Assertions.assertEquals("bpbewtghfgb", model.restoreTargetInfo().restoreLocation()); - Assertions.assertEquals(SourceDataStoreType.ARCHIVE_STORE, model.sourceDataStoreType()); - Assertions.assertEquals("wxzvlvqhjkb", model.sourceResourceId()); - Assertions.assertEquals(false, model.identityDetails().useSystemAssignedIdentity()); - Assertions.assertEquals("nmxiebwwaloayqc", model.identityDetails().userAssignedIdentityArmUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureBackupRestoreRequest model = - new AzureBackupRestoreRequest() - .withRestoreTargetInfo( - new RestoreTargetInfoBase() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("bpbewtghfgb")) - .withSourceDataStoreType(SourceDataStoreType.ARCHIVE_STORE) - .withSourceResourceId("wxzvlvqhjkb") - .withIdentityDetails( - new IdentityDetails() - .withUseSystemAssignedIdentity(false) - .withUserAssignedIdentityArmUrl("nmxiebwwaloayqc")); - model = BinaryData.fromObject(model).toObject(AzureBackupRestoreRequest.class); - Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.restoreTargetInfo().recoveryOption()); - Assertions.assertEquals("bpbewtghfgb", model.restoreTargetInfo().restoreLocation()); - Assertions.assertEquals(SourceDataStoreType.ARCHIVE_STORE, model.sourceDataStoreType()); - Assertions.assertEquals("wxzvlvqhjkb", model.sourceResourceId()); - Assertions.assertEquals(false, model.identityDetails().useSystemAssignedIdentity()); - Assertions.assertEquals("nmxiebwwaloayqc", model.identityDetails().userAssignedIdentityArmUrl()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRestoreWithRehydrationRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRestoreWithRehydrationRequestTests.java deleted file mode 100644 index 6ed638ac83e3..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRestoreWithRehydrationRequestTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreWithRehydrationRequest; -import com.azure.resourcemanager.dataprotection.models.IdentityDetails; -import com.azure.resourcemanager.dataprotection.models.RecoveryOption; -import com.azure.resourcemanager.dataprotection.models.RehydrationPriority; -import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfoBase; -import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType; -import org.junit.jupiter.api.Assertions; - -public final class AzureBackupRestoreWithRehydrationRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureBackupRestoreWithRehydrationRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureBackupRestoreWithRehydrationRequest\",\"rehydrationPriority\":\"Standard\",\"rehydrationRetentionDuration\":\"einqf\",\"recoveryPointId\":\"ufxqknpirgnepttw\",\"restoreTargetInfo\":{\"objectType\":\"RestoreTargetInfoBase\",\"recoveryOption\":\"FailIfExists\",\"restoreLocation\":\"niffcdmqnroj\"},\"sourceDataStoreType\":\"ArchiveStore\",\"sourceResourceId\":\"jnkrxf\",\"identityDetails\":{\"useSystemAssignedIdentity\":false,\"userAssignedIdentityArmUrl\":\"ratiz\"}}") - .toObject(AzureBackupRestoreWithRehydrationRequest.class); - Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.restoreTargetInfo().recoveryOption()); - Assertions.assertEquals("niffcdmqnroj", model.restoreTargetInfo().restoreLocation()); - Assertions.assertEquals(SourceDataStoreType.ARCHIVE_STORE, model.sourceDataStoreType()); - Assertions.assertEquals("jnkrxf", model.sourceResourceId()); - Assertions.assertEquals(false, model.identityDetails().useSystemAssignedIdentity()); - Assertions.assertEquals("ratiz", model.identityDetails().userAssignedIdentityArmUrl()); - Assertions.assertEquals("ufxqknpirgnepttw", model.recoveryPointId()); - Assertions.assertEquals(RehydrationPriority.STANDARD, model.rehydrationPriority()); - Assertions.assertEquals("einqf", model.rehydrationRetentionDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureBackupRestoreWithRehydrationRequest model = - new AzureBackupRestoreWithRehydrationRequest() - .withRestoreTargetInfo( - new RestoreTargetInfoBase() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("niffcdmqnroj")) - .withSourceDataStoreType(SourceDataStoreType.ARCHIVE_STORE) - .withSourceResourceId("jnkrxf") - .withIdentityDetails( - new IdentityDetails().withUseSystemAssignedIdentity(false).withUserAssignedIdentityArmUrl("ratiz")) - .withRecoveryPointId("ufxqknpirgnepttw") - .withRehydrationPriority(RehydrationPriority.STANDARD) - .withRehydrationRetentionDuration("einqf"); - model = BinaryData.fromObject(model).toObject(AzureBackupRestoreWithRehydrationRequest.class); - Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.restoreTargetInfo().recoveryOption()); - Assertions.assertEquals("niffcdmqnroj", model.restoreTargetInfo().restoreLocation()); - Assertions.assertEquals(SourceDataStoreType.ARCHIVE_STORE, model.sourceDataStoreType()); - Assertions.assertEquals("jnkrxf", model.sourceResourceId()); - Assertions.assertEquals(false, model.identityDetails().useSystemAssignedIdentity()); - Assertions.assertEquals("ratiz", model.identityDetails().userAssignedIdentityArmUrl()); - Assertions.assertEquals("ufxqknpirgnepttw", model.recoveryPointId()); - Assertions.assertEquals(RehydrationPriority.STANDARD, model.rehydrationPriority()); - Assertions.assertEquals("einqf", model.rehydrationRetentionDuration()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRuleTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRuleTests.java deleted file mode 100644 index ee22fd25629d..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRuleTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRule; -import com.azure.resourcemanager.dataprotection.models.BackupParameters; -import com.azure.resourcemanager.dataprotection.models.DataStoreInfoBase; -import com.azure.resourcemanager.dataprotection.models.DataStoreTypes; -import com.azure.resourcemanager.dataprotection.models.TriggerContext; -import org.junit.jupiter.api.Assertions; - -public final class AzureBackupRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureBackupRule model = - BinaryData - .fromString( - "{\"objectType\":\"AzureBackupRule\",\"backupParameters\":{\"objectType\":\"BackupParameters\"},\"dataStore\":{\"dataStoreType\":\"ArchiveStore\",\"objectType\":\"qxvcxgfrpdsofb\"},\"trigger\":{\"objectType\":\"TriggerContext\"},\"name\":\"hrnsvbu\"}") - .toObject(AzureBackupRule.class); - Assertions.assertEquals("hrnsvbu", model.name()); - Assertions.assertEquals(DataStoreTypes.ARCHIVE_STORE, model.dataStore().dataStoreType()); - Assertions.assertEquals("qxvcxgfrpdsofb", model.dataStore().objectType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureBackupRule model = - new AzureBackupRule() - .withName("hrnsvbu") - .withBackupParameters(new BackupParameters()) - .withDataStore( - new DataStoreInfoBase() - .withDataStoreType(DataStoreTypes.ARCHIVE_STORE) - .withObjectType("qxvcxgfrpdsofb")) - .withTrigger(new TriggerContext()); - model = BinaryData.fromObject(model).toObject(AzureBackupRule.class); - Assertions.assertEquals("hrnsvbu", model.name()); - Assertions.assertEquals(DataStoreTypes.ARCHIVE_STORE, model.dataStore().dataStoreType()); - Assertions.assertEquals("qxvcxgfrpdsofb", model.dataStore().objectType()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureMonitorAlertSettingsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureMonitorAlertSettingsTests.java deleted file mode 100644 index 8d306dde08b5..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureMonitorAlertSettingsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AlertsState; -import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings; -import org.junit.jupiter.api.Assertions; - -public final class AzureMonitorAlertSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureMonitorAlertSettings model = - BinaryData - .fromString("{\"alertsForAllJobFailures\":\"Disabled\"}") - .toObject(AzureMonitorAlertSettings.class); - Assertions.assertEquals(AlertsState.DISABLED, model.alertsForAllJobFailures()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureMonitorAlertSettings model = - new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.DISABLED); - model = BinaryData.fromObject(model).toObject(AzureMonitorAlertSettings.class); - Assertions.assertEquals(AlertsState.DISABLED, model.alertsForAllJobFailures()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureOperationalStoreParametersTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureOperationalStoreParametersTests.java deleted file mode 100644 index 4d6b2b9c90b7..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureOperationalStoreParametersTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AzureOperationalStoreParameters; -import com.azure.resourcemanager.dataprotection.models.DataStoreTypes; -import org.junit.jupiter.api.Assertions; - -public final class AzureOperationalStoreParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureOperationalStoreParameters model = - BinaryData - .fromString( - "{\"objectType\":\"AzureOperationalStoreParameters\",\"resourceGroupId\":\"wnopqgikyzirtx\",\"dataStoreType\":\"VaultStore\"}") - .toObject(AzureOperationalStoreParameters.class); - Assertions.assertEquals(DataStoreTypes.VAULT_STORE, model.dataStoreType()); - Assertions.assertEquals("wnopqgikyzirtx", model.resourceGroupId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureOperationalStoreParameters model = - new AzureOperationalStoreParameters() - .withDataStoreType(DataStoreTypes.VAULT_STORE) - .withResourceGroupId("wnopqgikyzirtx"); - model = BinaryData.fromObject(model).toObject(AzureOperationalStoreParameters.class); - Assertions.assertEquals(DataStoreTypes.VAULT_STORE, model.dataStoreType()); - Assertions.assertEquals("wnopqgikyzirtx", model.resourceGroupId()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureRetentionRuleTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureRetentionRuleTests.java deleted file mode 100644 index f4de46cd7703..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureRetentionRuleTests.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AzureRetentionRule; -import com.azure.resourcemanager.dataprotection.models.CopyOption; -import com.azure.resourcemanager.dataprotection.models.DataStoreInfoBase; -import com.azure.resourcemanager.dataprotection.models.DataStoreTypes; -import com.azure.resourcemanager.dataprotection.models.DeleteOption; -import com.azure.resourcemanager.dataprotection.models.SourceLifeCycle; -import com.azure.resourcemanager.dataprotection.models.TargetCopySetting; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AzureRetentionRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureRetentionRule model = - BinaryData - .fromString( - "{\"objectType\":\"AzureRetentionRule\",\"isDefault\":false,\"lifecycles\":[{\"deleteAfter\":{\"objectType\":\"DeleteOption\",\"duration\":\"sdvlmfwdgzxulucv\"},\"sourceDataStore\":{\"dataStoreType\":\"ArchiveStore\",\"objectType\":\"mrsreuzvxurisjnh\"},\"targetDataStoreCopySettings\":[{\"copyAfter\":{\"objectType\":\"CopyOption\"},\"dataStore\":{\"dataStoreType\":\"ArchiveStore\",\"objectType\":\"ifqjz\"}},{\"copyAfter\":{\"objectType\":\"CopyOption\"},\"dataStore\":{\"dataStoreType\":\"OperationalStore\",\"objectType\":\"mrhublwpc\"}}]},{\"deleteAfter\":{\"objectType\":\"DeleteOption\",\"duration\":\"sutrgjup\"},\"sourceDataStore\":{\"dataStoreType\":\"ArchiveStore\",\"objectType\":\"utpwoqhihejqgw\"},\"targetDataStoreCopySettings\":[{\"copyAfter\":{\"objectType\":\"CopyOption\"},\"dataStore\":{\"dataStoreType\":\"VaultStore\",\"objectType\":\"qntcypsxjvfoimwk\"}}]}],\"name\":\"lirc\"}") - .toObject(AzureRetentionRule.class); - Assertions.assertEquals("lirc", model.name()); - Assertions.assertEquals(false, model.isDefault()); - Assertions.assertEquals("sdvlmfwdgzxulucv", model.lifecycles().get(0).deleteAfter().duration()); - Assertions - .assertEquals(DataStoreTypes.ARCHIVE_STORE, model.lifecycles().get(0).sourceDataStore().dataStoreType()); - Assertions.assertEquals("mrsreuzvxurisjnh", model.lifecycles().get(0).sourceDataStore().objectType()); - Assertions - .assertEquals( - DataStoreTypes.ARCHIVE_STORE, - model.lifecycles().get(0).targetDataStoreCopySettings().get(0).dataStore().dataStoreType()); - Assertions - .assertEquals( - "ifqjz", model.lifecycles().get(0).targetDataStoreCopySettings().get(0).dataStore().objectType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureRetentionRule model = - new AzureRetentionRule() - .withName("lirc") - .withIsDefault(false) - .withLifecycles( - Arrays - .asList( - new SourceLifeCycle() - .withDeleteAfter(new DeleteOption().withDuration("sdvlmfwdgzxulucv")) - .withSourceDataStore( - new DataStoreInfoBase() - .withDataStoreType(DataStoreTypes.ARCHIVE_STORE) - .withObjectType("mrsreuzvxurisjnh")) - .withTargetDataStoreCopySettings( - Arrays - .asList( - new TargetCopySetting() - .withCopyAfter(new CopyOption()) - .withDataStore( - new DataStoreInfoBase() - .withDataStoreType(DataStoreTypes.ARCHIVE_STORE) - .withObjectType("ifqjz")), - new TargetCopySetting() - .withCopyAfter(new CopyOption()) - .withDataStore( - new DataStoreInfoBase() - .withDataStoreType(DataStoreTypes.OPERATIONAL_STORE) - .withObjectType("mrhublwpc")))), - new SourceLifeCycle() - .withDeleteAfter(new DeleteOption().withDuration("sutrgjup")) - .withSourceDataStore( - new DataStoreInfoBase() - .withDataStoreType(DataStoreTypes.ARCHIVE_STORE) - .withObjectType("utpwoqhihejqgw")) - .withTargetDataStoreCopySettings( - Arrays - .asList( - new TargetCopySetting() - .withCopyAfter(new CopyOption()) - .withDataStore( - new DataStoreInfoBase() - .withDataStoreType(DataStoreTypes.VAULT_STORE) - .withObjectType("qntcypsxjvfoimwk")))))); - model = BinaryData.fromObject(model).toObject(AzureRetentionRule.class); - Assertions.assertEquals("lirc", model.name()); - Assertions.assertEquals(false, model.isDefault()); - Assertions.assertEquals("sdvlmfwdgzxulucv", model.lifecycles().get(0).deleteAfter().duration()); - Assertions - .assertEquals(DataStoreTypes.ARCHIVE_STORE, model.lifecycles().get(0).sourceDataStore().dataStoreType()); - Assertions.assertEquals("mrsreuzvxurisjnh", model.lifecycles().get(0).sourceDataStore().objectType()); - Assertions - .assertEquals( - DataStoreTypes.ARCHIVE_STORE, - model.lifecycles().get(0).targetDataStoreCopySettings().get(0).dataStore().dataStoreType()); - Assertions - .assertEquals( - "ifqjz", model.lifecycles().get(0).targetDataStoreCopySettings().get(0).dataStore().objectType()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupCriteriaTests.java deleted file mode 100644 index 30d501819073..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupCriteriaTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.BackupCriteria; - -public final class BackupCriteriaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupCriteria model = - BinaryData.fromString("{\"objectType\":\"BackupCriteria\"}").toObject(BackupCriteria.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupCriteria model = new BackupCriteria(); - model = BinaryData.fromObject(model).toObject(BackupCriteria.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupDatasourceParametersTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupDatasourceParametersTests.java deleted file mode 100644 index c11a73f3ef17..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupDatasourceParametersTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.BackupDatasourceParameters; - -public final class BackupDatasourceParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupDatasourceParameters model = - BinaryData - .fromString("{\"objectType\":\"BackupDatasourceParameters\"}") - .toObject(BackupDatasourceParameters.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupDatasourceParameters model = new BackupDatasourceParameters(); - model = BinaryData.fromObject(model).toObject(BackupDatasourceParameters.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupMockTests.java deleted file mode 100644 index e474af8a4e2e..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.AdHocBackupRuleOptions; -import com.azure.resourcemanager.dataprotection.models.AdhocBackupTriggerOption; -import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo; -import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupInstancesAdhocBackupMockTests { - @Test - public void testAdhocBackup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"objectType\":\"OperationJobExtendedInfo\",\"jobId\":\"gyyprotwy\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OperationJobExtendedInfo response = - manager - .backupInstances() - .adhocBackup( - "mexiitdfuxt", - "asiibmiybnnust", - "nlj", - new TriggerBackupRequest() - .withBackupRuleOptions( - new AdHocBackupRuleOptions() - .withRuleName("nmgixh") - .withTriggerOption( - new AdhocBackupTriggerOption().withRetentionTagOverride("avmqfoudor"))), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("gyyprotwy", response.jobId()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteMockTests.java deleted file mode 100644 index f029087988d2..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupInstancesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.backupInstances().delete("gh", "iypoqeyhlqhykprl", "yznuciqd", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsMockTests.java deleted file mode 100644 index 9ec248106407..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupInstancesResumeBackupsMockTests { - @Test - public void testResumeBackups() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.backupInstances().resumeBackups("hv", "slkvntjl", "igjkskyrio", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionMockTests.java deleted file mode 100644 index 40cf358f61be..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupInstancesResumeProtectionMockTests { - @Test - public void testResumeProtection() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.backupInstances().resumeProtection("vzidsxwaab", "mifrygznmma", "ri", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionMockTests.java deleted file mode 100644 index d4da206f57cc..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupInstancesStopProtectionMockTests { - @Test - public void testStopProtection() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .backupInstances() - .stopProtection("kzobgopxlhsln", "lxieixynllxecwcr", "jphslhcaw", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsMockTests.java deleted file mode 100644 index 30c5cd91fc8a..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupInstancesSuspendBackupsMockTests { - @Test - public void testSuspendBackups() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.backupInstances().suspendBackups("u", "i", "dwfmvigorqjb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceMockTests.java deleted file mode 100644 index f6195225f40b..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest; -import com.azure.resourcemanager.dataprotection.models.SyncType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupInstancesSyncBackupInstanceMockTests { - @Test - public void testSyncBackupInstance() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .backupInstances() - .syncBackupInstance( - "tzh", - "aglkafhon", - "juj", - new SyncBackupInstanceRequest().withSyncType(SyncType.FORCE_RESYNC), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreMockTests.java deleted file mode 100644 index 558c43c38ca1..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreMockTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest; -import com.azure.resourcemanager.dataprotection.models.IdentityDetails; -import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo; -import com.azure.resourcemanager.dataprotection.models.RecoveryOption; -import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfoBase; -import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupInstancesTriggerRestoreMockTests { - @Test - public void testTriggerRestore() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"objectType\":\"OperationJobExtendedInfo\",\"jobId\":\"bp\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OperationJobExtendedInfo response = - manager - .backupInstances() - .triggerRestore( - "zh", - "jqg", - "cfhmlrqryxyn", - new AzureBackupRestoreRequest() - .withRestoreTargetInfo( - new RestoreTargetInfoBase() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("rd")) - .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE) - .withSourceResourceId("vwxzn") - .withIdentityDetails( - new IdentityDetails() - .withUseSystemAssignedIdentity(false) - .withUserAssignedIdentityArmUrl("iyb")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bp", response.jobId()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreMockTests.java deleted file mode 100644 index e039c3cee2aa..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreMockTests.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest; -import com.azure.resourcemanager.dataprotection.models.IdentityDetails; -import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo; -import com.azure.resourcemanager.dataprotection.models.RecoveryOption; -import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfoBase; -import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType; -import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupInstancesValidateForRestoreMockTests { - @Test - public void testValidateForRestore() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"objectType\":\"OperationJobExtendedInfo\",\"jobId\":\"asflvg\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OperationJobExtendedInfo response = - manager - .backupInstances() - .validateForRestore( - "kpzvcpopmxelnwc", - "tyjedex", - "mlfmkqs", - new ValidateRestoreRequestObject() - .withRestoreRequestObject( - new AzureBackupRestoreRequest() - .withRestoreTargetInfo( - new RestoreTargetInfoBase() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("uawxtzx")) - .withSourceDataStoreType(SourceDataStoreType.OPERATIONAL_STORE) - .withSourceResourceId("mwabzxrvxc") - .withIdentityDetails( - new IdentityDetails() - .withUseSystemAssignedIdentity(true) - .withUserAssignedIdentityArmUrl("haivm"))), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("asflvg", response.jobId()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupParametersTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupParametersTests.java deleted file mode 100644 index b7e73cad636a..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupParametersTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.BackupParameters; - -public final class BackupParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupParameters model = - BinaryData.fromString("{\"objectType\":\"BackupParameters\"}").toObject(BackupParameters.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupParameters model = new BackupParameters(); - model = BinaryData.fromObject(model).toObject(BackupParameters.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index c12035fe4c3e..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicy; -import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicyResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupPoliciesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"objectType\":\"BaseBackupPolicy\",\"datasourceTypes\":[\"idizozsdbccxjmo\",\"fdgnwncypuuwwlt\",\"uqj\"]},\"id\":\"zenkeifzzhmkd\",\"name\":\"svflyhbxcudch\",\"type\":\"gsrboldforobw\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BaseBackupPolicyResource response = - manager - .backupPolicies() - .define("jtszcof") - .withExistingBackupVault("gnl", "zonzlrpiqywnc") - .withProperties(new BaseBackupPolicy().withDatasourceTypes(Arrays.asList("htd"))) - .create(); - - Assertions.assertEquals("idizozsdbccxjmo", response.properties().datasourceTypes().get(0)); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteWithResponseMockTests.java deleted file mode 100644 index 7f7de852ff06..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupPoliciesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.backupPolicies().deleteWithResponse("xzhczexrxz", "ujrtrhqvwr", "vk", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetWithResponseMockTests.java deleted file mode 100644 index 03f9ab16e680..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicyResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupPoliciesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"objectType\":\"BaseBackupPolicy\",\"datasourceTypes\":[\"eioqaqhvse\",\"fuqyrxpdlcgqlsi\"]},\"id\":\"jqfrddgamquh\",\"name\":\"os\",\"type\":\"sjuivfcdisyir\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BaseBackupPolicyResource response = - manager - .backupPolicies() - .getWithResponse("zaapmudqmeqwi", "pibudqwyxebeybpm", "znrtffyaqit", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("eioqaqhvse", response.properties().datasourceTypes().get(0)); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListMockTests.java deleted file mode 100644 index dc96d9bd3c89..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicyResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupPoliciesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"objectType\":\"BaseBackupPolicy\",\"datasourceTypes\":[\"wm\",\"xmeb\",\"jscjpahl\",\"veabfqxnmwmqtib\"]},\"id\":\"ijddtvqc\",\"name\":\"tad\",\"type\":\"jaeukmrsieekpn\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.backupPolicies().list("wxdzaumweoohgu", "fuzboyjathwtzolb", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wm", response.iterator().next().properties().datasourceTypes().get(0)); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPolicyTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPolicyTests.java deleted file mode 100644 index d13701d5dea4..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPolicyTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.BackupPolicy; -import com.azure.resourcemanager.dataprotection.models.BasePolicyRule; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BackupPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupPolicy model = - BinaryData - .fromString( - "{\"objectType\":\"BackupPolicy\",\"policyRules\":[{\"objectType\":\"BasePolicyRule\",\"name\":\"bejdznxcv\"},{\"objectType\":\"BasePolicyRule\",\"name\":\"srhnjivo\"},{\"objectType\":\"BasePolicyRule\",\"name\":\"v\"},{\"objectType\":\"BasePolicyRule\",\"name\":\"novqfzge\"}],\"datasourceTypes\":[\"dftuljltduce\",\"mtmczuome\",\"wcw\"]}") - .toObject(BackupPolicy.class); - Assertions.assertEquals("dftuljltduce", model.datasourceTypes().get(0)); - Assertions.assertEquals("bejdznxcv", model.policyRules().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupPolicy model = - new BackupPolicy() - .withDatasourceTypes(Arrays.asList("dftuljltduce", "mtmczuome", "wcw")) - .withPolicyRules( - Arrays - .asList( - new BasePolicyRule().withName("bejdznxcv"), - new BasePolicyRule().withName("srhnjivo"), - new BasePolicyRule().withName("v"), - new BasePolicyRule().withName("novqfzge"))); - model = BinaryData.fromObject(model).toObject(BackupPolicy.class); - Assertions.assertEquals("dftuljltduce", model.datasourceTypes().get(0)); - Assertions.assertEquals("bejdznxcv", model.policyRules().get(0).name()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupScheduleTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupScheduleTests.java deleted file mode 100644 index 52a01d82afdb..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupScheduleTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.BackupSchedule; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BackupScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupSchedule model = - BinaryData - .fromString("{\"repeatingTimeIntervals\":[\"ioknssxmoj\",\"sv\",\"kjprvk\"],\"timeZone\":\"fz\"}") - .toObject(BackupSchedule.class); - Assertions.assertEquals("ioknssxmoj", model.repeatingTimeIntervals().get(0)); - Assertions.assertEquals("fz", model.timeZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupSchedule model = - new BackupSchedule() - .withRepeatingTimeIntervals(Arrays.asList("ioknssxmoj", "sv", "kjprvk")) - .withTimeZone("fz"); - model = BinaryData.fromObject(model).toObject(BackupSchedule.class); - Assertions.assertEquals("ioknssxmoj", model.repeatingTimeIntervals().get(0)); - Assertions.assertEquals("fz", model.timeZone()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetWithResponseMockTests.java deleted file mode 100644 index 5fcb50dd9b7c..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetWithResponseMockTests.java +++ /dev/null @@ -1,106 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.AlertsState; -import com.azure.resourcemanager.dataprotection.models.BackupVaultResource; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState; -import com.azure.resourcemanager.dataprotection.models.ImmutabilityState; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteState; -import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes; -import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupVaultOperationResultsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Disabled\"}},\"provisioningState\":\"Updating\",\"resourceMoveState\":\"PartialSuccess\",\"resourceMoveDetails\":{\"operationId\":\"bmxva\",\"startTimeUtc\":\"efdeesve\",\"completionTimeUtc\":\"ijpxtx\",\"sourceResourcePath\":\"wprtu\",\"targetResourcePath\":\"sawddjibabxvi\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"On\",\"retentionDurationInDays\":35.69950221341751},\"immutabilitySettings\":{\"state\":\"Disabled\"}},\"storageSettings\":[{\"datastoreType\":\"ArchiveStore\",\"type\":\"LocallyRedundant\"},{\"datastoreType\":\"ArchiveStore\",\"type\":\"LocallyRedundant\"},{\"datastoreType\":\"ArchiveStore\",\"type\":\"GeoRedundant\"},{\"datastoreType\":\"OperationalStore\",\"type\":\"GeoRedundant\"}],\"isVaultProtectedByResourceGuard\":false,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"Enabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Disabled\"}},\"secureScore\":\"Minimum\"},\"identity\":{\"principalId\":\"xudb\",\"tenantId\":\"odhtnsirudhzm\",\"type\":\"sckdlp\",\"userAssignedIdentities\":{\"x\":{\"principalId\":\"ded892d5-40a8-40f4-9383-1747c1db5cff\",\"clientId\":\"73b5760b-fc94-4df6-b05b-48ae4ff02d44\"},\"lc\":{\"principalId\":\"c5be0ed3-817a-44c1-852c-805439e2cba0\",\"clientId\":\"c34c8d19-4ef5-4c54-9d54-65208b3a89db\"},\"m\":{\"principalId\":\"adeeee11-3f3c-4339-a5ba-c037bc315121\",\"clientId\":\"f789ff75-8e1a-4f3d-971a-eb20d759c6f5\"},\"xdfgsftufqobr\":{\"principalId\":\"58000328-b64f-486b-83a7-4f9ca25aea32\",\"clientId\":\"84b08a3f-178a-4aa0-bf2b-01786164c24b\"}}},\"eTag\":\"nac\",\"location\":\"ckknhxkizvy\",\"tags\":{\"aaeranokqgukk\":\"zvulj\",\"oylaxxul\":\"qnvb\"},\"id\":\"disdosfjbjsvgj\",\"name\":\"whryvycytdcl\",\"type\":\"gc\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BackupVaultResource response = - manager - .backupVaultOperationResults() - .getWithResponse("ckt", "iymerteeammxqi", "kk", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ckknhxkizvy", response.location()); - Assertions.assertEquals("zvulj", response.tags().get("aaeranokqgukk")); - Assertions.assertEquals("nac", response.etag()); - Assertions.assertEquals("sckdlp", response.identity().type()); - Assertions - .assertEquals( - AlertsState.DISABLED, - response.properties().monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures()); - Assertions - .assertEquals(SoftDeleteState.ON, response.properties().securitySettings().softDeleteSettings().state()); - Assertions - .assertEquals( - 35.69950221341751D, - response.properties().securitySettings().softDeleteSettings().retentionDurationInDays()); - Assertions - .assertEquals( - ImmutabilityState.DISABLED, response.properties().securitySettings().immutabilitySettings().state()); - Assertions - .assertEquals( - StorageSettingStoreTypes.ARCHIVE_STORE, response.properties().storageSettings().get(0).datastoreType()); - Assertions - .assertEquals(StorageSettingTypes.LOCALLY_REDUNDANT, response.properties().storageSettings().get(0).type()); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.ENABLED, - response.properties().featureSettings().crossSubscriptionRestoreSettings().state()); - Assertions - .assertEquals( - CrossRegionRestoreState.DISABLED, - response.properties().featureSettings().crossRegionRestoreSettings().state()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultResourceInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultResourceInnerTests.java deleted file mode 100644 index d9bc35b5bb3d..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultResourceInnerTests.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner; -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.CrossRegionRestoreSettings; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState; -import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails; -import com.azure.resourcemanager.dataprotection.models.FeatureSettings; -import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings; -import com.azure.resourcemanager.dataprotection.models.ImmutabilityState; -import com.azure.resourcemanager.dataprotection.models.MonitoringSettings; -import com.azure.resourcemanager.dataprotection.models.SecuritySettings; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteState; -import com.azure.resourcemanager.dataprotection.models.StorageSetting; -import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes; -import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes; -import com.azure.resourcemanager.dataprotection.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BackupVaultResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupVaultResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Disabled\"}},\"provisioningState\":\"Failed\",\"resourceMoveState\":\"PrepareTimedout\",\"resourceMoveDetails\":{\"operationId\":\"v\",\"startTimeUtc\":\"mjqulngsn\",\"completionTimeUtc\":\"bybkzgcwrwclxx\",\"sourceResourcePath\":\"ljdousk\",\"targetResourcePath\":\"vkocrcjdkwtn\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"AlwaysOn\",\"retentionDurationInDays\":30.743644504476197},\"immutabilitySettings\":{\"state\":\"Disabled\"}},\"storageSettings\":[{\"datastoreType\":\"ArchiveStore\",\"type\":\"LocallyRedundant\"}],\"isVaultProtectedByResourceGuard\":true,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"PermanentlyDisabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Enabled\"}},\"secureScore\":\"Maximum\"},\"identity\":{\"principalId\":\"ppeebvmgxsab\",\"tenantId\":\"qduujitcjczdz\",\"type\":\"ndhkrw\",\"userAssignedIdentities\":{\"dsbdkvwrwjf\":{\"principalId\":\"31776e23-8c83-4449-96f9-1cf2a857ddc1\",\"clientId\":\"b575cc54-aa3b-408a-b375-706c48648f79\"}}},\"eTag\":\"snhu\",\"location\":\"eltmrldhugjzzdat\",\"tags\":{\"geablgphuticndvk\":\"oc\",\"ftyxolniw\":\"ozwyiftyhxhuro\"},\"id\":\"wcukjfkgiawxk\",\"name\":\"ryplwckbasyypn\",\"type\":\"dhsgcba\"}") - .toObject(BackupVaultResourceInner.class); - Assertions.assertEquals("eltmrldhugjzzdat", model.location()); - Assertions.assertEquals("oc", model.tags().get("geablgphuticndvk")); - Assertions.assertEquals("snhu", model.etag()); - Assertions.assertEquals("ndhkrw", model.identity().type()); - Assertions - .assertEquals( - AlertsState.DISABLED, - model.properties().monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures()); - Assertions - .assertEquals( - SoftDeleteState.ALWAYS_ON, model.properties().securitySettings().softDeleteSettings().state()); - Assertions - .assertEquals( - 30.743644504476197D, - model.properties().securitySettings().softDeleteSettings().retentionDurationInDays()); - Assertions - .assertEquals( - ImmutabilityState.DISABLED, model.properties().securitySettings().immutabilitySettings().state()); - Assertions - .assertEquals( - StorageSettingStoreTypes.ARCHIVE_STORE, model.properties().storageSettings().get(0).datastoreType()); - Assertions - .assertEquals(StorageSettingTypes.LOCALLY_REDUNDANT, model.properties().storageSettings().get(0).type()); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.PERMANENTLY_DISABLED, - model.properties().featureSettings().crossSubscriptionRestoreSettings().state()); - Assertions - .assertEquals( - CrossRegionRestoreState.ENABLED, - model.properties().featureSettings().crossRegionRestoreSettings().state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupVaultResourceInner model = - new BackupVaultResourceInner() - .withLocation("eltmrldhugjzzdat") - .withTags(mapOf("geablgphuticndvk", "oc", "ftyxolniw", "ozwyiftyhxhuro")) - .withEtag("snhu") - .withIdentity( - new DppIdentityDetails() - .withType("ndhkrw") - .withUserAssignedIdentities(mapOf("dsbdkvwrwjf", new UserAssignedIdentity()))) - .withProperties( - new BackupVault() - .withMonitoringSettings( - new MonitoringSettings() - .withAzureMonitorAlertSettings( - new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.DISABLED))) - .withSecuritySettings( - new SecuritySettings() - .withSoftDeleteSettings( - new SoftDeleteSettings() - .withState(SoftDeleteState.ALWAYS_ON) - .withRetentionDurationInDays(30.743644504476197D)) - .withImmutabilitySettings( - new ImmutabilitySettings().withState(ImmutabilityState.DISABLED))) - .withStorageSettings( - Arrays - .asList( - new StorageSetting() - .withDatastoreType(StorageSettingStoreTypes.ARCHIVE_STORE) - .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) - .withFeatureSettings( - new FeatureSettings() - .withCrossSubscriptionRestoreSettings( - new CrossSubscriptionRestoreSettings() - .withState(CrossSubscriptionRestoreState.PERMANENTLY_DISABLED)) - .withCrossRegionRestoreSettings( - new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED)))); - model = BinaryData.fromObject(model).toObject(BackupVaultResourceInner.class); - Assertions.assertEquals("eltmrldhugjzzdat", model.location()); - Assertions.assertEquals("oc", model.tags().get("geablgphuticndvk")); - Assertions.assertEquals("snhu", model.etag()); - Assertions.assertEquals("ndhkrw", model.identity().type()); - Assertions - .assertEquals( - AlertsState.DISABLED, - model.properties().monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures()); - Assertions - .assertEquals( - SoftDeleteState.ALWAYS_ON, model.properties().securitySettings().softDeleteSettings().state()); - Assertions - .assertEquals( - 30.743644504476197D, - model.properties().securitySettings().softDeleteSettings().retentionDurationInDays()); - Assertions - .assertEquals( - ImmutabilityState.DISABLED, model.properties().securitySettings().immutabilitySettings().state()); - Assertions - .assertEquals( - StorageSettingStoreTypes.ARCHIVE_STORE, model.properties().storageSettings().get(0).datastoreType()); - Assertions - .assertEquals(StorageSettingTypes.LOCALLY_REDUNDANT, model.properties().storageSettings().get(0).type()); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.PERMANENTLY_DISABLED, - model.properties().featureSettings().crossSubscriptionRestoreSettings().state()); - Assertions - .assertEquals( - CrossRegionRestoreState.ENABLED, - model.properties().featureSettings().crossRegionRestoreSettings().state()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultResourceListTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultResourceListTests.java deleted file mode 100644 index 62a4e36fd679..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultResourceListTests.java +++ /dev/null @@ -1,277 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner; -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.BackupVaultResourceList; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState; -import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails; -import com.azure.resourcemanager.dataprotection.models.FeatureSettings; -import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings; -import com.azure.resourcemanager.dataprotection.models.ImmutabilityState; -import com.azure.resourcemanager.dataprotection.models.MonitoringSettings; -import com.azure.resourcemanager.dataprotection.models.SecuritySettings; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteState; -import com.azure.resourcemanager.dataprotection.models.StorageSetting; -import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes; -import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes; -import com.azure.resourcemanager.dataprotection.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BackupVaultResourceListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupVaultResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Disabled\"}},\"provisioningState\":\"Updating\",\"resourceMoveState\":\"InProgress\",\"resourceMoveDetails\":{\"operationId\":\"czmehmtzopbsp\",\"startTimeUtc\":\"upi\",\"completionTimeUtc\":\"sybbejhph\",\"sourceResourcePath\":\"cmsxaobhdxbm\",\"targetResourcePath\":\"ioq\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"On\",\"retentionDurationInDays\":12.53974621306525},\"immutabilitySettings\":{\"state\":\"Locked\"}},\"storageSettings\":[{\"datastoreType\":\"ArchiveStore\",\"type\":\"ZoneRedundant\"}],\"isVaultProtectedByResourceGuard\":false,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"Enabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Disabled\"}},\"secureScore\":\"Maximum\"},\"identity\":{\"principalId\":\"gkdmb\",\"tenantId\":\"zlobcufpd\",\"type\":\"rbt\",\"userAssignedIdentities\":{\"qglhq\":{\"principalId\":\"f2d3b8e7-52a0-4f8b-b8c7-36079f909e5d\",\"clientId\":\"0cff634b-fd47-4068-b753-cfe92b8d0770\"},\"foooj\":{\"principalId\":\"0eaa23b0-2246-4ac9-9535-d7a040c9eeb6\",\"clientId\":\"3b924f59-ee26-4a50-a04d-68b9c823eb9a\"},\"fsqesaagdfmglzlh\":{\"principalId\":\"6ed79fac-a234-44ee-8992-1d781ed629a6\",\"clientId\":\"d9e48a54-1d25-4553-a9e1-5b77ad8009fc\"},\"ifkwmrvktsizntoc\":{\"principalId\":\"6145262b-4c14-4055-9825-0c4b1036b8a7\",\"clientId\":\"5bf44891-dd30-45d2-b606-3a01f0586d48\"}}},\"eTag\":\"a\",\"location\":\"ajpsquc\",\"tags\":{\"kfo\":\"yf\"},\"id\":\"knygjofjddeq\",\"name\":\"rd\",\"type\":\"upewnwreitjzy\"},{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Disabled\"}},\"provisioningState\":\"Updating\",\"resourceMoveState\":\"CommitTimedout\",\"resourceMoveDetails\":{\"operationId\":\"qhsmyurkdtml\",\"startTimeUtc\":\"ekuksjtx\",\"completionTimeUtc\":\"cdm\",\"sourceResourcePath\":\"rcryuanzwuxzdxta\",\"targetResourcePath\":\"lhmwhfpmrqobm\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"AlwaysOn\",\"retentionDurationInDays\":30.42594303603623},\"immutabilitySettings\":{\"state\":\"Unlocked\"}},\"storageSettings\":[{\"datastoreType\":\"OperationalStore\",\"type\":\"ZoneRedundant\"}],\"isVaultProtectedByResourceGuard\":true,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"PermanentlyDisabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Enabled\"}},\"secureScore\":\"Maximum\"},\"identity\":{\"principalId\":\"zufcyzkohdbi\",\"tenantId\":\"nufhf\",\"type\":\"jysagith\",\"userAssignedIdentities\":{\"ifpikxwczby\":{\"principalId\":\"ef399efe-6d7b-4c2d-a4e3-61ff69034318\",\"clientId\":\"7db38b12-8fb5-4bc4-8eee-981e777a83be\"}}},\"eTag\":\"npqxuh\",\"location\":\"y\",\"tags\":{\"rkxvdum\":\"wby\",\"xgaudccs\":\"grtfwvu\",\"jcny\":\"h\",\"kryhtnapczwlokj\":\"j\"},\"id\":\"emkkvnipjox\",\"name\":\"jnchgej\",\"type\":\"podmailzydehojwy\"},{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Enabled\"}},\"provisioningState\":\"Updating\",\"resourceMoveState\":\"CommitTimedout\",\"resourceMoveDetails\":{\"operationId\":\"aqwi\",\"startTimeUtc\":\"sprozvcput\",\"completionTimeUtc\":\"jvwmfda\",\"sourceResourcePath\":\"cmdv\",\"targetResourcePath\":\"hulsuuvmkjozkrwf\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"AlwaysOn\",\"retentionDurationInDays\":59.75135945335241},\"immutabilitySettings\":{\"state\":\"Disabled\"}},\"storageSettings\":[{\"datastoreType\":\"OperationalStore\",\"type\":\"GeoRedundant\"},{\"datastoreType\":\"VaultStore\",\"type\":\"ZoneRedundant\"}],\"isVaultProtectedByResourceGuard\":true,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"PermanentlyDisabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Enabled\"}},\"secureScore\":\"None\"},\"identity\":{\"principalId\":\"lahbcryff\",\"tenantId\":\"dosyg\",\"type\":\"paojakhmsbzjh\",\"userAssignedIdentities\":{\"dphlxaolt\":{\"principalId\":\"cbc53dd9-b826-4009-88b3-a2f5261abe4d\",\"clientId\":\"cd7e0a0a-a5e2-4c16-ba4c-e561a5008c3e\"},\"rgqjbpfzfsinzg\":{\"principalId\":\"be86cbae-a4b5-4e66-810c-4b462e1e04dd\",\"clientId\":\"38642b6a-9468-46e6-a44c-361a9720c2a0\"}}},\"eTag\":\"cjrwzoxxjtfellu\",\"location\":\"zitonpeqfpjkjl\",\"tags\":{\"nmayhuybb\":\"pdvhpfxxypin\",\"inuvamiheogn\":\"podepoo\",\"usivye\":\"rxzxtheo\"},\"id\":\"cciqihnhungbwjz\",\"name\":\"nfygxgispemvtz\",\"type\":\"kufubljo\"}],\"nextLink\":\"qeof\"}") - .toObject(BackupVaultResourceList.class); - Assertions.assertEquals("qeof", model.nextLink()); - Assertions.assertEquals("ajpsquc", model.value().get(0).location()); - Assertions.assertEquals("yf", model.value().get(0).tags().get("kfo")); - Assertions.assertEquals("a", model.value().get(0).etag()); - Assertions.assertEquals("rbt", model.value().get(0).identity().type()); - Assertions - .assertEquals( - AlertsState.DISABLED, - model - .value() - .get(0) - .properties() - .monitoringSettings() - .azureMonitorAlertSettings() - .alertsForAllJobFailures()); - Assertions - .assertEquals( - SoftDeleteState.ON, model.value().get(0).properties().securitySettings().softDeleteSettings().state()); - Assertions - .assertEquals( - 12.53974621306525D, - model.value().get(0).properties().securitySettings().softDeleteSettings().retentionDurationInDays()); - Assertions - .assertEquals( - ImmutabilityState.LOCKED, - model.value().get(0).properties().securitySettings().immutabilitySettings().state()); - Assertions - .assertEquals( - StorageSettingStoreTypes.ARCHIVE_STORE, - model.value().get(0).properties().storageSettings().get(0).datastoreType()); - Assertions - .assertEquals( - StorageSettingTypes.ZONE_REDUNDANT, model.value().get(0).properties().storageSettings().get(0).type()); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.ENABLED, - model.value().get(0).properties().featureSettings().crossSubscriptionRestoreSettings().state()); - Assertions - .assertEquals( - CrossRegionRestoreState.DISABLED, - model.value().get(0).properties().featureSettings().crossRegionRestoreSettings().state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupVaultResourceList model = - new BackupVaultResourceList() - .withNextLink("qeof") - .withValue( - Arrays - .asList( - new BackupVaultResourceInner() - .withLocation("ajpsquc") - .withTags(mapOf("kfo", "yf")) - .withEtag("a") - .withIdentity( - new DppIdentityDetails() - .withType("rbt") - .withUserAssignedIdentities( - mapOf( - "qglhq", - new UserAssignedIdentity(), - "foooj", - new UserAssignedIdentity(), - "fsqesaagdfmglzlh", - new UserAssignedIdentity(), - "ifkwmrvktsizntoc", - new UserAssignedIdentity()))) - .withProperties( - new BackupVault() - .withMonitoringSettings( - new MonitoringSettings() - .withAzureMonitorAlertSettings( - new AzureMonitorAlertSettings() - .withAlertsForAllJobFailures(AlertsState.DISABLED))) - .withSecuritySettings( - new SecuritySettings() - .withSoftDeleteSettings( - new SoftDeleteSettings() - .withState(SoftDeleteState.ON) - .withRetentionDurationInDays(12.53974621306525D)) - .withImmutabilitySettings( - new ImmutabilitySettings().withState(ImmutabilityState.LOCKED))) - .withStorageSettings( - Arrays - .asList( - new StorageSetting() - .withDatastoreType(StorageSettingStoreTypes.ARCHIVE_STORE) - .withType(StorageSettingTypes.ZONE_REDUNDANT))) - .withFeatureSettings( - new FeatureSettings() - .withCrossSubscriptionRestoreSettings( - new CrossSubscriptionRestoreSettings() - .withState(CrossSubscriptionRestoreState.ENABLED)) - .withCrossRegionRestoreSettings( - new CrossRegionRestoreSettings() - .withState(CrossRegionRestoreState.DISABLED)))), - new BackupVaultResourceInner() - .withLocation("y") - .withTags( - mapOf("rkxvdum", "wby", "xgaudccs", "grtfwvu", "jcny", "h", "kryhtnapczwlokj", "j")) - .withEtag("npqxuh") - .withIdentity( - new DppIdentityDetails() - .withType("jysagith") - .withUserAssignedIdentities(mapOf("ifpikxwczby", new UserAssignedIdentity()))) - .withProperties( - new BackupVault() - .withMonitoringSettings( - new MonitoringSettings() - .withAzureMonitorAlertSettings( - new AzureMonitorAlertSettings() - .withAlertsForAllJobFailures(AlertsState.DISABLED))) - .withSecuritySettings( - new SecuritySettings() - .withSoftDeleteSettings( - new SoftDeleteSettings() - .withState(SoftDeleteState.ALWAYS_ON) - .withRetentionDurationInDays(30.42594303603623D)) - .withImmutabilitySettings( - new ImmutabilitySettings().withState(ImmutabilityState.UNLOCKED))) - .withStorageSettings( - Arrays - .asList( - new StorageSetting() - .withDatastoreType(StorageSettingStoreTypes.OPERATIONAL_STORE) - .withType(StorageSettingTypes.ZONE_REDUNDANT))) - .withFeatureSettings( - new FeatureSettings() - .withCrossSubscriptionRestoreSettings( - new CrossSubscriptionRestoreSettings() - .withState(CrossSubscriptionRestoreState.PERMANENTLY_DISABLED)) - .withCrossRegionRestoreSettings( - new CrossRegionRestoreSettings() - .withState(CrossRegionRestoreState.ENABLED)))), - new BackupVaultResourceInner() - .withLocation("zitonpeqfpjkjl") - .withTags( - mapOf("nmayhuybb", "pdvhpfxxypin", "inuvamiheogn", "podepoo", "usivye", "rxzxtheo")) - .withEtag("cjrwzoxxjtfellu") - .withIdentity( - new DppIdentityDetails() - .withType("paojakhmsbzjh") - .withUserAssignedIdentities( - mapOf( - "dphlxaolt", - new UserAssignedIdentity(), - "rgqjbpfzfsinzg", - new UserAssignedIdentity()))) - .withProperties( - new BackupVault() - .withMonitoringSettings( - new MonitoringSettings() - .withAzureMonitorAlertSettings( - new AzureMonitorAlertSettings() - .withAlertsForAllJobFailures(AlertsState.ENABLED))) - .withSecuritySettings( - new SecuritySettings() - .withSoftDeleteSettings( - new SoftDeleteSettings() - .withState(SoftDeleteState.ALWAYS_ON) - .withRetentionDurationInDays(59.75135945335241D)) - .withImmutabilitySettings( - new ImmutabilitySettings().withState(ImmutabilityState.DISABLED))) - .withStorageSettings( - Arrays - .asList( - new StorageSetting() - .withDatastoreType(StorageSettingStoreTypes.OPERATIONAL_STORE) - .withType(StorageSettingTypes.GEO_REDUNDANT), - new StorageSetting() - .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) - .withType(StorageSettingTypes.ZONE_REDUNDANT))) - .withFeatureSettings( - new FeatureSettings() - .withCrossSubscriptionRestoreSettings( - new CrossSubscriptionRestoreSettings() - .withState(CrossSubscriptionRestoreState.PERMANENTLY_DISABLED)) - .withCrossRegionRestoreSettings( - new CrossRegionRestoreSettings() - .withState(CrossRegionRestoreState.ENABLED)))))); - model = BinaryData.fromObject(model).toObject(BackupVaultResourceList.class); - Assertions.assertEquals("qeof", model.nextLink()); - Assertions.assertEquals("ajpsquc", model.value().get(0).location()); - Assertions.assertEquals("yf", model.value().get(0).tags().get("kfo")); - Assertions.assertEquals("a", model.value().get(0).etag()); - Assertions.assertEquals("rbt", model.value().get(0).identity().type()); - Assertions - .assertEquals( - AlertsState.DISABLED, - model - .value() - .get(0) - .properties() - .monitoringSettings() - .azureMonitorAlertSettings() - .alertsForAllJobFailures()); - Assertions - .assertEquals( - SoftDeleteState.ON, model.value().get(0).properties().securitySettings().softDeleteSettings().state()); - Assertions - .assertEquals( - 12.53974621306525D, - model.value().get(0).properties().securitySettings().softDeleteSettings().retentionDurationInDays()); - Assertions - .assertEquals( - ImmutabilityState.LOCKED, - model.value().get(0).properties().securitySettings().immutabilitySettings().state()); - Assertions - .assertEquals( - StorageSettingStoreTypes.ARCHIVE_STORE, - model.value().get(0).properties().storageSettings().get(0).datastoreType()); - Assertions - .assertEquals( - StorageSettingTypes.ZONE_REDUNDANT, model.value().get(0).properties().storageSettings().get(0).type()); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.ENABLED, - model.value().get(0).properties().featureSettings().crossSubscriptionRestoreSettings().state()); - Assertions - .assertEquals( - CrossRegionRestoreState.DISABLED, - model.value().get(0).properties().featureSettings().crossRegionRestoreSettings().state()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultTests.java deleted file mode 100644 index cc79ef547503..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultTests.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -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.CrossRegionRestoreSettings; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState; -import com.azure.resourcemanager.dataprotection.models.FeatureSettings; -import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings; -import com.azure.resourcemanager.dataprotection.models.ImmutabilityState; -import com.azure.resourcemanager.dataprotection.models.MonitoringSettings; -import com.azure.resourcemanager.dataprotection.models.SecuritySettings; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteState; -import com.azure.resourcemanager.dataprotection.models.StorageSetting; -import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes; -import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BackupVaultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupVault model = - BinaryData - .fromString( - "{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Enabled\"}},\"provisioningState\":\"Updating\",\"resourceMoveState\":\"PrepareTimedout\",\"resourceMoveDetails\":{\"operationId\":\"gou\",\"startTimeUtc\":\"ndlik\",\"completionTimeUtc\":\"qkgfgibma\",\"sourceResourcePath\":\"akeqs\",\"targetResourcePath\":\"yb\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"Off\",\"retentionDurationInDays\":18.452690158174846},\"immutabilitySettings\":{\"state\":\"Unlocked\"}},\"storageSettings\":[{\"datastoreType\":\"ArchiveStore\",\"type\":\"GeoRedundant\"}],\"isVaultProtectedByResourceGuard\":true,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"PermanentlyDisabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Disabled\"}},\"secureScore\":\"Adequate\"}") - .toObject(BackupVault.class); - Assertions - .assertEquals( - AlertsState.ENABLED, model.monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures()); - Assertions.assertEquals(SoftDeleteState.OFF, model.securitySettings().softDeleteSettings().state()); - Assertions - .assertEquals(18.452690158174846D, model.securitySettings().softDeleteSettings().retentionDurationInDays()); - Assertions.assertEquals(ImmutabilityState.UNLOCKED, model.securitySettings().immutabilitySettings().state()); - Assertions.assertEquals(StorageSettingStoreTypes.ARCHIVE_STORE, model.storageSettings().get(0).datastoreType()); - Assertions.assertEquals(StorageSettingTypes.GEO_REDUNDANT, model.storageSettings().get(0).type()); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.PERMANENTLY_DISABLED, - model.featureSettings().crossSubscriptionRestoreSettings().state()); - Assertions - .assertEquals( - CrossRegionRestoreState.DISABLED, model.featureSettings().crossRegionRestoreSettings().state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupVault model = - new BackupVault() - .withMonitoringSettings( - new MonitoringSettings() - .withAzureMonitorAlertSettings( - new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED))) - .withSecuritySettings( - new SecuritySettings() - .withSoftDeleteSettings( - new SoftDeleteSettings() - .withState(SoftDeleteState.OFF) - .withRetentionDurationInDays(18.452690158174846D)) - .withImmutabilitySettings(new ImmutabilitySettings().withState(ImmutabilityState.UNLOCKED))) - .withStorageSettings( - Arrays - .asList( - new StorageSetting() - .withDatastoreType(StorageSettingStoreTypes.ARCHIVE_STORE) - .withType(StorageSettingTypes.GEO_REDUNDANT))) - .withFeatureSettings( - new FeatureSettings() - .withCrossSubscriptionRestoreSettings( - new CrossSubscriptionRestoreSettings() - .withState(CrossSubscriptionRestoreState.PERMANENTLY_DISABLED)) - .withCrossRegionRestoreSettings( - new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.DISABLED))); - model = BinaryData.fromObject(model).toObject(BackupVault.class); - Assertions - .assertEquals( - AlertsState.ENABLED, model.monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures()); - Assertions.assertEquals(SoftDeleteState.OFF, model.securitySettings().softDeleteSettings().state()); - Assertions - .assertEquals(18.452690158174846D, model.securitySettings().softDeleteSettings().retentionDurationInDays()); - Assertions.assertEquals(ImmutabilityState.UNLOCKED, model.securitySettings().immutabilitySettings().state()); - Assertions.assertEquals(StorageSettingStoreTypes.ARCHIVE_STORE, model.storageSettings().get(0).datastoreType()); - Assertions.assertEquals(StorageSettingTypes.GEO_REDUNDANT, model.storageSettings().get(0).type()); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.PERMANENTLY_DISABLED, - model.featureSettings().crossSubscriptionRestoreSettings().state()); - Assertions - .assertEquals( - CrossRegionRestoreState.DISABLED, model.featureSettings().crossRegionRestoreSettings().state()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilityWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 90046e932e09..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilityWithResponseMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityResult; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupVaultsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"message\":\"wgdsl\",\"nameAvailable\":false,\"reason\":\"hrmooi\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameAvailabilityResult response = - manager - .backupVaults() - .checkNameAvailabilityWithResponse( - "kvyklxubyjaffmm", - "bl", - new CheckNameAvailabilityRequest().withName("cuubgq").withType("rtalmet"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wgdsl", response.message()); - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals("hrmooi", response.reason()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateMockTests.java deleted file mode 100644 index d39b9df9fbac..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,181 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -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.BackupVaultResource; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState; -import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails; -import com.azure.resourcemanager.dataprotection.models.FeatureSettings; -import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings; -import com.azure.resourcemanager.dataprotection.models.ImmutabilityState; -import com.azure.resourcemanager.dataprotection.models.MonitoringSettings; -import com.azure.resourcemanager.dataprotection.models.SecuritySettings; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteState; -import com.azure.resourcemanager.dataprotection.models.StorageSetting; -import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes; -import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes; -import com.azure.resourcemanager.dataprotection.models.UserAssignedIdentity; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupVaultsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Enabled\"}},\"provisioningState\":\"Succeeded\",\"resourceMoveState\":\"PrepareTimedout\",\"resourceMoveDetails\":{\"operationId\":\"euvyinzqodfvpgs\",\"startTimeUtc\":\"xgsg\",\"completionTimeUtc\":\"fgzdjtxvz\",\"sourceResourcePath\":\"bqvgaqv\",\"targetResourcePath\":\"a\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"Off\",\"retentionDurationInDays\":38.97441720807582},\"immutabilitySettings\":{\"state\":\"Disabled\"}},\"storageSettings\":[{\"datastoreType\":\"ArchiveStore\",\"type\":\"LocallyRedundant\"},{\"datastoreType\":\"VaultStore\",\"type\":\"ZoneRedundant\"},{\"datastoreType\":\"OperationalStore\",\"type\":\"ZoneRedundant\"}],\"isVaultProtectedByResourceGuard\":true,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"Disabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Enabled\"}},\"secureScore\":\"Maximum\"},\"identity\":{\"principalId\":\"ekdxuku\",\"tenantId\":\"sjjxundxgketw\",\"type\":\"hzjhf\",\"userAssignedIdentities\":{\"muvgp\":{\"principalId\":\"064ceadf-b7bc-483a-8d61-390687b5d81b\",\"clientId\":\"85611a6f-fcb4-4efe-861b-27c047302e8f\"},\"eqsx\":{\"principalId\":\"909a84f7-be3b-4d49-8cb4-0ac272d4e6e8\",\"clientId\":\"8a858bc1-79db-49fe-a83c-f5b10c9c7123\"},\"fbuzjyihs\":{\"principalId\":\"019798cb-4757-4158-b694-546f00104f54\",\"clientId\":\"b8867c5b-b012-4e72-83aa-935b136deae0\"}}},\"eTag\":\"bhu\",\"location\":\"pohyuemslynsqyr\",\"tags\":{\"msjnygqdnfw\":\"obrltt\",\"ijouwivkxoyzunb\":\"zdzgtilaxhnfhqly\",\"wpgclrcivt\":\"xxrtikvc\"},\"id\":\"oxfrkenxpmyyefr\",\"name\":\"mpdnqqskawa\",\"type\":\"qvmmbn\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BackupVaultResource response = - manager - .backupVaults() - .define("zhyrpeto") - .withRegion("bousn") - .withExistingResourceGroup("qseypxiutcxa") - .withProperties( - new BackupVault() - .withMonitoringSettings( - new MonitoringSettings() - .withAzureMonitorAlertSettings( - new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED))) - .withSecuritySettings( - new SecuritySettings() - .withSoftDeleteSettings( - new SoftDeleteSettings() - .withState(SoftDeleteState.ALWAYS_ON) - .withRetentionDurationInDays(29.275683310623478D)) - .withImmutabilitySettings( - new ImmutabilitySettings().withState(ImmutabilityState.UNLOCKED))) - .withStorageSettings( - Arrays - .asList( - new StorageSetting() - .withDatastoreType(StorageSettingStoreTypes.OPERATIONAL_STORE) - .withType(StorageSettingTypes.ZONE_REDUNDANT), - new StorageSetting() - .withDatastoreType(StorageSettingStoreTypes.ARCHIVE_STORE) - .withType(StorageSettingTypes.ZONE_REDUNDANT), - new StorageSetting() - .withDatastoreType(StorageSettingStoreTypes.ARCHIVE_STORE) - .withType(StorageSettingTypes.GEO_REDUNDANT), - new StorageSetting() - .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) - .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) - .withFeatureSettings( - new FeatureSettings() - .withCrossSubscriptionRestoreSettings( - new CrossSubscriptionRestoreSettings() - .withState(CrossSubscriptionRestoreState.ENABLED)) - .withCrossRegionRestoreSettings( - new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED)))) - .withTags(mapOf("ykxhdjh", "gfewetwlyxgnc", "h", "immbcx", "qizxfpxtgqscjavf", "cporxvxcjz")) - .withEtag("pchwa") - .withIdentity( - new DppIdentityDetails() - .withType("ktalhsnvkcdmxz") - .withUserAssignedIdentities( - mapOf( - "mlnwiaaomylweazu", - new UserAssignedIdentity(), - "ethwwnpjhlfz", - new UserAssignedIdentity()))) - .create(); - - Assertions.assertEquals("pohyuemslynsqyr", response.location()); - Assertions.assertEquals("obrltt", response.tags().get("msjnygqdnfw")); - Assertions.assertEquals("bhu", response.etag()); - Assertions.assertEquals("hzjhf", response.identity().type()); - Assertions - .assertEquals( - AlertsState.ENABLED, - response.properties().monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures()); - Assertions - .assertEquals(SoftDeleteState.OFF, response.properties().securitySettings().softDeleteSettings().state()); - Assertions - .assertEquals( - 38.97441720807582D, - response.properties().securitySettings().softDeleteSettings().retentionDurationInDays()); - Assertions - .assertEquals( - ImmutabilityState.DISABLED, response.properties().securitySettings().immutabilitySettings().state()); - Assertions - .assertEquals( - StorageSettingStoreTypes.ARCHIVE_STORE, response.properties().storageSettings().get(0).datastoreType()); - Assertions - .assertEquals(StorageSettingTypes.LOCALLY_REDUNDANT, response.properties().storageSettings().get(0).type()); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.DISABLED, - response.properties().featureSettings().crossSubscriptionRestoreSettings().state()); - Assertions - .assertEquals( - CrossRegionRestoreState.ENABLED, - response.properties().featureSettings().crossRegionRestoreSettings().state()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteMockTests.java deleted file mode 100644 index da945aecd726..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupVaultsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.backupVaults().delete("cvhrfsp", "uagrttikteusqc", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 8e1e69c1f2ea..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.AlertsState; -import com.azure.resourcemanager.dataprotection.models.BackupVaultResource; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState; -import com.azure.resourcemanager.dataprotection.models.ImmutabilityState; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteState; -import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes; -import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupVaultsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Disabled\"}},\"provisioningState\":\"Failed\",\"resourceMoveState\":\"CommitFailed\",\"resourceMoveDetails\":{\"operationId\":\"bunzozudh\",\"startTimeUtc\":\"gkmoyxcdyuibhmfd\",\"completionTimeUtc\":\"zydvfvf\",\"sourceResourcePath\":\"naeo\",\"targetResourcePath\":\"rvhmgor\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"On\",\"retentionDurationInDays\":71.74888692263151},\"immutabilitySettings\":{\"state\":\"Unlocked\"}},\"storageSettings\":[{\"datastoreType\":\"OperationalStore\",\"type\":\"ZoneRedundant\"},{\"datastoreType\":\"VaultStore\",\"type\":\"ZoneRedundant\"},{\"datastoreType\":\"ArchiveStore\",\"type\":\"GeoRedundant\"}],\"isVaultProtectedByResourceGuard\":false,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"PermanentlyDisabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Enabled\"}},\"secureScore\":\"Adequate\"},\"identity\":{\"principalId\":\"jfzqlqhycavodgg\",\"tenantId\":\"beesmieknlra\",\"type\":\"aawiuagydwqfb\",\"userAssignedIdentities\":{\"giagtcojo\":{\"principalId\":\"4c1b70df-e96d-4ef6-8c3e-2c9f8b042761\",\"clientId\":\"d69abbb5-dfe3-4eb5-a402-a6c2fb14a9f5\"}}},\"eTag\":\"wogfnzjvu\",\"location\":\"zldmozuxy\",\"tags\":{\"grjqctojcmi\":\"btkadpysownbtgkb\",\"eypefojyqd\":\"of\",\"hlhzdsqtzbsrgno\":\"cuplcplcwkhih\",\"teyowclu\":\"cjhfgmvecactxmw\"},\"id\":\"ovekqvgqouwi\",\"name\":\"zmpjwyiv\",\"type\":\"ikf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BackupVaultResource response = - manager - .backupVaults() - .getByResourceGroupWithResponse("khocxvdfffwaf", "roud", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("zldmozuxy", response.location()); - Assertions.assertEquals("btkadpysownbtgkb", response.tags().get("grjqctojcmi")); - Assertions.assertEquals("wogfnzjvu", response.etag()); - Assertions.assertEquals("aawiuagydwqfb", response.identity().type()); - Assertions - .assertEquals( - AlertsState.DISABLED, - response.properties().monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures()); - Assertions - .assertEquals(SoftDeleteState.ON, response.properties().securitySettings().softDeleteSettings().state()); - Assertions - .assertEquals( - 71.74888692263151D, - response.properties().securitySettings().softDeleteSettings().retentionDurationInDays()); - Assertions - .assertEquals( - ImmutabilityState.UNLOCKED, response.properties().securitySettings().immutabilitySettings().state()); - Assertions - .assertEquals( - StorageSettingStoreTypes.OPERATIONAL_STORE, - response.properties().storageSettings().get(0).datastoreType()); - Assertions - .assertEquals(StorageSettingTypes.ZONE_REDUNDANT, response.properties().storageSettings().get(0).type()); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.PERMANENTLY_DISABLED, - response.properties().featureSettings().crossSubscriptionRestoreSettings().state()); - Assertions - .assertEquals( - CrossRegionRestoreState.ENABLED, - response.properties().featureSettings().crossRegionRestoreSettings().state()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupMockTests.java deleted file mode 100644 index 14ffcd98433c..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupMockTests.java +++ /dev/null @@ -1,122 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.AlertsState; -import com.azure.resourcemanager.dataprotection.models.BackupVaultResource; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState; -import com.azure.resourcemanager.dataprotection.models.ImmutabilityState; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteState; -import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes; -import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupVaultsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Enabled\"}},\"provisioningState\":\"Succeeded\",\"resourceMoveState\":\"MoveSucceeded\",\"resourceMoveDetails\":{\"operationId\":\"bf\",\"startTimeUtc\":\"clnpkci\",\"completionTimeUtc\":\"zriykhy\",\"sourceResourcePath\":\"fvjlboxqvkjlmx\",\"targetResourcePath\":\"mdy\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"Off\",\"retentionDurationInDays\":92.44657852084777},\"immutabilitySettings\":{\"state\":\"Disabled\"}},\"storageSettings\":[{\"datastoreType\":\"ArchiveStore\",\"type\":\"ZoneRedundant\"},{\"datastoreType\":\"VaultStore\",\"type\":\"LocallyRedundant\"}],\"isVaultProtectedByResourceGuard\":false,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"Disabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Disabled\"}},\"secureScore\":\"Adequate\"},\"identity\":{\"principalId\":\"iqyuvvfo\",\"tenantId\":\"p\",\"type\":\"qyikvy\",\"userAssignedIdentities\":{\"vluwmncsttij\":{\"principalId\":\"46ce289c-67d0-4d4e-aadc-f17d8b1a6765\",\"clientId\":\"5eaeb323-8fd2-4284-8614-65268c9cfa0b\"}}},\"eTag\":\"bvpoekrsgsgbdhu\",\"location\":\"gnjdgkynscliqhz\",\"tags\":{\"mtk\":\"nk\",\"ppnvdxz\":\"bo\",\"hlfkqojpy\":\"hihfrbbcevqagtlt\"},\"id\":\"vgtrdcnifmzzs\",\"name\":\"ymbrnysuxmpraf\",\"type\":\"g\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.backupVaults().listByResourceGroup("cokpv", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("gnjdgkynscliqhz", response.iterator().next().location()); - Assertions.assertEquals("nk", response.iterator().next().tags().get("mtk")); - Assertions.assertEquals("bvpoekrsgsgbdhu", response.iterator().next().etag()); - Assertions.assertEquals("qyikvy", response.iterator().next().identity().type()); - Assertions - .assertEquals( - AlertsState.ENABLED, - response - .iterator() - .next() - .properties() - .monitoringSettings() - .azureMonitorAlertSettings() - .alertsForAllJobFailures()); - Assertions - .assertEquals( - SoftDeleteState.OFF, - response.iterator().next().properties().securitySettings().softDeleteSettings().state()); - Assertions - .assertEquals( - 92.44657852084777D, - response - .iterator() - .next() - .properties() - .securitySettings() - .softDeleteSettings() - .retentionDurationInDays()); - Assertions - .assertEquals( - ImmutabilityState.DISABLED, - response.iterator().next().properties().securitySettings().immutabilitySettings().state()); - Assertions - .assertEquals( - StorageSettingStoreTypes.ARCHIVE_STORE, - response.iterator().next().properties().storageSettings().get(0).datastoreType()); - Assertions - .assertEquals( - StorageSettingTypes.ZONE_REDUNDANT, - response.iterator().next().properties().storageSettings().get(0).type()); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.DISABLED, - response.iterator().next().properties().featureSettings().crossSubscriptionRestoreSettings().state()); - Assertions - .assertEquals( - CrossRegionRestoreState.DISABLED, - response.iterator().next().properties().featureSettings().crossRegionRestoreSettings().state()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListMockTests.java deleted file mode 100644 index b7890fce31f9..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListMockTests.java +++ /dev/null @@ -1,121 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.AlertsState; -import com.azure.resourcemanager.dataprotection.models.BackupVaultResource; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState; -import com.azure.resourcemanager.dataprotection.models.ImmutabilityState; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteState; -import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes; -import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupVaultsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Enabled\"}},\"provisioningState\":\"Succeeded\",\"resourceMoveState\":\"MoveSucceeded\",\"resourceMoveDetails\":{\"operationId\":\"wyrpgogtqxepnyl\",\"startTimeUtc\":\"uajlyj\",\"completionTimeUtc\":\"vofqzhvfc\",\"sourceResourcePath\":\"yfm\",\"targetResourcePath\":\"uxrkjp\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"Off\",\"retentionDurationInDays\":77.28442995264712},\"immutabilitySettings\":{\"state\":\"Locked\"}},\"storageSettings\":[{\"datastoreType\":\"ArchiveStore\",\"type\":\"LocallyRedundant\"}],\"isVaultProtectedByResourceGuard\":false,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"Enabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Disabled\"}},\"secureScore\":\"Minimum\"},\"identity\":{\"principalId\":\"gvmnvuqeq\",\"tenantId\":\"dspastjbkkdmfl\",\"type\":\"stmjlxrri\",\"userAssignedIdentities\":{\"eewchpxlktw\":{\"principalId\":\"3e4e6d4b-3b37-47c2-88f7-a9756da0e940\",\"clientId\":\"5f40efbf-ad8a-490c-b4df-e3b41f3f45d2\"},\"iycslevuf\":{\"principalId\":\"874c4d45-f68c-4563-8220-ee31fd84546c\",\"clientId\":\"f4567b4b-bbe8-4f61-a4b3-765ee4c0f8e6\"},\"cktyh\":{\"principalId\":\"fffa31af-ed5c-4139-af6c-997be1fcebe2\",\"clientId\":\"353aea24-6cf1-4c30-9b53-eafc1400508e\"}}},\"eTag\":\"qedcgzulwm\",\"location\":\"qzz\",\"tags\":{\"krvq\":\"vpglydz\",\"oepry\":\"ev\",\"wytpzdmovz\":\"t\"},\"id\":\"fvaawzqa\",\"name\":\"f\",\"type\":\"gzuriglaecxndt\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.backupVaults().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qzz", response.iterator().next().location()); - Assertions.assertEquals("vpglydz", response.iterator().next().tags().get("krvq")); - Assertions.assertEquals("qedcgzulwm", response.iterator().next().etag()); - Assertions.assertEquals("stmjlxrri", response.iterator().next().identity().type()); - Assertions - .assertEquals( - AlertsState.ENABLED, - response - .iterator() - .next() - .properties() - .monitoringSettings() - .azureMonitorAlertSettings() - .alertsForAllJobFailures()); - Assertions - .assertEquals( - SoftDeleteState.OFF, - response.iterator().next().properties().securitySettings().softDeleteSettings().state()); - Assertions - .assertEquals( - 77.28442995264712D, - response - .iterator() - .next() - .properties() - .securitySettings() - .softDeleteSettings() - .retentionDurationInDays()); - Assertions - .assertEquals( - ImmutabilityState.LOCKED, - response.iterator().next().properties().securitySettings().immutabilitySettings().state()); - Assertions - .assertEquals( - StorageSettingStoreTypes.ARCHIVE_STORE, - response.iterator().next().properties().storageSettings().get(0).datastoreType()); - Assertions - .assertEquals( - StorageSettingTypes.LOCALLY_REDUNDANT, - response.iterator().next().properties().storageSettings().get(0).type()); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.ENABLED, - response.iterator().next().properties().featureSettings().crossSubscriptionRestoreSettings().state()); - Assertions - .assertEquals( - CrossRegionRestoreState.DISABLED, - response.iterator().next().properties().featureSettings().crossRegionRestoreSettings().state()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyResourceInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyResourceInnerTests.java deleted file mode 100644 index 5fec009ec0c9..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyResourceInnerTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.BaseBackupPolicyResourceInner; -import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BaseBackupPolicyResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BaseBackupPolicyResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"objectType\":\"BaseBackupPolicy\",\"datasourceTypes\":[\"osvexcsonpclhoc\"]},\"id\":\"slkevle\",\"name\":\"gz\",\"type\":\"buhfmvfaxkffeiit\"}") - .toObject(BaseBackupPolicyResourceInner.class); - Assertions.assertEquals("osvexcsonpclhoc", model.properties().datasourceTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BaseBackupPolicyResourceInner model = - new BaseBackupPolicyResourceInner() - .withProperties(new BaseBackupPolicy().withDatasourceTypes(Arrays.asList("osvexcsonpclhoc"))); - model = BinaryData.fromObject(model).toObject(BaseBackupPolicyResourceInner.class); - Assertions.assertEquals("osvexcsonpclhoc", model.properties().datasourceTypes().get(0)); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyResourceListTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyResourceListTests.java deleted file mode 100644 index 6a9bd9317ed4..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyResourceListTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.BaseBackupPolicyResourceInner; -import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicy; -import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicyResourceList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BaseBackupPolicyResourceListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BaseBackupPolicyResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"objectType\":\"BaseBackupPolicy\",\"datasourceTypes\":[\"yokacspkw\",\"hzdobpxjmflbvvnc\",\"rkcciwwzjuqk\"]},\"id\":\"sa\",\"name\":\"iwkuofos\",\"type\":\"ghsauuimjmvxied\"}],\"nextLink\":\"gidyjrrf\"}") - .toObject(BaseBackupPolicyResourceList.class); - Assertions.assertEquals("gidyjrrf", model.nextLink()); - Assertions.assertEquals("yokacspkw", model.value().get(0).properties().datasourceTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BaseBackupPolicyResourceList model = - new BaseBackupPolicyResourceList() - .withNextLink("gidyjrrf") - .withValue( - Arrays - .asList( - new BaseBackupPolicyResourceInner() - .withProperties( - new BaseBackupPolicy() - .withDatasourceTypes( - Arrays.asList("yokacspkw", "hzdobpxjmflbvvnc", "rkcciwwzjuqk"))))); - model = BinaryData.fromObject(model).toObject(BaseBackupPolicyResourceList.class); - Assertions.assertEquals("gidyjrrf", model.nextLink()); - Assertions.assertEquals("yokacspkw", model.value().get(0).properties().datasourceTypes().get(0)); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyTests.java deleted file mode 100644 index 0a42c9dde878..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BaseBackupPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BaseBackupPolicy model = - BinaryData - .fromString( - "{\"objectType\":\"BaseBackupPolicy\",\"datasourceTypes\":[\"vmezy\",\"shxmzsbbzoggigrx\",\"burvjxxjnspy\",\"ptkoenkoukn\"]}") - .toObject(BaseBackupPolicy.class); - Assertions.assertEquals("vmezy", model.datasourceTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BaseBackupPolicy model = - new BaseBackupPolicy() - .withDatasourceTypes(Arrays.asList("vmezy", "shxmzsbbzoggigrx", "burvjxxjnspy", "ptkoenkoukn")); - model = BinaryData.fromObject(model).toObject(BaseBackupPolicy.class); - Assertions.assertEquals("vmezy", model.datasourceTypes().get(0)); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BasePolicyRuleTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BasePolicyRuleTests.java deleted file mode 100644 index 8edafac0c79d..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BasePolicyRuleTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.BasePolicyRule; -import org.junit.jupiter.api.Assertions; - -public final class BasePolicyRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BasePolicyRule model = - BinaryData - .fromString("{\"objectType\":\"BasePolicyRule\",\"name\":\"jsrtk\"}") - .toObject(BasePolicyRule.class); - Assertions.assertEquals("jsrtk", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BasePolicyRule model = new BasePolicyRule().withName("jsrtk"); - model = BinaryData.fromObject(model).toObject(BasePolicyRule.class); - Assertions.assertEquals("jsrtk", model.name()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseResourcePropertiesTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseResourcePropertiesTests.java deleted file mode 100644 index 8452ac569d52..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseResourcePropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.BaseResourceProperties; - -public final class BaseResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BaseResourceProperties model = - BinaryData.fromString("{\"objectType\":\"BaseResourceProperties\"}").toObject(BaseResourceProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BaseResourceProperties model = new BaseResourceProperties(); - model = BinaryData.fromObject(model).toObject(BaseResourceProperties.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BlobBackupDatasourceParametersTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BlobBackupDatasourceParametersTests.java deleted file mode 100644 index cfe41ff78015..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BlobBackupDatasourceParametersTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.BlobBackupDatasourceParameters; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BlobBackupDatasourceParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BlobBackupDatasourceParameters model = - BinaryData - .fromString( - "{\"objectType\":\"BlobBackupDatasourceParameters\",\"containersList\":[\"ymoxoftpipiwyczu\",\"xacpqjli\",\"hyus\"]}") - .toObject(BlobBackupDatasourceParameters.class); - Assertions.assertEquals("ymoxoftpipiwyczu", model.containersList().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BlobBackupDatasourceParameters model = - new BlobBackupDatasourceParameters() - .withContainersList(Arrays.asList("ymoxoftpipiwyczu", "xacpqjli", "hyus")); - model = BinaryData.fromObject(model).toObject(BlobBackupDatasourceParameters.class); - Assertions.assertEquals("ymoxoftpipiwyczu", model.containersList().get(0)); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CheckNameAvailabilityRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CheckNameAvailabilityRequestTests.java deleted file mode 100644 index 946f1d12d7c3..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CheckNameAvailabilityRequestTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityRequest model = - BinaryData - .fromString("{\"name\":\"tkftutqxlngx\",\"type\":\"fgugnxkrxdqmid\"}") - .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("tkftutqxlngx", model.name()); - Assertions.assertEquals("fgugnxkrxdqmid", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityRequest model = - new CheckNameAvailabilityRequest().withName("tkftutqxlngx").withType("fgugnxkrxdqmid"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("tkftutqxlngx", model.name()); - Assertions.assertEquals("fgugnxkrxdqmid", model.type()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CheckNameAvailabilityResultInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CheckNameAvailabilityResultInnerTests.java deleted file mode 100644 index 12ca746fab2f..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CheckNameAvailabilityResultInnerTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.CheckNameAvailabilityResultInner; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityResultInner model = - BinaryData - .fromString("{\"message\":\"hzrvqd\",\"nameAvailable\":false,\"reason\":\"jybige\"}") - .toObject(CheckNameAvailabilityResultInner.class); - Assertions.assertEquals("hzrvqd", model.message()); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals("jybige", model.reason()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityResultInner model = - new CheckNameAvailabilityResultInner().withMessage("hzrvqd").withNameAvailable(false).withReason("jybige"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResultInner.class); - Assertions.assertEquals("hzrvqd", model.message()); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals("jybige", model.reason()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryDisplayTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryDisplayTests.java deleted file mode 100644 index eacd6910f715..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryDisplayTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryDisplay; -import org.junit.jupiter.api.Assertions; - -public final class ClientDiscoveryDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClientDiscoveryDisplay model = - BinaryData - .fromString( - "{\"description\":\"hezrkgq\",\"operation\":\"jrefovgmkqsle\",\"provider\":\"vxyqjpkcattpngjc\",\"resource\":\"czsqpjhvm\"}") - .toObject(ClientDiscoveryDisplay.class); - Assertions.assertEquals("hezrkgq", model.description()); - Assertions.assertEquals("jrefovgmkqsle", model.operation()); - Assertions.assertEquals("vxyqjpkcattpngjc", model.provider()); - Assertions.assertEquals("czsqpjhvm", model.resource()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientDiscoveryDisplay model = - new ClientDiscoveryDisplay() - .withDescription("hezrkgq") - .withOperation("jrefovgmkqsle") - .withProvider("vxyqjpkcattpngjc") - .withResource("czsqpjhvm"); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryDisplay.class); - Assertions.assertEquals("hezrkgq", model.description()); - Assertions.assertEquals("jrefovgmkqsle", model.operation()); - Assertions.assertEquals("vxyqjpkcattpngjc", model.provider()); - Assertions.assertEquals("czsqpjhvm", model.resource()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForLogSpecificationTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForLogSpecificationTests.java deleted file mode 100644 index c9d84a452f84..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForLogSpecificationTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForLogSpecification; -import org.junit.jupiter.api.Assertions; - -public final class ClientDiscoveryForLogSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClientDiscoveryForLogSpecification model = - BinaryData - .fromString("{\"blobDuration\":\"vvdfwatkpnpul\",\"displayName\":\"xbczwtruwiqz\",\"name\":\"j\"}") - .toObject(ClientDiscoveryForLogSpecification.class); - Assertions.assertEquals("vvdfwatkpnpul", model.blobDuration()); - Assertions.assertEquals("xbczwtruwiqz", model.displayName()); - Assertions.assertEquals("j", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientDiscoveryForLogSpecification model = - new ClientDiscoveryForLogSpecification() - .withBlobDuration("vvdfwatkpnpul") - .withDisplayName("xbczwtruwiqz") - .withName("j"); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryForLogSpecification.class); - Assertions.assertEquals("vvdfwatkpnpul", model.blobDuration()); - Assertions.assertEquals("xbczwtruwiqz", model.displayName()); - Assertions.assertEquals("j", model.name()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForPropertiesTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForPropertiesTests.java deleted file mode 100644 index 5d56c47d6b31..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForPropertiesTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForLogSpecification; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForProperties; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClientDiscoveryForPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClientDiscoveryForProperties model = - BinaryData - .fromString( - "{\"serviceSpecification\":{\"logSpecifications\":[{\"blobDuration\":\"ysou\",\"displayName\":\"e\",\"name\":\"noae\"}]}}") - .toObject(ClientDiscoveryForProperties.class); - Assertions.assertEquals("ysou", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("e", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("noae", model.serviceSpecification().logSpecifications().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientDiscoveryForProperties model = - new ClientDiscoveryForProperties() - .withServiceSpecification( - new ClientDiscoveryForServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new ClientDiscoveryForLogSpecification() - .withBlobDuration("ysou") - .withDisplayName("e") - .withName("noae")))); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryForProperties.class); - Assertions.assertEquals("ysou", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("e", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("noae", model.serviceSpecification().logSpecifications().get(0).name()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForServiceSpecificationTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForServiceSpecificationTests.java deleted file mode 100644 index 1edc150c2c1f..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForServiceSpecificationTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForLogSpecification; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClientDiscoveryForServiceSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClientDiscoveryForServiceSpecification model = - BinaryData - .fromString( - "{\"logSpecifications\":[{\"blobDuration\":\"yhltrpmopjmcm\",\"displayName\":\"u\",\"name\":\"thfuiuaodsfcpkvx\"},{\"blobDuration\":\"puozmyzydag\",\"displayName\":\"axbezyiuo\",\"name\":\"twhrdxwzywqsm\"},{\"blobDuration\":\"ureximoryocfs\",\"displayName\":\"s\",\"name\":\"ddystkiiuxhqy\"},{\"blobDuration\":\"xorrqnb\",\"displayName\":\"czvyifq\",\"name\":\"kdvjsll\"}]}") - .toObject(ClientDiscoveryForServiceSpecification.class); - Assertions.assertEquals("yhltrpmopjmcm", model.logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("u", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("thfuiuaodsfcpkvx", model.logSpecifications().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientDiscoveryForServiceSpecification model = - new ClientDiscoveryForServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new ClientDiscoveryForLogSpecification() - .withBlobDuration("yhltrpmopjmcm") - .withDisplayName("u") - .withName("thfuiuaodsfcpkvx"), - new ClientDiscoveryForLogSpecification() - .withBlobDuration("puozmyzydag") - .withDisplayName("axbezyiuo") - .withName("twhrdxwzywqsm"), - new ClientDiscoveryForLogSpecification() - .withBlobDuration("ureximoryocfs") - .withDisplayName("s") - .withName("ddystkiiuxhqy"), - new ClientDiscoveryForLogSpecification() - .withBlobDuration("xorrqnb") - .withDisplayName("czvyifq") - .withName("kdvjsll"))); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryForServiceSpecification.class); - Assertions.assertEquals("yhltrpmopjmcm", model.logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("u", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("thfuiuaodsfcpkvx", model.logSpecifications().get(0).name()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryResponseTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryResponseTests.java deleted file mode 100644 index 54c304acd82b..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryResponseTests.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.ClientDiscoveryValueForSingleApiInner; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryDisplay; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForLogSpecification; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForProperties; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForServiceSpecification; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClientDiscoveryResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClientDiscoveryResponse model = - BinaryData - .fromString( - "{\"nextLink\":\"qfbow\",\"value\":[{\"display\":{\"description\":\"ktzlcuiywg\",\"operation\":\"wgndrvynhzgpp\",\"provider\":\"cgyncocpecf\",\"resource\":\"mcoo\"},\"name\":\"xlzevgbmqjqabcy\",\"isDataAction\":true,\"origin\":\"kwlzuvccfwnfn\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}]}}},{\"display\":{\"description\":\"l\",\"operation\":\"x\",\"provider\":\"qgtz\",\"resource\":\"pnqbqqwxrjfe\"},\"name\":\"lnwsubisn\",\"isDataAction\":true,\"origin\":\"mngnzscxaqw\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}]}}},{\"display\":{\"description\":\"nqvpkvlrxnje\",\"operation\":\"eipheoflokeyy\",\"provider\":\"nj\",\"resource\":\"lwtgrhpdj\"},\"name\":\"umasxazjpq\",\"isDataAction\":false,\"origin\":\"alhbx\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}]}}},{\"display\":{\"description\":\"v\",\"operation\":\"dgwdslfhot\",\"provider\":\"cynpwlbjnp\",\"resource\":\"cftadeh\"},\"name\":\"ltyfsop\",\"isDataAction\":false,\"origin\":\"esnzwde\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{},{},{}]}}}]}") - .toObject(ClientDiscoveryResponse.class); - Assertions.assertEquals("qfbow", model.nextLink()); - Assertions.assertEquals("ktzlcuiywg", model.value().get(0).display().description()); - Assertions.assertEquals("wgndrvynhzgpp", model.value().get(0).display().operation()); - Assertions.assertEquals("cgyncocpecf", model.value().get(0).display().provider()); - Assertions.assertEquals("mcoo", model.value().get(0).display().resource()); - Assertions.assertEquals("xlzevgbmqjqabcy", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("kwlzuvccfwnfn", model.value().get(0).origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientDiscoveryResponse model = - new ClientDiscoveryResponse() - .withNextLink("qfbow") - .withValue( - Arrays - .asList( - new ClientDiscoveryValueForSingleApiInner() - .withDisplay( - new ClientDiscoveryDisplay() - .withDescription("ktzlcuiywg") - .withOperation("wgndrvynhzgpp") - .withProvider("cgyncocpecf") - .withResource("mcoo")) - .withName("xlzevgbmqjqabcy") - .withIsDataAction(true) - .withOrigin("kwlzuvccfwnfn") - .withProperties( - new ClientDiscoveryForProperties() - .withServiceSpecification( - new ClientDiscoveryForServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new ClientDiscoveryForLogSpecification(), - new ClientDiscoveryForLogSpecification())))), - new ClientDiscoveryValueForSingleApiInner() - .withDisplay( - new ClientDiscoveryDisplay() - .withDescription("l") - .withOperation("x") - .withProvider("qgtz") - .withResource("pnqbqqwxrjfe")) - .withName("lnwsubisn") - .withIsDataAction(true) - .withOrigin("mngnzscxaqw") - .withProperties( - new ClientDiscoveryForProperties() - .withServiceSpecification( - new ClientDiscoveryForServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new ClientDiscoveryForLogSpecification(), - new ClientDiscoveryForLogSpecification())))), - new ClientDiscoveryValueForSingleApiInner() - .withDisplay( - new ClientDiscoveryDisplay() - .withDescription("nqvpkvlrxnje") - .withOperation("eipheoflokeyy") - .withProvider("nj") - .withResource("lwtgrhpdj")) - .withName("umasxazjpq") - .withIsDataAction(false) - .withOrigin("alhbx") - .withProperties( - new ClientDiscoveryForProperties() - .withServiceSpecification( - new ClientDiscoveryForServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new ClientDiscoveryForLogSpecification(), - new ClientDiscoveryForLogSpecification())))), - new ClientDiscoveryValueForSingleApiInner() - .withDisplay( - new ClientDiscoveryDisplay() - .withDescription("v") - .withOperation("dgwdslfhot") - .withProvider("cynpwlbjnp") - .withResource("cftadeh")) - .withName("ltyfsop") - .withIsDataAction(false) - .withOrigin("esnzwde") - .withProperties( - new ClientDiscoveryForProperties() - .withServiceSpecification( - new ClientDiscoveryForServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new ClientDiscoveryForLogSpecification(), - new ClientDiscoveryForLogSpecification(), - new ClientDiscoveryForLogSpecification(), - new ClientDiscoveryForLogSpecification())))))); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryResponse.class); - Assertions.assertEquals("qfbow", model.nextLink()); - Assertions.assertEquals("ktzlcuiywg", model.value().get(0).display().description()); - Assertions.assertEquals("wgndrvynhzgpp", model.value().get(0).display().operation()); - Assertions.assertEquals("cgyncocpecf", model.value().get(0).display().provider()); - Assertions.assertEquals("mcoo", model.value().get(0).display().resource()); - Assertions.assertEquals("xlzevgbmqjqabcy", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("kwlzuvccfwnfn", model.value().get(0).origin()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryValueForSingleApiInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryValueForSingleApiInnerTests.java deleted file mode 100644 index 1be2cd3982d0..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryValueForSingleApiInnerTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.ClientDiscoveryValueForSingleApiInner; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryDisplay; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForLogSpecification; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForProperties; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClientDiscoveryValueForSingleApiInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClientDiscoveryValueForSingleApiInner model = - BinaryData - .fromString( - "{\"display\":{\"description\":\"zdmohctbqvu\",\"operation\":\"xdn\",\"provider\":\"vo\",\"resource\":\"ujjugwdkcglh\"},\"name\":\"azjdyggd\",\"isDataAction\":true,\"origin\":\"hbkuofqwey\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"blobDuration\":\"vfyexfw\",\"displayName\":\"bcibvyvdcsitynn\",\"name\":\"mdectehfiqscjey\"}]}}}") - .toObject(ClientDiscoveryValueForSingleApiInner.class); - Assertions.assertEquals("zdmohctbqvu", model.display().description()); - Assertions.assertEquals("xdn", model.display().operation()); - Assertions.assertEquals("vo", model.display().provider()); - Assertions.assertEquals("ujjugwdkcglh", model.display().resource()); - Assertions.assertEquals("azjdyggd", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("hbkuofqwey", model.origin()); - Assertions - .assertEquals( - "vfyexfw", model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions - .assertEquals( - "bcibvyvdcsitynn", model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "mdectehfiqscjey", model.properties().serviceSpecification().logSpecifications().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientDiscoveryValueForSingleApiInner model = - new ClientDiscoveryValueForSingleApiInner() - .withDisplay( - new ClientDiscoveryDisplay() - .withDescription("zdmohctbqvu") - .withOperation("xdn") - .withProvider("vo") - .withResource("ujjugwdkcglh")) - .withName("azjdyggd") - .withIsDataAction(true) - .withOrigin("hbkuofqwey") - .withProperties( - new ClientDiscoveryForProperties() - .withServiceSpecification( - new ClientDiscoveryForServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new ClientDiscoveryForLogSpecification() - .withBlobDuration("vfyexfw") - .withDisplayName("bcibvyvdcsitynn") - .withName("mdectehfiqscjey"))))); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryValueForSingleApiInner.class); - Assertions.assertEquals("zdmohctbqvu", model.display().description()); - Assertions.assertEquals("xdn", model.display().operation()); - Assertions.assertEquals("vo", model.display().provider()); - Assertions.assertEquals("ujjugwdkcglh", model.display().resource()); - Assertions.assertEquals("azjdyggd", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("hbkuofqwey", model.origin()); - Assertions - .assertEquals( - "vfyexfw", model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions - .assertEquals( - "bcibvyvdcsitynn", model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "mdectehfiqscjey", model.properties().serviceSpecification().logSpecifications().get(0).name()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CopyOnExpiryOptionTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CopyOnExpiryOptionTests.java deleted file mode 100644 index c50cb4939394..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CopyOnExpiryOptionTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.CopyOnExpiryOption; - -public final class CopyOnExpiryOptionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CopyOnExpiryOption model = - BinaryData.fromString("{\"objectType\":\"CopyOnExpiryOption\"}").toObject(CopyOnExpiryOption.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CopyOnExpiryOption model = new CopyOnExpiryOption(); - model = BinaryData.fromObject(model).toObject(CopyOnExpiryOption.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CopyOptionTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CopyOptionTests.java deleted file mode 100644 index 225d533dee2d..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CopyOptionTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.dataprotection.models.CopyOption; - -public final class CopyOptionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CopyOption model = BinaryData.fromString("{\"objectType\":\"CopyOption\"}").toObject(CopyOption.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CopyOption model = new CopyOption(); - model = BinaryData.fromObject(model).toObject(CopyOption.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CrossRegionRestoreSettingsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CrossRegionRestoreSettingsTests.java deleted file mode 100644 index cf93fb7692dd..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CrossRegionRestoreSettingsTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState; -import org.junit.jupiter.api.Assertions; - -public final class CrossRegionRestoreSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CrossRegionRestoreSettings model = - BinaryData.fromString("{\"state\":\"Enabled\"}").toObject(CrossRegionRestoreSettings.class); - Assertions.assertEquals(CrossRegionRestoreState.ENABLED, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CrossRegionRestoreSettings model = new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED); - model = BinaryData.fromObject(model).toObject(CrossRegionRestoreSettings.class); - Assertions.assertEquals(CrossRegionRestoreState.ENABLED, model.state()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CrossSubscriptionRestoreSettingsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CrossSubscriptionRestoreSettingsTests.java deleted file mode 100644 index addda0518133..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CrossSubscriptionRestoreSettingsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState; -import org.junit.jupiter.api.Assertions; - -public final class CrossSubscriptionRestoreSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CrossSubscriptionRestoreSettings model = - BinaryData - .fromString("{\"state\":\"PermanentlyDisabled\"}") - .toObject(CrossSubscriptionRestoreSettings.class); - Assertions.assertEquals(CrossSubscriptionRestoreState.PERMANENTLY_DISABLED, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CrossSubscriptionRestoreSettings model = - new CrossSubscriptionRestoreSettings().withState(CrossSubscriptionRestoreState.PERMANENTLY_DISABLED); - model = BinaryData.fromObject(model).toObject(CrossSubscriptionRestoreSettings.class); - Assertions.assertEquals(CrossSubscriptionRestoreState.PERMANENTLY_DISABLED, model.state()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CustomCopyOptionTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CustomCopyOptionTests.java deleted file mode 100644 index 6418670c0f50..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CustomCopyOptionTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.CustomCopyOption; -import org.junit.jupiter.api.Assertions; - -public final class CustomCopyOptionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomCopyOption model = - BinaryData - .fromString("{\"objectType\":\"CustomCopyOption\",\"duration\":\"jyxgtczh\"}") - .toObject(CustomCopyOption.class); - Assertions.assertEquals("jyxgtczh", model.duration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomCopyOption model = new CustomCopyOption().withDuration("jyxgtczh"); - model = BinaryData.fromObject(model).toObject(CustomCopyOption.class); - Assertions.assertEquals("jyxgtczh", model.duration()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListMockTests.java deleted file mode 100644 index 1ae51f971c48..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListMockTests.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryValueForSingleApi; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataProtectionOperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"display\":{\"description\":\"ttzaefed\",\"operation\":\"hchrphkmcrjdqn\",\"provider\":\"fzpbgtgkyl\",\"resource\":\"ghrjeuutl\"},\"name\":\"ez\",\"isDataAction\":false,\"origin\":\"kvbwnhhtqlgeh\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"blobDuration\":\"fhpfeoajvgcxtx\",\"displayName\":\"sheafid\",\"name\":\"ugsresmkssjhoi\"},{\"blobDuration\":\"xfkfwegprhptill\",\"displayName\":\"biqtgdq\",\"name\":\"mcwsldrizetpwb\"},{\"blobDuration\":\"lllibph\",\"displayName\":\"zmizakakan\",\"name\":\"p\"},{\"blobDuration\":\"jzhajoy\",\"displayName\":\"jlmuoyxprimrsopt\",\"name\":\"cjmeislstvasy\"}]}}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.dataProtectionOperations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ttzaefed", response.iterator().next().display().description()); - Assertions.assertEquals("hchrphkmcrjdqn", response.iterator().next().display().operation()); - Assertions.assertEquals("fzpbgtgkyl", response.iterator().next().display().provider()); - Assertions.assertEquals("ghrjeuutl", response.iterator().next().display().resource()); - Assertions.assertEquals("ez", response.iterator().next().name()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("kvbwnhhtqlgeh", response.iterator().next().origin()); - Assertions - .assertEquals( - "fhpfeoajvgcxtx", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .logSpecifications() - .get(0) - .blobDuration()); - Assertions - .assertEquals( - "sheafid", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .logSpecifications() - .get(0) - .displayName()); - Assertions - .assertEquals( - "ugsresmkssjhoi", - response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).name()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionsCheckFeatureSupportWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionsCheckFeatureSupportWithResponseMockTests.java deleted file mode 100644 index 545ccf1055b5..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionsCheckFeatureSupportWithResponseMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequestBase; -import com.azure.resourcemanager.dataprotection.models.FeatureValidationResponseBase; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataProtectionsCheckFeatureSupportWithResponseMockTests { - @Test - public void testCheckFeatureSupportWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"objectType\":\"FeatureValidationResponseBase\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeatureValidationResponseBase response = - manager - .dataProtections() - .checkFeatureSupportWithResponse( - "knfnwmbtmvpdv", new FeatureValidationRequestBase(), com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataStoreInfoBaseTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataStoreInfoBaseTests.java deleted file mode 100644 index 6cdadfc0f9eb..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataStoreInfoBaseTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.DataStoreInfoBase; -import com.azure.resourcemanager.dataprotection.models.DataStoreTypes; -import org.junit.jupiter.api.Assertions; - -public final class DataStoreInfoBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataStoreInfoBase model = - BinaryData - .fromString("{\"dataStoreType\":\"VaultStore\",\"objectType\":\"dvzyybycnun\"}") - .toObject(DataStoreInfoBase.class); - Assertions.assertEquals(DataStoreTypes.VAULT_STORE, model.dataStoreType()); - Assertions.assertEquals("dvzyybycnun", model.objectType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataStoreInfoBase model = - new DataStoreInfoBase().withDataStoreType(DataStoreTypes.VAULT_STORE).withObjectType("dvzyybycnun"); - model = BinaryData.fromObject(model).toObject(DataStoreInfoBase.class); - Assertions.assertEquals(DataStoreTypes.VAULT_STORE, model.dataStoreType()); - Assertions.assertEquals("dvzyybycnun", model.objectType()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataStoreParametersTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataStoreParametersTests.java deleted file mode 100644 index 4083c7291427..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataStoreParametersTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.DataStoreParameters; -import com.azure.resourcemanager.dataprotection.models.DataStoreTypes; -import org.junit.jupiter.api.Assertions; - -public final class DataStoreParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataStoreParameters model = - BinaryData - .fromString("{\"objectType\":\"DataStoreParameters\",\"dataStoreType\":\"ArchiveStore\"}") - .toObject(DataStoreParameters.class); - Assertions.assertEquals(DataStoreTypes.ARCHIVE_STORE, model.dataStoreType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataStoreParameters model = new DataStoreParameters().withDataStoreType(DataStoreTypes.ARCHIVE_STORE); - model = BinaryData.fromObject(model).toObject(DataStoreParameters.class); - Assertions.assertEquals(DataStoreTypes.ARCHIVE_STORE, model.dataStoreType()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DatasourceSetTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DatasourceSetTests.java deleted file mode 100644 index 9e889b01cbbe..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DatasourceSetTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.BaseResourceProperties; -import com.azure.resourcemanager.dataprotection.models.DatasourceSet; -import org.junit.jupiter.api.Assertions; - -public final class DatasourceSetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatasourceSet model = - BinaryData - .fromString( - "{\"datasourceType\":\"lwzbhvgyugu\",\"objectType\":\"vmkfssxqu\",\"resourceID\":\"kfplgmgsxnk\",\"resourceLocation\":\"kde\",\"resourceName\":\"pvlopwiyighxpkd\",\"resourceType\":\"baiuebbaumny\",\"resourceUri\":\"ped\",\"resourceProperties\":{\"objectType\":\"BaseResourceProperties\"}}") - .toObject(DatasourceSet.class); - Assertions.assertEquals("lwzbhvgyugu", model.datasourceType()); - Assertions.assertEquals("vmkfssxqu", model.objectType()); - Assertions.assertEquals("kfplgmgsxnk", model.resourceId()); - Assertions.assertEquals("kde", model.resourceLocation()); - Assertions.assertEquals("pvlopwiyighxpkd", model.resourceName()); - Assertions.assertEquals("baiuebbaumny", model.resourceType()); - Assertions.assertEquals("ped", model.resourceUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatasourceSet model = - new DatasourceSet() - .withDatasourceType("lwzbhvgyugu") - .withObjectType("vmkfssxqu") - .withResourceId("kfplgmgsxnk") - .withResourceLocation("kde") - .withResourceName("pvlopwiyighxpkd") - .withResourceType("baiuebbaumny") - .withResourceUri("ped") - .withResourceProperties(new BaseResourceProperties()); - model = BinaryData.fromObject(model).toObject(DatasourceSet.class); - Assertions.assertEquals("lwzbhvgyugu", model.datasourceType()); - Assertions.assertEquals("vmkfssxqu", model.objectType()); - Assertions.assertEquals("kfplgmgsxnk", model.resourceId()); - Assertions.assertEquals("kde", model.resourceLocation()); - Assertions.assertEquals("pvlopwiyighxpkd", model.resourceName()); - Assertions.assertEquals("baiuebbaumny", model.resourceType()); - Assertions.assertEquals("ped", model.resourceUri()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DatasourceTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DatasourceTests.java deleted file mode 100644 index 0a9cb2ddf282..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DatasourceTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.BaseResourceProperties; -import com.azure.resourcemanager.dataprotection.models.Datasource; -import org.junit.jupiter.api.Assertions; - -public final class DatasourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Datasource model = - BinaryData - .fromString( - "{\"datasourceType\":\"hdwbavxbniwdjs\",\"objectType\":\"tsdbpgn\",\"resourceID\":\"ytxhp\",\"resourceLocation\":\"bzpfzab\",\"resourceName\":\"cuh\",\"resourceType\":\"tcty\",\"resourceUri\":\"klbb\",\"resourceProperties\":{\"objectType\":\"BaseResourceProperties\"}}") - .toObject(Datasource.class); - Assertions.assertEquals("hdwbavxbniwdjs", model.datasourceType()); - Assertions.assertEquals("tsdbpgn", model.objectType()); - Assertions.assertEquals("ytxhp", model.resourceId()); - Assertions.assertEquals("bzpfzab", model.resourceLocation()); - Assertions.assertEquals("cuh", model.resourceName()); - Assertions.assertEquals("tcty", model.resourceType()); - Assertions.assertEquals("klbb", model.resourceUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Datasource model = - new Datasource() - .withDatasourceType("hdwbavxbniwdjs") - .withObjectType("tsdbpgn") - .withResourceId("ytxhp") - .withResourceLocation("bzpfzab") - .withResourceName("cuh") - .withResourceType("tcty") - .withResourceUri("klbb") - .withResourceProperties(new BaseResourceProperties()); - model = BinaryData.fromObject(model).toObject(Datasource.class); - Assertions.assertEquals("hdwbavxbniwdjs", model.datasourceType()); - Assertions.assertEquals("tsdbpgn", model.objectType()); - Assertions.assertEquals("ytxhp", model.resourceId()); - Assertions.assertEquals("bzpfzab", model.resourceLocation()); - Assertions.assertEquals("cuh", model.resourceName()); - Assertions.assertEquals("tcty", model.resourceType()); - Assertions.assertEquals("klbb", model.resourceUri()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DayTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DayTests.java deleted file mode 100644 index 029b3e8b310c..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DayTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.Day; -import org.junit.jupiter.api.Assertions; - -public final class DayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Day model = BinaryData.fromString("{\"date\":1722960093,\"isLast\":true}").toObject(Day.class); - Assertions.assertEquals(1722960093, model.date()); - Assertions.assertEquals(true, model.isLast()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Day model = new Day().withDate(1722960093).withIsLast(true); - model = BinaryData.fromObject(model).toObject(Day.class); - Assertions.assertEquals(1722960093, model.date()); - Assertions.assertEquals(true, model.isLast()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeleteOptionTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeleteOptionTests.java deleted file mode 100644 index 517346ba5a3e..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeleteOptionTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.DeleteOption; -import org.junit.jupiter.api.Assertions; - -public final class DeleteOptionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeleteOption model = - BinaryData - .fromString("{\"objectType\":\"DeleteOption\",\"duration\":\"hfkvtvsexsowuel\"}") - .toObject(DeleteOption.class); - Assertions.assertEquals("hfkvtvsexsowuel", model.duration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeleteOption model = new DeleteOption().withDuration("hfkvtvsexsowuel"); - model = BinaryData.fromObject(model).toObject(DeleteOption.class); - Assertions.assertEquals("hfkvtvsexsowuel", model.duration()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteMockTests.java deleted file mode 100644 index 2fd1145f7c04..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DeletedBackupInstancesUndeleteMockTests { - @Test - public void testUndelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .deletedBackupInstances() - .undelete("zszuwiwtglxx", "ljfp", "picrmnzhrgmqgjsx", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeletionInfoTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeletionInfoTests.java deleted file mode 100644 index a5f737d9c9bc..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeletionInfoTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.DeletionInfo; - -public final class DeletionInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeletionInfo model = - BinaryData - .fromString( - "{\"deletionTime\":\"ok\",\"billingEndDate\":\"llxdyhgs\",\"scheduledPurgeTime\":\"cogjltdtbn\",\"deleteActivityID\":\"adoocrkvc\"}") - .toObject(DeletionInfo.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeletionInfo model = new DeletionInfo(); - model = BinaryData.fromObject(model).toObject(DeletionInfo.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseResourceInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseResourceInnerTests.java deleted file mode 100644 index cbc5b81b4bcd..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseResourceInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.DppBaseResourceInner; - -public final class DppBaseResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DppBaseResourceInner model = - BinaryData - .fromString("{\"id\":\"m\",\"name\":\"kufgmj\",\"type\":\"wr\"}") - .toObject(DppBaseResourceInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DppBaseResourceInner model = new DppBaseResourceInner(); - model = BinaryData.fromObject(model).toObject(DppBaseResourceInner.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseResourceListTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseResourceListTests.java deleted file mode 100644 index 4063db17424c..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseResourceListTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.DppBaseResourceInner; -import com.azure.resourcemanager.dataprotection.models.DppBaseResourceList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DppBaseResourceListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DppBaseResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"ximerqfobwyznk\",\"name\":\"kutwpf\",\"type\":\"a\"},{\"id\":\"hrskdsnfd\",\"name\":\"oakgtdlmkkzev\",\"type\":\"hewpusdsttwv\"}],\"nextLink\":\"vbbejdcng\"}") - .toObject(DppBaseResourceList.class); - Assertions.assertEquals("vbbejdcng", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DppBaseResourceList model = - new DppBaseResourceList() - .withValue(Arrays.asList(new DppBaseResourceInner(), new DppBaseResourceInner())) - .withNextLink("vbbejdcng"); - model = BinaryData.fromObject(model).toObject(DppBaseResourceList.class); - Assertions.assertEquals("vbbejdcng", model.nextLink()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseTrackedResourceTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseTrackedResourceTests.java deleted file mode 100644 index fe0e580a3794..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseTrackedResourceTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.DppBaseTrackedResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DppBaseTrackedResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DppBaseTrackedResource model = - BinaryData - .fromString( - "{\"eTag\":\"dkirsoodqxhcr\",\"location\":\"ohjtckw\",\"tags\":{\"bznorcjxvsnby\":\"oifiyipjxsqwpgr\",\"cyshurzafbljjgp\":\"qabnmoc\",\"bqidtqaj\":\"toqcjmklja\",\"khbzhfepgzg\":\"yulpkudjkr\"},\"id\":\"e\",\"name\":\"zloc\",\"type\":\"scpai\"}") - .toObject(DppBaseTrackedResource.class); - Assertions.assertEquals("ohjtckw", model.location()); - Assertions.assertEquals("oifiyipjxsqwpgr", model.tags().get("bznorcjxvsnby")); - Assertions.assertEquals("dkirsoodqxhcr", model.etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DppBaseTrackedResource model = - new DppBaseTrackedResource() - .withLocation("ohjtckw") - .withTags( - mapOf( - "bznorcjxvsnby", - "oifiyipjxsqwpgr", - "cyshurzafbljjgp", - "qabnmoc", - "bqidtqaj", - "toqcjmklja", - "khbzhfepgzg", - "yulpkudjkr")) - .withEtag("dkirsoodqxhcr"); - model = BinaryData.fromObject(model).toObject(DppBaseTrackedResource.class); - Assertions.assertEquals("ohjtckw", model.location()); - Assertions.assertEquals("oifiyipjxsqwpgr", model.tags().get("bznorcjxvsnby")); - Assertions.assertEquals("dkirsoodqxhcr", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppIdentityDetailsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppIdentityDetailsTests.java deleted file mode 100644 index b2a80d571bce..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppIdentityDetailsTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails; -import com.azure.resourcemanager.dataprotection.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DppIdentityDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DppIdentityDetails model = - BinaryData - .fromString( - "{\"principalId\":\"xmnteiwaop\",\"tenantId\":\"mijcmmxdcufufs\",\"type\":\"ymzidn\",\"userAssignedIdentities\":{\"tbzsgfyccs\":{\"principalId\":\"05992a25-5a3c-489c-8844-8def4acbbb2a\",\"clientId\":\"145a6212-7d83-4f77-b358-8122dde72fd4\"},\"mdwzjeiachboo\":{\"principalId\":\"2ccbb825-1f77-4a8b-8614-e49530bae829\",\"clientId\":\"b3688cbe-fc11-42ed-9c9e-eed92d43f58d\"},\"nrosfqpte\":{\"principalId\":\"bbb7502f-6130-4080-8a33-fa24fd3506c5\",\"clientId\":\"9ca5c0f9-d64c-4b2d-ac40-c88841bb9267\"},\"zvypyqrimzinp\":{\"principalId\":\"ecca0efe-e900-46cd-92ba-1182988af69b\",\"clientId\":\"1ac68a2c-e646-4377-8203-79ca3b2f69f2\"}}}") - .toObject(DppIdentityDetails.class); - Assertions.assertEquals("ymzidn", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DppIdentityDetails model = - new DppIdentityDetails() - .withType("ymzidn") - .withUserAssignedIdentities( - mapOf( - "tbzsgfyccs", - new UserAssignedIdentity(), - "mdwzjeiachboo", - new UserAssignedIdentity(), - "nrosfqpte", - new UserAssignedIdentity(), - "zvypyqrimzinp", - new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(DppIdentityDetails.class); - Assertions.assertEquals("ymzidn", model.type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppProxyResourceTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppProxyResourceTests.java deleted file mode 100644 index 815d3e6673f8..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppProxyResourceTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.DppProxyResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DppProxyResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DppProxyResource model = - BinaryData - .fromString( - "{\"tags\":{\"zq\":\"gyepsbjt\",\"fjz\":\"gxywpmue\"},\"id\":\"qkqujidsu\",\"name\":\"onobglaocqx\",\"type\":\"ccm\"}") - .toObject(DppProxyResource.class); - Assertions.assertEquals("gyepsbjt", model.tags().get("zq")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DppProxyResource model = new DppProxyResource().withTags(mapOf("zq", "gyepsbjt", "fjz", "gxywpmue")); - model = BinaryData.fromObject(model).toObject(DppProxyResource.class); - Assertions.assertEquals("gyepsbjt", model.tags().get("zq")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesCreateOrUpdateWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index fa57f5605331..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardOperationDetail; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBaseResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DppResourceGuardProxiesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"resourceGuardResourceId\":\"hguynuchlgmltxdw\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"us\",\"defaultResourceRequest\":\"vlnsnnjz\"},{\"vaultCriticalOperation\":\"afolpymwamxqzrag\",\"defaultResourceRequest\":\"dphtv\"}],\"lastUpdatedTime\":\"lajv\",\"description\":\"jchcsrlzknmzla\"},\"id\":\"updwv\",\"name\":\"phcnzqtpj\",\"type\":\"mqrhvthl\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ResourceGuardProxyBaseResource response = - manager - .dppResourceGuardProxies() - .define("jpu") - .withExistingBackupVault("zrvjfnmjmvlwyzgi", "lkujrllfojui") - .withProperties( - new ResourceGuardProxyBase() - .withResourceGuardResourceId("ucejikzoeovvtz") - .withResourceGuardOperationDetails( - Arrays - .asList( - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("jklntikyj") - .withDefaultResourceRequest("k"))) - .withLastUpdatedTime("qzolxrzvhqjw") - .withDescription("htgv")) - .create(); - - Assertions.assertEquals("hguynuchlgmltxdw", response.properties().resourceGuardResourceId()); - Assertions - .assertEquals("us", response.properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions - .assertEquals( - "vlnsnnjz", response.properties().resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("lajv", response.properties().lastUpdatedTime()); - Assertions.assertEquals("jchcsrlzknmzla", response.properties().description()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesDeleteWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesDeleteWithResponseMockTests.java deleted file mode 100644 index 118e3da6f92f..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DppResourceGuardProxiesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .dppResourceGuardProxies() - .deleteWithResponse("bmoichd", "pnfpubntnbat", "viqsowsaaelcattc", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesGetWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesGetWithResponseMockTests.java deleted file mode 100644 index d60be102ea37..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesGetWithResponseMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBaseResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DppResourceGuardProxiesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"resourceGuardResourceId\":\"mmyky\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"glh\",\"defaultResourceRequest\":\"rryejylmbkzudnig\"},{\"vaultCriticalOperation\":\"ihotjewlpxuzzjg\",\"defaultResourceRequest\":\"efqyhqotoihiqaky\"}],\"lastUpdatedTime\":\"wf\",\"description\":\"kwpzdqtvh\"},\"id\":\"podaq\",\"name\":\"xsi\",\"type\":\"ietgbebjfu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ResourceGuardProxyBaseResource response = - manager - .dppResourceGuardProxies() - .getWithResponse("lrocuyzlwh", "memhooclutnpq", "emc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("mmyky", response.properties().resourceGuardResourceId()); - Assertions - .assertEquals("glh", response.properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions - .assertEquals( - "rryejylmbkzudnig", - response.properties().resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("wf", response.properties().lastUpdatedTime()); - Assertions.assertEquals("kwpzdqtvh", response.properties().description()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesListMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesListMockTests.java deleted file mode 100644 index cea91fda439c..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesListMockTests.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBaseResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DppResourceGuardProxiesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"resourceGuardResourceId\":\"mzgwe\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"xwefohecbvopwndy\",\"defaultResourceRequest\":\"eallklmtkhlo\"},{\"vaultCriticalOperation\":\"x\",\"defaultResourceRequest\":\"vbrdfjmzsyzfho\"}],\"lastUpdatedTime\":\"h\",\"description\":\"cyychunsjlp\"},\"id\":\"twszhvvuic\",\"name\":\"hvtrrmhwrbfdpyf\",\"type\":\"ubhvj\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.dppResourceGuardProxies().list("v", "xmycjimryvwgcw", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mzgwe", response.iterator().next().properties().resourceGuardResourceId()); - Assertions - .assertEquals( - "xwefohecbvopwndy", - response - .iterator() - .next() - .properties() - .resourceGuardOperationDetails() - .get(0) - .vaultCriticalOperation()); - Assertions - .assertEquals( - "eallklmtkhlo", - response - .iterator() - .next() - .properties() - .resourceGuardOperationDetails() - .get(0) - .defaultResourceRequest()); - Assertions.assertEquals("h", response.iterator().next().properties().lastUpdatedTime()); - Assertions.assertEquals("cyychunsjlp", response.iterator().next().properties().description()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesUnlockDeleteWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesUnlockDeleteWithResponseMockTests.java deleted file mode 100644 index 770190faf1d7..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesUnlockDeleteWithResponseMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.UnlockDeleteRequest; -import com.azure.resourcemanager.dataprotection.models.UnlockDeleteResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DppResourceGuardProxiesUnlockDeleteWithResponseMockTests { - @Test - public void testUnlockDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"unlockDeleteExpiryTime\":\"dqlvhukoveof\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - UnlockDeleteResponse response = - manager - .dppResourceGuardProxies() - .unlockDeleteWithResponse( - "uhplrvkmjcwmjv", - "gfggcvkyylizrzbj", - "sfxsf", - new UnlockDeleteRequest() - .withResourceGuardOperationRequests(Arrays.asList("lvt")) - .withResourceToBeDeleted("agb"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("dqlvhukoveof", response.unlockDeleteExpiryTime()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceListTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceListTests.java deleted file mode 100644 index a8a9bb9375be..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.DppResourceList; -import org.junit.jupiter.api.Assertions; - -public final class DppResourceListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DppResourceList model = - BinaryData.fromString("{\"nextLink\":\"hhbcsglummajtjao\"}").toObject(DppResourceList.class); - Assertions.assertEquals("hhbcsglummajtjao", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DppResourceList model = new DppResourceList().withNextLink("hhbcsglummajtjao"); - model = BinaryData.fromObject(model).toObject(DppResourceList.class); - Assertions.assertEquals("hhbcsglummajtjao", model.nextLink()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceTests.java deleted file mode 100644 index 5196d3e92761..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.DppResource; - -public final class DppResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DppResource model = - BinaryData - .fromString("{\"id\":\"dwtiukbldngkp\",\"name\":\"cipazyxoegukgjnp\",\"type\":\"ucgygevqz\"}") - .toObject(DppResource.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DppResource model = new DppResource(); - model = BinaryData.fromObject(model).toObject(DppResource.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppTrackedResourceListTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppTrackedResourceListTests.java deleted file mode 100644 index b92c3ee91f55..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppTrackedResourceListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.DppTrackedResourceList; -import org.junit.jupiter.api.Assertions; - -public final class DppTrackedResourceListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DppTrackedResourceList model = - BinaryData.fromString("{\"nextLink\":\"azxkhnzbonlwnto\"}").toObject(DppTrackedResourceList.class); - Assertions.assertEquals("azxkhnzbonlwnto", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DppTrackedResourceList model = new DppTrackedResourceList().withNextLink("azxkhnzbonlwnto"); - model = BinaryData.fromObject(model).toObject(DppTrackedResourceList.class); - Assertions.assertEquals("azxkhnzbonlwnto", model.nextLink()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppTrackedResourceTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppTrackedResourceTests.java deleted file mode 100644 index cf74b92beeb8..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppTrackedResourceTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails; -import com.azure.resourcemanager.dataprotection.models.DppTrackedResource; -import com.azure.resourcemanager.dataprotection.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DppTrackedResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DppTrackedResource model = - BinaryData - .fromString( - "{\"identity\":{\"principalId\":\"jgzjaoyfhrtx\",\"tenantId\":\"n\",\"type\":\"kujysvlejuvfq\",\"userAssignedIdentities\":{\"xwjkcprbnwbxg\":{\"principalId\":\"219e0109-deda-4ee9-8735-2600b97e58d4\",\"clientId\":\"7e50e910-e1d0-4503-ab76-e9b81e1f8ead\"},\"bvpyss\":{\"principalId\":\"1227691a-a47d-4bcd-8a59-37efbbfd7349\",\"clientId\":\"3595c5f9-0d4b-49d6-b44d-b3b3bd5db6c2\"},\"rujqg\":{\"principalId\":\"fc47465c-0b57-4de4-96fd-7ff47914d8c8\",\"clientId\":\"cc034697-3a26-49ac-9e6b-3909fdfc1c67\"},\"uouq\":{\"principalId\":\"80f5dd5f-bda6-4c08-bfc7-d9ade0acc0b0\",\"clientId\":\"e17afb2b-e0a4-4e8e-9c15-a3a6b9e2de52\"}}},\"eTag\":\"rwzwbng\",\"location\":\"tnwu\",\"tags\":{\"x\":\"a\",\"hr\":\"fizuckyf\"},\"id\":\"idf\",\"name\":\"zwdzuh\",\"type\":\"ymwisdkft\"}") - .toObject(DppTrackedResource.class); - Assertions.assertEquals("tnwu", model.location()); - Assertions.assertEquals("a", model.tags().get("x")); - Assertions.assertEquals("rwzwbng", model.etag()); - Assertions.assertEquals("kujysvlejuvfq", model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DppTrackedResource model = - new DppTrackedResource() - .withLocation("tnwu") - .withTags(mapOf("x", "a", "hr", "fizuckyf")) - .withEtag("rwzwbng") - .withIdentity( - new DppIdentityDetails() - .withType("kujysvlejuvfq") - .withUserAssignedIdentities( - mapOf( - "xwjkcprbnwbxg", - new UserAssignedIdentity(), - "bvpyss", - new UserAssignedIdentity(), - "rujqg", - new UserAssignedIdentity(), - "uouq", - new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(DppTrackedResource.class); - Assertions.assertEquals("tnwu", model.location()); - Assertions.assertEquals("a", model.tags().get("x")); - Assertions.assertEquals("rwzwbng", model.etag()); - Assertions.assertEquals("kujysvlejuvfq", model.identity().type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppWorkerRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppWorkerRequestTests.java deleted file mode 100644 index 41068a26f8b2..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppWorkerRequestTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.DppWorkerRequest; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DppWorkerRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DppWorkerRequest model = - BinaryData - .fromString( - "{\"subscriptionId\":\"fffiak\",\"uri\":\"pqqmted\",\"headers\":{\"mdscwxqupev\":[\"jihy\",\"ozphvwauyqncygu\",\"kvi\"]},\"supportedGroupVersions\":[\"stotxh\"],\"cultureInfo\":\"ujbypelmcuvhixb\",\"parameters\":{\"yl\":\"fw\",\"ujrywvtyl\":\"coolsttpkiwkkb\"},\"httpMethod\":\"pncur\"}") - .toObject(DppWorkerRequest.class); - Assertions.assertEquals("fffiak", model.subscriptionId()); - Assertions.assertEquals("pqqmted", model.uri()); - Assertions.assertEquals("jihy", model.headers().get("mdscwxqupev").get(0)); - Assertions.assertEquals("stotxh", model.supportedGroupVersions().get(0)); - Assertions.assertEquals("ujbypelmcuvhixb", model.cultureInfo()); - Assertions.assertEquals("fw", model.parameters().get("yl")); - Assertions.assertEquals("pncur", model.httpMethod()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DppWorkerRequest model = - new DppWorkerRequest() - .withSubscriptionId("fffiak") - .withUri("pqqmted") - .withHeaders(mapOf("mdscwxqupev", Arrays.asList("jihy", "ozphvwauyqncygu", "kvi"))) - .withSupportedGroupVersions(Arrays.asList("stotxh")) - .withCultureInfo("ujbypelmcuvhixb") - .withParameters(mapOf("yl", "fw", "ujrywvtyl", "coolsttpkiwkkb")) - .withHttpMethod("pncur"); - model = BinaryData.fromObject(model).toObject(DppWorkerRequest.class); - Assertions.assertEquals("fffiak", model.subscriptionId()); - Assertions.assertEquals("pqqmted", model.uri()); - Assertions.assertEquals("jihy", model.headers().get("mdscwxqupev").get(0)); - Assertions.assertEquals("stotxh", model.supportedGroupVersions().get(0)); - Assertions.assertEquals("ujbypelmcuvhixb", model.cultureInfo()); - Assertions.assertEquals("fw", model.parameters().get("yl")); - Assertions.assertEquals("pncur", model.httpMethod()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureSettingsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureSettingsTests.java deleted file mode 100644 index c0508ff28ffc..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureSettingsTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState; -import com.azure.resourcemanager.dataprotection.models.FeatureSettings; -import org.junit.jupiter.api.Assertions; - -public final class FeatureSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureSettings model = - BinaryData - .fromString( - "{\"crossSubscriptionRestoreSettings\":{\"state\":\"PermanentlyDisabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Disabled\"}}") - .toObject(FeatureSettings.class); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.PERMANENTLY_DISABLED, model.crossSubscriptionRestoreSettings().state()); - Assertions.assertEquals(CrossRegionRestoreState.DISABLED, model.crossRegionRestoreSettings().state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureSettings model = - new FeatureSettings() - .withCrossSubscriptionRestoreSettings( - new CrossSubscriptionRestoreSettings() - .withState(CrossSubscriptionRestoreState.PERMANENTLY_DISABLED)) - .withCrossRegionRestoreSettings( - new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.DISABLED)); - model = BinaryData.fromObject(model).toObject(FeatureSettings.class); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.PERMANENTLY_DISABLED, model.crossSubscriptionRestoreSettings().state()); - Assertions.assertEquals(CrossRegionRestoreState.DISABLED, model.crossRegionRestoreSettings().state()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationRequestBaseTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationRequestBaseTests.java deleted file mode 100644 index f86a04fe27fa..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationRequestBaseTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequestBase; - -public final class FeatureValidationRequestBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureValidationRequestBase model = - BinaryData - .fromString("{\"objectType\":\"FeatureValidationRequestBase\"}") - .toObject(FeatureValidationRequestBase.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureValidationRequestBase model = new FeatureValidationRequestBase(); - model = BinaryData.fromObject(model).toObject(FeatureValidationRequestBase.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationRequestTests.java deleted file mode 100644 index 7bd151ae3936..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationRequestTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.FeatureType; -import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequest; -import org.junit.jupiter.api.Assertions; - -public final class FeatureValidationRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureValidationRequest model = - BinaryData - .fromString( - "{\"objectType\":\"FeatureValidationRequest\",\"featureType\":\"DataSourceType\",\"featureName\":\"m\"}") - .toObject(FeatureValidationRequest.class); - Assertions.assertEquals(FeatureType.DATA_SOURCE_TYPE, model.featureType()); - Assertions.assertEquals("m", model.featureName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureValidationRequest model = - new FeatureValidationRequest().withFeatureType(FeatureType.DATA_SOURCE_TYPE).withFeatureName("m"); - model = BinaryData.fromObject(model).toObject(FeatureValidationRequest.class); - Assertions.assertEquals(FeatureType.DATA_SOURCE_TYPE, model.featureType()); - Assertions.assertEquals("m", model.featureName()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationResponseBaseInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationResponseBaseInnerTests.java deleted file mode 100644 index 1e41db25182f..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationResponseBaseInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.FeatureValidationResponseBaseInner; - -public final class FeatureValidationResponseBaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureValidationResponseBaseInner model = - BinaryData - .fromString("{\"objectType\":\"FeatureValidationResponseBase\"}") - .toObject(FeatureValidationResponseBaseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureValidationResponseBaseInner model = new FeatureValidationResponseBaseInner(); - model = BinaryData.fromObject(model).toObject(FeatureValidationResponseBaseInner.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationResponseTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationResponseTests.java deleted file mode 100644 index 274a9a8c9302..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationResponseTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.FeatureSupportStatus; -import com.azure.resourcemanager.dataprotection.models.FeatureType; -import com.azure.resourcemanager.dataprotection.models.FeatureValidationResponse; -import com.azure.resourcemanager.dataprotection.models.SupportedFeature; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FeatureValidationResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureValidationResponse model = - BinaryData - .fromString( - "{\"objectType\":\"FeatureValidationResponse\",\"featureType\":\"DataSourceType\",\"features\":[{\"featureName\":\"vbbxuripl\",\"supportStatus\":\"GenerallyAvailable\",\"exposureControlledFeatures\":[\"baxk\",\"xywr\"]},{\"featureName\":\"pyklyhpluodpvru\",\"supportStatus\":\"GenerallyAvailable\",\"exposureControlledFeatures\":[\"ibthostgktstvd\"]},{\"featureName\":\"clzedqbcvh\",\"supportStatus\":\"GenerallyAvailable\",\"exposureControlledFeatures\":[\"odqkdlwwqfb\",\"mlkxtrqjfs\",\"lmbtxhwgfwsrt\",\"wcoezbrhub\"]}]}") - .toObject(FeatureValidationResponse.class); - Assertions.assertEquals(FeatureType.DATA_SOURCE_TYPE, model.featureType()); - Assertions.assertEquals("vbbxuripl", model.features().get(0).featureName()); - Assertions.assertEquals(FeatureSupportStatus.GENERALLY_AVAILABLE, model.features().get(0).supportStatus()); - Assertions.assertEquals("baxk", model.features().get(0).exposureControlledFeatures().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureValidationResponse model = - new FeatureValidationResponse() - .withFeatureType(FeatureType.DATA_SOURCE_TYPE) - .withFeatures( - Arrays - .asList( - new SupportedFeature() - .withFeatureName("vbbxuripl") - .withSupportStatus(FeatureSupportStatus.GENERALLY_AVAILABLE) - .withExposureControlledFeatures(Arrays.asList("baxk", "xywr")), - new SupportedFeature() - .withFeatureName("pyklyhpluodpvru") - .withSupportStatus(FeatureSupportStatus.GENERALLY_AVAILABLE) - .withExposureControlledFeatures(Arrays.asList("ibthostgktstvd")), - new SupportedFeature() - .withFeatureName("clzedqbcvh") - .withSupportStatus(FeatureSupportStatus.GENERALLY_AVAILABLE) - .withExposureControlledFeatures( - Arrays.asList("odqkdlwwqfb", "mlkxtrqjfs", "lmbtxhwgfwsrt", "wcoezbrhub")))); - model = BinaryData.fromObject(model).toObject(FeatureValidationResponse.class); - Assertions.assertEquals(FeatureType.DATA_SOURCE_TYPE, model.featureType()); - Assertions.assertEquals("vbbxuripl", model.features().get(0).featureName()); - Assertions.assertEquals(FeatureSupportStatus.GENERALLY_AVAILABLE, model.features().get(0).supportStatus()); - Assertions.assertEquals("baxk", model.features().get(0).exposureControlledFeatures().get(0)); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/IdentityDetailsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/IdentityDetailsTests.java deleted file mode 100644 index 1e58f78d2ead..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/IdentityDetailsTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.IdentityDetails; -import org.junit.jupiter.api.Assertions; - -public final class IdentityDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityDetails model = - BinaryData - .fromString("{\"useSystemAssignedIdentity\":true,\"userAssignedIdentityArmUrl\":\"ermclfplphoxuscr\"}") - .toObject(IdentityDetails.class); - Assertions.assertEquals(true, model.useSystemAssignedIdentity()); - Assertions.assertEquals("ermclfplphoxuscr", model.userAssignedIdentityArmUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityDetails model = - new IdentityDetails() - .withUseSystemAssignedIdentity(true) - .withUserAssignedIdentityArmUrl("ermclfplphoxuscr"); - model = BinaryData.fromObject(model).toObject(IdentityDetails.class); - Assertions.assertEquals(true, model.useSystemAssignedIdentity()); - Assertions.assertEquals("ermclfplphoxuscr", model.userAssignedIdentityArmUrl()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ImmediateCopyOptionTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ImmediateCopyOptionTests.java deleted file mode 100644 index ec8c7cb6f9eb..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ImmediateCopyOptionTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.ImmediateCopyOption; - -public final class ImmediateCopyOptionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImmediateCopyOption model = - BinaryData.fromString("{\"objectType\":\"ImmediateCopyOption\"}").toObject(ImmediateCopyOption.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImmediateCopyOption model = new ImmediateCopyOption(); - model = BinaryData.fromObject(model).toObject(ImmediateCopyOption.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ImmutabilitySettingsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ImmutabilitySettingsTests.java deleted file mode 100644 index 6426fc25e21d..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ImmutabilitySettingsTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings; -import com.azure.resourcemanager.dataprotection.models.ImmutabilityState; -import org.junit.jupiter.api.Assertions; - -public final class ImmutabilitySettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImmutabilitySettings model = - BinaryData.fromString("{\"state\":\"Disabled\"}").toObject(ImmutabilitySettings.class); - Assertions.assertEquals(ImmutabilityState.DISABLED, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImmutabilitySettings model = new ImmutabilitySettings().withState(ImmutabilityState.DISABLED); - model = BinaryData.fromObject(model).toObject(ImmutabilitySettings.class); - Assertions.assertEquals(ImmutabilityState.DISABLED, model.state()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ItemLevelRestoreCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ItemLevelRestoreCriteriaTests.java deleted file mode 100644 index 0c702b23dd0f..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ItemLevelRestoreCriteriaTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.ItemLevelRestoreCriteria; - -public final class ItemLevelRestoreCriteriaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ItemLevelRestoreCriteria model = - BinaryData - .fromString("{\"objectType\":\"ItemLevelRestoreCriteria\"}") - .toObject(ItemLevelRestoreCriteria.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ItemLevelRestoreCriteria model = new ItemLevelRestoreCriteria(); - model = BinaryData.fromObject(model).toObject(ItemLevelRestoreCriteria.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ItemPathBasedRestoreCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ItemPathBasedRestoreCriteriaTests.java deleted file mode 100644 index b11da878c4df..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ItemPathBasedRestoreCriteriaTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.ItemPathBasedRestoreCriteria; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ItemPathBasedRestoreCriteriaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ItemPathBasedRestoreCriteria model = - BinaryData - .fromString( - "{\"objectType\":\"ItemPathBasedRestoreCriteria\",\"itemPath\":\"xwmygdxpgpqc\",\"isPathRelativeToBackupItem\":false,\"subItemPathPrefix\":[\"epn\"]}") - .toObject(ItemPathBasedRestoreCriteria.class); - Assertions.assertEquals("xwmygdxpgpqc", model.itemPath()); - Assertions.assertEquals(false, model.isPathRelativeToBackupItem()); - Assertions.assertEquals("epn", model.subItemPathPrefix().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ItemPathBasedRestoreCriteria model = - new ItemPathBasedRestoreCriteria() - .withItemPath("xwmygdxpgpqc") - .withIsPathRelativeToBackupItem(false) - .withSubItemPathPrefix(Arrays.asList("epn")); - model = BinaryData.fromObject(model).toObject(ItemPathBasedRestoreCriteria.class); - Assertions.assertEquals("xwmygdxpgpqc", model.itemPath()); - Assertions.assertEquals(false, model.isPathRelativeToBackupItem()); - Assertions.assertEquals("epn", model.subItemPathPrefix().get(0)); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/JobExtendedInfoTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/JobExtendedInfoTests.java deleted file mode 100644 index a024d35ff51a..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/JobExtendedInfoTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.JobExtendedInfo; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobExtendedInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobExtendedInfo model = - BinaryData - .fromString( - "{\"additionalDetails\":{\"hhuao\":\"zfq\",\"ahzxctobgbk\":\"ppcqeqxolz\",\"mgrcfbu\":\"moizpos\",\"mjh\":\"rmfqjhhkxbpvj\"},\"backupInstanceState\":\"j\",\"dataTransferredInBytes\":87.30772584972803,\"recoveryDestination\":\"ivkrtsw\",\"sourceRecoverPoint\":{\"recoveryPointID\":\"zvszj\",\"recoveryPointTime\":\"2021-04-01T03:47:56Z\"},\"subTasks\":[{\"additionalDetails\":{\"cqaqtdoqmcbx\":\"xxivetv\",\"bhsfxob\":\"wvxysl\"},\"taskId\":168100762,\"taskName\":\"tkblmpewww\",\"taskProgress\":\"krvrns\",\"taskStatus\":\"shqjohxcrsbf\"}],\"targetRecoverPoint\":{\"recoveryPointID\":\"srruvwbhsqfsubcg\",\"recoveryPointTime\":\"2021-02-04T22:06:27Z\"}}") - .toObject(JobExtendedInfo.class); - Assertions.assertEquals("zfq", model.additionalDetails().get("hhuao")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobExtendedInfo model = - new JobExtendedInfo() - .withAdditionalDetails( - mapOf("hhuao", "zfq", "ahzxctobgbk", "ppcqeqxolz", "mgrcfbu", "moizpos", "mjh", "rmfqjhhkxbpvj")); - model = BinaryData.fromObject(model).toObject(JobExtendedInfo.class); - Assertions.assertEquals("zfq", model.additionalDetails().get("hhuao")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/JobSubTaskTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/JobSubTaskTests.java deleted file mode 100644 index 657f0df63449..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/JobSubTaskTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.JobSubTask; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobSubTaskTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobSubTask model = - BinaryData - .fromString( - "{\"additionalDetails\":{\"bexilzznfqqnv\":\"fbjfdtwssotftpvj\",\"ujmkcjhwqy\":\"pmqtaru\"},\"taskId\":1656357002,\"taskName\":\"r\",\"taskProgress\":\"n\",\"taskStatus\":\"jewgdrjerv\"}") - .toObject(JobSubTask.class); - Assertions.assertEquals("fbjfdtwssotftpvj", model.additionalDetails().get("bexilzznfqqnv")); - Assertions.assertEquals(1656357002, model.taskId()); - Assertions.assertEquals("r", model.taskName()); - Assertions.assertEquals("jewgdrjerv", model.taskStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobSubTask model = - new JobSubTask() - .withAdditionalDetails(mapOf("bexilzznfqqnv", "fbjfdtwssotftpvj", "ujmkcjhwqy", "pmqtaru")) - .withTaskId(1656357002) - .withTaskName("r") - .withTaskStatus("jewgdrjerv"); - model = BinaryData.fromObject(model).toObject(JobSubTask.class); - Assertions.assertEquals("fbjfdtwssotftpvj", model.additionalDetails().get("bexilzznfqqnv")); - Assertions.assertEquals(1656357002, model.taskId()); - Assertions.assertEquals("r", model.taskName()); - Assertions.assertEquals("jewgdrjerv", model.taskStatus()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesClusterBackupDatasourceParametersTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesClusterBackupDatasourceParametersTests.java deleted file mode 100644 index 24c4c5819b3c..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesClusterBackupDatasourceParametersTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.KubernetesClusterBackupDatasourceParameters; -import com.azure.resourcemanager.dataprotection.models.NamespacedNameResource; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class KubernetesClusterBackupDatasourceParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KubernetesClusterBackupDatasourceParameters model = - BinaryData - .fromString( - "{\"objectType\":\"KubernetesClusterBackupDatasourceParameters\",\"snapshotVolumes\":true,\"includeClusterScopeResources\":false,\"includedNamespaces\":[\"jntpsewgioilqu\"],\"excludedNamespaces\":[\"dxtqmieoxo\",\"ggufhyaomtb\"],\"includedResourceTypes\":[\"avgrvkffovjz\",\"pjbi\"],\"excludedResourceTypes\":[\"mfxumvfcluyovw\",\"nbkfezzxscy\"],\"labelSelectors\":[\"dgirujbzbom\",\"zzbtdcqvpniyujvi\"],\"backupHookReferences\":[{\"name\":\"shfssnrbgyef\",\"namespace\":\"msgaoj\"}]}") - .toObject(KubernetesClusterBackupDatasourceParameters.class); - Assertions.assertEquals(true, model.snapshotVolumes()); - Assertions.assertEquals(false, model.includeClusterScopeResources()); - Assertions.assertEquals("jntpsewgioilqu", model.includedNamespaces().get(0)); - Assertions.assertEquals("dxtqmieoxo", model.excludedNamespaces().get(0)); - Assertions.assertEquals("avgrvkffovjz", model.includedResourceTypes().get(0)); - Assertions.assertEquals("mfxumvfcluyovw", model.excludedResourceTypes().get(0)); - Assertions.assertEquals("dgirujbzbom", model.labelSelectors().get(0)); - Assertions.assertEquals("shfssnrbgyef", model.backupHookReferences().get(0).name()); - Assertions.assertEquals("msgaoj", model.backupHookReferences().get(0).namespace()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KubernetesClusterBackupDatasourceParameters model = - new KubernetesClusterBackupDatasourceParameters() - .withSnapshotVolumes(true) - .withIncludeClusterScopeResources(false) - .withIncludedNamespaces(Arrays.asList("jntpsewgioilqu")) - .withExcludedNamespaces(Arrays.asList("dxtqmieoxo", "ggufhyaomtb")) - .withIncludedResourceTypes(Arrays.asList("avgrvkffovjz", "pjbi")) - .withExcludedResourceTypes(Arrays.asList("mfxumvfcluyovw", "nbkfezzxscy")) - .withLabelSelectors(Arrays.asList("dgirujbzbom", "zzbtdcqvpniyujvi")) - .withBackupHookReferences( - Arrays.asList(new NamespacedNameResource().withName("shfssnrbgyef").withNamespace("msgaoj"))); - model = BinaryData.fromObject(model).toObject(KubernetesClusterBackupDatasourceParameters.class); - Assertions.assertEquals(true, model.snapshotVolumes()); - Assertions.assertEquals(false, model.includeClusterScopeResources()); - Assertions.assertEquals("jntpsewgioilqu", model.includedNamespaces().get(0)); - Assertions.assertEquals("dxtqmieoxo", model.excludedNamespaces().get(0)); - Assertions.assertEquals("avgrvkffovjz", model.includedResourceTypes().get(0)); - Assertions.assertEquals("mfxumvfcluyovw", model.excludedResourceTypes().get(0)); - Assertions.assertEquals("dgirujbzbom", model.labelSelectors().get(0)); - Assertions.assertEquals("shfssnrbgyef", model.backupHookReferences().get(0).name()); - Assertions.assertEquals("msgaoj", model.backupHookReferences().get(0).namespace()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesClusterRestoreCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesClusterRestoreCriteriaTests.java deleted file mode 100644 index 81d07a670d9d..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesClusterRestoreCriteriaTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.ExistingResourcePolicy; -import com.azure.resourcemanager.dataprotection.models.KubernetesClusterRestoreCriteria; -import com.azure.resourcemanager.dataprotection.models.NamespacedNameResource; -import com.azure.resourcemanager.dataprotection.models.PersistentVolumeRestoreMode; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class KubernetesClusterRestoreCriteriaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KubernetesClusterRestoreCriteria model = - BinaryData - .fromString( - "{\"objectType\":\"KubernetesClusterRestoreCriteria\",\"includeClusterScopeResources\":false,\"includedNamespaces\":[\"nrwrbiork\",\"alywjhhgdn\",\"xmsivfomiloxggdu\"],\"excludedNamespaces\":[\"ndieuzaofj\"],\"includedResourceTypes\":[\"cyyysfgdot\"],\"excludedResourceTypes\":[\"iipuipwoqonm\",\"cje\"],\"labelSelectors\":[\"zshq\"],\"persistentVolumeRestoreMode\":\"RestoreWithVolumeData\",\"conflictPolicy\":\"Skip\",\"namespaceMappings\":{\"ccwr\":\"fgmblrrilbywdxsm\",\"dvoqyt\":\"fscjfnynszquji\",\"hjoxo\":\"byowbblgyavutp\"},\"restoreHookReferences\":[{\"name\":\"ksbpimlqoljx\",\"namespace\":\"gxxlxsffgcvizq\"},{\"name\":\"wlvwlyoupf\",\"namespace\":\"bkjubdyhgkfmins\"}]}") - .toObject(KubernetesClusterRestoreCriteria.class); - Assertions.assertEquals(false, model.includeClusterScopeResources()); - Assertions.assertEquals("nrwrbiork", model.includedNamespaces().get(0)); - Assertions.assertEquals("ndieuzaofj", model.excludedNamespaces().get(0)); - Assertions.assertEquals("cyyysfgdot", model.includedResourceTypes().get(0)); - Assertions.assertEquals("iipuipwoqonm", model.excludedResourceTypes().get(0)); - Assertions.assertEquals("zshq", model.labelSelectors().get(0)); - Assertions - .assertEquals(PersistentVolumeRestoreMode.RESTORE_WITH_VOLUME_DATA, model.persistentVolumeRestoreMode()); - Assertions.assertEquals(ExistingResourcePolicy.SKIP, model.conflictPolicy()); - Assertions.assertEquals("fgmblrrilbywdxsm", model.namespaceMappings().get("ccwr")); - Assertions.assertEquals("ksbpimlqoljx", model.restoreHookReferences().get(0).name()); - Assertions.assertEquals("gxxlxsffgcvizq", model.restoreHookReferences().get(0).namespace()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KubernetesClusterRestoreCriteria model = - new KubernetesClusterRestoreCriteria() - .withIncludeClusterScopeResources(false) - .withIncludedNamespaces(Arrays.asList("nrwrbiork", "alywjhhgdn", "xmsivfomiloxggdu")) - .withExcludedNamespaces(Arrays.asList("ndieuzaofj")) - .withIncludedResourceTypes(Arrays.asList("cyyysfgdot")) - .withExcludedResourceTypes(Arrays.asList("iipuipwoqonm", "cje")) - .withLabelSelectors(Arrays.asList("zshq")) - .withPersistentVolumeRestoreMode(PersistentVolumeRestoreMode.RESTORE_WITH_VOLUME_DATA) - .withConflictPolicy(ExistingResourcePolicy.SKIP) - .withNamespaceMappings( - mapOf("ccwr", "fgmblrrilbywdxsm", "dvoqyt", "fscjfnynszquji", "hjoxo", "byowbblgyavutp")) - .withRestoreHookReferences( - Arrays - .asList( - new NamespacedNameResource().withName("ksbpimlqoljx").withNamespace("gxxlxsffgcvizq"), - new NamespacedNameResource().withName("wlvwlyoupf").withNamespace("bkjubdyhgkfmins"))); - model = BinaryData.fromObject(model).toObject(KubernetesClusterRestoreCriteria.class); - Assertions.assertEquals(false, model.includeClusterScopeResources()); - Assertions.assertEquals("nrwrbiork", model.includedNamespaces().get(0)); - Assertions.assertEquals("ndieuzaofj", model.excludedNamespaces().get(0)); - Assertions.assertEquals("cyyysfgdot", model.includedResourceTypes().get(0)); - Assertions.assertEquals("iipuipwoqonm", model.excludedResourceTypes().get(0)); - Assertions.assertEquals("zshq", model.labelSelectors().get(0)); - Assertions - .assertEquals(PersistentVolumeRestoreMode.RESTORE_WITH_VOLUME_DATA, model.persistentVolumeRestoreMode()); - Assertions.assertEquals(ExistingResourcePolicy.SKIP, model.conflictPolicy()); - Assertions.assertEquals("fgmblrrilbywdxsm", model.namespaceMappings().get("ccwr")); - Assertions.assertEquals("ksbpimlqoljx", model.restoreHookReferences().get(0).name()); - Assertions.assertEquals("gxxlxsffgcvizq", model.restoreHookReferences().get(0).namespace()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesPVRestoreCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesPVRestoreCriteriaTests.java deleted file mode 100644 index d5f251911b98..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesPVRestoreCriteriaTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.KubernetesPVRestoreCriteria; -import org.junit.jupiter.api.Assertions; - -public final class KubernetesPVRestoreCriteriaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KubernetesPVRestoreCriteria model = - BinaryData - .fromString( - "{\"objectType\":\"KubernetesPVRestoreCriteria\",\"name\":\"hw\",\"storageClassName\":\"oldweyuqdu\"}") - .toObject(KubernetesPVRestoreCriteria.class); - Assertions.assertEquals("hw", model.name()); - Assertions.assertEquals("oldweyuqdu", model.storageClassName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KubernetesPVRestoreCriteria model = - new KubernetesPVRestoreCriteria().withName("hw").withStorageClassName("oldweyuqdu"); - model = BinaryData.fromObject(model).toObject(KubernetesPVRestoreCriteria.class); - Assertions.assertEquals("hw", model.name()); - Assertions.assertEquals("oldweyuqdu", model.storageClassName()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesStorageClassRestoreCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesStorageClassRestoreCriteriaTests.java deleted file mode 100644 index 37601c4e419c..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesStorageClassRestoreCriteriaTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.KubernetesStorageClassRestoreCriteria; -import org.junit.jupiter.api.Assertions; - -public final class KubernetesStorageClassRestoreCriteriaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KubernetesStorageClassRestoreCriteria model = - BinaryData - .fromString( - "{\"objectType\":\"KubernetesStorageClassRestoreCriteria\",\"selectedStorageClassName\":\"wbqpl\",\"provisioner\":\"vnuuepzl\"}") - .toObject(KubernetesStorageClassRestoreCriteria.class); - Assertions.assertEquals("wbqpl", model.selectedStorageClassName()); - Assertions.assertEquals("vnuuepzl", model.provisioner()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KubernetesStorageClassRestoreCriteria model = - new KubernetesStorageClassRestoreCriteria() - .withSelectedStorageClassName("wbqpl") - .withProvisioner("vnuuepzl"); - model = BinaryData.fromObject(model).toObject(KubernetesStorageClassRestoreCriteria.class); - Assertions.assertEquals("wbqpl", model.selectedStorageClassName()); - Assertions.assertEquals("vnuuepzl", model.provisioner()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/MonitoringSettingsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/MonitoringSettingsTests.java deleted file mode 100644 index 07e1f288ecaa..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/MonitoringSettingsTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AlertsState; -import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings; -import com.azure.resourcemanager.dataprotection.models.MonitoringSettings; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringSettings model = - BinaryData - .fromString("{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Enabled\"}}") - .toObject(MonitoringSettings.class); - Assertions.assertEquals(AlertsState.ENABLED, model.azureMonitorAlertSettings().alertsForAllJobFailures()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringSettings model = - new MonitoringSettings() - .withAzureMonitorAlertSettings( - new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED)); - model = BinaryData.fromObject(model).toObject(MonitoringSettings.class); - Assertions.assertEquals(AlertsState.ENABLED, model.azureMonitorAlertSettings().alertsForAllJobFailures()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/NamespacedNameResourceTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/NamespacedNameResourceTests.java deleted file mode 100644 index 779991e053bb..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/NamespacedNameResourceTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.NamespacedNameResource; -import org.junit.jupiter.api.Assertions; - -public final class NamespacedNameResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NamespacedNameResource model = - BinaryData.fromString("{\"name\":\"wncot\",\"namespace\":\"fhir\"}").toObject(NamespacedNameResource.class); - Assertions.assertEquals("wncot", model.name()); - Assertions.assertEquals("fhir", model.namespace()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NamespacedNameResource model = new NamespacedNameResource().withName("wncot").withNamespace("fhir"); - model = BinaryData.fromObject(model).toObject(NamespacedNameResource.class); - Assertions.assertEquals("wncot", model.name()); - Assertions.assertEquals("fhir", model.namespace()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationExtendedInfoTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationExtendedInfoTests.java deleted file mode 100644 index 26cf31748f4b..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationExtendedInfoTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.OperationExtendedInfo; - -public final class OperationExtendedInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationExtendedInfo model = - BinaryData.fromString("{\"objectType\":\"OperationExtendedInfo\"}").toObject(OperationExtendedInfo.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationExtendedInfo model = new OperationExtendedInfo(); - model = BinaryData.fromObject(model).toObject(OperationExtendedInfo.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationJobExtendedInfoInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationJobExtendedInfoInnerTests.java deleted file mode 100644 index ff52f8577deb..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationJobExtendedInfoInnerTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner; -import org.junit.jupiter.api.Assertions; - -public final class OperationJobExtendedInfoInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationJobExtendedInfoInner model = - BinaryData - .fromString("{\"objectType\":\"OperationJobExtendedInfo\",\"jobId\":\"obnbdxkqpxokaj\"}") - .toObject(OperationJobExtendedInfoInner.class); - Assertions.assertEquals("obnbdxkqpxokaj", model.jobId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationJobExtendedInfoInner model = new OperationJobExtendedInfoInner().withJobId("obnbdxkqpxokaj"); - model = BinaryData.fromObject(model).toObject(OperationJobExtendedInfoInner.class); - Assertions.assertEquals("obnbdxkqpxokaj", model.jobId()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationResourceInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationResourceInnerTests.java deleted file mode 100644 index 25b309ee2508..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationResourceInnerTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner; -import com.azure.resourcemanager.dataprotection.models.OperationExtendedInfo; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class OperationResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationResourceInner model = - BinaryData - .fromString( - "{\"endTime\":\"2021-02-09T00:09:24Z\",\"id\":\"mexgstxgcp\",\"name\":\"gmaajrm\",\"properties\":{\"objectType\":\"OperationExtendedInfo\"},\"startTime\":\"2021-05-16T07:57:55Z\",\"status\":\"rlovmclwhijcoej\"}") - .toObject(OperationResourceInner.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-09T00:09:24Z"), model.endTime()); - Assertions.assertEquals("mexgstxgcp", model.id()); - Assertions.assertEquals("gmaajrm", model.name()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-16T07:57:55Z"), model.startTime()); - Assertions.assertEquals("rlovmclwhijcoej", model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationResourceInner model = - new OperationResourceInner() - .withEndTime(OffsetDateTime.parse("2021-02-09T00:09:24Z")) - .withId("mexgstxgcp") - .withName("gmaajrm") - .withProperties(new OperationExtendedInfo()) - .withStartTime(OffsetDateTime.parse("2021-05-16T07:57:55Z")) - .withStatus("rlovmclwhijcoej"); - model = BinaryData.fromObject(model).toObject(OperationResourceInner.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-09T00:09:24Z"), model.endTime()); - Assertions.assertEquals("mexgstxgcp", model.id()); - Assertions.assertEquals("gmaajrm", model.name()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-16T07:57:55Z"), model.startTime()); - Assertions.assertEquals("rlovmclwhijcoej", model.status()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationResultsGetWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationResultsGetWithResponseMockTests.java deleted file mode 100644 index 2227b1ac2f74..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationResultsGetWithResponseMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationResultsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"objectType\":\"OperationJobExtendedInfo\",\"jobId\":\"itgvkx\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OperationJobExtendedInfo response = - manager.operationResults().getWithResponse("qfr", "qlkzme", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("itgvkx", response.jobId()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextsGetWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextsGetWithResponseMockTests.java deleted file mode 100644 index 415ee0402d1c..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextsGetWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.OperationResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationStatusBackupVaultContextsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"endTime\":\"2021-08-06T17:28:28Z\",\"id\":\"mocwa\",\"name\":\"qgatjeaahhvjhhn\",\"properties\":{\"objectType\":\"OperationExtendedInfo\"},\"startTime\":\"2021-02-08T20:51:05Z\",\"status\":\"bjjidjksyxky\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OperationResource response = - manager - .operationStatusBackupVaultContexts() - .getWithResponse("guxak", "sqzhzbezkg", "msidxasicddyvv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(OffsetDateTime.parse("2021-08-06T17:28:28Z"), response.endTime()); - Assertions.assertEquals("mocwa", response.id()); - Assertions.assertEquals("qgatjeaahhvjhhn", response.name()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T20:51:05Z"), response.startTime()); - Assertions.assertEquals("bjjidjksyxky", response.status()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetWithResponseMockTests.java deleted file mode 100644 index c8148d164ba3..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.OperationResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationStatusGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"endTime\":\"2021-03-27T07:28:32Z\",\"id\":\"hlwigdivbkbxg\",\"name\":\"fajuwas\",\"properties\":{\"objectType\":\"OperationExtendedInfo\"},\"startTime\":\"2021-01-09T03:36:37Z\",\"status\":\"y\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OperationResource response = - manager - .operationStatus() - .getWithResponse("zyqdrfegcealzx", "hcans", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(OffsetDateTime.parse("2021-03-27T07:28:32Z"), response.endTime()); - Assertions.assertEquals("hlwigdivbkbxg", response.id()); - Assertions.assertEquals("fajuwas", response.name()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-09T03:36:37Z"), response.startTime()); - Assertions.assertEquals("y", response.status()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextsGetByResourceGroupWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index a8b6a87175ee..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.OperationResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationStatusResourceGroupContextsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"endTime\":\"2021-06-09T05:24:22Z\",\"id\":\"ulxunsmjbnkpp\",\"name\":\"nenlsvxeizzg\",\"properties\":{\"objectType\":\"OperationExtendedInfo\"},\"startTime\":\"2021-09-02T06:11:57Z\",\"status\":\"rmffeyc\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OperationResource response = - manager - .operationStatusResourceGroupContexts() - .getByResourceGroupWithResponse("vxevblb", "ednljl", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T05:24:22Z"), response.endTime()); - Assertions.assertEquals("ulxunsmjbnkpp", response.id()); - Assertions.assertEquals("nenlsvxeizzg", response.name()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-02T06:11:57Z"), response.startTime()); - Assertions.assertEquals("rmffeyc", response.status()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchBackupVaultInputTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchBackupVaultInputTests.java deleted file mode 100644 index 2e84e6e76ff9..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchBackupVaultInputTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AlertsState; -import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState; -import com.azure.resourcemanager.dataprotection.models.FeatureSettings; -import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings; -import com.azure.resourcemanager.dataprotection.models.ImmutabilityState; -import com.azure.resourcemanager.dataprotection.models.MonitoringSettings; -import com.azure.resourcemanager.dataprotection.models.PatchBackupVaultInput; -import com.azure.resourcemanager.dataprotection.models.SecuritySettings; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteState; -import org.junit.jupiter.api.Assertions; - -public final class PatchBackupVaultInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PatchBackupVaultInput model = - BinaryData - .fromString( - "{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Enabled\"}},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"Off\",\"retentionDurationInDays\":59.897839624628624},\"immutabilitySettings\":{\"state\":\"Unlocked\"}},\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"Enabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Enabled\"}}}") - .toObject(PatchBackupVaultInput.class); - Assertions - .assertEquals( - AlertsState.ENABLED, model.monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures()); - Assertions.assertEquals(SoftDeleteState.OFF, model.securitySettings().softDeleteSettings().state()); - Assertions - .assertEquals(59.897839624628624D, model.securitySettings().softDeleteSettings().retentionDurationInDays()); - Assertions.assertEquals(ImmutabilityState.UNLOCKED, model.securitySettings().immutabilitySettings().state()); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.ENABLED, - model.featureSettings().crossSubscriptionRestoreSettings().state()); - Assertions - .assertEquals( - CrossRegionRestoreState.ENABLED, model.featureSettings().crossRegionRestoreSettings().state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PatchBackupVaultInput model = - new PatchBackupVaultInput() - .withMonitoringSettings( - new MonitoringSettings() - .withAzureMonitorAlertSettings( - new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED))) - .withSecuritySettings( - new SecuritySettings() - .withSoftDeleteSettings( - new SoftDeleteSettings() - .withState(SoftDeleteState.OFF) - .withRetentionDurationInDays(59.897839624628624D)) - .withImmutabilitySettings(new ImmutabilitySettings().withState(ImmutabilityState.UNLOCKED))) - .withFeatureSettings( - new FeatureSettings() - .withCrossSubscriptionRestoreSettings( - new CrossSubscriptionRestoreSettings().withState(CrossSubscriptionRestoreState.ENABLED)) - .withCrossRegionRestoreSettings( - new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED))); - model = BinaryData.fromObject(model).toObject(PatchBackupVaultInput.class); - Assertions - .assertEquals( - AlertsState.ENABLED, model.monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures()); - Assertions.assertEquals(SoftDeleteState.OFF, model.securitySettings().softDeleteSettings().state()); - Assertions - .assertEquals(59.897839624628624D, model.securitySettings().softDeleteSettings().retentionDurationInDays()); - Assertions.assertEquals(ImmutabilityState.UNLOCKED, model.securitySettings().immutabilitySettings().state()); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.ENABLED, - model.featureSettings().crossSubscriptionRestoreSettings().state()); - Assertions - .assertEquals( - CrossRegionRestoreState.ENABLED, model.featureSettings().crossRegionRestoreSettings().state()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchResourceGuardInputTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchResourceGuardInputTests.java deleted file mode 100644 index c08cd1be18e7..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchResourceGuardInputTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.PatchResourceGuardInput; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PatchResourceGuardInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PatchResourceGuardInput model = - BinaryData - .fromString("{\"tags\":{\"mrv\":\"kdwbwhkszz\",\"owtlmnguxawqald\":\"xztvbtqgsfraoyzk\"}}") - .toObject(PatchResourceGuardInput.class); - Assertions.assertEquals("kdwbwhkszz", model.tags().get("mrv")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PatchResourceGuardInput model = - new PatchResourceGuardInput().withTags(mapOf("mrv", "kdwbwhkszz", "owtlmnguxawqald", "xztvbtqgsfraoyzk")); - model = BinaryData.fromObject(model).toObject(PatchResourceGuardInput.class); - Assertions.assertEquals("kdwbwhkszz", model.tags().get("mrv")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchResourceRequestInputTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchResourceRequestInputTests.java deleted file mode 100644 index e550e3baaf05..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchResourceRequestInputTests.java +++ /dev/null @@ -1,139 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AlertsState; -import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings; -import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings; -import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState; -import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails; -import com.azure.resourcemanager.dataprotection.models.FeatureSettings; -import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings; -import com.azure.resourcemanager.dataprotection.models.ImmutabilityState; -import com.azure.resourcemanager.dataprotection.models.MonitoringSettings; -import com.azure.resourcemanager.dataprotection.models.PatchBackupVaultInput; -import com.azure.resourcemanager.dataprotection.models.PatchResourceRequestInput; -import com.azure.resourcemanager.dataprotection.models.SecuritySettings; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteState; -import com.azure.resourcemanager.dataprotection.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PatchResourceRequestInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PatchResourceRequestInput model = - BinaryData - .fromString( - "{\"identity\":{\"principalId\":\"zaqsqsycbkbfk\",\"tenantId\":\"kdkexxp\",\"type\":\"fmxa\",\"userAssignedIdentities\":{\"gddtocj\":{\"principalId\":\"147cb136-2a60-4b06-a131-c36478985f49\",\"clientId\":\"bad0465d-c493-4571-acf2-db91e0a6d8d9\"},\"vpmouexhdzxib\":{\"principalId\":\"fa798c48-b47c-46a7-a1cb-6be53b13431e\",\"clientId\":\"d11aa6fb-e394-4b1c-8aa2-0364c6a070a1\"},\"jnxqbzvddntwn\":{\"principalId\":\"c138d274-8916-453f-bdd1-b0e35693f694\",\"clientId\":\"44478ebc-2907-4142-8991-3d0946f358ba\"},\"cbtwnpzaoqvuh\":{\"principalId\":\"1deba60b-57d2-4ea7-ab29-55811c0a2e0b\",\"clientId\":\"d02b3ab6-928d-4e8b-a8a0-cfe564603bd4\"}}},\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Disabled\"}},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"AlwaysOn\",\"retentionDurationInDays\":51.7805556269055},\"immutabilitySettings\":{\"state\":\"Disabled\"}},\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"Enabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Disabled\"}}},\"tags\":{\"wqvhkhixuigdt\":\"mqc\",\"hm\":\"pbobjo\"}}") - .toObject(PatchResourceRequestInput.class); - Assertions.assertEquals("fmxa", model.identity().type()); - Assertions - .assertEquals( - AlertsState.DISABLED, - model.properties().monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures()); - Assertions - .assertEquals( - SoftDeleteState.ALWAYS_ON, model.properties().securitySettings().softDeleteSettings().state()); - Assertions - .assertEquals( - 51.7805556269055D, - model.properties().securitySettings().softDeleteSettings().retentionDurationInDays()); - Assertions - .assertEquals( - ImmutabilityState.DISABLED, model.properties().securitySettings().immutabilitySettings().state()); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.ENABLED, - model.properties().featureSettings().crossSubscriptionRestoreSettings().state()); - Assertions - .assertEquals( - CrossRegionRestoreState.DISABLED, - model.properties().featureSettings().crossRegionRestoreSettings().state()); - Assertions.assertEquals("mqc", model.tags().get("wqvhkhixuigdt")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PatchResourceRequestInput model = - new PatchResourceRequestInput() - .withIdentity( - new DppIdentityDetails() - .withType("fmxa") - .withUserAssignedIdentities( - mapOf( - "gddtocj", - new UserAssignedIdentity(), - "vpmouexhdzxib", - new UserAssignedIdentity(), - "jnxqbzvddntwn", - new UserAssignedIdentity(), - "cbtwnpzaoqvuh", - new UserAssignedIdentity()))) - .withProperties( - new PatchBackupVaultInput() - .withMonitoringSettings( - new MonitoringSettings() - .withAzureMonitorAlertSettings( - new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.DISABLED))) - .withSecuritySettings( - new SecuritySettings() - .withSoftDeleteSettings( - new SoftDeleteSettings() - .withState(SoftDeleteState.ALWAYS_ON) - .withRetentionDurationInDays(51.7805556269055D)) - .withImmutabilitySettings( - new ImmutabilitySettings().withState(ImmutabilityState.DISABLED))) - .withFeatureSettings( - new FeatureSettings() - .withCrossSubscriptionRestoreSettings( - new CrossSubscriptionRestoreSettings() - .withState(CrossSubscriptionRestoreState.ENABLED)) - .withCrossRegionRestoreSettings( - new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.DISABLED)))) - .withTags(mapOf("wqvhkhixuigdt", "mqc", "hm", "pbobjo")); - model = BinaryData.fromObject(model).toObject(PatchResourceRequestInput.class); - Assertions.assertEquals("fmxa", model.identity().type()); - Assertions - .assertEquals( - AlertsState.DISABLED, - model.properties().monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures()); - Assertions - .assertEquals( - SoftDeleteState.ALWAYS_ON, model.properties().securitySettings().softDeleteSettings().state()); - Assertions - .assertEquals( - 51.7805556269055D, - model.properties().securitySettings().softDeleteSettings().retentionDurationInDays()); - Assertions - .assertEquals( - ImmutabilityState.DISABLED, model.properties().securitySettings().immutabilitySettings().state()); - Assertions - .assertEquals( - CrossSubscriptionRestoreState.ENABLED, - model.properties().featureSettings().crossSubscriptionRestoreSettings().state()); - Assertions - .assertEquals( - CrossRegionRestoreState.DISABLED, - model.properties().featureSettings().crossRegionRestoreSettings().state()); - Assertions.assertEquals("mqc", model.tags().get("wqvhkhixuigdt")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PolicyInfoTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PolicyInfoTests.java deleted file mode 100644 index be42496ac6fc..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PolicyInfoTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.BackupDatasourceParameters; -import com.azure.resourcemanager.dataprotection.models.DataStoreParameters; -import com.azure.resourcemanager.dataprotection.models.DataStoreTypes; -import com.azure.resourcemanager.dataprotection.models.PolicyInfo; -import com.azure.resourcemanager.dataprotection.models.PolicyParameters; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PolicyInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PolicyInfo model = - BinaryData - .fromString( - "{\"policyId\":\"jn\",\"policyVersion\":\"ckhsmtxpsieb\",\"policyParameters\":{\"dataStoreParametersList\":[{\"objectType\":\"DataStoreParameters\",\"dataStoreType\":\"ArchiveStore\"},{\"objectType\":\"DataStoreParameters\",\"dataStoreType\":\"OperationalStore\"},{\"objectType\":\"DataStoreParameters\",\"dataStoreType\":\"VaultStore\"},{\"objectType\":\"DataStoreParameters\",\"dataStoreType\":\"OperationalStore\"}],\"backupDatasourceParametersList\":[{\"objectType\":\"BackupDatasourceParameters\"},{\"objectType\":\"BackupDatasourceParameters\"},{\"objectType\":\"BackupDatasourceParameters\"}]}}") - .toObject(PolicyInfo.class); - Assertions.assertEquals("jn", model.policyId()); - Assertions - .assertEquals( - DataStoreTypes.ARCHIVE_STORE, - model.policyParameters().dataStoreParametersList().get(0).dataStoreType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PolicyInfo model = - new PolicyInfo() - .withPolicyId("jn") - .withPolicyParameters( - new PolicyParameters() - .withDataStoreParametersList( - Arrays - .asList( - new DataStoreParameters().withDataStoreType(DataStoreTypes.ARCHIVE_STORE), - new DataStoreParameters().withDataStoreType(DataStoreTypes.OPERATIONAL_STORE), - new DataStoreParameters().withDataStoreType(DataStoreTypes.VAULT_STORE), - new DataStoreParameters().withDataStoreType(DataStoreTypes.OPERATIONAL_STORE))) - .withBackupDatasourceParametersList( - Arrays - .asList( - new BackupDatasourceParameters(), - new BackupDatasourceParameters(), - new BackupDatasourceParameters()))); - model = BinaryData.fromObject(model).toObject(PolicyInfo.class); - Assertions.assertEquals("jn", model.policyId()); - Assertions - .assertEquals( - DataStoreTypes.ARCHIVE_STORE, - model.policyParameters().dataStoreParametersList().get(0).dataStoreType()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PolicyParametersTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PolicyParametersTests.java deleted file mode 100644 index bed1219787d3..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PolicyParametersTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.BackupDatasourceParameters; -import com.azure.resourcemanager.dataprotection.models.DataStoreParameters; -import com.azure.resourcemanager.dataprotection.models.DataStoreTypes; -import com.azure.resourcemanager.dataprotection.models.PolicyParameters; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PolicyParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PolicyParameters model = - BinaryData - .fromString( - "{\"dataStoreParametersList\":[{\"objectType\":\"DataStoreParameters\",\"dataStoreType\":\"OperationalStore\"},{\"objectType\":\"DataStoreParameters\",\"dataStoreType\":\"OperationalStore\"},{\"objectType\":\"DataStoreParameters\",\"dataStoreType\":\"VaultStore\"},{\"objectType\":\"DataStoreParameters\",\"dataStoreType\":\"VaultStore\"}],\"backupDatasourceParametersList\":[{\"objectType\":\"BackupDatasourceParameters\"},{\"objectType\":\"BackupDatasourceParameters\"},{\"objectType\":\"BackupDatasourceParameters\"}]}") - .toObject(PolicyParameters.class); - Assertions - .assertEquals(DataStoreTypes.OPERATIONAL_STORE, model.dataStoreParametersList().get(0).dataStoreType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PolicyParameters model = - new PolicyParameters() - .withDataStoreParametersList( - Arrays - .asList( - new DataStoreParameters().withDataStoreType(DataStoreTypes.OPERATIONAL_STORE), - new DataStoreParameters().withDataStoreType(DataStoreTypes.OPERATIONAL_STORE), - new DataStoreParameters().withDataStoreType(DataStoreTypes.VAULT_STORE), - new DataStoreParameters().withDataStoreType(DataStoreTypes.VAULT_STORE))) - .withBackupDatasourceParametersList( - Arrays - .asList( - new BackupDatasourceParameters(), - new BackupDatasourceParameters(), - new BackupDatasourceParameters())); - model = BinaryData.fromObject(model).toObject(PolicyParameters.class); - Assertions - .assertEquals(DataStoreTypes.OPERATIONAL_STORE, model.dataStoreParametersList().get(0).dataStoreType()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RangeBasedItemLevelRestoreCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RangeBasedItemLevelRestoreCriteriaTests.java deleted file mode 100644 index 779f440a4208..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RangeBasedItemLevelRestoreCriteriaTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.RangeBasedItemLevelRestoreCriteria; -import org.junit.jupiter.api.Assertions; - -public final class RangeBasedItemLevelRestoreCriteriaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RangeBasedItemLevelRestoreCriteria model = - BinaryData - .fromString( - "{\"objectType\":\"RangeBasedItemLevelRestoreCriteria\",\"minMatchingValue\":\"jcrxgibbdaxcon\",\"maxMatchingValue\":\"zauorsuk\"}") - .toObject(RangeBasedItemLevelRestoreCriteria.class); - Assertions.assertEquals("jcrxgibbdaxcon", model.minMatchingValue()); - Assertions.assertEquals("zauorsuk", model.maxMatchingValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RangeBasedItemLevelRestoreCriteria model = - new RangeBasedItemLevelRestoreCriteria() - .withMinMatchingValue("jcrxgibbdaxcon") - .withMaxMatchingValue("zauorsuk"); - model = BinaryData.fromObject(model).toObject(RangeBasedItemLevelRestoreCriteria.class); - Assertions.assertEquals("jcrxgibbdaxcon", model.minMatchingValue()); - Assertions.assertEquals("zauorsuk", model.maxMatchingValue()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointDataStoreDetailsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointDataStoreDetailsTests.java deleted file mode 100644 index 2d2e276465d9..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointDataStoreDetailsTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.RecoveryPointDataStoreDetails; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class RecoveryPointDataStoreDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoveryPointDataStoreDetails model = - BinaryData - .fromString( - "{\"creationTime\":\"2021-10-02T02:42:21Z\",\"expiryTime\":\"2021-09-17T13:51:22Z\",\"id\":\"llqwjygvjayvblmh\",\"metaData\":\"zuhbxvvyhgsopb\",\"state\":\"qufegxuvwzfbn\",\"type\":\"mctlpdngitv\",\"visible\":true,\"rehydrationExpiryTime\":\"2021-02-28T20:17:33Z\",\"rehydrationStatus\":\"DELETE_IN_PROGRESS\"}") - .toObject(RecoveryPointDataStoreDetails.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-02T02:42:21Z"), model.creationTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-17T13:51:22Z"), model.expiryTime()); - Assertions.assertEquals("llqwjygvjayvblmh", model.id()); - Assertions.assertEquals("zuhbxvvyhgsopb", model.metadata()); - Assertions.assertEquals("qufegxuvwzfbn", model.state()); - Assertions.assertEquals("mctlpdngitv", model.type()); - Assertions.assertEquals(true, model.visible()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPointDataStoreDetails model = - new RecoveryPointDataStoreDetails() - .withCreationTime(OffsetDateTime.parse("2021-10-02T02:42:21Z")) - .withExpiryTime(OffsetDateTime.parse("2021-09-17T13:51:22Z")) - .withId("llqwjygvjayvblmh") - .withMetadata("zuhbxvvyhgsopb") - .withState("qufegxuvwzfbn") - .withType("mctlpdngitv") - .withVisible(true); - model = BinaryData.fromObject(model).toObject(RecoveryPointDataStoreDetails.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-02T02:42:21Z"), model.creationTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-17T13:51:22Z"), model.expiryTime()); - Assertions.assertEquals("llqwjygvjayvblmh", model.id()); - Assertions.assertEquals("zuhbxvvyhgsopb", model.metadata()); - Assertions.assertEquals("qufegxuvwzfbn", model.state()); - Assertions.assertEquals("mctlpdngitv", model.type()); - Assertions.assertEquals(true, model.visible()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsGetWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsGetWithResponseMockTests.java deleted file mode 100644 index 7b2303b22eec..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsGetWithResponseMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// 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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class RecoveryPointsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"objectType\":\"AzureBackupRecoveryPoint\"},\"id\":\"xfe\",\"name\":\"zjkjexfdeqv\",\"type\":\"psylkkshkbffmbmx\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AzureBackupRecoveryPointResource response = - manager - .recoveryPoints() - .getWithResponse( - "fwyfwlwxjwet", "psihcla", "zvaylptrsqqw", "tcmwqkchc", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsListMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsListMockTests.java deleted file mode 100644 index 917133391b6b..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsListMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class RecoveryPointsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"objectType\":\"AzureBackupRecoveryPoint\"},\"id\":\"wbuqn\",\"name\":\"ophzfylsgcrp\",\"type\":\"bcunezzceze\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .recoveryPoints() - .list("tkvnlvxbcuiiznkt", "f", "nsnvpd", "bmikost", "z", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardOperationDetailTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardOperationDetailTests.java deleted file mode 100644 index 82c82354e4d3..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardOperationDetailTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardOperationDetail; -import org.junit.jupiter.api.Assertions; - -public final class ResourceGuardOperationDetailTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceGuardOperationDetail model = - BinaryData - .fromString("{\"vaultCriticalOperation\":\"irgzp\",\"defaultResourceRequest\":\"lazszrn\"}") - .toObject(ResourceGuardOperationDetail.class); - Assertions.assertEquals("irgzp", model.vaultCriticalOperation()); - Assertions.assertEquals("lazszrn", model.defaultResourceRequest()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceGuardOperationDetail model = - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("irgzp") - .withDefaultResourceRequest("lazszrn"); - model = BinaryData.fromObject(model).toObject(ResourceGuardOperationDetail.class); - Assertions.assertEquals("irgzp", model.vaultCriticalOperation()); - Assertions.assertEquals("lazszrn", model.defaultResourceRequest()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardOperationTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardOperationTests.java deleted file mode 100644 index eb935cebc143..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardOperationTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardOperation; - -public final class ResourceGuardOperationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceGuardOperation model = - BinaryData - .fromString("{\"vaultCriticalOperation\":\"p\",\"requestResourceType\":\"oamciodh\"}") - .toObject(ResourceGuardOperation.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceGuardOperation model = new ResourceGuardOperation(); - model = BinaryData.fromObject(model).toObject(ResourceGuardOperation.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardProxyBaseResourceInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardProxyBaseResourceInnerTests.java deleted file mode 100644 index 02324dfdabcc..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardProxyBaseResourceInnerTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardProxyBaseResourceInner; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardOperationDetail; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceGuardProxyBaseResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceGuardProxyBaseResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"resourceGuardResourceId\":\"pvkvpbjxbk\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"dvncjabudurgk\",\"defaultResourceRequest\":\"mokzhjjklf\"},{\"vaultCriticalOperation\":\"mouwqlgzrfzeey\",\"defaultResourceRequest\":\"izikayuhq\"}],\"lastUpdatedTime\":\"jbsybbqw\",\"description\":\"t\"},\"id\":\"gmfpgvmp\",\"name\":\"paslthaqfxssmwu\",\"type\":\"wbdsr\"}") - .toObject(ResourceGuardProxyBaseResourceInner.class); - Assertions.assertEquals("pvkvpbjxbk", model.properties().resourceGuardResourceId()); - Assertions - .assertEquals( - "dvncjabudurgk", model.properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions - .assertEquals( - "mokzhjjklf", model.properties().resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("jbsybbqw", model.properties().lastUpdatedTime()); - Assertions.assertEquals("t", model.properties().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceGuardProxyBaseResourceInner model = - new ResourceGuardProxyBaseResourceInner() - .withProperties( - new ResourceGuardProxyBase() - .withResourceGuardResourceId("pvkvpbjxbk") - .withResourceGuardOperationDetails( - Arrays - .asList( - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("dvncjabudurgk") - .withDefaultResourceRequest("mokzhjjklf"), - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("mouwqlgzrfzeey") - .withDefaultResourceRequest("izikayuhq"))) - .withLastUpdatedTime("jbsybbqw") - .withDescription("t")); - model = BinaryData.fromObject(model).toObject(ResourceGuardProxyBaseResourceInner.class); - Assertions.assertEquals("pvkvpbjxbk", model.properties().resourceGuardResourceId()); - Assertions - .assertEquals( - "dvncjabudurgk", model.properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions - .assertEquals( - "mokzhjjklf", model.properties().resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("jbsybbqw", model.properties().lastUpdatedTime()); - Assertions.assertEquals("t", model.properties().description()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardProxyBaseResourceListTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardProxyBaseResourceListTests.java deleted file mode 100644 index 551528509104..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardProxyBaseResourceListTests.java +++ /dev/null @@ -1,113 +0,0 @@ -// 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.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardProxyBaseResourceInner; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardOperationDetail; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBaseResourceList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceGuardProxyBaseResourceListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceGuardProxyBaseResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"resourceGuardResourceId\":\"aenuuz\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"minrfdw\",\"defaultResourceRequest\":\"uhhziuiefozbhdm\"},{\"vaultCriticalOperation\":\"l\",\"defaultResourceRequest\":\"qhoftrmaequiah\"}],\"lastUpdatedTime\":\"cslfaoqzpiyylha\",\"description\":\"swhccsphk\"},\"id\":\"vwitqscyw\",\"name\":\"ggwoluhczb\",\"type\":\"emh\"},{\"properties\":{\"resourceGuardResourceId\":\"sbrgz\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"weyp\",\"defaultResourceRequest\":\"dxggicccnxqhuexm\"},{\"vaultCriticalOperation\":\"tlstvlzywem\",\"defaultResourceRequest\":\"rncsdtclu\"},{\"vaultCriticalOperation\":\"ypbsfgytguslfead\",\"defaultResourceRequest\":\"gq\"},{\"vaultCriticalOperation\":\"yhejhzisxgfp\",\"defaultResourceRequest\":\"olppvksrpqvujz\"}],\"lastUpdatedTime\":\"ehtwdwrft\",\"description\":\"iby\"},\"id\":\"dl\",\"name\":\"h\",\"type\":\"hfwpracstwit\"},{\"properties\":{\"resourceGuardResourceId\":\"evxccedcp\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"odn\",\"defaultResourceRequest\":\"xltjcvnhltiu\"},{\"vaultCriticalOperation\":\"xnavvwxq\",\"defaultResourceRequest\":\"y\"},{\"vaultCriticalOperation\":\"nyowxwlmdjrkvfg\",\"defaultResourceRequest\":\"fvpdbo\"}],\"lastUpdatedTime\":\"cizsjqlhkrribdei\",\"description\":\"ipqkghvxndzwm\"},\"id\":\"efajpj\",\"name\":\"rwkq\",\"type\":\"yhgbijtjivfx\"}],\"nextLink\":\"jabibsystawf\"}") - .toObject(ResourceGuardProxyBaseResourceList.class); - Assertions.assertEquals("jabibsystawf", model.nextLink()); - Assertions.assertEquals("aenuuz", model.value().get(0).properties().resourceGuardResourceId()); - Assertions - .assertEquals( - "minrfdw", - model.value().get(0).properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions - .assertEquals( - "uhhziuiefozbhdm", - model.value().get(0).properties().resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("cslfaoqzpiyylha", model.value().get(0).properties().lastUpdatedTime()); - Assertions.assertEquals("swhccsphk", model.value().get(0).properties().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceGuardProxyBaseResourceList model = - new ResourceGuardProxyBaseResourceList() - .withNextLink("jabibsystawf") - .withValue( - Arrays - .asList( - new ResourceGuardProxyBaseResourceInner() - .withProperties( - new ResourceGuardProxyBase() - .withResourceGuardResourceId("aenuuz") - .withResourceGuardOperationDetails( - Arrays - .asList( - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("minrfdw") - .withDefaultResourceRequest("uhhziuiefozbhdm"), - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("l") - .withDefaultResourceRequest("qhoftrmaequiah"))) - .withLastUpdatedTime("cslfaoqzpiyylha") - .withDescription("swhccsphk")), - new ResourceGuardProxyBaseResourceInner() - .withProperties( - new ResourceGuardProxyBase() - .withResourceGuardResourceId("sbrgz") - .withResourceGuardOperationDetails( - Arrays - .asList( - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("weyp") - .withDefaultResourceRequest("dxggicccnxqhuexm"), - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("tlstvlzywem") - .withDefaultResourceRequest("rncsdtclu"), - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("ypbsfgytguslfead") - .withDefaultResourceRequest("gq"), - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("yhejhzisxgfp") - .withDefaultResourceRequest("olppvksrpqvujz"))) - .withLastUpdatedTime("ehtwdwrft") - .withDescription("iby")), - new ResourceGuardProxyBaseResourceInner() - .withProperties( - new ResourceGuardProxyBase() - .withResourceGuardResourceId("evxccedcp") - .withResourceGuardOperationDetails( - Arrays - .asList( - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("odn") - .withDefaultResourceRequest("xltjcvnhltiu"), - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("xnavvwxq") - .withDefaultResourceRequest("y"), - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("nyowxwlmdjrkvfg") - .withDefaultResourceRequest("fvpdbo"))) - .withLastUpdatedTime("cizsjqlhkrribdei") - .withDescription("ipqkghvxndzwm")))); - model = BinaryData.fromObject(model).toObject(ResourceGuardProxyBaseResourceList.class); - Assertions.assertEquals("jabibsystawf", model.nextLink()); - Assertions.assertEquals("aenuuz", model.value().get(0).properties().resourceGuardResourceId()); - Assertions - .assertEquals( - "minrfdw", - model.value().get(0).properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions - .assertEquals( - "uhhziuiefozbhdm", - model.value().get(0).properties().resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("cslfaoqzpiyylha", model.value().get(0).properties().lastUpdatedTime()); - Assertions.assertEquals("swhccsphk", model.value().get(0).properties().description()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardProxyBaseTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardProxyBaseTests.java deleted file mode 100644 index 0e9c10aa016a..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardProxyBaseTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardOperationDetail; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceGuardProxyBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceGuardProxyBase model = - BinaryData - .fromString( - "{\"resourceGuardResourceId\":\"pdrhne\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"q\",\"defaultResourceRequest\":\"wyt\"},{\"vaultCriticalOperation\":\"ib\",\"defaultResourceRequest\":\"cgpik\"},{\"vaultCriticalOperation\":\"imejzanl\",\"defaultResourceRequest\":\"xi\"}],\"lastUpdatedTime\":\"rmbzo\",\"description\":\"kixrj\"}") - .toObject(ResourceGuardProxyBase.class); - Assertions.assertEquals("pdrhne", model.resourceGuardResourceId()); - Assertions.assertEquals("q", model.resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions.assertEquals("wyt", model.resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("rmbzo", model.lastUpdatedTime()); - Assertions.assertEquals("kixrj", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceGuardProxyBase model = - new ResourceGuardProxyBase() - .withResourceGuardResourceId("pdrhne") - .withResourceGuardOperationDetails( - Arrays - .asList( - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("q") - .withDefaultResourceRequest("wyt"), - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("ib") - .withDefaultResourceRequest("cgpik"), - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("imejzanl") - .withDefaultResourceRequest("xi"))) - .withLastUpdatedTime("rmbzo") - .withDescription("kixrj"); - model = BinaryData.fromObject(model).toObject(ResourceGuardProxyBase.class); - Assertions.assertEquals("pdrhne", model.resourceGuardResourceId()); - Assertions.assertEquals("q", model.resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions.assertEquals("wyt", model.resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("rmbzo", model.lastUpdatedTime()); - Assertions.assertEquals("kixrj", model.description()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardResourceInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardResourceInnerTests.java deleted file mode 100644 index f6d986fa15c0..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardResourceInnerTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardResourceInner; -import com.azure.resourcemanager.dataprotection.models.ResourceGuard; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourceGuardResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceGuardResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Unknown\",\"allowAutoApprovals\":false,\"resourceGuardOperations\":[{\"vaultCriticalOperation\":\"qztpp\",\"requestResourceType\":\"o\"},{\"vaultCriticalOperation\":\"or\",\"requestResourceType\":\"lt\"},{\"vaultCriticalOperation\":\"mncwsobqwcsdb\",\"requestResourceType\":\"dcfhucqdpf\"}],\"vaultCriticalOperationExclusionList\":[\"lsbjjcanvxbv\",\"vudutncor\"],\"description\":\"lxqtvcofudfl\"},\"eTag\":\"gj\",\"location\":\"gdknnqv\",\"tags\":{\"yc\":\"nqntorudsgsahm\",\"u\":\"rauwjuetaebu\"},\"id\":\"dmovsm\",\"name\":\"l\",\"type\":\"wabm\"}") - .toObject(ResourceGuardResourceInner.class); - Assertions.assertEquals("gdknnqv", model.location()); - Assertions.assertEquals("nqntorudsgsahm", model.tags().get("yc")); - Assertions.assertEquals("gj", model.etag()); - Assertions.assertEquals("lsbjjcanvxbv", model.properties().vaultCriticalOperationExclusionList().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceGuardResourceInner model = - new ResourceGuardResourceInner() - .withLocation("gdknnqv") - .withTags(mapOf("yc", "nqntorudsgsahm", "u", "rauwjuetaebu")) - .withEtag("gj") - .withProperties( - new ResourceGuard() - .withVaultCriticalOperationExclusionList(Arrays.asList("lsbjjcanvxbv", "vudutncor"))); - model = BinaryData.fromObject(model).toObject(ResourceGuardResourceInner.class); - Assertions.assertEquals("gdknnqv", model.location()); - Assertions.assertEquals("nqntorudsgsahm", model.tags().get("yc")); - Assertions.assertEquals("gj", model.etag()); - Assertions.assertEquals("lsbjjcanvxbv", model.properties().vaultCriticalOperationExclusionList().get(0)); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardResourceListTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardResourceListTests.java deleted file mode 100644 index 6cd426664508..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardResourceListTests.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardResourceInner; -import com.azure.resourcemanager.dataprotection.models.ResourceGuard; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardResourceList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourceGuardResourceListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceGuardResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"allowAutoApprovals\":false,\"resourceGuardOperations\":[{\"vaultCriticalOperation\":\"qqu\",\"requestResourceType\":\"ik\"},{\"vaultCriticalOperation\":\"ggxkallatmelwuip\",\"requestResourceType\":\"cjzkzivgvvcna\"},{\"vaultCriticalOperation\":\"hyrnxxmu\",\"requestResourceType\":\"dndrdvstkwqqtche\"}],\"vaultCriticalOperationExclusionList\":[\"fmtdaaygdvwvgp\",\"ohgwxrtfudxepxg\",\"qagvrvm\"],\"description\":\"k\"},\"eTag\":\"ghimdblx\",\"location\":\"imfnjhfjx\",\"tags\":{\"foqreyfkzik\":\"zk\",\"wczelpci\":\"jawneaiv\",\"abfatkl\":\"elsfeaen\"},\"id\":\"dxbjhwuaanozj\",\"name\":\"sphyoulpjrvxa\",\"type\":\"l\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"allowAutoApprovals\":true,\"resourceGuardOperations\":[{\"vaultCriticalOperation\":\"tx\",\"requestResourceType\":\"cskfcktqumiekk\"},{\"vaultCriticalOperation\":\"zikhl\",\"requestResourceType\":\"jhdgqggebdunyga\"},{\"vaultCriticalOperation\":\"idb\",\"requestResourceType\":\"atpxl\"},{\"vaultCriticalOperation\":\"xcyjmoadsuvarmy\",\"requestResourceType\":\"mjsjqb\"}],\"vaultCriticalOperationExclusionList\":[\"yxxrwlycoduh\",\"kxkgymareqna\",\"xqugjhkycubedd\",\"ssofwqmzqa\"],\"description\":\"rmnjijpx\"},\"eTag\":\"q\",\"location\":\"dfnbyxbaaabjyv\",\"tags\":{\"nevfdnw\":\"fimrzrtuzqogse\",\"euzsoi\":\"wmewzsyy\",\"thzvaytdwkqbrqu\":\"judpfrxt\",\"xiilivpdtiirqt\":\"paxh\"},\"id\":\"qoaxoruzfgs\",\"name\":\"uyfxrxxleptramxj\",\"type\":\"zwl\"},{\"properties\":{\"provisioningState\":\"Unknown\",\"allowAutoApprovals\":false,\"resourceGuardOperations\":[{\"vaultCriticalOperation\":\"y\",\"requestResourceType\":\"patdooaojkniodko\"},{\"vaultCriticalOperation\":\"bw\",\"requestResourceType\":\"jhemms\"},{\"vaultCriticalOperation\":\"dkcrodt\",\"requestResourceType\":\"nfwjlfltkacjvefk\"}],\"vaultCriticalOperationExclusionList\":[\"oakggkfpag\",\"owpulpq\"],\"description\":\"ylsyxkqjnsje\"},\"eTag\":\"tiagx\",\"location\":\"sz\",\"tags\":{\"icvi\":\"psbzkfzbeyvpn\",\"jjxd\":\"v\",\"ztzp\":\"rbuukzclewyhmlwp\"},\"id\":\"fn\",\"name\":\"ckw\",\"type\":\"fz\"}],\"nextLink\":\"hxx\"}") - .toObject(ResourceGuardResourceList.class); - Assertions.assertEquals("hxx", model.nextLink()); - Assertions.assertEquals("imfnjhfjx", model.value().get(0).location()); - Assertions.assertEquals("zk", model.value().get(0).tags().get("foqreyfkzik")); - Assertions.assertEquals("ghimdblx", model.value().get(0).etag()); - Assertions - .assertEquals( - "fmtdaaygdvwvgp", model.value().get(0).properties().vaultCriticalOperationExclusionList().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceGuardResourceList model = - new ResourceGuardResourceList() - .withNextLink("hxx") - .withValue( - Arrays - .asList( - new ResourceGuardResourceInner() - .withLocation("imfnjhfjx") - .withTags(mapOf("foqreyfkzik", "zk", "wczelpci", "jawneaiv", "abfatkl", "elsfeaen")) - .withEtag("ghimdblx") - .withProperties( - new ResourceGuard() - .withVaultCriticalOperationExclusionList( - Arrays.asList("fmtdaaygdvwvgp", "ohgwxrtfudxepxg", "qagvrvm"))), - new ResourceGuardResourceInner() - .withLocation("dfnbyxbaaabjyv") - .withTags( - mapOf( - "nevfdnw", - "fimrzrtuzqogse", - "euzsoi", - "wmewzsyy", - "thzvaytdwkqbrqu", - "judpfrxt", - "xiilivpdtiirqt", - "paxh")) - .withEtag("q") - .withProperties( - new ResourceGuard() - .withVaultCriticalOperationExclusionList( - Arrays - .asList( - "yxxrwlycoduh", "kxkgymareqna", "xqugjhkycubedd", "ssofwqmzqa"))), - new ResourceGuardResourceInner() - .withLocation("sz") - .withTags(mapOf("icvi", "psbzkfzbeyvpn", "jjxd", "v", "ztzp", "rbuukzclewyhmlwp")) - .withEtag("tiagx") - .withProperties( - new ResourceGuard() - .withVaultCriticalOperationExclusionList( - Arrays.asList("oakggkfpag", "owpulpq"))))); - model = BinaryData.fromObject(model).toObject(ResourceGuardResourceList.class); - Assertions.assertEquals("hxx", model.nextLink()); - Assertions.assertEquals("imfnjhfjx", model.value().get(0).location()); - Assertions.assertEquals("zk", model.value().get(0).tags().get("foqreyfkzik")); - Assertions.assertEquals("ghimdblx", model.value().get(0).etag()); - Assertions - .assertEquals( - "fmtdaaygdvwvgp", model.value().get(0).properties().vaultCriticalOperationExclusionList().get(0)); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardTests.java deleted file mode 100644 index 054342345bf5..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.ResourceGuard; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceGuardTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceGuard model = - BinaryData - .fromString( - "{\"provisioningState\":\"Failed\",\"allowAutoApprovals\":false,\"resourceGuardOperations\":[{\"vaultCriticalOperation\":\"vtpuqujmqlgk\",\"requestResourceType\":\"tndoaongbjc\"},{\"vaultCriticalOperation\":\"ujitcjedftww\",\"requestResourceType\":\"zkoj\"}],\"vaultCriticalOperationExclusionList\":[\"pzfoqoui\"],\"description\":\"bxarzgszufoxci\"}") - .toObject(ResourceGuard.class); - Assertions.assertEquals("pzfoqoui", model.vaultCriticalOperationExclusionList().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceGuard model = new ResourceGuard().withVaultCriticalOperationExclusionList(Arrays.asList("pzfoqoui")); - model = BinaryData.fromObject(model).toObject(ResourceGuard.class); - Assertions.assertEquals("pzfoqoui", model.vaultCriticalOperationExclusionList().get(0)); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsDeleteByResourceGroupWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsDeleteByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 2fe58720eb12..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .resourceGuards() - .deleteByResourceGroupWithResponse("xu", "cbuewmrswnjlxuz", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetBackupSecurityPinRequestsObjectsMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetBackupSecurityPinRequestsObjectsMockTests.java deleted file mode 100644 index 6dfe1ea650b6..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetBackupSecurityPinRequestsObjectsMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.DppBaseResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsGetBackupSecurityPinRequestsObjectsMockTests { - @Test - public void testGetBackupSecurityPinRequestsObjects() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"id\":\"d\",\"name\":\"gueiookjbsahrtdt\",\"type\":\"elqacslmot\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .resourceGuards() - .getBackupSecurityPinRequestsObjects("mlbnseq", "cjjvpilguooqja", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetByResourceGroupWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 60100c7c0608..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Provisioning\",\"allowAutoApprovals\":true,\"resourceGuardOperations\":[{\"vaultCriticalOperation\":\"jpllndnpdwrpq\",\"requestResourceType\":\"gfugsnnfhyet\"}],\"vaultCriticalOperationExclusionList\":[\"pococtfjgt\",\"xrjvzuyturmlm\",\"owolbaui\",\"opionszon\"],\"description\":\"ngajinnixjawrtmj\"},\"eTag\":\"myccx\",\"location\":\"hcoxov\",\"tags\":{\"tjxtxr\":\"henlusfnr\",\"jvidttge\":\"cq\"},\"id\":\"uslvyjtcvuwkasi\",\"name\":\"iesfuug\",\"type\":\"tuqfecjxeygtu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ResourceGuardResource response = - manager - .resourceGuards() - .getByResourceGroupWithResponse("kauxof", "hfphwpnulaiywze", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hcoxov", response.location()); - Assertions.assertEquals("henlusfnr", response.tags().get("tjxtxr")); - Assertions.assertEquals("myccx", response.etag()); - Assertions.assertEquals("pococtfjgt", response.properties().vaultCriticalOperationExclusionList().get(0)); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectWithResponseMockTests.java deleted file mode 100644 index 1f2f50c2849d..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.DppBaseResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectWithResponseMockTests { - @Test - public void testGetDefaultBackupSecurityPinRequestsObjectWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"id\":\"yrneizjcpeo\",\"name\":\"hnmgbroux\",\"type\":\"bhfhpfpazjzoy\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DppBaseResource response = - manager - .resourceGuards() - .getDefaultBackupSecurityPinRequestsObjectWithResponse( - "alhhjnhgwydyynfs", "khgb", "qtanarfdlpuk", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectWithResponseMockTests.java deleted file mode 100644 index e85337e2a157..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.DppBaseResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectWithResponseMockTests { - @Test - public void testGetDefaultDeleteProtectedItemRequestsObjectWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"id\":\"wbsreur\",\"name\":\"kfuarenlv\",\"type\":\"tklnvnafvvkyfed\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DppBaseResource response = - manager - .resourceGuards() - .getDefaultDeleteProtectedItemRequestsObjectWithResponse( - "jxhpdulontacn", "qwtehtuevr", "rljyoogwxhnsdu", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectWithResponseMockTests.java deleted file mode 100644 index 90e801c373e4..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.DppBaseResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectWithResponseMockTests { - @Test - public void testGetDefaultDeleteResourceGuardProxyRequestsObjectWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"id\":\"lgmtrwahzjmucf\",\"name\":\"yrplrohkpigqfus\",\"type\":\"kzmkwklsnoxaxmqe\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DppBaseResource response = - manager - .resourceGuards() - .getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse( - "uuuybnchrsziz", "yuel", "etndnbfqyggagf", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectWithResponseMockTests.java deleted file mode 100644 index a6d1a33d0203..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.DppBaseResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectWithResponseMockTests { - @Test - public void testGetDefaultDisableSoftDeleteRequestsObjectWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"id\":\"serxht\",\"name\":\"oxhlw\",\"type\":\"sjgqrsxyp\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DppBaseResource response = - manager - .resourceGuards() - .getDefaultDisableSoftDeleteRequestsObjectWithResponse( - "guaucmfdjwnla", "punj", "ikczvvitacgxmf", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectWithResponseMockTests.java deleted file mode 100644 index 3ce846bd8a57..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.DppBaseResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectWithResponseMockTests { - @Test - public void testGetDefaultUpdateProtectedItemRequestsObjectWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"id\":\"oxczytp\",\"name\":\"nwvroevytlyokrr\",\"type\":\"uuxvnsasbcry\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DppBaseResource response = - manager - .resourceGuards() - .getDefaultUpdateProtectedItemRequestsObjectWithResponse( - "qct", "xxdtddmflh", "ytxzvtznapxbanno", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectWithResponseMockTests.java deleted file mode 100644 index 0968e6ab4b12..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.DppBaseResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectWithResponseMockTests { - @Test - public void testGetDefaultUpdateProtectionPolicyRequestsObjectWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"id\":\"inqcymczngnbdxxe\",\"name\":\"ninvudbchaqdt\",\"type\":\"ec\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DppBaseResource response = - manager - .resourceGuards() - .getDefaultUpdateProtectionPolicyRequestsObjectWithResponse( - "v", "bo", "lcqxypokk", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteProtectedItemRequestsObjectsMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteProtectedItemRequestsObjectsMockTests.java deleted file mode 100644 index adc7fda34ddc..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteProtectedItemRequestsObjectsMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.DppBaseResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsGetDeleteProtectedItemRequestsObjectsMockTests { - @Test - public void testGetDeleteProtectedItemRequestsObjects() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"id\":\"irazftxejwabmd\",\"name\":\"tmvcop\",\"type\":\"c\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .resourceGuards() - .getDeleteProtectedItemRequestsObjects("ebnfxofvc", "k", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsMockTests.java deleted file mode 100644 index 1fe382cf860e..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.DppBaseResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsMockTests { - @Test - public void testGetDeleteResourceGuardProxyRequestsObjects() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"id\":\"tqhamzjrw\",\"name\":\"qzeqyjleziunjxdf\",\"type\":\"ntkwcegy\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .resourceGuards() - .getDeleteResourceGuardProxyRequestsObjects("dlfgtdysnaq", "flq", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDisableSoftDeleteRequestsObjectsMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDisableSoftDeleteRequestsObjectsMockTests.java deleted file mode 100644 index 4988618b225f..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDisableSoftDeleteRequestsObjectsMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.DppBaseResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsGetDisableSoftDeleteRequestsObjectsMockTests { - @Test - public void testGetDisableSoftDeleteRequestsObjects() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"id\":\"ohzjqatucoigeb\",\"name\":\"cnwfepbnwgfmxjg\",\"type\":\"bjb\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .resourceGuards() - .getDisableSoftDeleteRequestsObjects("hwpusxj", "aqehg", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectedItemRequestsObjectsMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectedItemRequestsObjectsMockTests.java deleted file mode 100644 index 8a0847e82031..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectedItemRequestsObjectsMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.DppBaseResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsGetUpdateProtectedItemRequestsObjectsMockTests { - @Test - public void testGetUpdateProtectedItemRequestsObjects() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"id\":\"fzyjqt\",\"name\":\"wkpqhjpenuygbq\",\"type\":\"qekewvnqvcd\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .resourceGuards() - .getUpdateProtectedItemRequestsObjects("sfikayiansharuj", "ji", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsMockTests.java deleted file mode 100644 index 09375f872e20..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.DppBaseResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsMockTests { - @Test - public void testGetUpdateProtectionPolicyRequestsObjects() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"id\":\"ktsysidfvclglxn\",\"name\":\"ijtk\",\"type\":\"sqo\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .resourceGuards() - .getUpdateProtectionPolicyRequestsObjects( - "jurbuhhlkyqltqsr", "gtuwkff", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListByResourceGroupMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListByResourceGroupMockTests.java deleted file mode 100644 index 8fec380b7311..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListByResourceGroupMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Unknown\",\"allowAutoApprovals\":false,\"resourceGuardOperations\":[{\"vaultCriticalOperation\":\"jfujq\",\"requestResourceType\":\"fcbahhp\"},{\"vaultCriticalOperation\":\"ofoiy\",\"requestResourceType\":\"p\"}],\"vaultCriticalOperationExclusionList\":[\"kmkkholvdnd\",\"iauogphuartv\",\"iukyefchnmna\",\"mnxhkxjqirwrweo\"],\"description\":\"ffifhx\"},\"eTag\":\"snewmozqvbub\",\"location\":\"amhsycxhxzgazt\",\"tags\":{\"dvmfqhppub\":\"o\"},\"id\":\"w\",\"name\":\"epdfgkmtdherng\",\"type\":\"tcjuahokqto\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.resourceGuards().listByResourceGroup("xoe", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("amhsycxhxzgazt", response.iterator().next().location()); - Assertions.assertEquals("o", response.iterator().next().tags().get("dvmfqhppub")); - Assertions.assertEquals("snewmozqvbub", response.iterator().next().etag()); - Assertions - .assertEquals( - "kmkkholvdnd", response.iterator().next().properties().vaultCriticalOperationExclusionList().get(0)); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListMockTests.java deleted file mode 100644 index 94f4a05ce7da..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Provisioning\",\"allowAutoApprovals\":true,\"resourceGuardOperations\":[{\"vaultCriticalOperation\":\"odth\",\"requestResourceType\":\"qgvriibakcla\"},{\"vaultCriticalOperation\":\"fr\",\"requestResourceType\":\"ousxauzlwvsgmw\"},{\"vaultCriticalOperation\":\"qf\",\"requestResourceType\":\"zvuxm\"},{\"vaultCriticalOperation\":\"jsvthnwpzteko\",\"requestResourceType\":\"ribi\"}],\"vaultCriticalOperationExclusionList\":[\"gplucfotangcfhny\",\"zcugswvxwlmzqw\",\"vtxnjmxmcuqud\"],\"description\":\"vclx\"},\"eTag\":\"pdkvg\",\"location\":\"buiyji\",\"tags\":{\"neiknpg\":\"phdu\",\"btozipqwje\":\"xgjiuqh\",\"xxgewpk\":\"mur\"},\"id\":\"vqylkmqpzoyhl\",\"name\":\"bcg\",\"type\":\"gcl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.resourceGuards().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("buiyji", response.iterator().next().location()); - Assertions.assertEquals("phdu", response.iterator().next().tags().get("neiknpg")); - Assertions.assertEquals("pdkvg", response.iterator().next().etag()); - Assertions - .assertEquals( - "gplucfotangcfhny", - response.iterator().next().properties().vaultCriticalOperationExclusionList().get(0)); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPutWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPutWithResponseMockTests.java deleted file mode 100644 index 3f9ae0389e67..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPutWithResponseMockTests.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.ResourceGuard; -import com.azure.resourcemanager.dataprotection.models.ResourceGuardResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardsPutWithResponseMockTests { - @Test - public void testPutWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Updating\",\"allowAutoApprovals\":true,\"resourceGuardOperations\":[{\"vaultCriticalOperation\":\"oy\",\"requestResourceType\":\"k\"},{\"vaultCriticalOperation\":\"aimmoiroqb\",\"requestResourceType\":\"hbragapyyr\"}],\"vaultCriticalOperationExclusionList\":[\"vbpavbopfppdbw\",\"upgahxkum\",\"sjcaacfdmmcpugm\",\"hqepvufhbzehewh\"],\"description\":\"hnl\"},\"eTag\":\"nbldxeaclgschori\",\"location\":\"rsrrmoucsofldp\",\"tags\":{\"uqibsxtkcu\":\"yfcaabeolhbhlvbm\"},\"id\":\"fbsfarfsiow\",\"name\":\"kjxnqpvwgfstmhq\",\"type\":\"kizmdksaoafclu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ResourceGuardResource response = - manager - .resourceGuards() - .define("izrxklob") - .withRegion("gxqbawpcb") - .withExistingResourceGroup("o") - .withTags(mapOf("napqo", "qcy", "wwgbdv", "yuicdhzbdy")) - .withEtag("dd") - .withProperties(new ResourceGuard().withVaultCriticalOperationExclusionList(Arrays.asList("pj"))) - .create(); - - Assertions.assertEquals("rsrrmoucsofldp", response.location()); - Assertions.assertEquals("yfcaabeolhbhlvbm", response.tags().get("uqibsxtkcu")); - Assertions.assertEquals("nbldxeaclgschori", response.etag()); - Assertions.assertEquals("vbpavbopfppdbw", response.properties().vaultCriticalOperationExclusionList().get(0)); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceMoveDetailsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceMoveDetailsTests.java deleted file mode 100644 index 54f289aeab16..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ResourceMoveDetailsTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.ResourceMoveDetails; -import org.junit.jupiter.api.Assertions; - -public final class ResourceMoveDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceMoveDetails model = - BinaryData - .fromString( - "{\"operationId\":\"b\",\"startTimeUtc\":\"tmut\",\"completionTimeUtc\":\"qktapspwgcuert\",\"sourceResourcePath\":\"kdosvqw\",\"targetResourcePath\":\"mdgbbjfdd\"}") - .toObject(ResourceMoveDetails.class); - Assertions.assertEquals("b", model.operationId()); - Assertions.assertEquals("tmut", model.startTimeUtc()); - Assertions.assertEquals("qktapspwgcuert", model.completionTimeUtc()); - Assertions.assertEquals("kdosvqw", model.sourceResourcePath()); - Assertions.assertEquals("mdgbbjfdd", model.targetResourcePath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceMoveDetails model = - new ResourceMoveDetails() - .withOperationId("b") - .withStartTimeUtc("tmut") - .withCompletionTimeUtc("qktapspwgcuert") - .withSourceResourcePath("kdosvqw") - .withTargetResourcePath("mdgbbjfdd"); - model = BinaryData.fromObject(model).toObject(ResourceMoveDetails.class); - Assertions.assertEquals("b", model.operationId()); - Assertions.assertEquals("tmut", model.startTimeUtc()); - Assertions.assertEquals("qktapspwgcuert", model.completionTimeUtc()); - Assertions.assertEquals("kdosvqw", model.sourceResourcePath()); - Assertions.assertEquals("mdgbbjfdd", model.targetResourcePath()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangeTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangeTests.java deleted file mode 100644 index b944d81d8d32..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangeTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.RestorableTimeRange; -import org.junit.jupiter.api.Assertions; - -public final class RestorableTimeRangeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RestorableTimeRange model = - BinaryData - .fromString("{\"startTime\":\"dxunkbebxmubyyn\",\"endTime\":\"wlrbqtkoievseo\",\"objectType\":\"q\"}") - .toObject(RestorableTimeRange.class); - Assertions.assertEquals("dxunkbebxmubyyn", model.startTime()); - Assertions.assertEquals("wlrbqtkoievseo", model.endTime()); - Assertions.assertEquals("q", model.objectType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RestorableTimeRange model = - new RestorableTimeRange() - .withStartTime("dxunkbebxmubyyn") - .withEndTime("wlrbqtkoievseo") - .withObjectType("q"); - model = BinaryData.fromObject(model).toObject(RestorableTimeRange.class); - Assertions.assertEquals("dxunkbebxmubyyn", model.startTime()); - Assertions.assertEquals("wlrbqtkoievseo", model.endTime()); - Assertions.assertEquals("q", model.objectType()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangesFindWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangesFindWithResponseMockTests.java deleted file mode 100644 index 1b35962be935..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangesFindWithResponseMockTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.dataprotection.DataProtectionManager; -import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest; -import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesResponseResource; -import com.azure.resourcemanager.dataprotection.models.RestoreSourceDataStoreType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class RestorableTimeRangesFindWithResponseMockTests { - @Test - public void testFindWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"restorableTimeRanges\":[{\"startTime\":\"ilrmcaykggnox\",\"endTime\":\"ztrksxwpndf\",\"objectType\":\"fnznth\"}],\"objectType\":\"wkjaos\"},\"id\":\"uzvoamktcqiosm\",\"name\":\"bzahgxqd\",\"type\":\"yrtltlaprltzkat\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataProtectionManager manager = - DataProtectionManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AzureBackupFindRestorableTimeRangesResponseResource response = - manager - .restorableTimeRanges() - .findWithResponse( - "ltsxoatf", - "g", - "pnpbswveflocc", - new AzureBackupFindRestorableTimeRangesRequest() - .withSourceDataStoreType(RestoreSourceDataStoreType.OPERATIONAL_STORE) - .withStartTime("ozihmipgawt") - .withEndTime("pkyjcxcjxgrytfm"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ilrmcaykggnox", response.properties().restorableTimeRanges().get(0).startTime()); - Assertions.assertEquals("ztrksxwpndf", response.properties().restorableTimeRanges().get(0).endTime()); - Assertions.assertEquals("fnznth", response.properties().restorableTimeRanges().get(0).objectType()); - Assertions.assertEquals("wkjaos", response.properties().objectType()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestoreFilesTargetInfoTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestoreFilesTargetInfoTests.java deleted file mode 100644 index 655495726301..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestoreFilesTargetInfoTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.RecoveryOption; -import com.azure.resourcemanager.dataprotection.models.RestoreFilesTargetInfo; -import com.azure.resourcemanager.dataprotection.models.RestoreTargetLocationType; -import com.azure.resourcemanager.dataprotection.models.TargetDetails; -import org.junit.jupiter.api.Assertions; - -public final class RestoreFilesTargetInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RestoreFilesTargetInfo model = - BinaryData - .fromString( - "{\"objectType\":\"RestoreFilesTargetInfo\",\"targetDetails\":{\"filePrefix\":\"owzfttsttkt\",\"restoreTargetLocationType\":\"Invalid\",\"url\":\"hbq\",\"targetResourceArmId\":\"tx\"},\"recoveryOption\":\"FailIfExists\",\"restoreLocation\":\"ukxit\"}") - .toObject(RestoreFilesTargetInfo.class); - Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.recoveryOption()); - Assertions.assertEquals("ukxit", model.restoreLocation()); - Assertions.assertEquals("owzfttsttkt", model.targetDetails().filePrefix()); - Assertions.assertEquals(RestoreTargetLocationType.INVALID, model.targetDetails().restoreTargetLocationType()); - Assertions.assertEquals("hbq", model.targetDetails().url()); - Assertions.assertEquals("tx", model.targetDetails().targetResourceArmId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RestoreFilesTargetInfo model = - new RestoreFilesTargetInfo() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("ukxit") - .withTargetDetails( - new TargetDetails() - .withFilePrefix("owzfttsttkt") - .withRestoreTargetLocationType(RestoreTargetLocationType.INVALID) - .withUrl("hbq") - .withTargetResourceArmId("tx")); - model = BinaryData.fromObject(model).toObject(RestoreFilesTargetInfo.class); - Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.recoveryOption()); - Assertions.assertEquals("ukxit", model.restoreLocation()); - Assertions.assertEquals("owzfttsttkt", model.targetDetails().filePrefix()); - Assertions.assertEquals(RestoreTargetLocationType.INVALID, model.targetDetails().restoreTargetLocationType()); - Assertions.assertEquals("hbq", model.targetDetails().url()); - Assertions.assertEquals("tx", model.targetDetails().targetResourceArmId()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestoreJobRecoveryPointDetailsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestoreJobRecoveryPointDetailsTests.java deleted file mode 100644 index aaf73321f12c..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestoreJobRecoveryPointDetailsTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.RestoreJobRecoveryPointDetails; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class RestoreJobRecoveryPointDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RestoreJobRecoveryPointDetails model = - BinaryData - .fromString("{\"recoveryPointID\":\"xb\",\"recoveryPointTime\":\"2021-08-16T05:09:52Z\"}") - .toObject(RestoreJobRecoveryPointDetails.class); - Assertions.assertEquals("xb", model.recoveryPointId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-16T05:09:52Z"), model.recoveryPointTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RestoreJobRecoveryPointDetails model = - new RestoreJobRecoveryPointDetails() - .withRecoveryPointId("xb") - .withRecoveryPointTime(OffsetDateTime.parse("2021-08-16T05:09:52Z")); - model = BinaryData.fromObject(model).toObject(RestoreJobRecoveryPointDetails.class); - Assertions.assertEquals("xb", model.recoveryPointId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-16T05:09:52Z"), model.recoveryPointTime()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestoreTargetInfoBaseTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestoreTargetInfoBaseTests.java deleted file mode 100644 index 4b61fb5cef77..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RestoreTargetInfoBaseTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.RecoveryOption; -import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfoBase; -import org.junit.jupiter.api.Assertions; - -public final class RestoreTargetInfoBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RestoreTargetInfoBase model = - BinaryData - .fromString( - "{\"objectType\":\"RestoreTargetInfoBase\",\"recoveryOption\":\"FailIfExists\",\"restoreLocation\":\"tzjuzgwyzmhtxo\"}") - .toObject(RestoreTargetInfoBase.class); - Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.recoveryOption()); - Assertions.assertEquals("tzjuzgwyzmhtxo", model.restoreLocation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RestoreTargetInfoBase model = - new RestoreTargetInfoBase() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("tzjuzgwyzmhtxo"); - model = BinaryData.fromObject(model).toObject(RestoreTargetInfoBase.class); - Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.recoveryOption()); - Assertions.assertEquals("tzjuzgwyzmhtxo", model.restoreLocation()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RetentionTagTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RetentionTagTests.java deleted file mode 100644 index ac126ede103b..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/RetentionTagTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.RetentionTag; -import org.junit.jupiter.api.Assertions; - -public final class RetentionTagTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RetentionTag model = - BinaryData - .fromString("{\"eTag\":\"kndxdigrjgu\",\"id\":\"zdmsyqtfi\",\"tagName\":\"whbotzingamv\"}") - .toObject(RetentionTag.class); - Assertions.assertEquals("whbotzingamv", model.tagName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RetentionTag model = new RetentionTag().withTagName("whbotzingamv"); - model = BinaryData.fromObject(model).toObject(RetentionTag.class); - Assertions.assertEquals("whbotzingamv", model.tagName()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ScheduleBasedBackupCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ScheduleBasedBackupCriteriaTests.java deleted file mode 100644 index cb0bbb33ebc3..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ScheduleBasedBackupCriteriaTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AbsoluteMarker; -import com.azure.resourcemanager.dataprotection.models.Day; -import com.azure.resourcemanager.dataprotection.models.DayOfWeek; -import com.azure.resourcemanager.dataprotection.models.Month; -import com.azure.resourcemanager.dataprotection.models.ScheduleBasedBackupCriteria; -import com.azure.resourcemanager.dataprotection.models.WeekNumber; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleBasedBackupCriteriaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleBasedBackupCriteria model = - BinaryData - .fromString( - "{\"objectType\":\"ScheduleBasedBackupCriteria\",\"absoluteCriteria\":[\"FirstOfYear\"],\"daysOfMonth\":[{\"date\":172770191,\"isLast\":true},{\"date\":863803765,\"isLast\":false},{\"date\":2107096986,\"isLast\":false}],\"daysOfTheWeek\":[\"Wednesday\",\"Wednesday\",\"Monday\",\"Tuesday\"],\"monthsOfYear\":[\"May\",\"June\"],\"scheduleTimes\":[\"2021-01-06T07:58:29Z\"],\"weeksOfTheMonth\":[\"Third\",\"Second\",\"First\"]}") - .toObject(ScheduleBasedBackupCriteria.class); - Assertions.assertEquals(AbsoluteMarker.FIRST_OF_YEAR, model.absoluteCriteria().get(0)); - Assertions.assertEquals(172770191, model.daysOfMonth().get(0).date()); - Assertions.assertEquals(true, model.daysOfMonth().get(0).isLast()); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.daysOfTheWeek().get(0)); - Assertions.assertEquals(Month.MAY, model.monthsOfYear().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-06T07:58:29Z"), model.scheduleTimes().get(0)); - Assertions.assertEquals(WeekNumber.THIRD, model.weeksOfTheMonth().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleBasedBackupCriteria model = - new ScheduleBasedBackupCriteria() - .withAbsoluteCriteria(Arrays.asList(AbsoluteMarker.FIRST_OF_YEAR)) - .withDaysOfMonth( - Arrays - .asList( - new Day().withDate(172770191).withIsLast(true), - new Day().withDate(863803765).withIsLast(false), - new Day().withDate(2107096986).withIsLast(false))) - .withDaysOfTheWeek( - Arrays.asList(DayOfWeek.WEDNESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.MONDAY, DayOfWeek.TUESDAY)) - .withMonthsOfYear(Arrays.asList(Month.MAY, Month.JUNE)) - .withScheduleTimes(Arrays.asList(OffsetDateTime.parse("2021-01-06T07:58:29Z"))) - .withWeeksOfTheMonth(Arrays.asList(WeekNumber.THIRD, WeekNumber.SECOND, WeekNumber.FIRST)); - model = BinaryData.fromObject(model).toObject(ScheduleBasedBackupCriteria.class); - Assertions.assertEquals(AbsoluteMarker.FIRST_OF_YEAR, model.absoluteCriteria().get(0)); - Assertions.assertEquals(172770191, model.daysOfMonth().get(0).date()); - Assertions.assertEquals(true, model.daysOfMonth().get(0).isLast()); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.daysOfTheWeek().get(0)); - Assertions.assertEquals(Month.MAY, model.monthsOfYear().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-06T07:58:29Z"), model.scheduleTimes().get(0)); - Assertions.assertEquals(WeekNumber.THIRD, model.weeksOfTheMonth().get(0)); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ScheduleBasedTriggerContextTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ScheduleBasedTriggerContextTests.java deleted file mode 100644 index c7f175a9c6c6..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ScheduleBasedTriggerContextTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.BackupCriteria; -import com.azure.resourcemanager.dataprotection.models.BackupSchedule; -import com.azure.resourcemanager.dataprotection.models.RetentionTag; -import com.azure.resourcemanager.dataprotection.models.ScheduleBasedTriggerContext; -import com.azure.resourcemanager.dataprotection.models.TaggingCriteria; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleBasedTriggerContextTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleBasedTriggerContext model = - BinaryData - .fromString( - "{\"objectType\":\"ScheduleBasedTriggerContext\",\"schedule\":{\"repeatingTimeIntervals\":[\"n\",\"ntfpmvmemfnc\",\"dwvvba\",\"xlllchp\"],\"timeZone\":\"bzevwrd\"},\"taggingCriteria\":[{\"criteria\":[{\"objectType\":\"BackupCriteria\"}],\"isDefault\":true,\"taggingPriority\":4132850753130690201,\"tagInfo\":{\"eTag\":\"jcswsmys\",\"id\":\"luqypfcvlerch\",\"tagName\":\"qbmfpjbabwidf\"}}]}") - .toObject(ScheduleBasedTriggerContext.class); - Assertions.assertEquals("n", model.schedule().repeatingTimeIntervals().get(0)); - Assertions.assertEquals("bzevwrd", model.schedule().timeZone()); - Assertions.assertEquals(true, model.taggingCriteria().get(0).isDefault()); - Assertions.assertEquals(4132850753130690201L, model.taggingCriteria().get(0).taggingPriority()); - Assertions.assertEquals("qbmfpjbabwidf", model.taggingCriteria().get(0).tagInfo().tagName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleBasedTriggerContext model = - new ScheduleBasedTriggerContext() - .withSchedule( - new BackupSchedule() - .withRepeatingTimeIntervals(Arrays.asList("n", "ntfpmvmemfnc", "dwvvba", "xlllchp")) - .withTimeZone("bzevwrd")) - .withTaggingCriteria( - Arrays - .asList( - new TaggingCriteria() - .withCriteria(Arrays.asList(new BackupCriteria())) - .withIsDefault(true) - .withTaggingPriority(4132850753130690201L) - .withTagInfo(new RetentionTag().withTagName("qbmfpjbabwidf")))); - model = BinaryData.fromObject(model).toObject(ScheduleBasedTriggerContext.class); - Assertions.assertEquals("n", model.schedule().repeatingTimeIntervals().get(0)); - Assertions.assertEquals("bzevwrd", model.schedule().timeZone()); - Assertions.assertEquals(true, model.taggingCriteria().get(0).isDefault()); - Assertions.assertEquals(4132850753130690201L, model.taggingCriteria().get(0).taggingPriority()); - Assertions.assertEquals("qbmfpjbabwidf", model.taggingCriteria().get(0).tagInfo().tagName()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SecuritySettingsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SecuritySettingsTests.java deleted file mode 100644 index db8dab36dafe..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SecuritySettingsTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings; -import com.azure.resourcemanager.dataprotection.models.ImmutabilityState; -import com.azure.resourcemanager.dataprotection.models.SecuritySettings; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteState; -import org.junit.jupiter.api.Assertions; - -public final class SecuritySettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SecuritySettings model = - BinaryData - .fromString( - "{\"softDeleteSettings\":{\"state\":\"On\",\"retentionDurationInDays\":10.065565442836222},\"immutabilitySettings\":{\"state\":\"Unlocked\"}}") - .toObject(SecuritySettings.class); - Assertions.assertEquals(SoftDeleteState.ON, model.softDeleteSettings().state()); - Assertions.assertEquals(10.065565442836222D, model.softDeleteSettings().retentionDurationInDays()); - Assertions.assertEquals(ImmutabilityState.UNLOCKED, model.immutabilitySettings().state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SecuritySettings model = - new SecuritySettings() - .withSoftDeleteSettings( - new SoftDeleteSettings() - .withState(SoftDeleteState.ON) - .withRetentionDurationInDays(10.065565442836222D)) - .withImmutabilitySettings(new ImmutabilitySettings().withState(ImmutabilityState.UNLOCKED)); - model = BinaryData.fromObject(model).toObject(SecuritySettings.class); - Assertions.assertEquals(SoftDeleteState.ON, model.softDeleteSettings().state()); - Assertions.assertEquals(10.065565442836222D, model.softDeleteSettings().retentionDurationInDays()); - Assertions.assertEquals(ImmutabilityState.UNLOCKED, model.immutabilitySettings().state()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SoftDeleteSettingsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SoftDeleteSettingsTests.java deleted file mode 100644 index bfacd6d0a336..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SoftDeleteSettingsTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings; -import com.azure.resourcemanager.dataprotection.models.SoftDeleteState; -import org.junit.jupiter.api.Assertions; - -public final class SoftDeleteSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SoftDeleteSettings model = - BinaryData - .fromString("{\"state\":\"Off\",\"retentionDurationInDays\":42.629804332769986}") - .toObject(SoftDeleteSettings.class); - Assertions.assertEquals(SoftDeleteState.OFF, model.state()); - Assertions.assertEquals(42.629804332769986D, model.retentionDurationInDays()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SoftDeleteSettings model = - new SoftDeleteSettings().withState(SoftDeleteState.OFF).withRetentionDurationInDays(42.629804332769986D); - model = BinaryData.fromObject(model).toObject(SoftDeleteSettings.class); - Assertions.assertEquals(SoftDeleteState.OFF, model.state()); - Assertions.assertEquals(42.629804332769986D, model.retentionDurationInDays()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SourceLifeCycleTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SourceLifeCycleTests.java deleted file mode 100644 index c5b1b2b1a675..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SourceLifeCycleTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.CopyOption; -import com.azure.resourcemanager.dataprotection.models.DataStoreInfoBase; -import com.azure.resourcemanager.dataprotection.models.DataStoreTypes; -import com.azure.resourcemanager.dataprotection.models.DeleteOption; -import com.azure.resourcemanager.dataprotection.models.SourceLifeCycle; -import com.azure.resourcemanager.dataprotection.models.TargetCopySetting; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SourceLifeCycleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SourceLifeCycle model = - BinaryData - .fromString( - "{\"deleteAfter\":{\"objectType\":\"DeleteOption\",\"duration\":\"zjxvydfcea\"},\"sourceDataStore\":{\"dataStoreType\":\"VaultStore\",\"objectType\":\"lhvygdyftu\"},\"targetDataStoreCopySettings\":[{\"copyAfter\":{\"objectType\":\"CopyOption\"},\"dataStore\":{\"dataStoreType\":\"ArchiveStore\",\"objectType\":\"nawjslbiwkojgcy\"}},{\"copyAfter\":{\"objectType\":\"CopyOption\"},\"dataStore\":{\"dataStoreType\":\"OperationalStore\",\"objectType\":\"sfmznbaeqphc\"}},{\"copyAfter\":{\"objectType\":\"CopyOption\"},\"dataStore\":{\"dataStoreType\":\"ArchiveStore\",\"objectType\":\"nrnrp\"}},{\"copyAfter\":{\"objectType\":\"CopyOption\"},\"dataStore\":{\"dataStoreType\":\"OperationalStore\",\"objectType\":\"huwrykqgaifm\"}}]}") - .toObject(SourceLifeCycle.class); - Assertions.assertEquals("zjxvydfcea", model.deleteAfter().duration()); - Assertions.assertEquals(DataStoreTypes.VAULT_STORE, model.sourceDataStore().dataStoreType()); - Assertions.assertEquals("lhvygdyftu", model.sourceDataStore().objectType()); - Assertions - .assertEquals( - DataStoreTypes.ARCHIVE_STORE, model.targetDataStoreCopySettings().get(0).dataStore().dataStoreType()); - Assertions.assertEquals("nawjslbiwkojgcy", model.targetDataStoreCopySettings().get(0).dataStore().objectType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SourceLifeCycle model = - new SourceLifeCycle() - .withDeleteAfter(new DeleteOption().withDuration("zjxvydfcea")) - .withSourceDataStore( - new DataStoreInfoBase().withDataStoreType(DataStoreTypes.VAULT_STORE).withObjectType("lhvygdyftu")) - .withTargetDataStoreCopySettings( - Arrays - .asList( - new TargetCopySetting() - .withCopyAfter(new CopyOption()) - .withDataStore( - new DataStoreInfoBase() - .withDataStoreType(DataStoreTypes.ARCHIVE_STORE) - .withObjectType("nawjslbiwkojgcy")), - new TargetCopySetting() - .withCopyAfter(new CopyOption()) - .withDataStore( - new DataStoreInfoBase() - .withDataStoreType(DataStoreTypes.OPERATIONAL_STORE) - .withObjectType("sfmznbaeqphc")), - new TargetCopySetting() - .withCopyAfter(new CopyOption()) - .withDataStore( - new DataStoreInfoBase() - .withDataStoreType(DataStoreTypes.ARCHIVE_STORE) - .withObjectType("nrnrp")), - new TargetCopySetting() - .withCopyAfter(new CopyOption()) - .withDataStore( - new DataStoreInfoBase() - .withDataStoreType(DataStoreTypes.OPERATIONAL_STORE) - .withObjectType("huwrykqgaifm")))); - model = BinaryData.fromObject(model).toObject(SourceLifeCycle.class); - Assertions.assertEquals("zjxvydfcea", model.deleteAfter().duration()); - Assertions.assertEquals(DataStoreTypes.VAULT_STORE, model.sourceDataStore().dataStoreType()); - Assertions.assertEquals("lhvygdyftu", model.sourceDataStore().objectType()); - Assertions - .assertEquals( - DataStoreTypes.ARCHIVE_STORE, model.targetDataStoreCopySettings().get(0).dataStore().dataStoreType()); - Assertions.assertEquals("nawjslbiwkojgcy", model.targetDataStoreCopySettings().get(0).dataStore().objectType()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/StorageSettingTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/StorageSettingTests.java deleted file mode 100644 index a30d8914857a..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/StorageSettingTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.StorageSetting; -import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes; -import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes; -import org.junit.jupiter.api.Assertions; - -public final class StorageSettingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageSetting model = - BinaryData - .fromString("{\"datastoreType\":\"ArchiveStore\",\"type\":\"LocallyRedundant\"}") - .toObject(StorageSetting.class); - Assertions.assertEquals(StorageSettingStoreTypes.ARCHIVE_STORE, model.datastoreType()); - Assertions.assertEquals(StorageSettingTypes.LOCALLY_REDUNDANT, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageSetting model = - new StorageSetting() - .withDatastoreType(StorageSettingStoreTypes.ARCHIVE_STORE) - .withType(StorageSettingTypes.LOCALLY_REDUNDANT); - model = BinaryData.fromObject(model).toObject(StorageSetting.class); - Assertions.assertEquals(StorageSettingStoreTypes.ARCHIVE_STORE, model.datastoreType()); - Assertions.assertEquals(StorageSettingTypes.LOCALLY_REDUNDANT, model.type()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SupportedFeatureTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SupportedFeatureTests.java deleted file mode 100644 index 8861d87c1c57..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SupportedFeatureTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.FeatureSupportStatus; -import com.azure.resourcemanager.dataprotection.models.SupportedFeature; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SupportedFeatureTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SupportedFeature model = - BinaryData - .fromString( - "{\"featureName\":\"hud\",\"supportStatus\":\"Invalid\",\"exposureControlledFeatures\":[\"kkqfqjbvle\",\"rfmluiqtq\",\"fa\"]}") - .toObject(SupportedFeature.class); - Assertions.assertEquals("hud", model.featureName()); - Assertions.assertEquals(FeatureSupportStatus.INVALID, model.supportStatus()); - Assertions.assertEquals("kkqfqjbvle", model.exposureControlledFeatures().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedFeature model = - new SupportedFeature() - .withFeatureName("hud") - .withSupportStatus(FeatureSupportStatus.INVALID) - .withExposureControlledFeatures(Arrays.asList("kkqfqjbvle", "rfmluiqtq", "fa")); - model = BinaryData.fromObject(model).toObject(SupportedFeature.class); - Assertions.assertEquals("hud", model.featureName()); - Assertions.assertEquals(FeatureSupportStatus.INVALID, model.supportStatus()); - Assertions.assertEquals("kkqfqjbvle", model.exposureControlledFeatures().get(0)); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SyncBackupInstanceRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SyncBackupInstanceRequestTests.java deleted file mode 100644 index 864c46b5746b..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/SyncBackupInstanceRequestTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest; -import com.azure.resourcemanager.dataprotection.models.SyncType; -import org.junit.jupiter.api.Assertions; - -public final class SyncBackupInstanceRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SyncBackupInstanceRequest model = - BinaryData.fromString("{\"syncType\":\"ForceResync\"}").toObject(SyncBackupInstanceRequest.class); - Assertions.assertEquals(SyncType.FORCE_RESYNC, model.syncType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SyncBackupInstanceRequest model = new SyncBackupInstanceRequest().withSyncType(SyncType.FORCE_RESYNC); - model = BinaryData.fromObject(model).toObject(SyncBackupInstanceRequest.class); - Assertions.assertEquals(SyncType.FORCE_RESYNC, model.syncType()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TaggingCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TaggingCriteriaTests.java deleted file mode 100644 index 42c9a9377bff..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TaggingCriteriaTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.BackupCriteria; -import com.azure.resourcemanager.dataprotection.models.RetentionTag; -import com.azure.resourcemanager.dataprotection.models.TaggingCriteria; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TaggingCriteriaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TaggingCriteria model = - BinaryData - .fromString( - "{\"criteria\":[{\"objectType\":\"BackupCriteria\"},{\"objectType\":\"BackupCriteria\"},{\"objectType\":\"BackupCriteria\"},{\"objectType\":\"BackupCriteria\"}],\"isDefault\":true,\"taggingPriority\":6457008666336224866,\"tagInfo\":{\"eTag\":\"nnoxyhkx\",\"id\":\"ddrihpf\",\"tagName\":\"oqcaaewdaomdj\"}}") - .toObject(TaggingCriteria.class); - Assertions.assertEquals(true, model.isDefault()); - Assertions.assertEquals(6457008666336224866L, model.taggingPriority()); - Assertions.assertEquals("oqcaaewdaomdj", model.tagInfo().tagName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TaggingCriteria model = - new TaggingCriteria() - .withCriteria( - Arrays - .asList(new BackupCriteria(), new BackupCriteria(), new BackupCriteria(), new BackupCriteria())) - .withIsDefault(true) - .withTaggingPriority(6457008666336224866L) - .withTagInfo(new RetentionTag().withTagName("oqcaaewdaomdj")); - model = BinaryData.fromObject(model).toObject(TaggingCriteria.class); - Assertions.assertEquals(true, model.isDefault()); - Assertions.assertEquals(6457008666336224866L, model.taggingPriority()); - Assertions.assertEquals("oqcaaewdaomdj", model.tagInfo().tagName()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TargetCopySettingTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TargetCopySettingTests.java deleted file mode 100644 index 159c9fc1a374..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TargetCopySettingTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.CopyOption; -import com.azure.resourcemanager.dataprotection.models.DataStoreInfoBase; -import com.azure.resourcemanager.dataprotection.models.DataStoreTypes; -import com.azure.resourcemanager.dataprotection.models.TargetCopySetting; -import org.junit.jupiter.api.Assertions; - -public final class TargetCopySettingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TargetCopySetting model = - BinaryData - .fromString( - "{\"copyAfter\":{\"objectType\":\"CopyOption\"},\"dataStore\":{\"dataStoreType\":\"VaultStore\",\"objectType\":\"klbydv\"}}") - .toObject(TargetCopySetting.class); - Assertions.assertEquals(DataStoreTypes.VAULT_STORE, model.dataStore().dataStoreType()); - Assertions.assertEquals("klbydv", model.dataStore().objectType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TargetCopySetting model = - new TargetCopySetting() - .withCopyAfter(new CopyOption()) - .withDataStore( - new DataStoreInfoBase().withDataStoreType(DataStoreTypes.VAULT_STORE).withObjectType("klbydv")); - model = BinaryData.fromObject(model).toObject(TargetCopySetting.class); - Assertions.assertEquals(DataStoreTypes.VAULT_STORE, model.dataStore().dataStoreType()); - Assertions.assertEquals("klbydv", model.dataStore().objectType()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TargetDetailsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TargetDetailsTests.java deleted file mode 100644 index 976ae4e83232..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TargetDetailsTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.RestoreTargetLocationType; -import com.azure.resourcemanager.dataprotection.models.TargetDetails; -import org.junit.jupiter.api.Assertions; - -public final class TargetDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TargetDetails model = - BinaryData - .fromString( - "{\"filePrefix\":\"m\",\"restoreTargetLocationType\":\"Invalid\",\"url\":\"gqqqxh\",\"targetResourceArmId\":\"xrxc\"}") - .toObject(TargetDetails.class); - Assertions.assertEquals("m", model.filePrefix()); - Assertions.assertEquals(RestoreTargetLocationType.INVALID, model.restoreTargetLocationType()); - Assertions.assertEquals("gqqqxh", model.url()); - Assertions.assertEquals("xrxc", model.targetResourceArmId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TargetDetails model = - new TargetDetails() - .withFilePrefix("m") - .withRestoreTargetLocationType(RestoreTargetLocationType.INVALID) - .withUrl("gqqqxh") - .withTargetResourceArmId("xrxc"); - model = BinaryData.fromObject(model).toObject(TargetDetails.class); - Assertions.assertEquals("m", model.filePrefix()); - Assertions.assertEquals(RestoreTargetLocationType.INVALID, model.restoreTargetLocationType()); - Assertions.assertEquals("gqqqxh", model.url()); - Assertions.assertEquals("xrxc", model.targetResourceArmId()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TriggerBackupRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TriggerBackupRequestTests.java deleted file mode 100644 index f63308c1ff78..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TriggerBackupRequestTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AdHocBackupRuleOptions; -import com.azure.resourcemanager.dataprotection.models.AdhocBackupTriggerOption; -import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest; -import org.junit.jupiter.api.Assertions; - -public final class TriggerBackupRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TriggerBackupRequest model = - BinaryData - .fromString( - "{\"backupRuleOptions\":{\"ruleName\":\"yudxytlmoy\",\"triggerOption\":{\"retentionTagOverride\":\"vwfudwpzntxhd\"}}}") - .toObject(TriggerBackupRequest.class); - Assertions.assertEquals("yudxytlmoy", model.backupRuleOptions().ruleName()); - Assertions.assertEquals("vwfudwpzntxhd", model.backupRuleOptions().triggerOption().retentionTagOverride()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TriggerBackupRequest model = - new TriggerBackupRequest() - .withBackupRuleOptions( - new AdHocBackupRuleOptions() - .withRuleName("yudxytlmoy") - .withTriggerOption(new AdhocBackupTriggerOption().withRetentionTagOverride("vwfudwpzntxhd"))); - model = BinaryData.fromObject(model).toObject(TriggerBackupRequest.class); - Assertions.assertEquals("yudxytlmoy", model.backupRuleOptions().ruleName()); - Assertions.assertEquals("vwfudwpzntxhd", model.backupRuleOptions().triggerOption().retentionTagOverride()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TriggerContextTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TriggerContextTests.java deleted file mode 100644 index 2d202d93df9b..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/TriggerContextTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.TriggerContext; - -public final class TriggerContextTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TriggerContext model = - BinaryData.fromString("{\"objectType\":\"TriggerContext\"}").toObject(TriggerContext.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TriggerContext model = new TriggerContext(); - model = BinaryData.fromObject(model).toObject(TriggerContext.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/UnlockDeleteRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/UnlockDeleteRequestTests.java deleted file mode 100644 index a9d9780b7725..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/UnlockDeleteRequestTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.UnlockDeleteRequest; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UnlockDeleteRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UnlockDeleteRequest model = - BinaryData - .fromString( - "{\"resourceGuardOperationRequests\":[\"indfpwpjyl\"],\"resourceToBeDeleted\":\"tlhflsjcdhszf\"}") - .toObject(UnlockDeleteRequest.class); - Assertions.assertEquals("indfpwpjyl", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("tlhflsjcdhszf", model.resourceToBeDeleted()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UnlockDeleteRequest model = - new UnlockDeleteRequest() - .withResourceGuardOperationRequests(Arrays.asList("indfpwpjyl")) - .withResourceToBeDeleted("tlhflsjcdhszf"); - model = BinaryData.fromObject(model).toObject(UnlockDeleteRequest.class); - Assertions.assertEquals("indfpwpjyl", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("tlhflsjcdhszf", model.resourceToBeDeleted()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/UnlockDeleteResponseInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/UnlockDeleteResponseInnerTests.java deleted file mode 100644 index ac55b098dc1d..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/UnlockDeleteResponseInnerTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.fluent.models.UnlockDeleteResponseInner; -import org.junit.jupiter.api.Assertions; - -public final class UnlockDeleteResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UnlockDeleteResponseInner model = - BinaryData - .fromString("{\"unlockDeleteExpiryTime\":\"fbgofeljagrqmqh\"}") - .toObject(UnlockDeleteResponseInner.class); - Assertions.assertEquals("fbgofeljagrqmqh", model.unlockDeleteExpiryTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UnlockDeleteResponseInner model = new UnlockDeleteResponseInner().withUnlockDeleteExpiryTime("fbgofeljagrqmqh"); - model = BinaryData.fromObject(model).toObject(UnlockDeleteResponseInner.class); - Assertions.assertEquals("fbgofeljagrqmqh", model.unlockDeleteExpiryTime()); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/UserAssignedIdentityTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/UserAssignedIdentityTests.java deleted file mode 100644 index 536734e5f7af..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"0f77df81-3598-4121-a9b6-6b58402a7da1\",\"clientId\":\"0585da7c-c357-4cc6-97d0-5b5dbcf725df\"}") - .toObject(UserAssignedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ValidateRestoreRequestObjectTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ValidateRestoreRequestObjectTests.java deleted file mode 100644 index 50eecf31464d..000000000000 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ValidateRestoreRequestObjectTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dataprotection.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest; -import com.azure.resourcemanager.dataprotection.models.IdentityDetails; -import com.azure.resourcemanager.dataprotection.models.RecoveryOption; -import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfoBase; -import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType; -import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject; -import org.junit.jupiter.api.Assertions; - -public final class ValidateRestoreRequestObjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ValidateRestoreRequestObject model = - BinaryData - .fromString( - "{\"restoreRequestObject\":{\"objectType\":\"AzureBackupRestoreRequest\",\"restoreTargetInfo\":{\"objectType\":\"RestoreTargetInfoBase\",\"recoveryOption\":\"FailIfExists\",\"restoreLocation\":\"avjcbpwx\"},\"sourceDataStoreType\":\"ArchiveStore\",\"sourceResourceId\":\"rknftguvriuhprwm\",\"identityDetails\":{\"useSystemAssignedIdentity\":true,\"userAssignedIdentityArmUrl\":\"tayriwwroyqbex\"}}}") - .toObject(ValidateRestoreRequestObject.class); - Assertions - .assertEquals( - RecoveryOption.FAIL_IF_EXISTS, model.restoreRequestObject().restoreTargetInfo().recoveryOption()); - Assertions.assertEquals("avjcbpwx", model.restoreRequestObject().restoreTargetInfo().restoreLocation()); - Assertions.assertEquals(SourceDataStoreType.ARCHIVE_STORE, model.restoreRequestObject().sourceDataStoreType()); - Assertions.assertEquals("rknftguvriuhprwm", model.restoreRequestObject().sourceResourceId()); - Assertions.assertEquals(true, model.restoreRequestObject().identityDetails().useSystemAssignedIdentity()); - Assertions - .assertEquals( - "tayriwwroyqbex", model.restoreRequestObject().identityDetails().userAssignedIdentityArmUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ValidateRestoreRequestObject model = - new ValidateRestoreRequestObject() - .withRestoreRequestObject( - new AzureBackupRestoreRequest() - .withRestoreTargetInfo( - new RestoreTargetInfoBase() - .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS) - .withRestoreLocation("avjcbpwx")) - .withSourceDataStoreType(SourceDataStoreType.ARCHIVE_STORE) - .withSourceResourceId("rknftguvriuhprwm") - .withIdentityDetails( - new IdentityDetails() - .withUseSystemAssignedIdentity(true) - .withUserAssignedIdentityArmUrl("tayriwwroyqbex"))); - model = BinaryData.fromObject(model).toObject(ValidateRestoreRequestObject.class); - Assertions - .assertEquals( - RecoveryOption.FAIL_IF_EXISTS, model.restoreRequestObject().restoreTargetInfo().recoveryOption()); - Assertions.assertEquals("avjcbpwx", model.restoreRequestObject().restoreTargetInfo().restoreLocation()); - Assertions.assertEquals(SourceDataStoreType.ARCHIVE_STORE, model.restoreRequestObject().sourceDataStoreType()); - Assertions.assertEquals("rknftguvriuhprwm", model.restoreRequestObject().sourceResourceId()); - Assertions.assertEquals(true, model.restoreRequestObject().identityDetails().useSystemAssignedIdentity()); - Assertions - .assertEquals( - "tayriwwroyqbex", model.restoreRequestObject().identityDetails().userAssignedIdentityArmUrl()); - } -}