diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md
index d981ad6b9411..716476d6944f 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md
@@ -1,14 +1,833 @@
# Release History
-## 1.3.0-beta.1 (Unreleased)
+## 1.0.0-beta.1 (2024-07-16)
-### Features Added
+- 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-2024-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Breaking Changes
-### Bugs Fixed
+#### `models.BackupInstanceResource` was modified
+
+* `suspendBackups(com.azure.core.util.Context)` was removed
+* `stopProtection(com.azure.core.util.Context)` was removed
+
+#### `models.BackupInstances` was modified
+
+* `suspendBackups(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
+* `stopProtection(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
+
+### Features Added
+
+* `models.IdentityType` was added
+
+* `models.EncryptionSettings` was added
+
+* `models.InfrastructureEncryptionState` was added
+
+* `models.BcdrSecurityLevel` was added
+
+* `models.BackupInstancesExtensionRoutings` was added
+
+* `models.StopProtectionRequest` was added
+
+* `models.CmkKeyVaultProperties` was added
+
+* `models.CmkKekIdentity` was added
+
+* `models.EncryptionState` was added
+
+* `models.SuspendBackupRequest` was added
+
+#### `models.AdhocBasedTriggerContext` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `objectType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.AdhocBasedTaggingCriteria` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.AzureBackupRecoveryTimeBasedRestoreRequest` was modified
+
+* `withResourceGuardOperationRequests(java.util.List)` was added
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ResourceMoveDetails` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.CrossRegionRestoreJobRequest` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.SourceLifeCycle` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.DppWorkerRequest` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.TaggingCriteria` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.JobExtendedInfo` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.SoftDeleteSettings` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.DppTrackedResource` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `id()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `type()` was added
+* `systemData()` was added
+* `name()` was added
+
+#### `models.BackupInstanceResource` was modified
+
+* `stopProtection(models.StopProtectionRequest,com.azure.core.util.Context)` was added
+* `suspendBackups(models.SuspendBackupRequest,com.azure.core.util.Context)` was added
+
+#### `models.AdhocBackupTriggerOption` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.SupportedFeature` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.PolicyParameters` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.DataStoreParameters` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.RestorableTimeRange` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.AzureBackupParams` was modified
+
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClientDiscoveryDisplay` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.DppResource` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `name()` was added
+* `type()` was added
+* `id()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.StorageSetting` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.DppResourceList` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ProtectionStatusDetails` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.BackupInstanceResourceList` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.RangeBasedItemLevelRestoreCriteria` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `objectType()` was added
+
+#### `models.SecretStoreResource` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.AzureBackupRestoreRequest` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `withResourceGuardOperationRequests(java.util.List)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `resourceGuardOperationRequests()` was added
+* `objectType()` was added
+
+#### `models.BackupSchedule` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `DataProtectionManager` was modified
+
+* `backupInstancesExtensionRoutings()` was added
+
+#### `models.PatchBackupVaultInput` was modified
+
+* `withResourceGuardOperationRequests(java.util.List)` was added
+* `resourceGuardOperationRequests()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.DeletedBackupInstance` was modified
+
+* `withResourceGuardOperationRequests(java.util.List)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `currentProtectionState()` was added
+* `protectionStatus()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `protectionErrorDetails()` was added
+* `provisioningState()` was added
+
+#### `models.CrossSubscriptionRestoreSettings` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.AbsoluteDeleteOption` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `objectType()` was added
+
+#### `models.SecuritySettings` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `withEncryptionSettings(models.EncryptionSettings)` was added
+* `encryptionSettings()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.DefaultResourceProperties` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.AzureBackupRestoreWithRehydrationRequest` was modified
+
+* `withResourceGuardOperationRequests(java.util.List)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `objectType()` was added
+
+#### `models.RestoreJobRecoveryPointDetails` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.BaseResourceProperties` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `objectType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.AzureBackupFindRestorableTimeRangesRequestResource` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.NamespacedNameResource` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.TriggerContext` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.BasePolicyRule` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.AzureBackupJobResourceList` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.KubernetesClusterBackupDatasourceParameters` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.UnlockDeleteRequest` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.UserAssignedIdentity` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ResourceGuardOperationDetail` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.CheckNameAvailabilityRequest` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.UserFacingError` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.DatasourceSet` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.RestoreFilesTargetInfo` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `objectType()` was added
+
+#### `models.RestoreTargetInfo` was modified
+
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.DeleteOption` was modified
+
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.BackupCriteria` was modified
+
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.DeletedBackupInstanceResourceList` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.UserFacingWarningDetail` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.DeletionInfo` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.BackupInstance` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `withResourceGuardOperationRequests(java.util.List)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `resourceGuardOperationRequests()` was added
+
+#### `models.ValidateCrossRegionRestoreRequestObject` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClientDiscoveryForProperties` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.CustomCopyOption` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.TargetDetails` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ItemLevelRestoreCriteria` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `objectType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ItemPathBasedRestoreCriteria` was modified
+
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.RestoreTargetInfoBase` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `objectType()` was added
+
+#### `models.AzureOperationalStoreParameters` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `objectType()` was added
+
+#### `models.BaseBackupPolicy` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.InnerError` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.AzureRetentionRule` was modified
+
+* `objectType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.MonitoringSettings` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.FeatureValidationRequestBase` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.FeatureSettings` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.AuthCredentials` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `objectType()` was added
+
+#### `models.BackupVault` was modified
+
+* `resourceGuardOperationRequests()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `withResourceGuardOperationRequests(java.util.List)` was added
+* `bcdrSecurityLevel()` was added
+
+#### `models.Day` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ResourceGuardOperation` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClientDiscoveryResponse` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.SyncBackupInstanceRequest` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.AzureBackupRule` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `objectType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.OperationJobExtendedInfo` was modified
+
+* `objectType()` was added
+
+#### `models.CopyOption` was modified
+
+* `objectType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.BackupDatasourceParameters` was modified
+
+* `objectType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ScheduleBasedBackupCriteria` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `objectType()` was added
+
+#### `models.CrossRegionRestoreSettings` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.CrossRegionRestoreJobsRequest` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.AzureBackupFindRestorableTimeRangesResponse` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.AzureMonitorAlertSettings` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.IdentityDetails` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.FeatureValidationResponse` was modified
+
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClientDiscoveryForLogSpecification` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.DppTrackedResourceList` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.FeatureValidationRequest` was modified
+
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.KubernetesStorageClassRestoreCriteria` was modified
+
+* `objectType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.DppBaseResourceList` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ValidateRestoreRequestObject` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.TriggerBackupRequest` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.Datasource` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.BlobBackupDatasourceParameters` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `objectType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.RetentionTag` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.CrossRegionRestoreDetails` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ValidateForBackupRequest` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.TargetCopySetting` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.OperationExtendedInfo` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.JobSubTask` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.KubernetesClusterVaultTierRestoreCriteria` was modified
+
+* `resourceModifierReference()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `objectType()` was added
+* `withResourceModifierReference(models.NamespacedNameResource)` was added
+
+#### `models.PatchResourceRequestInput` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.KubernetesPVRestoreCriteria` was modified
+
+* `objectType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.SecretStoreBasedAuthCredentials` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `objectType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.AzureBackupRehydrationRequest` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ScheduleBasedTriggerContext` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `objectType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.BaseBackupPolicyResourceList` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.BackupInstances` was modified
+
+* `stopProtection(java.lang.String,java.lang.String,java.lang.String,models.StopProtectionRequest,com.azure.core.util.Context)` was added
+* `suspendBackups(java.lang.String,java.lang.String,java.lang.String,models.SuspendBackupRequest,com.azure.core.util.Context)` was added
+
+#### `models.RecoveryPointDataStoreDetails` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.CopyOnExpiryOption` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ImmutabilitySettings` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.DataStoreInfoBase` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.AdHocBackupRuleOptions` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.KubernetesClusterRestoreCriteria` was modified
+
+* `objectType()` was added
+* `withResourceModifierReference(models.NamespacedNameResource)` was added
+* `resourceModifierReference()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.FetchSecondaryRPsRequestParameters` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ResourceGuardProxyBase` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ResourceGuardProxyBaseResourceList` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.CrossRegionRestoreRequestObject` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ResourceGuardResourceList` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.BackupPolicy` was modified
+
+* `objectType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.AzureBackupRecoveryPoint` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `objectType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ItemLevelRestoreTargetInfo` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `objectType()` was added
+
+#### `models.AzureBackupFindRestorableTimeRangesRequest` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ResourceGuard` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClientDiscoveryForServiceSpecification` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.AzureBackupDiscreteRecoveryPoint` was modified
+
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.AzureBackupRecoveryPointBasedRestoreRequest` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `withResourceGuardOperationRequests(java.util.List)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `objectType()` was added
+
+#### `models.BackupVaultResourceList` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.AzureBackupRecoveryPointResourceList` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ImmediateCopyOption` was modified
+
+* `objectType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.DppProxyResource` was modified
+
+* `type()` was added
+* `id()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `name()` was added
+
+#### `models.FeatureValidationResponseBase` was modified
+
+* `objectType()` was added
+
+#### `models.DppBaseTrackedResource` was modified
+
+* `name()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `type()` was added
+* `id()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.AzureBackupJob` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.PatchResourceGuardInput` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.DppIdentityDetails` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.PolicyInfo` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.BackupParameters` was modified
-### Other Changes
+* `objectType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
## 1.2.0 (2023-12-18)
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md
index d3283fcb695f..42c31fd91d11 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-11. 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-2024-04. 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.2.0
+ 1.3.0-beta.1
```
[//]: # ({x-version-update-end})
@@ -45,15 +45,11 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
### Authentication
-By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.
+Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
-- `AZURE_CLIENT_ID` for Azure client ID.
-- `AZURE_TENANT_ID` for Azure tenant ID.
-- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-
-With above configuration, `azure` client can be authenticated using the following code:
+Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -132,6 +128,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[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_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md
index ae6e451e7d8d..748a7c74e332 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md
@@ -21,6 +21,10 @@
- [ValidateForBackup](#backupinstances_validateforbackup)
- [ValidateForRestore](#backupinstances_validateforrestore)
+## BackupInstancesExtensionRouting
+
+- [List](#backupinstancesextensionrouting_list)
+
## BackupPolicies
- [CreateOrUpdate](#backuppolicies_createorupdate)
@@ -146,7 +150,9 @@ import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest;
*/
public final class BackupInstancesAdhocBackupSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/TriggerBackup.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/TriggerBackup.json
*/
/**
* Sample code: Trigger Adhoc Backup.
@@ -154,7 +160,12 @@ public final class BackupInstancesAdhocBackupSamples {
* @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);
}
}
```
@@ -176,14 +187,15 @@ 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.
*/
public final class BackupInstancesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/PutBackupInstance.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/PutBackupInstance.json
*/
/**
* Sample code: Create BackupInstance.
@@ -191,7 +203,90 @@ public final class BackupInstancesCreateOrUpdateSamples {
* @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();
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/PutBackupInstance_ResourceGuardEnabled.json
+ */
+ /**
+ * Sample code: Create BackupInstance to perform critical operation With MUA.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void createBackupInstanceToPerformCriticalOperationWithMUA(
+ 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")))))
+ .withResourceGuardOperationRequests(Arrays.asList(
+ "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourcegroups/ankurResourceGuard1/providers/Microsoft.DataProtection/resourceGuards/ResourceGuard38-1/dppModifyPolicy/default"))
+ .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
@@ -216,7 +311,9 @@ public final class BackupInstancesCreateOrUpdateSamples {
*/
public final class BackupInstancesDeleteSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/DeleteBackupInstance.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/DeleteBackupInstance.json
*/
/**
* Sample code: Delete BackupInstance.
@@ -224,7 +321,8 @@ public final class BackupInstancesDeleteSamples {
* @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);
}
}
```
@@ -237,7 +335,9 @@ public final class BackupInstancesDeleteSamples {
*/
public final class BackupInstancesGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/GetBackupInstance.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/GetBackupInstance.json
*/
/**
* Sample code: Get BackupInstance.
@@ -245,7 +345,9 @@ public final class BackupInstancesGetSamples {
* @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);
}
}
```
@@ -258,15 +360,21 @@ public final class BackupInstancesGetSamples {
*/
public final class BackupInstancesGetBackupInstanceOperationResultSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/GetBackupInstanceOperationResult.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -279,14 +387,17 @@ public final class BackupInstancesGetBackupInstanceOperationResultSamples {
*/
public final class BackupInstancesListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/ListBackupInstances.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
@@ -300,7 +411,9 @@ public final class BackupInstancesListSamples {
*/
public final class BackupInstancesResumeBackupsSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/ResumeBackups.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/ResumeBackups.json
*/
/**
* Sample code: ResumeBackups.
@@ -321,7 +434,9 @@ public final class BackupInstancesResumeBackupsSamples {
*/
public final class BackupInstancesResumeProtectionSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/ResumeProtection.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/ResumeProtection.json
*/
/**
* Sample code: ResumeProtection.
@@ -337,12 +452,17 @@ public final class BackupInstancesResumeProtectionSamples {
### BackupInstances_StopProtection
```java
+import com.azure.resourcemanager.dataprotection.models.StopProtectionRequest;
+import java.util.Arrays;
+
/**
* Samples for BackupInstances StopProtection.
*/
public final class BackupInstancesStopProtectionSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/StopProtection.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/StopProtection.json
*/
/**
* Sample code: StopProtection.
@@ -350,7 +470,26 @@ public final class BackupInstancesStopProtectionSamples {
* @param manager Entry point to DataProtectionManager.
*/
public static void stopProtection(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
- manager.backupInstances().stopProtection("testrg", "testvault", "testbi", com.azure.core.util.Context.NONE);
+ manager.backupInstances()
+ .stopProtection("testrg", "testvault", "testbi", null, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/StopProtection_ResourceGuardEnabled.json
+ */
+ /**
+ * Sample code: StopProtection with MUA.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void stopProtectionWithMUA(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.backupInstances()
+ .stopProtection("testrg", "testvault", "testbi",
+ new StopProtectionRequest().withResourceGuardOperationRequests(Arrays.asList(
+ "/subscriptions/754ec39f-8d2a-44cf-bfbf-13107ac85c36/resourcegroups/mua-testing/providers/Microsoft.DataProtection/resourceGuards/gvjreddy-test-ecy-rg-reader/dppDisableStopProtectionRequests/default")),
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -358,12 +497,17 @@ public final class BackupInstancesStopProtectionSamples {
### BackupInstances_SuspendBackups
```java
+import com.azure.resourcemanager.dataprotection.models.SuspendBackupRequest;
+import java.util.Arrays;
+
/**
* Samples for BackupInstances SuspendBackups.
*/
public final class BackupInstancesSuspendBackupsSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/SuspendBackups.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/SuspendBackups.json
*/
/**
* Sample code: SuspendBackups.
@@ -371,7 +515,26 @@ public final class BackupInstancesSuspendBackupsSamples {
* @param manager Entry point to DataProtectionManager.
*/
public static void suspendBackups(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
- manager.backupInstances().suspendBackups("testrg", "testvault", "testbi", com.azure.core.util.Context.NONE);
+ manager.backupInstances()
+ .suspendBackups("testrg", "testvault", "testbi", null, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/SuspendBackup_ResourceGuardEnabled.json
+ */
+ /**
+ * Sample code: SuspendBackups with MUA.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void suspendBackupsWithMUA(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.backupInstances()
+ .suspendBackups("testrg", "testvault", "testbi",
+ new SuspendBackupRequest().withResourceGuardOperationRequests(Arrays.asList(
+ "/subscriptions/754ec39f-8d2a-44cf-bfbf-13107ac85c36/resourcegroups/mua-testing/providers/Microsoft.DataProtection/resourceGuards/gvjreddy-test-ecy-rg-reader/dppDisableSuspendBackupsRequests/default")),
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -381,14 +544,15 @@ 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.
*/
public final class BackupInstancesSyncBackupInstanceSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/SyncBackupInstance.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/SyncBackupInstance.json
*/
/**
* Sample code: Sync BackupInstance.
@@ -396,7 +560,9 @@ public final class BackupInstancesSyncBackupInstanceSamples {
* @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);
}
}
```
@@ -415,22 +581,57 @@ 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.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
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
+ 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);
}
}
```
@@ -440,14 +641,15 @@ public final class BackupInstancesTriggerCrossRegionRestoreSamples {
```java
import com.azure.resourcemanager.dataprotection.models.AzureBackupRehydrationRequest;
import com.azure.resourcemanager.dataprotection.models.RehydrationPriority;
-import java.util.stream.Collectors;
/**
* Samples for BackupInstances TriggerRehydrate.
*/
public final class BackupInstancesTriggerRehydrateSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/TriggerRehydrate.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/TriggerRehydrate.json
*/
/**
* Sample code: Trigger Rehydrate.
@@ -455,7 +657,12 @@ public final class BackupInstancesTriggerRehydrateSamples {
* @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);
}
}
```
@@ -477,14 +684,15 @@ 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.
*/
public final class BackupInstancesTriggerRestoreSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/TriggerRestoreAsFiles.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/TriggerRestoreAsFiles.json
*/
/**
* Sample code: Trigger Restore As Files.
@@ -492,23 +700,68 @@ public final class BackupInstancesTriggerRestoreSamples {
* @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-11-01/examples/BackupInstanceOperations/TriggerRestoreWithRehydration.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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-11-01/examples/BackupInstanceOperations/TriggerRestore.json
+ 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/2024-04-01/examples/
+ * BackupInstanceOperations/TriggerRestore.json
*/
/**
* Sample code: Trigger Restore.
@@ -516,7 +769,37 @@ public final class BackupInstancesTriggerRestoreSamples {
* @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);
}
}
```
@@ -535,22 +818,57 @@ 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
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
+ 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);
}
}
```
@@ -566,14 +884,15 @@ 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.
*/
public final class BackupInstancesValidateForBackupSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/ValidateForBackup.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/ValidateForBackup.json
*/
/**
* Sample code: Validate For Backup.
@@ -581,7 +900,32 @@ public final class BackupInstancesValidateForBackupSamples {
* @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);
}
}
```
@@ -599,14 +943,15 @@ 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.
*/
public final class BackupInstancesValidateForRestoreSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/ValidateRestore.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/ValidateRestore.json
*/
/**
* Sample code: Validate Restore.
@@ -614,7 +959,65 @@ public final class BackupInstancesValidateForRestoreSamples {
* @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);
+ }
+}
+```
+
+### BackupInstancesExtensionRouting_List
+
+```java
+/**
+ * Samples for BackupInstancesExtensionRouting List.
+ */
+public final class BackupInstancesExtensionRoutingListSamples {
+ /*
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/ListBackupInstancesExtensionRouting.json
+ */
+ /**
+ * Sample code: List BackupInstances associated with an azure resource.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void listBackupInstancesAssociatedWithAnAzureResource(
+ com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.backupInstancesExtensionRoutings()
+ .list(
+ "subscriptions/36d32b25-3dc7-41b0-bde1-397500644591/resourceGroups/testRG/providers/Microsoft.Compute/disks/testDisk",
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -638,22 +1041,73 @@ 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.
*/
public final class BackupPoliciesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/PolicyCRUD/CreateOrUpdateBackupPolicy.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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();
+ 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();
}
}
```
@@ -666,7 +1120,9 @@ public final class BackupPoliciesCreateOrUpdateSamples {
*/
public final class BackupPoliciesDeleteSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/PolicyCRUD/DeleteBackupPolicy.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/PolicyCRUD/
+ * DeleteBackupPolicy.json
*/
/**
* Sample code: Delete BackupPolicy.
@@ -674,7 +1130,8 @@ public final class BackupPoliciesDeleteSamples {
* @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);
}
}
```
@@ -687,7 +1144,9 @@ public final class BackupPoliciesDeleteSamples {
*/
public final class BackupPoliciesGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/PolicyCRUD/GetBackupPolicy.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/PolicyCRUD/
+ * GetBackupPolicy.json
*/
/**
* Sample code: Get BackupPolicy.
@@ -695,7 +1154,8 @@ public final class BackupPoliciesGetSamples {
* @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);
}
}
```
@@ -708,7 +1168,9 @@ public final class BackupPoliciesGetSamples {
*/
public final class BackupPoliciesListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/PolicyCRUD/ListBackupPolicy.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/PolicyCRUD/
+ * ListBackupPolicy.json
*/
/**
* Sample code: List BackupPolicy.
@@ -729,7 +1191,9 @@ public final class BackupPoliciesListSamples {
*/
public final class BackupVaultOperationResultsGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/GetOperationResultPatch.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/VaultCRUD/
+ * GetOperationResultPatch.json
*/
/**
* Sample code: GetOperationResult Patch.
@@ -737,7 +1201,10 @@ public final class BackupVaultOperationResultsGetSamples {
* @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);
}
}
```
@@ -752,15 +1219,22 @@ import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityRequ
*/
public final class BackupVaultsCheckNameAvailabilitySamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/CheckBackupVaultsNameAvailability.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -771,10 +1245,18 @@ public final class BackupVaultsCheckNameAvailabilitySamples {
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.CmkKekIdentity;
+import com.azure.resourcemanager.dataprotection.models.CmkKeyVaultProperties;
import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings;
import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState;
import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails;
+import com.azure.resourcemanager.dataprotection.models.EncryptionSettings;
+import com.azure.resourcemanager.dataprotection.models.EncryptionState;
import com.azure.resourcemanager.dataprotection.models.FeatureSettings;
+import com.azure.resourcemanager.dataprotection.models.IdentityType;
+import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings;
+import com.azure.resourcemanager.dataprotection.models.ImmutabilityState;
+import com.azure.resourcemanager.dataprotection.models.InfrastructureEncryptionState;
import com.azure.resourcemanager.dataprotection.models.MonitoringSettings;
import com.azure.resourcemanager.dataprotection.models.SecuritySettings;
import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings;
@@ -785,14 +1267,15 @@ 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.
*/
public final class BackupVaultsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/PutBackupVault.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/VaultCRUD/
+ * PutBackupVault.json
*/
/**
* Sample code: Create BackupVault.
@@ -800,19 +1283,93 @@ public final class BackupVaultsCreateOrUpdateSamples {
* @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-11-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/2024-04-01/examples/VaultCRUD/
+ * PutBackupVaultWithCMK.json
+ */
+ /**
+ * Sample code: Create BackupVault With CMK.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void
+ createBackupVaultWithCMK(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.OFF).withRetentionDurationInDays(0.0D))
+ .withImmutabilitySettings(new ImmutabilitySettings().withState(ImmutabilityState.DISABLED))
+ .withEncryptionSettings(new EncryptionSettings().withState(EncryptionState.ENABLED)
+ .withKeyVaultProperties(new CmkKeyVaultProperties().withKeyUri("fakeTokenPlaceholder"))
+ .withKekIdentity(new CmkKekIdentity().withIdentityType(IdentityType.USER_ASSIGNED)
+ .withIdentityId(
+ "/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi"))
+ .withInfrastructureEncryption(InfrastructureEncryptionState.ENABLED)))
+ .withStorageSettings(
+ Arrays.asList(new StorageSetting().withDatastoreType(StorageSettingStoreTypes.VAULT_STORE)
+ .withType(StorageSettingTypes.LOCALLY_REDUNDANT))))
+ .withTags(mapOf("key1", "fakeTokenPlaceholder"))
+ .withIdentity(new DppIdentityDetails().withType("None"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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();
+ 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
@@ -837,7 +1394,9 @@ public final class BackupVaultsCreateOrUpdateSamples {
*/
public final class BackupVaultsDeleteSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/DeleteBackupVault.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/VaultCRUD/
+ * DeleteBackupVault.json
*/
/**
* Sample code: Delete BackupVault.
@@ -858,7 +1417,9 @@ public final class BackupVaultsDeleteSamples {
*/
public final class BackupVaultsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/GetBackupVault.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/VaultCRUD/
+ * GetBackupVault.json
*/
/**
* Sample code: Get BackupVault.
@@ -866,11 +1427,14 @@ public final class BackupVaultsGetByResourceGroupSamples {
* @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-11-01/examples/VaultCRUD/GetBackupVaultWithMSI.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/VaultCRUD/
+ * GetBackupVaultWithMSI.json
*/
/**
* Sample code: Get BackupVault With MSI.
@@ -878,7 +1442,23 @@ public final class BackupVaultsGetByResourceGroupSamples {
* @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);
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/VaultCRUD/
+ * GetBackupVaultWithCMK.json
+ */
+ /**
+ * Sample code: Get BackupVault With CMK.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void getBackupVaultWithCMK(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.backupVaults()
+ .getByResourceGroupWithResponse("SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE);
}
}
```
@@ -891,14 +1471,17 @@ public final class BackupVaultsGetByResourceGroupSamples {
*/
public final class BackupVaultsListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/GetBackupVaultsInSubscription.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
@@ -912,14 +1495,17 @@ public final class BackupVaultsListSamples {
*/
public final class BackupVaultsListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/GetBackupVaultsInResourceGroup.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
@@ -931,18 +1517,30 @@ public final class BackupVaultsListByResourceGroupSamples {
import com.azure.resourcemanager.dataprotection.models.AlertsState;
import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings;
import com.azure.resourcemanager.dataprotection.models.BackupVaultResource;
+import com.azure.resourcemanager.dataprotection.models.CmkKekIdentity;
+import com.azure.resourcemanager.dataprotection.models.CmkKeyVaultProperties;
+import com.azure.resourcemanager.dataprotection.models.EncryptionSettings;
+import com.azure.resourcemanager.dataprotection.models.EncryptionState;
+import com.azure.resourcemanager.dataprotection.models.IdentityType;
+import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings;
+import com.azure.resourcemanager.dataprotection.models.ImmutabilityState;
+import com.azure.resourcemanager.dataprotection.models.InfrastructureEncryptionState;
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 java.util.HashMap;
import java.util.Map;
-import java.util.stream.Collectors;
/**
* Samples for BackupVaults Update.
*/
public final class BackupVaultsUpdateSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/VaultCRUD/PatchBackupVault.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/VaultCRUD/
+ * PatchBackupVault.json
*/
/**
* Sample code: Patch BackupVault.
@@ -950,8 +1548,45 @@ public final class BackupVaultsUpdateSamples {
* @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();
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/VaultCRUD/
+ * PatchBackupVaultWithCMK.json
+ */
+ /**
+ * Sample code: Patch BackupVault with CMK.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void patchBackupVaultWithCMK(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)))
+ .withSecuritySettings(new SecuritySettings()
+ .withSoftDeleteSettings(
+ new SoftDeleteSettings().withState(SoftDeleteState.ON).withRetentionDurationInDays(90.0D))
+ .withImmutabilitySettings(new ImmutabilitySettings().withState(ImmutabilityState.DISABLED))
+ .withEncryptionSettings(new EncryptionSettings().withState(EncryptionState.ENABLED)
+ .withKeyVaultProperties(new CmkKeyVaultProperties().withKeyUri("fakeTokenPlaceholder"))
+ .withKekIdentity(new CmkKekIdentity().withIdentityType(IdentityType.SYSTEM_ASSIGNED))
+ .withInfrastructureEncryption(InfrastructureEncryptionState.ENABLED))))
+ .apply();
}
// Use "Map.of" if available
@@ -973,22 +1608,27 @@ 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.
*/
public final class DataProtectionCheckFeatureSupportSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/CheckfeatureSupport.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1001,14 +1641,17 @@ public final class DataProtectionCheckFeatureSupportSamples {
*/
public final class DataProtectionOperationsListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/Operations/List.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
@@ -1022,15 +1665,20 @@ public final class DataProtectionOperationsListSamples {
*/
public final class DeletedBackupInstancesGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1043,15 +1691,19 @@ public final class DeletedBackupInstancesGetSamples {
*/
public final class DeletedBackupInstancesListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1064,14 +1716,17 @@ public final class DeletedBackupInstancesListSamples {
*/
public final class DeletedBackupInstancesUndeleteSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
@@ -1087,15 +1742,23 @@ import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase;
*/
public final class DppResourceGuardProxyCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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();
}
}
```
@@ -1108,15 +1771,20 @@ public final class DppResourceGuardProxyCreateOrUpdateSamples {
*/
public final class DppResourceGuardProxyDeleteSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1129,7 +1797,9 @@ public final class DppResourceGuardProxyDeleteSamples {
*/
public final class DppResourceGuardProxyGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * ResourceGuardProxyCRUD/GetResourceGuardProxy.json
*/
/**
* Sample code: Get ResourceGuardProxy.
@@ -1137,7 +1807,8 @@ public final class DppResourceGuardProxyGetSamples {
* @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);
}
}
```
@@ -1150,7 +1821,9 @@ public final class DppResourceGuardProxyGetSamples {
*/
public final class DppResourceGuardProxyListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * ResourceGuardProxyCRUD/ListResourceGuardProxy.json
*/
/**
* Sample code: Get ResourceGuardProxies.
@@ -1174,15 +1847,24 @@ import java.util.Arrays;
*/
public final class DppResourceGuardProxyUnlockDeleteSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1195,7 +1877,9 @@ public final class DppResourceGuardProxyUnlockDeleteSamples {
*/
public final class ExportJobsTriggerSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/JobCRUD/TriggerExportJobs.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/JobCRUD/
+ * TriggerExportJobs.json
*/
/**
* Sample code: Trigger Export Jobs.
@@ -1216,15 +1900,20 @@ public final class ExportJobsTriggerSamples {
*/
public final class ExportJobsOperationResultGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/JobCRUD/GetExportJobsOperationResult.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1239,15 +1928,22 @@ import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobRequ
*/
public final class FetchCrossRegionRestoreJobGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/CrossRegionRestore/FetchCrossRegionRestoreJob.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
+ 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);
}
}
```
@@ -1262,15 +1958,22 @@ import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobsReq
*/
public final class FetchCrossRegionRestoreJobsOperationListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/CrossRegionRestore/FetchCrossRegionRestoreJobs.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
+ 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);
}
}
```
@@ -1285,7 +1988,9 @@ import com.azure.resourcemanager.dataprotection.models.FetchSecondaryRPsRequestP
*/
public final class FetchSecondaryRecoveryPointsListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/CrossRegionRestore/FetchSecondaryRPs.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * CrossRegionRestore/FetchSecondaryRPs.json
*/
/**
* Sample code: Fetch SecondaryRPs.
@@ -1293,7 +1998,11 @@ public final class FetchSecondaryRecoveryPointsListSamples {
* @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);
+ 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);
}
}
```
@@ -1306,7 +2015,9 @@ public final class FetchSecondaryRecoveryPointsListSamples {
*/
public final class JobsGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/JobCRUD/GetJob.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/JobCRUD/GetJob.
+ * json
*/
/**
* Sample code: Get Job.
@@ -1314,7 +2025,9 @@ public final class JobsGetSamples {
* @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);
}
}
```
@@ -1327,7 +2040,9 @@ public final class JobsGetSamples {
*/
public final class JobsListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/JobCRUD/ListJobs.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/JobCRUD/
+ * ListJobs.json
*/
/**
* Sample code: Get Jobs.
@@ -1348,7 +2063,9 @@ public final class JobsListSamples {
*/
public final class OperationResultGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/GetOperationResult.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * GetOperationResult.json
*/
/**
* Sample code: Get OperationResult.
@@ -1356,7 +2073,10 @@ public final class OperationResultGetSamples {
* @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);
}
}
```
@@ -1369,7 +2089,9 @@ public final class OperationResultGetSamples {
*/
public final class OperationStatusGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/GetOperationStatus.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * GetOperationStatus.json
*/
/**
* Sample code: Get OperationStatus.
@@ -1377,7 +2099,10 @@ public final class OperationStatusGetSamples {
* @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);
}
}
```
@@ -1390,7 +2115,9 @@ public final class OperationStatusGetSamples {
*/
public final class OperationStatusBackupVaultContextGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/GetOperationStatusVaultContext.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * GetOperationStatusVaultContext.json
*/
/**
* Sample code: Get OperationStatus.
@@ -1398,7 +2125,10 @@ public final class OperationStatusBackupVaultContextGetSamples {
* @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);
}
}
```
@@ -1411,7 +2141,9 @@ public final class OperationStatusBackupVaultContextGetSamples {
*/
public final class OperationStatusResourceGroupContextGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/GetOperationStatusRGContext.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * GetOperationStatusRGContext.json
*/
/**
* Sample code: Get OperationStatus.
@@ -1419,7 +2151,10 @@ public final class OperationStatusResourceGroupContextGetByResourceGroupSamples
* @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);
}
}
```
@@ -1432,7 +2167,9 @@ public final class OperationStatusResourceGroupContextGetByResourceGroupSamples
*/
public final class RecoveryPointsGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/GetRecoveryPoint.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * BackupInstanceOperations/GetRecoveryPoint.json
*/
/**
* Sample code: Get Recovery Point.
@@ -1440,7 +2177,9 @@ public final class RecoveryPointsGetSamples {
* @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);
}
}
```
@@ -1453,15 +2192,20 @@ public final class RecoveryPointsGetSamples {
*/
public final class RecoveryPointsListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/ListRecoveryPoints.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1474,7 +2218,9 @@ public final class RecoveryPointsListSamples {
*/
public final class ResourceGuardsDeleteSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/DeleteResourceGuard.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * ResourceGuardCRUD/DeleteResourceGuard.json
*/
/**
* Sample code: Delete ResourceGuard.
@@ -1482,7 +2228,9 @@ public final class ResourceGuardsDeleteSamples {
* @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);
}
}
```
@@ -1495,15 +2243,20 @@ public final class ResourceGuardsDeleteSamples {
*/
public final class ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/ListBackupSecurityPINRequests.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1516,7 +2269,9 @@ public final class ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples {
*/
public final class ResourceGuardsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetResourceGuard.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * ResourceGuardCRUD/GetResourceGuard.json
*/
/**
* Sample code: Get ResourceGuard.
@@ -1524,7 +2279,8 @@ public final class ResourceGuardsGetByResourceGroupSamples {
* @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);
}
}
```
@@ -1537,15 +2293,20 @@ public final class ResourceGuardsGetByResourceGroupSamples {
*/
public final class ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1558,15 +2319,20 @@ public final class ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSample
*/
public final class ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1579,15 +2345,20 @@ public final class ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamp
*/
public final class ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1600,15 +2371,20 @@ public final class ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjec
*/
public final class ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1621,15 +2397,20 @@ public final class ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSample
*/
public final class ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1642,15 +2423,20 @@ public final class ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamp
*/
public final class ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1663,15 +2449,20 @@ public final class ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectS
*/
public final class ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1684,15 +2475,20 @@ public final class ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples {
*/
public final class ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1705,15 +2501,20 @@ public final class ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSampl
*/
public final class ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1726,15 +2527,20 @@ public final class ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples {
*/
public final class ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1747,15 +2553,20 @@ public final class ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples {
*/
public final class ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
```
@@ -1768,14 +2579,17 @@ public final class ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples
*/
public final class ResourceGuardsListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetResourceGuardsInSubscription.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
@@ -1789,14 +2603,17 @@ public final class ResourceGuardsListSamples {
*/
public final class ResourceGuardsListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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);
}
}
@@ -1814,7 +2631,9 @@ import java.util.Map;
*/
public final class ResourceGuardsPatchSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/PatchResourceGuard.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * ResourceGuardCRUD/PatchResourceGuard.json
*/
/**
* Sample code: Patch ResourceGuard.
@@ -1822,7 +2641,9 @@ public final class ResourceGuardsPatchSamples {
* @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();
}
@@ -1851,7 +2672,9 @@ import java.util.Map;
*/
public final class ResourceGuardsPutSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/ResourceGuardCRUD/PutResourceGuard.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-01/examples/
+ * ResourceGuardCRUD/PutResourceGuard.json
*/
/**
* Sample code: Create ResourceGuard.
@@ -1859,7 +2682,12 @@ public final class ResourceGuardsPutSamples {
* @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
@@ -1881,22 +2709,30 @@ 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.
*/
public final class RestorableTimeRangesFindSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/examples/BackupInstanceOperations/FindRestorableTimeRanges.json
+ * x-ms-original-file:
+ * specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2024-04-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/pom.xml b/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml
index e3c80e3f1fd5..52a8f920bb1a 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-11.
+ 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-2024-04.
https://github.com/Azure/azure-sdk-for-java
@@ -48,6 +48,11 @@
true
+
+ com.azure
+ azure-json
+ 1.1.0
+
com.azure
azure-core
@@ -88,8 +93,6 @@
4.11.0
test
-
-
net.bytebuddy
byte-buddy
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 54b2fbaf5480..161197ac4479 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
@@ -11,8 +11,8 @@
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
-import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
@@ -24,6 +24,7 @@
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.dataprotection.fluent.DataProtectionClient;
+import com.azure.resourcemanager.dataprotection.implementation.BackupInstancesExtensionRoutingsImpl;
import com.azure.resourcemanager.dataprotection.implementation.BackupInstancesImpl;
import com.azure.resourcemanager.dataprotection.implementation.BackupPoliciesImpl;
import com.azure.resourcemanager.dataprotection.implementation.BackupVaultOperationResultsImpl;
@@ -47,6 +48,7 @@
import com.azure.resourcemanager.dataprotection.implementation.ResourceGuardsImpl;
import com.azure.resourcemanager.dataprotection.implementation.RestorableTimeRangesImpl;
import com.azure.resourcemanager.dataprotection.models.BackupInstances;
+import com.azure.resourcemanager.dataprotection.models.BackupInstancesExtensionRoutings;
import com.azure.resourcemanager.dataprotection.models.BackupPolicies;
import com.azure.resourcemanager.dataprotection.models.BackupVaultOperationResults;
import com.azure.resourcemanager.dataprotection.models.BackupVaults;
@@ -107,6 +109,8 @@ public final class DataProtectionManager {
private FetchCrossRegionRestoreJobsOperations fetchCrossRegionRestoreJobsOperations;
+ private BackupInstancesExtensionRoutings backupInstancesExtensionRoutings;
+
private Jobs jobs;
private RestorableTimeRanges restorableTimeRanges;
@@ -127,8 +131,10 @@ private DataProtectionManager(HttpPipeline httpPipeline, AzureProfile profile, D
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();
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
}
/**
@@ -279,12 +285,19 @@ 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.2.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)");
}
@@ -303,18 +316,21 @@ 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)
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
.collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies.stream()
- .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList()));
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
- .policies(policies.toArray(new HttpPipelinePolicy[0])).build();
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
return new DataProtectionManager(httpPipeline, profile, defaultPollInterval);
}
}
@@ -494,6 +510,19 @@ public FetchCrossRegionRestoreJobsOperations fetchCrossRegionRestoreJobsOperatio
return fetchCrossRegionRestoreJobsOperations;
}
+ /**
+ * Gets the resource collection API of BackupInstancesExtensionRoutings.
+ *
+ * @return Resource collection API of BackupInstancesExtensionRoutings.
+ */
+ public BackupInstancesExtensionRoutings backupInstancesExtensionRoutings() {
+ if (this.backupInstancesExtensionRoutings == null) {
+ this.backupInstancesExtensionRoutings
+ = new BackupInstancesExtensionRoutingsImpl(clientObject.getBackupInstancesExtensionRoutings(), this);
+ }
+ return backupInstancesExtensionRoutings;
+ }
+
/**
* Gets the resource collection API of Jobs.
*
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 e5bbb8de7e8d..b9e4d2bd8ff0 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
@@ -16,6 +16,8 @@
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.StopProtectionRequest;
+import com.azure.resourcemanager.dataprotection.models.SuspendBackupRequest;
import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest;
import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest;
import com.azure.resourcemanager.dataprotection.models.ValidateCrossRegionRestoreRequestObject;
@@ -764,6 +766,7 @@ SyncPoller, Void> beginStopProtection(String resourceGroupName,
* @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.
+ * @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.
@@ -772,7 +775,7 @@ SyncPoller, Void> beginStopProtection(String resourceGroupName,
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginStopProtection(String resourceGroupName, String vaultName,
- String backupInstanceName, Context context);
+ String backupInstanceName, StopProtectionRequest parameters, Context context);
/**
* This operation will stop protection of a backup instance and data will be held forever.
@@ -793,13 +796,15 @@ SyncPoller, Void> beginStopProtection(String resourceGroupName,
* @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.
+ * @param parameters Request body for operation.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void stopProtection(String resourceGroupName, String vaultName, String backupInstanceName, Context context);
+ void stopProtection(String resourceGroupName, String vaultName, String backupInstanceName,
+ StopProtectionRequest parameters, Context context);
/**
* This operation will stop backup for a backup instance and retains the backup data as per the policy (except
@@ -824,6 +829,7 @@ SyncPoller, Void> beginSuspendBackups(String resourceGroupName,
* @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.
+ * @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.
@@ -832,7 +838,7 @@ SyncPoller, Void> beginSuspendBackups(String resourceGroupName,
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginSuspendBackups(String resourceGroupName, String vaultName,
- String backupInstanceName, Context context);
+ String backupInstanceName, SuspendBackupRequest parameters, Context context);
/**
* This operation will stop backup for a backup instance and retains the backup data as per the policy (except
@@ -855,13 +861,15 @@ SyncPoller, Void> beginSuspendBackups(String resourceGroupName,
* @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.
+ * @param parameters Request body for operation.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void suspendBackups(String resourceGroupName, String vaultName, String backupInstanceName, Context context);
+ void suspendBackups(String resourceGroupName, String vaultName, String backupInstanceName,
+ SuspendBackupRequest parameters, Context context);
/**
* Sync backup instance again in case of failure
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesExtensionRoutingsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesExtensionRoutingsClient.java
new file mode 100644
index 000000000000..f81d031b1d67
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesExtensionRoutingsClient.java
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.BackupInstanceResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupInstancesExtensionRoutingsClient.
+ */
+public interface BackupInstancesExtensionRoutingsClient {
+ /**
+ * Gets a list of backup instances associated with a tracked resource.
+ *
+ * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of backup instances associated with a tracked resource as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceId);
+
+ /**
+ * Gets a list of backup instances associated with a tracked resource.
+ *
+ * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of backup instances associated with a tracked resource as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceId, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionClient.java
index c5a234566f85..972cccd37ac4 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
@@ -144,6 +144,13 @@ public interface DataProtectionClient {
*/
FetchCrossRegionRestoreJobsOperationsClient getFetchCrossRegionRestoreJobsOperations();
+ /**
+ * Gets the BackupInstancesExtensionRoutingsClient object to access its operations.
+ *
+ * @return the BackupInstancesExtensionRoutingsClient object.
+ */
+ BackupInstancesExtensionRoutingsClient getBackupInstancesExtensionRoutings();
+
/**
* Gets the JobsClient object to access its operations.
*
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 7f572e73ee62..a697e5961ae4 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupFindRestorableTimeRangesResponseResourceInner.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupFindRestorableTimeRangesResponseResourceInner.java
@@ -5,9 +5,13 @@
package com.azure.resourcemanager.dataprotection.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesResponse;
import com.azure.resourcemanager.dataprotection.models.DppResource;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* List Restore Ranges Response.
@@ -17,9 +21,28 @@ public final class AzureBackupFindRestorableTimeRangesResponseResourceInner exte
/*
* AzureBackupFindRestorableTimeRangesResponseResource properties
*/
- @JsonProperty(value = "properties")
private AzureBackupFindRestorableTimeRangesResponse properties;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ private SystemData systemData;
+
/**
* Creates an instance of AzureBackupFindRestorableTimeRangesResponseResourceInner class.
*/
@@ -47,6 +70,46 @@ public AzureBackupFindRestorableTimeRangesResponse properties() {
return this;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ @Override
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Validates the instance.
*
@@ -59,4 +122,54 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AzureBackupFindRestorableTimeRangesResponseResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AzureBackupFindRestorableTimeRangesResponseResourceInner if the JsonReader was pointing to
+ * an instance of it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the
+ * AzureBackupFindRestorableTimeRangesResponseResourceInner.
+ */
+ public static AzureBackupFindRestorableTimeRangesResponseResourceInner fromJson(JsonReader jsonReader)
+ throws IOException {
+ return jsonReader.readObject(reader -> {
+ AzureBackupFindRestorableTimeRangesResponseResourceInner deserializedAzureBackupFindRestorableTimeRangesResponseResourceInner
+ = new AzureBackupFindRestorableTimeRangesResponseResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedAzureBackupFindRestorableTimeRangesResponseResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedAzureBackupFindRestorableTimeRangesResponseResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedAzureBackupFindRestorableTimeRangesResponseResourceInner.type = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedAzureBackupFindRestorableTimeRangesResponseResourceInner.systemData
+ = SystemData.fromJson(reader);
+ } else if ("properties".equals(fieldName)) {
+ deserializedAzureBackupFindRestorableTimeRangesResponseResourceInner.properties
+ = AzureBackupFindRestorableTimeRangesResponse.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAzureBackupFindRestorableTimeRangesResponseResourceInner;
+ });
+ }
}
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 12fd5661e9a5..8a6d6525aa78 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupJobResourceInner.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupJobResourceInner.java
@@ -5,9 +5,13 @@
package com.azure.resourcemanager.dataprotection.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.dataprotection.models.AzureBackupJob;
import com.azure.resourcemanager.dataprotection.models.DppResource;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* AzureBackup Job Resource Class.
@@ -17,9 +21,28 @@ public final class AzureBackupJobResourceInner extends DppResource {
/*
* AzureBackupJobResource properties
*/
- @JsonProperty(value = "properties")
private AzureBackupJob properties;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ private SystemData systemData;
+
/**
* Creates an instance of AzureBackupJobResourceInner class.
*/
@@ -46,6 +69,46 @@ public AzureBackupJobResourceInner withProperties(AzureBackupJob properties) {
return this;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ @Override
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Validates the instance.
*
@@ -58,4 +121,49 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AzureBackupJobResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AzureBackupJobResourceInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the AzureBackupJobResourceInner.
+ */
+ public static AzureBackupJobResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AzureBackupJobResourceInner deserializedAzureBackupJobResourceInner = new AzureBackupJobResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedAzureBackupJobResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedAzureBackupJobResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedAzureBackupJobResourceInner.type = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedAzureBackupJobResourceInner.systemData = SystemData.fromJson(reader);
+ } else if ("properties".equals(fieldName)) {
+ deserializedAzureBackupJobResourceInner.properties = AzureBackupJob.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAzureBackupJobResourceInner;
+ });
+ }
}
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 d88335e24416..e86c143a65d6 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupRecoveryPointResourceInner.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupRecoveryPointResourceInner.java
@@ -5,9 +5,13 @@
package com.azure.resourcemanager.dataprotection.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPoint;
import com.azure.resourcemanager.dataprotection.models.DppResource;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* AzureBackupRecoveryPointResource
@@ -17,13 +21,30 @@
@Fluent
public final class AzureBackupRecoveryPointResourceInner extends DppResource {
/*
- * AzureBackupRecoveryPoint
- *
* AzureBackupRecoveryPointResource properties
*/
- @JsonProperty(value = "properties")
private AzureBackupRecoveryPoint properties;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ private SystemData systemData;
+
/**
* Creates an instance of AzureBackupRecoveryPointResourceInner class.
*/
@@ -31,9 +52,7 @@ public AzureBackupRecoveryPointResourceInner() {
}
/**
- * Get the properties property: AzureBackupRecoveryPoint
- *
- * AzureBackupRecoveryPointResource properties.
+ * Get the properties property: AzureBackupRecoveryPointResource properties.
*
* @return the properties value.
*/
@@ -42,9 +61,7 @@ public AzureBackupRecoveryPoint properties() {
}
/**
- * Set the properties property: AzureBackupRecoveryPoint
- *
- * AzureBackupRecoveryPointResource properties.
+ * Set the properties property: AzureBackupRecoveryPointResource properties.
*
* @param properties the properties value to set.
* @return the AzureBackupRecoveryPointResourceInner object itself.
@@ -54,6 +71,46 @@ public AzureBackupRecoveryPointResourceInner withProperties(AzureBackupRecoveryP
return this;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ @Override
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Validates the instance.
*
@@ -66,4 +123,51 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AzureBackupRecoveryPointResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AzureBackupRecoveryPointResourceInner if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the AzureBackupRecoveryPointResourceInner.
+ */
+ public static AzureBackupRecoveryPointResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AzureBackupRecoveryPointResourceInner deserializedAzureBackupRecoveryPointResourceInner
+ = new AzureBackupRecoveryPointResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedAzureBackupRecoveryPointResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedAzureBackupRecoveryPointResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedAzureBackupRecoveryPointResourceInner.type = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedAzureBackupRecoveryPointResourceInner.systemData = SystemData.fromJson(reader);
+ } else if ("properties".equals(fieldName)) {
+ deserializedAzureBackupRecoveryPointResourceInner.properties
+ = AzureBackupRecoveryPoint.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAzureBackupRecoveryPointResourceInner;
+ });
+ }
}
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 1af6152b81d0..93cdbdc39c69 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BackupInstanceResourceInner.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BackupInstanceResourceInner.java
@@ -5,9 +5,13 @@
package com.azure.resourcemanager.dataprotection.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.dataprotection.models.BackupInstance;
import com.azure.resourcemanager.dataprotection.models.DppProxyResource;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.Map;
/**
@@ -20,9 +24,28 @@ public final class BackupInstanceResourceInner extends DppProxyResource {
/*
* BackupInstanceResource properties
*/
- @JsonProperty(value = "properties")
private BackupInstance properties;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ private SystemData systemData;
+
/**
* Creates an instance of BackupInstanceResourceInner class.
*/
@@ -49,6 +72,46 @@ public BackupInstanceResourceInner withProperties(BackupInstance properties) {
return this;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ @Override
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* {@inheritDoc}
*/
@@ -70,4 +133,53 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of BackupInstanceResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of BackupInstanceResourceInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the BackupInstanceResourceInner.
+ */
+ public static BackupInstanceResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ BackupInstanceResourceInner deserializedBackupInstanceResourceInner = new BackupInstanceResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedBackupInstanceResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedBackupInstanceResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedBackupInstanceResourceInner.type = reader.getString();
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedBackupInstanceResourceInner.withTags(tags);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedBackupInstanceResourceInner.systemData = SystemData.fromJson(reader);
+ } else if ("properties".equals(fieldName)) {
+ deserializedBackupInstanceResourceInner.properties = BackupInstance.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedBackupInstanceResourceInner;
+ });
+ }
}
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 a4880884bf87..fce5e3648118 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
@@ -5,11 +5,15 @@
package com.azure.resourcemanager.dataprotection.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.dataprotection.models.BackupVault;
import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails;
import com.azure.resourcemanager.dataprotection.models.DppTrackedResource;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.Map;
/**
@@ -20,13 +24,30 @@
@Fluent
public final class BackupVaultResourceInner extends DppTrackedResource {
/*
- * BackupVault
- *
* BackupVaultResource properties
*/
- @JsonProperty(value = "properties", required = true)
private BackupVault properties;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ private SystemData systemData;
+
/**
* Creates an instance of BackupVaultResourceInner class.
*/
@@ -34,9 +55,7 @@ public BackupVaultResourceInner() {
}
/**
- * Get the properties property: BackupVault
- *
- * BackupVaultResource properties.
+ * Get the properties property: BackupVaultResource properties.
*
* @return the properties value.
*/
@@ -45,9 +64,7 @@ public BackupVault properties() {
}
/**
- * Set the properties property: BackupVault
- *
- * BackupVaultResource properties.
+ * Set the properties property: BackupVaultResource properties.
*
* @param properties the properties value to set.
* @return the BackupVaultResourceInner object itself.
@@ -57,6 +74,46 @@ public BackupVaultResourceInner withProperties(BackupVault properties) {
return this;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ @Override
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* {@inheritDoc}
*/
@@ -102,12 +159,71 @@ public BackupVaultResourceInner withTags(Map tags) {
public void validate() {
super.validate();
if (properties() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property properties in model BackupVaultResourceInner"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property properties in model BackupVaultResourceInner"));
} else {
properties().validate();
}
}
private static final ClientLogger LOGGER = new ClientLogger(BackupVaultResourceInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("eTag", etag());
+ jsonWriter.writeJsonField("identity", identity());
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of BackupVaultResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of BackupVaultResourceInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the BackupVaultResourceInner.
+ */
+ public static BackupVaultResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ BackupVaultResourceInner deserializedBackupVaultResourceInner = new BackupVaultResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedBackupVaultResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedBackupVaultResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedBackupVaultResourceInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedBackupVaultResourceInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedBackupVaultResourceInner.withTags(tags);
+ } else if ("eTag".equals(fieldName)) {
+ deserializedBackupVaultResourceInner.withEtag(reader.getString());
+ } else if ("systemData".equals(fieldName)) {
+ deserializedBackupVaultResourceInner.systemData = SystemData.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedBackupVaultResourceInner.withIdentity(DppIdentityDetails.fromJson(reader));
+ } else if ("properties".equals(fieldName)) {
+ deserializedBackupVaultResourceInner.properties = BackupVault.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedBackupVaultResourceInner;
+ });
+ }
}
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 5c83a1d54390..0cbfafcdce13 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BaseBackupPolicyResourceInner.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BaseBackupPolicyResourceInner.java
@@ -5,9 +5,13 @@
package com.azure.resourcemanager.dataprotection.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicy;
import com.azure.resourcemanager.dataprotection.models.DppResource;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* BaseBackupPolicyResource
@@ -17,13 +21,30 @@
@Fluent
public final class BaseBackupPolicyResourceInner extends DppResource {
/*
- * BaseBackupPolicy
- *
* BaseBackupPolicyResource properties
*/
- @JsonProperty(value = "properties")
private BaseBackupPolicy properties;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ private SystemData systemData;
+
/**
* Creates an instance of BaseBackupPolicyResourceInner class.
*/
@@ -31,9 +52,7 @@ public BaseBackupPolicyResourceInner() {
}
/**
- * Get the properties property: BaseBackupPolicy
- *
- * BaseBackupPolicyResource properties.
+ * Get the properties property: BaseBackupPolicyResource properties.
*
* @return the properties value.
*/
@@ -42,9 +61,7 @@ public BaseBackupPolicy properties() {
}
/**
- * Set the properties property: BaseBackupPolicy
- *
- * BaseBackupPolicyResource properties.
+ * Set the properties property: BaseBackupPolicyResource properties.
*
* @param properties the properties value to set.
* @return the BaseBackupPolicyResourceInner object itself.
@@ -54,6 +71,46 @@ public BaseBackupPolicyResourceInner withProperties(BaseBackupPolicy properties)
return this;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ @Override
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Validates the instance.
*
@@ -66,4 +123,50 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of BaseBackupPolicyResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of BaseBackupPolicyResourceInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the BaseBackupPolicyResourceInner.
+ */
+ public static BaseBackupPolicyResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ BaseBackupPolicyResourceInner deserializedBaseBackupPolicyResourceInner
+ = new BaseBackupPolicyResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedBaseBackupPolicyResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedBaseBackupPolicyResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedBaseBackupPolicyResourceInner.type = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedBaseBackupPolicyResourceInner.systemData = SystemData.fromJson(reader);
+ } else if ("properties".equals(fieldName)) {
+ deserializedBaseBackupPolicyResourceInner.properties = BaseBackupPolicy.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedBaseBackupPolicyResourceInner;
+ });
+ }
}
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 61c6713c9eaa..06f121e56b69 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CheckNameAvailabilityResultInner.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CheckNameAvailabilityResultInner.java
@@ -5,7 +5,11 @@
package com.azure.resourcemanager.dataprotection.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* CheckNameAvailabilityResult
@@ -13,23 +17,20 @@
* CheckNameAvailability Result.
*/
@Fluent
-public final class CheckNameAvailabilityResultInner {
+public final class CheckNameAvailabilityResultInner implements JsonSerializable {
/*
* Gets or sets the message.
*/
- @JsonProperty(value = "message")
private String message;
/*
* Gets or sets a value indicating whether [name available].
*/
- @JsonProperty(value = "nameAvailable")
private Boolean nameAvailable;
/*
* Gets or sets the reason.
*/
- @JsonProperty(value = "reason")
private String reason;
/**
@@ -105,4 +106,48 @@ public CheckNameAvailabilityResultInner withReason(String reason) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("message", this.message);
+ jsonWriter.writeBooleanField("nameAvailable", this.nameAvailable);
+ jsonWriter.writeStringField("reason", this.reason);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CheckNameAvailabilityResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CheckNameAvailabilityResultInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CheckNameAvailabilityResultInner.
+ */
+ public static CheckNameAvailabilityResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CheckNameAvailabilityResultInner deserializedCheckNameAvailabilityResultInner
+ = new CheckNameAvailabilityResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("message".equals(fieldName)) {
+ deserializedCheckNameAvailabilityResultInner.message = reader.getString();
+ } else if ("nameAvailable".equals(fieldName)) {
+ deserializedCheckNameAvailabilityResultInner.nameAvailable
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("reason".equals(fieldName)) {
+ deserializedCheckNameAvailabilityResultInner.reason = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCheckNameAvailabilityResultInner;
+ });
+ }
}
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 8f7f84778999..de186cf09c9e 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ClientDiscoveryValueForSingleApiInner.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ClientDiscoveryValueForSingleApiInner.java
@@ -5,9 +5,13 @@
package com.azure.resourcemanager.dataprotection.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryDisplay;
import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* ClientDiscoveryValueForSingleApi
@@ -15,39 +19,31 @@
* Available operation details.
*/
@Fluent
-public final class ClientDiscoveryValueForSingleApiInner {
+public final class ClientDiscoveryValueForSingleApiInner
+ implements JsonSerializable {
/*
- * ClientDiscoveryDisplay
- *
* Contains the localized display information for this particular operation
*/
- @JsonProperty(value = "display")
private ClientDiscoveryDisplay display;
/*
* Name of the Operation.
*/
- @JsonProperty(value = "name")
private String name;
/*
* Indicates whether the operation is a data action
*/
- @JsonProperty(value = "isDataAction")
private Boolean isDataAction;
/*
* The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX
*/
- @JsonProperty(value = "origin")
private String origin;
/*
- * ClientDiscoveryForProperties
- *
* Properties for the given operation.
*/
- @JsonProperty(value = "properties")
private ClientDiscoveryForProperties properties;
/**
@@ -57,9 +53,7 @@ public ClientDiscoveryValueForSingleApiInner() {
}
/**
- * Get the display property: ClientDiscoveryDisplay
- *
- * Contains the localized display information for this particular operation.
+ * Get the display property: Contains the localized display information for this particular operation.
*
* @return the display value.
*/
@@ -68,9 +62,7 @@ public ClientDiscoveryDisplay display() {
}
/**
- * Set the display property: ClientDiscoveryDisplay
- *
- * Contains the localized display information for this particular operation.
+ * Set the display property: Contains the localized display information for this particular operation.
*
* @param display the display value to set.
* @return the ClientDiscoveryValueForSingleApiInner object itself.
@@ -143,9 +135,7 @@ public ClientDiscoveryValueForSingleApiInner withOrigin(String origin) {
}
/**
- * Get the properties property: ClientDiscoveryForProperties
- *
- * Properties for the given operation.
+ * Get the properties property: Properties for the given operation.
*
* @return the properties value.
*/
@@ -154,9 +144,7 @@ public ClientDiscoveryForProperties properties() {
}
/**
- * Set the properties property: ClientDiscoveryForProperties
- *
- * Properties for the given operation.
+ * Set the properties property: Properties for the given operation.
*
* @param properties the properties value to set.
* @return the ClientDiscoveryValueForSingleApiInner object itself.
@@ -179,4 +167,55 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("display", this.display);
+ jsonWriter.writeStringField("name", this.name);
+ jsonWriter.writeBooleanField("isDataAction", this.isDataAction);
+ jsonWriter.writeStringField("origin", this.origin);
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClientDiscoveryValueForSingleApiInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClientDiscoveryValueForSingleApiInner if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClientDiscoveryValueForSingleApiInner.
+ */
+ public static ClientDiscoveryValueForSingleApiInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClientDiscoveryValueForSingleApiInner deserializedClientDiscoveryValueForSingleApiInner
+ = new ClientDiscoveryValueForSingleApiInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("display".equals(fieldName)) {
+ deserializedClientDiscoveryValueForSingleApiInner.display = ClientDiscoveryDisplay.fromJson(reader);
+ } else if ("name".equals(fieldName)) {
+ deserializedClientDiscoveryValueForSingleApiInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedClientDiscoveryValueForSingleApiInner.isDataAction
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("origin".equals(fieldName)) {
+ deserializedClientDiscoveryValueForSingleApiInner.origin = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedClientDiscoveryValueForSingleApiInner.properties
+ = ClientDiscoveryForProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClientDiscoveryValueForSingleApiInner;
+ });
+ }
}
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 0c69137e7a87..9ab79aeb2953 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
@@ -5,9 +5,13 @@
package com.azure.resourcemanager.dataprotection.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.dataprotection.models.DeletedBackupInstance;
import com.azure.resourcemanager.dataprotection.models.DppResource;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* Deleted Backup Instance.
@@ -17,9 +21,28 @@ public final class DeletedBackupInstanceResourceInner extends DppResource {
/*
* DeletedBackupInstanceResource properties
*/
- @JsonProperty(value = "properties")
private DeletedBackupInstance properties;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ private SystemData systemData;
+
/**
* Creates an instance of DeletedBackupInstanceResourceInner class.
*/
@@ -46,6 +69,46 @@ public DeletedBackupInstanceResourceInner withProperties(DeletedBackupInstance p
return this;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ @Override
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Validates the instance.
*
@@ -58,4 +121,50 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DeletedBackupInstanceResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DeletedBackupInstanceResourceInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the DeletedBackupInstanceResourceInner.
+ */
+ public static DeletedBackupInstanceResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DeletedBackupInstanceResourceInner deserializedDeletedBackupInstanceResourceInner
+ = new DeletedBackupInstanceResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedDeletedBackupInstanceResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedDeletedBackupInstanceResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedDeletedBackupInstanceResourceInner.type = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedDeletedBackupInstanceResourceInner.systemData = SystemData.fromJson(reader);
+ } else if ("properties".equals(fieldName)) {
+ deserializedDeletedBackupInstanceResourceInner.properties = DeletedBackupInstance.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDeletedBackupInstanceResourceInner;
+ });
+ }
}
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 6ec8b07e0cec..df65f799a973 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/DppBaseResourceInner.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/DppBaseResourceInner.java
@@ -5,29 +5,30 @@
package com.azure.resourcemanager.dataprotection.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Base resource under Microsoft.DataProtection provider namespace.
*/
@Immutable
-public final class DppBaseResourceInner {
+public final class DppBaseResourceInner implements JsonSerializable {
/*
* Resource Id represents the complete path to the resource.
*/
- @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
private String id;
/*
* Resource name associated with the resource.
*/
- @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
/*
* Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
*/
- @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
private String type;
/**
@@ -71,4 +72,43 @@ public String type() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DppBaseResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DppBaseResourceInner if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the DppBaseResourceInner.
+ */
+ public static DppBaseResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DppBaseResourceInner deserializedDppBaseResourceInner = new DppBaseResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedDppBaseResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedDppBaseResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedDppBaseResourceInner.type = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDppBaseResourceInner;
+ });
+ }
}
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 4d82a4e2e563..8b42671f348c 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ExportJobsResultInner.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ExportJobsResultInner.java
@@ -5,7 +5,11 @@
package com.azure.resourcemanager.dataprotection.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* ExportJobsResult
@@ -13,29 +17,25 @@
* The result for export jobs containing blob details.
*/
@Immutable
-public final class ExportJobsResultInner {
+public final class ExportJobsResultInner implements JsonSerializable {
/*
* URL of the blob into which the serialized string of list of jobs is exported.
*/
- @JsonProperty(value = "blobUrl", access = JsonProperty.Access.WRITE_ONLY)
private String blobUrl;
/*
* SAS key to access the blob.
*/
- @JsonProperty(value = "blobSasKey", access = JsonProperty.Access.WRITE_ONLY)
private String blobSasKey;
/*
* URL of the blob into which the ExcelFile is uploaded.
*/
- @JsonProperty(value = "excelFileBlobUrl", access = JsonProperty.Access.WRITE_ONLY)
private String excelFileBlobUrl;
/*
* SAS key to access the ExcelFile blob.
*/
- @JsonProperty(value = "excelFileBlobSasKey", access = JsonProperty.Access.WRITE_ONLY)
private String excelFileBlobSasKey;
/**
@@ -87,4 +87,45 @@ public String excelFileBlobSasKey() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ExportJobsResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ExportJobsResultInner if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ExportJobsResultInner.
+ */
+ public static ExportJobsResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExportJobsResultInner deserializedExportJobsResultInner = new ExportJobsResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("blobUrl".equals(fieldName)) {
+ deserializedExportJobsResultInner.blobUrl = reader.getString();
+ } else if ("blobSasKey".equals(fieldName)) {
+ deserializedExportJobsResultInner.blobSasKey = reader.getString();
+ } else if ("excelFileBlobUrl".equals(fieldName)) {
+ deserializedExportJobsResultInner.excelFileBlobUrl = reader.getString();
+ } else if ("excelFileBlobSasKey".equals(fieldName)) {
+ deserializedExportJobsResultInner.excelFileBlobSasKey = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExportJobsResultInner;
+ });
+ }
}
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 bcb953128ec5..c05d31f4bc19 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/FeatureValidationResponseBaseInner.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/FeatureValidationResponseBaseInner.java
@@ -5,29 +5,38 @@
package com.azure.resourcemanager.dataprotection.fluent.models;
import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.dataprotection.models.FeatureValidationResponse;
-import com.fasterxml.jackson.annotation.JsonSubTypes;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonTypeName;
+import java.io.IOException;
/**
* 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) })
@Immutable
-public class FeatureValidationResponseBaseInner {
+public class FeatureValidationResponseBaseInner implements JsonSerializable {
+ /*
+ * Type of the specific object - used for deserializing
+ */
+ private String objectType = "FeatureValidationResponseBase";
+
/**
* Creates an instance of FeatureValidationResponseBaseInner class.
*/
public FeatureValidationResponseBaseInner() {
}
+ /**
+ * Get the objectType property: Type of the specific object - used for deserializing.
+ *
+ * @return the objectType value.
+ */
+ public String objectType() {
+ return this.objectType;
+ }
+
/**
* Validates the instance.
*
@@ -35,4 +44,66 @@ public FeatureValidationResponseBaseInner() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("objectType", this.objectType);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FeatureValidationResponseBaseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FeatureValidationResponseBaseInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the FeatureValidationResponseBaseInner.
+ */
+ public static FeatureValidationResponseBaseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String discriminatorValue = null;
+ try (JsonReader readerToUse = reader.bufferObject()) {
+ readerToUse.nextToken(); // Prepare for reading
+ while (readerToUse.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = readerToUse.getFieldName();
+ readerToUse.nextToken();
+ if ("objectType".equals(fieldName)) {
+ discriminatorValue = readerToUse.getString();
+ break;
+ } else {
+ readerToUse.skipChildren();
+ }
+ }
+ // Use the discriminator value to determine which subtype should be deserialized.
+ if ("FeatureValidationResponse".equals(discriminatorValue)) {
+ return FeatureValidationResponse.fromJson(readerToUse.reset());
+ } else {
+ return fromJsonKnownDiscriminator(readerToUse.reset());
+ }
+ }
+ });
+ }
+
+ static FeatureValidationResponseBaseInner fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FeatureValidationResponseBaseInner deserializedFeatureValidationResponseBaseInner
+ = new FeatureValidationResponseBaseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("objectType".equals(fieldName)) {
+ deserializedFeatureValidationResponseBaseInner.objectType = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFeatureValidationResponseBaseInner;
+ });
+ }
}
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 cc7b3b9ed375..82ea561f8dc9 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationJobExtendedInfoInner.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationJobExtendedInfoInner.java
@@ -5,24 +5,28 @@
package com.azure.resourcemanager.dataprotection.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.dataprotection.models.OperationExtendedInfo;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonTypeName;
+import java.io.IOException;
/**
* OperationJobExtendedInfo
*
* Operation Job Extended Info.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType")
-@JsonTypeName("OperationJobExtendedInfo")
@Fluent
public final class OperationJobExtendedInfoInner extends OperationExtendedInfo {
+ /*
+ * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of
+ * types.
+ */
+ private String objectType = "OperationJobExtendedInfo";
+
/*
* Name or Arm Id of the job created for this operation.
*/
- @JsonProperty(value = "jobId")
private String jobId;
/**
@@ -31,6 +35,17 @@ public final class OperationJobExtendedInfoInner extends OperationExtendedInfo {
public OperationJobExtendedInfoInner() {
}
+ /**
+ * Get the objectType property: This property will be used as the discriminator for deciding the specific types in
+ * the polymorphic chain of types.
+ *
+ * @return the objectType value.
+ */
+ @Override
+ public String objectType() {
+ return this.objectType;
+ }
+
/**
* Get the jobId property: Name or Arm Id of the job created for this operation.
*
@@ -60,4 +75,44 @@ public OperationJobExtendedInfoInner withJobId(String jobId) {
public void validate() {
super.validate();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("objectType", this.objectType);
+ jsonWriter.writeStringField("jobId", this.jobId);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationJobExtendedInfoInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationJobExtendedInfoInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationJobExtendedInfoInner.
+ */
+ public static OperationJobExtendedInfoInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationJobExtendedInfoInner deserializedOperationJobExtendedInfoInner
+ = new OperationJobExtendedInfoInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("objectType".equals(fieldName)) {
+ deserializedOperationJobExtendedInfoInner.objectType = reader.getString();
+ } else if ("jobId".equals(fieldName)) {
+ deserializedOperationJobExtendedInfoInner.jobId = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationJobExtendedInfoInner;
+ });
+ }
}
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 fc60050308a5..98fb83e4d9bc 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationResourceInner.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationResourceInner.java
@@ -6,9 +6,15 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.exception.ManagementError;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.dataprotection.models.OperationExtendedInfo;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
/**
* OperationResource
@@ -16,11 +22,10 @@
* Operation Resource.
*/
@Fluent
-public final class OperationResourceInner {
+public final class OperationResourceInner implements JsonSerializable {
/*
* End time of the operation
*/
- @JsonProperty(value = "endTime")
private OffsetDateTime endTime;
/*
@@ -28,39 +33,31 @@ public final class OperationResourceInner {
* 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.
*/
- @JsonProperty(value = "error")
private ManagementError error;
/*
* It should match what is used to GET the operation result
*/
- @JsonProperty(value = "id")
private String id;
/*
* It must match the last segment of the "id" field, and will typically be a GUID / system generated value
*/
- @JsonProperty(value = "name")
private String name;
/*
- * OperationExtendedInfo
- *
* End time of the operation
*/
- @JsonProperty(value = "properties")
private OperationExtendedInfo properties;
/*
* Start time of the operation
*/
- @JsonProperty(value = "startTime")
private OffsetDateTime startTime;
/*
* The status property.
*/
- @JsonProperty(value = "status")
private String status;
/**
@@ -156,9 +153,7 @@ public OperationResourceInner withName(String name) {
}
/**
- * Get the properties property: OperationExtendedInfo
- *
- * End time of the operation.
+ * Get the properties property: End time of the operation.
*
* @return the properties value.
*/
@@ -167,9 +162,7 @@ public OperationExtendedInfo properties() {
}
/**
- * Set the properties property: OperationExtendedInfo
- *
- * End time of the operation.
+ * Set the properties property: End time of the operation.
*
* @param properties the properties value to set.
* @return the OperationResourceInner object itself.
@@ -229,4 +222,62 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("endTime",
+ this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime));
+ jsonWriter.writeJsonField("error", this.error);
+ jsonWriter.writeStringField("id", this.id);
+ jsonWriter.writeStringField("name", this.name);
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeStringField("startTime",
+ this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime));
+ jsonWriter.writeStringField("status", this.status);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationResourceInner if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationResourceInner.
+ */
+ public static OperationResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationResourceInner deserializedOperationResourceInner = new OperationResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("endTime".equals(fieldName)) {
+ deserializedOperationResourceInner.endTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("error".equals(fieldName)) {
+ deserializedOperationResourceInner.error = ManagementError.fromJson(reader);
+ } else if ("id".equals(fieldName)) {
+ deserializedOperationResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedOperationResourceInner.name = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedOperationResourceInner.properties = OperationExtendedInfo.fromJson(reader);
+ } else if ("startTime".equals(fieldName)) {
+ deserializedOperationResourceInner.startTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("status".equals(fieldName)) {
+ deserializedOperationResourceInner.status = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationResourceInner;
+ });
+ }
}
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 7ce0d4bb50cb..d818635dd073 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
@@ -5,9 +5,13 @@
package com.azure.resourcemanager.dataprotection.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.dataprotection.models.DppResource;
import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* ResourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs.
@@ -17,9 +21,28 @@ public final class ResourceGuardProxyBaseResourceInner extends DppResource {
/*
* ResourceGuardProxyBaseResource properties
*/
- @JsonProperty(value = "properties")
private ResourceGuardProxyBase properties;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ private SystemData systemData;
+
/**
* Creates an instance of ResourceGuardProxyBaseResourceInner class.
*/
@@ -46,6 +69,46 @@ public ResourceGuardProxyBaseResourceInner withProperties(ResourceGuardProxyBase
return this;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ @Override
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Validates the instance.
*
@@ -58,4 +121,51 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ResourceGuardProxyBaseResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ResourceGuardProxyBaseResourceInner if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ResourceGuardProxyBaseResourceInner.
+ */
+ public static ResourceGuardProxyBaseResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ResourceGuardProxyBaseResourceInner deserializedResourceGuardProxyBaseResourceInner
+ = new ResourceGuardProxyBaseResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedResourceGuardProxyBaseResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedResourceGuardProxyBaseResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedResourceGuardProxyBaseResourceInner.type = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedResourceGuardProxyBaseResourceInner.systemData = SystemData.fromJson(reader);
+ } else if ("properties".equals(fieldName)) {
+ deserializedResourceGuardProxyBaseResourceInner.properties
+ = ResourceGuardProxyBase.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedResourceGuardProxyBaseResourceInner;
+ });
+ }
}
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 76df24be46b1..68c290660cd9 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ResourceGuardResourceInner.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ResourceGuardResourceInner.java
@@ -5,9 +5,13 @@
package com.azure.resourcemanager.dataprotection.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.dataprotection.models.DppBaseTrackedResource;
import com.azure.resourcemanager.dataprotection.models.ResourceGuard;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.Map;
/**
@@ -18,9 +22,28 @@ public final class ResourceGuardResourceInner extends DppBaseTrackedResource {
/*
* ResourceGuardResource properties
*/
- @JsonProperty(value = "properties")
private ResourceGuard properties;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ private SystemData systemData;
+
/**
* Creates an instance of ResourceGuardResourceInner class.
*/
@@ -47,6 +70,46 @@ public ResourceGuardResourceInner withProperties(ResourceGuard properties) {
return this;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ @Override
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* {@inheritDoc}
*/
@@ -86,4 +149,59 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("eTag", etag());
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ResourceGuardResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ResourceGuardResourceInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ResourceGuardResourceInner.
+ */
+ public static ResourceGuardResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ResourceGuardResourceInner deserializedResourceGuardResourceInner = new ResourceGuardResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedResourceGuardResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedResourceGuardResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedResourceGuardResourceInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedResourceGuardResourceInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedResourceGuardResourceInner.withTags(tags);
+ } else if ("eTag".equals(fieldName)) {
+ deserializedResourceGuardResourceInner.withEtag(reader.getString());
+ } else if ("systemData".equals(fieldName)) {
+ deserializedResourceGuardResourceInner.systemData = SystemData.fromJson(reader);
+ } else if ("properties".equals(fieldName)) {
+ deserializedResourceGuardResourceInner.properties = ResourceGuard.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedResourceGuardResourceInner;
+ });
+ }
}
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 d1410b89b150..3cba48dbd8ee 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
@@ -5,17 +5,20 @@
package com.azure.resourcemanager.dataprotection.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Response of Unlock Delete API.
*/
@Fluent
-public final class UnlockDeleteResponseInner {
+public final class UnlockDeleteResponseInner implements JsonSerializable {
/*
* This is the time when unlock delete privileges will get expired.
*/
- @JsonProperty(value = "unlockDeleteExpiryTime")
private String unlockDeleteExpiryTime;
/**
@@ -51,4 +54,40 @@ public UnlockDeleteResponseInner withUnlockDeleteExpiryTime(String unlockDeleteE
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("unlockDeleteExpiryTime", this.unlockDeleteExpiryTime);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of UnlockDeleteResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of UnlockDeleteResponseInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the UnlockDeleteResponseInner.
+ */
+ public static UnlockDeleteResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ UnlockDeleteResponseInner deserializedUnlockDeleteResponseInner = new UnlockDeleteResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("unlockDeleteExpiryTime".equals(fieldName)) {
+ deserializedUnlockDeleteResponseInner.unlockDeleteExpiryTime = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedUnlockDeleteResponseInner;
+ });
+ }
}
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 94b68eb17a5c..dd8f464f358c 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceResourceImpl.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceResourceImpl.java
@@ -12,6 +12,8 @@
import com.azure.resourcemanager.dataprotection.models.BackupInstance;
import com.azure.resourcemanager.dataprotection.models.BackupInstanceResource;
import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo;
+import com.azure.resourcemanager.dataprotection.models.StopProtectionRequest;
+import com.azure.resourcemanager.dataprotection.models.SuspendBackupRequest;
import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest;
import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest;
import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject;
@@ -78,14 +80,16 @@ 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;
}
@@ -101,14 +105,16 @@ 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;
}
@@ -116,31 +122,35 @@ public BackupInstanceResource apply(Context context) {
com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.vaultName = Utils.getValueFromIdByName(innerObject.id(), "backupVaults");
- this.backupInstanceName = Utils.getValueFromIdByName(innerObject.id(), "backupInstances");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.vaultName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "backupVaults");
+ this.backupInstanceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "backupInstances");
}
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) {
@@ -148,18 +158,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() {
@@ -182,36 +192,38 @@ public void stopProtection() {
serviceManager.backupInstances().stopProtection(resourceGroupName, vaultName, backupInstanceName);
}
- public void stopProtection(Context context) {
- serviceManager.backupInstances().stopProtection(resourceGroupName, vaultName, backupInstanceName, context);
+ public void stopProtection(StopProtectionRequest parameters, Context context) {
+ serviceManager.backupInstances()
+ .stopProtection(resourceGroupName, vaultName, backupInstanceName, parameters, context);
}
public void suspendBackups() {
serviceManager.backupInstances().suspendBackups(resourceGroupName, vaultName, backupInstanceName);
}
- public void suspendBackups(Context context) {
- serviceManager.backupInstances().suspendBackups(resourceGroupName, vaultName, backupInstanceName, context);
+ public void suspendBackups(SuspendBackupRequest parameters, Context context) {
+ serviceManager.backupInstances()
+ .suspendBackups(resourceGroupName, vaultName, backupInstanceName, parameters, 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 2f9edf2b0307..0a2935074abc 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
@@ -39,6 +39,8 @@
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.StopProtectionRequest;
+import com.azure.resourcemanager.dataprotection.models.SuspendBackupRequest;
import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest;
import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest;
import com.azure.resourcemanager.dataprotection.models.ValidateCrossRegionRestoreRequestObject;
@@ -221,7 +223,8 @@ Mono>> stopProtection(@HostParam("$host") String endpo
@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);
+ @BodyParam("application/json") StopProtectionRequest parameters, @HeaderParam("Accept") String accept,
+ Context context);
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/suspendBackups")
@@ -231,7 +234,8 @@ Mono>> suspendBackups(@HostParam("$host") String endpo
@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);
+ @BodyParam("application/json") SuspendBackupRequest parameters, @HeaderParam("Accept") String accept,
+ Context context);
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/sync")
@@ -3104,6 +3108,7 @@ public void resumeProtection(String resourceGroupName, String vaultName, String
* @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.
+ * @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.
@@ -3111,7 +3116,7 @@ public void resumeProtection(String resourceGroupName, String vaultName, String
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> stopProtectionWithResponseAsync(String resourceGroupName, String vaultName,
- String backupInstanceName) {
+ String backupInstanceName, StopProtectionRequest parameters) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -3131,10 +3136,14 @@ private Mono>> stopProtectionWithResponseAsync(String
return Mono
.error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
}
+ if (parameters != null) {
+ parameters.validate();
+ }
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))
+ resourceGroupName, vaultName, backupInstanceName, this.client.getApiVersion(), parameters, accept,
+ context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -3144,6 +3153,7 @@ private Mono>> stopProtectionWithResponseAsync(String
* @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.
+ * @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.
@@ -3152,7 +3162,7 @@ private Mono>> stopProtectionWithResponseAsync(String
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> stopProtectionWithResponseAsync(String resourceGroupName, String vaultName,
- String backupInstanceName, Context context) {
+ String backupInstanceName, StopProtectionRequest parameters, Context context) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -3172,10 +3182,34 @@ private Mono>> stopProtectionWithResponseAsync(String
return Mono
.error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
}
+ if (parameters != null) {
+ parameters.validate();
+ }
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);
+ vaultName, backupInstanceName, this.client.getApiVersion(), parameters, 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.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginStopProtectionAsync(String resourceGroupName, String vaultName,
+ String backupInstanceName, StopProtectionRequest parameters) {
+ Mono>> mono
+ = stopProtectionWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
}
/**
@@ -3192,8 +3226,9 @@ private Mono>> stopProtectionWithResponseAsync(String
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginStopProtectionAsync(String resourceGroupName, String vaultName,
String backupInstanceName) {
+ final StopProtectionRequest parameters = null;
Mono>> mono
- = stopProtectionWithResponseAsync(resourceGroupName, vaultName, backupInstanceName);
+ = stopProtectionWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters);
return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
this.client.getContext());
}
@@ -3204,6 +3239,7 @@ private PollerFlux, Void> beginStopProtectionAsync(String resou
* @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.
+ * @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.
@@ -3212,10 +3248,10 @@ private PollerFlux, Void> beginStopProtectionAsync(String resou
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginStopProtectionAsync(String resourceGroupName, String vaultName,
- String backupInstanceName, Context context) {
+ String backupInstanceName, StopProtectionRequest parameters, Context context) {
context = this.client.mergeContext(context);
Mono>> mono
- = stopProtectionWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, context);
+ = stopProtectionWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context);
return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
context);
}
@@ -3234,7 +3270,9 @@ private PollerFlux, Void> beginStopProtectionAsync(String resou
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginStopProtection(String resourceGroupName, String vaultName,
String backupInstanceName) {
- return this.beginStopProtectionAsync(resourceGroupName, vaultName, backupInstanceName).getSyncPoller();
+ final StopProtectionRequest parameters = null;
+ return this.beginStopProtectionAsync(resourceGroupName, vaultName, backupInstanceName, parameters)
+ .getSyncPoller();
}
/**
@@ -3243,6 +3281,7 @@ public SyncPoller, Void> beginStopProtection(String resourceGro
* @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.
+ * @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.
@@ -3251,8 +3290,28 @@ public SyncPoller, Void> beginStopProtection(String resourceGro
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginStopProtection(String resourceGroupName, String vaultName,
- String backupInstanceName, Context context) {
- return this.beginStopProtectionAsync(resourceGroupName, vaultName, backupInstanceName, context).getSyncPoller();
+ String backupInstanceName, StopProtectionRequest parameters, Context context) {
+ return this.beginStopProtectionAsync(resourceGroupName, vaultName, backupInstanceName, parameters, 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.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono stopProtectionAsync(String resourceGroupName, String vaultName, String backupInstanceName,
+ StopProtectionRequest parameters) {
+ return beginStopProtectionAsync(resourceGroupName, vaultName, backupInstanceName, parameters).last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -3268,7 +3327,8 @@ public SyncPoller, Void> beginStopProtection(String resourceGro
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono stopProtectionAsync(String resourceGroupName, String vaultName, String backupInstanceName) {
- return beginStopProtectionAsync(resourceGroupName, vaultName, backupInstanceName).last()
+ final StopProtectionRequest parameters = null;
+ return beginStopProtectionAsync(resourceGroupName, vaultName, backupInstanceName, parameters).last()
.flatMap(this.client::getLroFinalResultOrError);
}
@@ -3278,6 +3338,7 @@ private Mono stopProtectionAsync(String resourceGroupName, String vaultNam
* @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.
+ * @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.
@@ -3286,8 +3347,8 @@ private Mono stopProtectionAsync(String resourceGroupName, String vaultNam
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono stopProtectionAsync(String resourceGroupName, String vaultName, String backupInstanceName,
- Context context) {
- return beginStopProtectionAsync(resourceGroupName, vaultName, backupInstanceName, context).last()
+ StopProtectionRequest parameters, Context context) {
+ return beginStopProtectionAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).last()
.flatMap(this.client::getLroFinalResultOrError);
}
@@ -3303,7 +3364,8 @@ private Mono stopProtectionAsync(String resourceGroupName, String vaultNam
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void stopProtection(String resourceGroupName, String vaultName, String backupInstanceName) {
- stopProtectionAsync(resourceGroupName, vaultName, backupInstanceName).block();
+ final StopProtectionRequest parameters = null;
+ stopProtectionAsync(resourceGroupName, vaultName, backupInstanceName, parameters).block();
}
/**
@@ -3312,14 +3374,16 @@ public void stopProtection(String resourceGroupName, String vaultName, String ba
* @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.
+ * @param parameters Request body for operation.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void stopProtection(String resourceGroupName, String vaultName, String backupInstanceName, Context context) {
- stopProtectionAsync(resourceGroupName, vaultName, backupInstanceName, context).block();
+ public void stopProtection(String resourceGroupName, String vaultName, String backupInstanceName,
+ StopProtectionRequest parameters, Context context) {
+ stopProtectionAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).block();
}
/**
@@ -3329,6 +3393,7 @@ public void stopProtection(String resourceGroupName, String vaultName, String ba
* @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.
+ * @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.
@@ -3336,7 +3401,7 @@ public void stopProtection(String resourceGroupName, String vaultName, String ba
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> suspendBackupsWithResponseAsync(String resourceGroupName, String vaultName,
- String backupInstanceName) {
+ String backupInstanceName, SuspendBackupRequest parameters) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -3356,10 +3421,14 @@ private Mono>> suspendBackupsWithResponseAsync(String
return Mono
.error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
}
+ if (parameters != null) {
+ parameters.validate();
+ }
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))
+ resourceGroupName, vaultName, backupInstanceName, this.client.getApiVersion(), parameters, accept,
+ context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -3370,6 +3439,7 @@ private Mono>> suspendBackupsWithResponseAsync(String
* @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.
+ * @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.
@@ -3378,7 +3448,7 @@ private Mono>> suspendBackupsWithResponseAsync(String
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> suspendBackupsWithResponseAsync(String resourceGroupName, String vaultName,
- String backupInstanceName, Context context) {
+ String backupInstanceName, SuspendBackupRequest parameters, Context context) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -3398,10 +3468,35 @@ private Mono>> suspendBackupsWithResponseAsync(String
return Mono
.error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
}
+ if (parameters != null) {
+ parameters.validate();
+ }
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);
+ vaultName, backupInstanceName, this.client.getApiVersion(), parameters, 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.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginSuspendBackupsAsync(String resourceGroupName, String vaultName,
+ String backupInstanceName, SuspendBackupRequest parameters) {
+ Mono>> mono
+ = suspendBackupsWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
}
/**
@@ -3419,8 +3514,9 @@ private Mono>> suspendBackupsWithResponseAsync(String
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginSuspendBackupsAsync(String resourceGroupName, String vaultName,
String backupInstanceName) {
+ final SuspendBackupRequest parameters = null;
Mono>> mono
- = suspendBackupsWithResponseAsync(resourceGroupName, vaultName, backupInstanceName);
+ = suspendBackupsWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters);
return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
this.client.getContext());
}
@@ -3432,6 +3528,7 @@ private PollerFlux, Void> beginSuspendBackupsAsync(String resou
* @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.
+ * @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.
@@ -3440,10 +3537,10 @@ private PollerFlux, Void> beginSuspendBackupsAsync(String resou
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginSuspendBackupsAsync(String resourceGroupName, String vaultName,
- String backupInstanceName, Context context) {
+ String backupInstanceName, SuspendBackupRequest parameters, Context context) {
context = this.client.mergeContext(context);
Mono>> mono
- = suspendBackupsWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, context);
+ = suspendBackupsWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context);
return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
context);
}
@@ -3463,7 +3560,9 @@ private PollerFlux, Void> beginSuspendBackupsAsync(String resou
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginSuspendBackups(String resourceGroupName, String vaultName,
String backupInstanceName) {
- return this.beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName).getSyncPoller();
+ final SuspendBackupRequest parameters = null;
+ return this.beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName, parameters)
+ .getSyncPoller();
}
/**
@@ -3473,6 +3572,7 @@ public SyncPoller, Void> beginSuspendBackups(String resourceGro
* @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.
+ * @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.
@@ -3481,8 +3581,29 @@ public SyncPoller, Void> beginSuspendBackups(String resourceGro
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginSuspendBackups(String resourceGroupName, String vaultName,
- String backupInstanceName, Context context) {
- return this.beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName, context).getSyncPoller();
+ String backupInstanceName, SuspendBackupRequest parameters, Context context) {
+ return this.beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName, parameters, 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.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono suspendBackupsAsync(String resourceGroupName, String vaultName, String backupInstanceName,
+ SuspendBackupRequest parameters) {
+ return beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName, parameters).last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -3499,7 +3620,8 @@ public SyncPoller, Void> beginSuspendBackups(String resourceGro
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono suspendBackupsAsync(String resourceGroupName, String vaultName, String backupInstanceName) {
- return beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName).last()
+ final SuspendBackupRequest parameters = null;
+ return beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName, parameters).last()
.flatMap(this.client::getLroFinalResultOrError);
}
@@ -3510,6 +3632,7 @@ private Mono suspendBackupsAsync(String resourceGroupName, String vaultNam
* @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.
+ * @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.
@@ -3518,8 +3641,8 @@ private Mono suspendBackupsAsync(String resourceGroupName, String vaultNam
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono suspendBackupsAsync(String resourceGroupName, String vaultName, String backupInstanceName,
- Context context) {
- return beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName, context).last()
+ SuspendBackupRequest parameters, Context context) {
+ return beginSuspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).last()
.flatMap(this.client::getLroFinalResultOrError);
}
@@ -3536,7 +3659,8 @@ private Mono suspendBackupsAsync(String resourceGroupName, String vaultNam
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void suspendBackups(String resourceGroupName, String vaultName, String backupInstanceName) {
- suspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName).block();
+ final SuspendBackupRequest parameters = null;
+ suspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName, parameters).block();
}
/**
@@ -3546,14 +3670,16 @@ public void suspendBackups(String resourceGroupName, String vaultName, String ba
* @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.
+ * @param parameters Request body for operation.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void suspendBackups(String resourceGroupName, String vaultName, String backupInstanceName, Context context) {
- suspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName, context).block();
+ public void suspendBackups(String resourceGroupName, String vaultName, String backupInstanceName,
+ SuspendBackupRequest parameters, Context context) {
+ suspendBackupsAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).block();
}
/**
@@ -3776,7 +3902,8 @@ private Mono syncBackupInstanceAsync(String resourceGroupName, String vaul
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);
}
/**
@@ -4035,7 +4162,8 @@ private Mono validateForRestoreAsync(String resou
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);
}
/**
@@ -4078,9 +4206,7 @@ public OperationJobExtendedInfoInner validateForRestore(String resourceGroupName
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -4105,9 +4231,7 @@ private Mono> listNextSinglePageAsync
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsClientImpl.java
new file mode 100644
index 000000000000..8f01bf943ed4
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsClientImpl.java
@@ -0,0 +1,251 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesExtensionRoutingsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.BackupInstanceResourceInner;
+import com.azure.resourcemanager.dataprotection.models.BackupInstanceResourceList;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupInstancesExtensionRoutingsClient.
+ */
+public final class BackupInstancesExtensionRoutingsClientImpl implements BackupInstancesExtensionRoutingsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final BackupInstancesExtensionRoutingsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DataProtectionClientImpl client;
+
+ /**
+ * Initializes an instance of BackupInstancesExtensionRoutingsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupInstancesExtensionRoutingsClientImpl(DataProtectionClientImpl client) {
+ this.service = RestProxy.create(BackupInstancesExtensionRoutingsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionClientBackupInstancesExtensionRoutings to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "DataProtectionClient")
+ public interface BackupInstancesExtensionRoutingsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{resourceId}/providers/Microsoft.DataProtection/backupInstances")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceId", encoded = true) String resourceId, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Gets a list of backup instances associated with a tracked resource.
+ *
+ * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of backup instances associated with a tracked resource along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceId,
+ accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a list of backup instances associated with a tracked resource.
+ *
+ * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of backup instances associated with a tracked resource along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceId, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Gets a list of backup instances associated with a tracked resource.
+ *
+ * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of backup instances associated with a tracked resource as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceId) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceId), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets a list of backup instances associated with a tracked resource.
+ *
+ * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of backup instances associated with a tracked resource as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceId, Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceId, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets a list of backup instances associated with a tracked resource.
+ *
+ * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of backup instances associated with a tracked resource as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceId) {
+ return new PagedIterable<>(listAsync(resourceId));
+ }
+
+ /**
+ * Gets a list of backup instances associated with a tracked resource.
+ *
+ * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of backup instances associated with a tracked resource as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceId, Context context) {
+ return new PagedIterable<>(listAsync(resourceId, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResourceList along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResourceList along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsImpl.java
new file mode 100644
index 000000000000..a68a502ae0d4
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesExtensionRoutingsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.BackupInstanceResourceInner;
+import com.azure.resourcemanager.dataprotection.models.BackupInstanceResource;
+import com.azure.resourcemanager.dataprotection.models.BackupInstancesExtensionRoutings;
+
+public final class BackupInstancesExtensionRoutingsImpl implements BackupInstancesExtensionRoutings {
+ private static final ClientLogger LOGGER = new ClientLogger(BackupInstancesExtensionRoutingsImpl.class);
+
+ private final BackupInstancesExtensionRoutingsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public BackupInstancesExtensionRoutingsImpl(BackupInstancesExtensionRoutingsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceId) {
+ PagedIterable inner = this.serviceClient().list(resourceId);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupInstanceResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceId, Context context) {
+ PagedIterable inner = this.serviceClient().list(resourceId, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupInstanceResourceImpl(inner1, this.manager()));
+ }
+
+ private BackupInstancesExtensionRoutingsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesImpl.java
index 4467dd44a0de..3805c75fc993 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
@@ -18,6 +18,8 @@
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.StopProtectionRequest;
+import com.azure.resourcemanager.dataprotection.models.SuspendBackupRequest;
import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest;
import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest;
import com.azure.resourcemanager.dataprotection.models.ValidateCrossRegionRestoreRequestObject;
@@ -39,13 +41,13 @@ public BackupInstancesImpl(BackupInstancesClient innerClient,
public PagedIterable list(String resourceGroupName, String vaultName) {
PagedIterable inner = this.serviceClient().list(resourceGroupName, vaultName);
- return Utils.mapPage(inner, inner1 -> new BackupInstanceResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupInstanceResourceImpl(inner1, this.manager()));
}
public PagedIterable list(String resourceGroupName, String vaultName, Context context) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, vaultName, context);
- return Utils.mapPage(inner, inner1 -> new BackupInstanceResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupInstanceResourceImpl(inner1, this.manager()));
}
public Response getWithResponse(String resourceGroupName, String vaultName,
@@ -123,8 +125,9 @@ public OperationJobExtendedInfo validateForBackup(String resourceGroupName, Stri
public Response getBackupInstanceOperationResultWithResponse(String resourceGroupName,
String vaultName, String backupInstanceName, String operationId, Context context) {
- Response inner = this.serviceClient().getBackupInstanceOperationResultWithResponse(
- resourceGroupName, vaultName, backupInstanceName, operationId, context);
+ Response inner = this.serviceClient()
+ .getBackupInstanceOperationResultWithResponse(resourceGroupName, vaultName, backupInstanceName, operationId,
+ context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new BackupInstanceResourceImpl(inner.getValue(), this.manager()));
@@ -135,8 +138,8 @@ public Response getBackupInstanceOperationResultWithResp
public BackupInstanceResource getBackupInstanceOperationResult(String resourceGroupName, String vaultName,
String backupInstanceName, String operationId) {
- BackupInstanceResourceInner inner = this.serviceClient().getBackupInstanceOperationResult(resourceGroupName,
- vaultName, backupInstanceName, operationId);
+ BackupInstanceResourceInner inner = this.serviceClient()
+ .getBackupInstanceOperationResult(resourceGroupName, vaultName, backupInstanceName, operationId);
if (inner != null) {
return new BackupInstanceResourceImpl(inner, this.manager());
} else {
@@ -211,8 +214,8 @@ public OperationJobExtendedInfo triggerRestore(String resourceGroupName, String
public OperationJobExtendedInfo triggerRestore(String resourceGroupName, String vaultName,
String backupInstanceName, AzureBackupRestoreRequest parameters, Context context) {
- OperationJobExtendedInfoInner inner = this.serviceClient().triggerRestore(resourceGroupName, vaultName,
- backupInstanceName, parameters, context);
+ OperationJobExtendedInfoInner inner = this.serviceClient()
+ .triggerRestore(resourceGroupName, vaultName, backupInstanceName, parameters, context);
if (inner != null) {
return new OperationJobExtendedInfoImpl(inner, this.manager());
} else {
@@ -241,16 +244,18 @@ public void stopProtection(String resourceGroupName, String vaultName, String ba
this.serviceClient().stopProtection(resourceGroupName, vaultName, backupInstanceName);
}
- public void stopProtection(String resourceGroupName, String vaultName, String backupInstanceName, Context context) {
- this.serviceClient().stopProtection(resourceGroupName, vaultName, backupInstanceName, context);
+ public void stopProtection(String resourceGroupName, String vaultName, String backupInstanceName,
+ StopProtectionRequest parameters, Context context) {
+ this.serviceClient().stopProtection(resourceGroupName, vaultName, backupInstanceName, parameters, context);
}
public void suspendBackups(String resourceGroupName, String vaultName, String backupInstanceName) {
this.serviceClient().suspendBackups(resourceGroupName, vaultName, backupInstanceName);
}
- public void suspendBackups(String resourceGroupName, String vaultName, String backupInstanceName, Context context) {
- this.serviceClient().suspendBackups(resourceGroupName, vaultName, backupInstanceName, context);
+ public void suspendBackups(String resourceGroupName, String vaultName, String backupInstanceName,
+ SuspendBackupRequest parameters, Context context) {
+ this.serviceClient().suspendBackups(resourceGroupName, vaultName, backupInstanceName, parameters, context);
}
public void syncBackupInstance(String resourceGroupName, String vaultName, String backupInstanceName,
@@ -276,8 +281,8 @@ public OperationJobExtendedInfo validateForRestore(String resourceGroupName, Str
public OperationJobExtendedInfo validateForRestore(String resourceGroupName, String vaultName,
String backupInstanceName, ValidateRestoreRequestObject parameters, Context context) {
- OperationJobExtendedInfoInner inner = this.serviceClient().validateForRestore(resourceGroupName, vaultName,
- backupInstanceName, parameters, context);
+ OperationJobExtendedInfoInner inner = this.serviceClient()
+ .validateForRestore(resourceGroupName, vaultName, backupInstanceName, parameters, context);
if (inner != null) {
return new OperationJobExtendedInfoImpl(inner, this.manager());
} else {
@@ -286,17 +291,17 @@ public OperationJobExtendedInfo validateForRestore(String resourceGroupName, Str
}
public BackupInstanceResource getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ String vaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults");
if (vaultName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
}
- String backupInstanceName = Utils.getValueFromIdByName(id, "backupInstances");
+ String backupInstanceName = ResourceManagerUtils.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)));
@@ -305,17 +310,17 @@ public BackupInstanceResource getById(String id) {
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ String vaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults");
if (vaultName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
}
- String backupInstanceName = Utils.getValueFromIdByName(id, "backupInstances");
+ String backupInstanceName = ResourceManagerUtils.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)));
@@ -324,17 +329,17 @@ public Response getByIdWithResponse(String id, Context c
}
public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ String vaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults");
if (vaultName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
}
- String backupInstanceName = Utils.getValueFromIdByName(id, "backupInstances");
+ String backupInstanceName = ResourceManagerUtils.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)));
@@ -343,17 +348,17 @@ public void deleteById(String id) {
}
public void deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ String vaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults");
if (vaultName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
}
- String backupInstanceName = Utils.getValueFromIdByName(id, "backupInstances");
+ String backupInstanceName = ResourceManagerUtils.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)));
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 e61689caccc2..5a93bfc148c1 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
@@ -59,8 +59,8 @@ public final class BackupPoliciesClientImpl implements BackupPoliciesClient {
}
/**
- * 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")
@@ -673,9 +673,7 @@ 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.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -700,9 +698,7 @@ private Mono> listNextSinglePageAsy
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
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 d018a222599b..c3aac313eddf 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
@@ -29,13 +29,13 @@ public BackupPoliciesImpl(BackupPoliciesClient innerClient,
public PagedIterable list(String resourceGroupName, String vaultName) {
PagedIterable inner = this.serviceClient().list(resourceGroupName, vaultName);
- return Utils.mapPage(inner, inner1 -> new BaseBackupPolicyResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BaseBackupPolicyResourceImpl(inner1, this.manager()));
}
public PagedIterable list(String resourceGroupName, String vaultName, Context context) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, vaultName, context);
- return Utils.mapPage(inner, inner1 -> new BaseBackupPolicyResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BaseBackupPolicyResourceImpl(inner1, this.manager()));
}
public Response getWithResponse(String resourceGroupName, String vaultName,
@@ -69,17 +69,17 @@ public void delete(String resourceGroupName, String vaultName, String backupPoli
}
public BaseBackupPolicyResource getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ String vaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults");
if (vaultName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
}
- String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies");
+ String backupPolicyName = ResourceManagerUtils.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)));
@@ -88,17 +88,17 @@ public BaseBackupPolicyResource getById(String id) {
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ String vaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults");
if (vaultName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
}
- String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies");
+ String backupPolicyName = ResourceManagerUtils.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)));
@@ -107,17 +107,17 @@ public Response getByIdWithResponse(String id, Context
}
public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ String vaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults");
if (vaultName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
}
- String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies");
+ String backupPolicyName = ResourceManagerUtils.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)));
@@ -126,17 +126,17 @@ public void deleteById(String id) {
}
public Response deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ String vaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults");
if (vaultName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
}
- String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies");
+ String backupPolicyName = ResourceManagerUtils.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)));
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 1bc0b1b7e2db..313b246422cf 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,14 +95,16 @@ 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;
}
@@ -119,14 +121,16 @@ 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;
}
@@ -134,19 +138,23 @@ public BackupVaultResource apply(Context context) {
com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.vaultName = Utils.getValueFromIdByName(innerObject.id(), "backupVaults");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.vaultName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "backupVaults");
}
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 9778375f6f17..33501a7c466d 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
@@ -1307,9 +1307,7 @@ public CheckNameAvailabilityResultInner checkNameAvailability(String resourceGro
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1335,9 +1333,7 @@ private Mono> getInSubscriptionNextSingl
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -1364,9 +1360,7 @@ private Mono> getInSubscriptionNextSingl
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1393,9 +1387,7 @@ private Mono> getInResourceGroupNextSing
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
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 fa5a65556bee..5c2f14b25db0 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
@@ -32,23 +32,23 @@ public BackupVaultsImpl(BackupVaultsClient innerClient,
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
- return Utils.mapPage(inner, inner1 -> new BackupVaultResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupVaultResourceImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
- return Utils.mapPage(inner, inner1 -> new BackupVaultResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupVaultResourceImpl(inner1, this.manager()));
}
public PagedIterable listByResourceGroup(String resourceGroupName) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
- return Utils.mapPage(inner, inner1 -> new BackupVaultResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupVaultResourceImpl(inner1, this.manager()));
}
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
PagedIterable inner
= this.serviceClient().listByResourceGroup(resourceGroupName, context);
- return Utils.mapPage(inner, inner1 -> new BackupVaultResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupVaultResourceImpl(inner1, this.manager()));
}
public Response getByResourceGroupWithResponse(String resourceGroupName, String vaultName,
@@ -104,12 +104,12 @@ public CheckNameAvailabilityResult checkNameAvailability(String resourceGroupNam
}
public BackupVaultResource getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ String vaultName = ResourceManagerUtils.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)));
@@ -118,12 +118,12 @@ public BackupVaultResource getById(String id) {
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ String vaultName = ResourceManagerUtils.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)));
@@ -132,12 +132,12 @@ public Response getByIdWithResponse(String id, Context cont
}
public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ String vaultName = ResourceManagerUtils.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)));
@@ -146,12 +146,12 @@ public void deleteById(String id) {
}
public void deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ String vaultName = ResourceManagerUtils.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)));
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 d89b0793650b..6ba69bf15004 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,14 +61,16 @@ public BaseBackupPolicyResourceImpl withExistingBackupVault(String resourceGroup
}
public BaseBackupPolicyResource create() {
- this.innerObject = serviceManager.serviceClient().getBackupPolicies()
+ 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()
+ this.innerObject = serviceManager.serviceClient()
+ .getBackupPolicies()
.createOrUpdateWithResponse(resourceGroupName, vaultName, backupPolicyName, this.innerModel(), context)
.getValue();
return this;
@@ -86,14 +88,16 @@ public BaseBackupPolicyResourceImpl update() {
}
public BaseBackupPolicyResource apply() {
- this.innerObject = serviceManager.serviceClient().getBackupPolicies()
+ 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()
+ this.innerObject = serviceManager.serviceClient()
+ .getBackupPolicies()
.createOrUpdateWithResponse(resourceGroupName, vaultName, backupPolicyName, this.innerModel(), context)
.getValue();
return this;
@@ -103,20 +107,24 @@ public BaseBackupPolicyResource apply(Context context) {
com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.vaultName = Utils.getValueFromIdByName(innerObject.id(), "backupVaults");
- this.backupPolicyName = Utils.getValueFromIdByName(innerObject.id(), "backupPolicies");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.vaultName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "backupVaults");
+ this.backupPolicyName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "backupPolicies");
}
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/DataProtectionClientBuilder.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientBuilder.java
index a7caf1aca4c7..795012ad847b 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
@@ -123,11 +123,13 @@ public DataProtectionClientBuilder serializerAdapter(SerializerAdapter serialize
public DataProtectionClientImpl buildClient() {
String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
- HttpPipeline localPipeline = (pipeline != null) ? pipeline
+ HttpPipeline localPipeline = (pipeline != null)
+ ? pipeline
: new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
Duration localDefaultPollInterval
= (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
- SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter
+ SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
+ ? serializerAdapter
: SerializerFactory.createDefaultManagementSerializerAdapter();
DataProtectionClientImpl client = new DataProtectionClientImpl(localPipeline, localSerializerAdapter,
localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
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 65a61641845b..49e5d32ee68b 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
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.dataprotection.implementation;
import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaderName;
import com.azure.core.http.HttpHeaders;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpResponse;
@@ -12,8 +13,8 @@
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.exception.ManagementError;
import com.azure.core.management.exception.ManagementException;
-import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
@@ -23,6 +24,7 @@
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesClient;
+import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesExtensionRoutingsClient;
import com.azure.resourcemanager.dataprotection.fluent.BackupPoliciesClient;
import com.azure.resourcemanager.dataprotection.fluent.BackupVaultOperationResultsClient;
import com.azure.resourcemanager.dataprotection.fluent.BackupVaultsClient;
@@ -338,6 +340,20 @@ public FetchCrossRegionRestoreJobsOperationsClient getFetchCrossRegionRestoreJob
return this.fetchCrossRegionRestoreJobsOperations;
}
+ /**
+ * The BackupInstancesExtensionRoutingsClient object to access its operations.
+ */
+ private final BackupInstancesExtensionRoutingsClient backupInstancesExtensionRoutings;
+
+ /**
+ * Gets the BackupInstancesExtensionRoutingsClient object to access its operations.
+ *
+ * @return the BackupInstancesExtensionRoutingsClient object.
+ */
+ public BackupInstancesExtensionRoutingsClient getBackupInstancesExtensionRoutings() {
+ return this.backupInstancesExtensionRoutings;
+ }
+
/**
* The JobsClient object to access its operations.
*/
@@ -453,7 +469,7 @@ public DppResourceGuardProxiesClient getDppResourceGuardProxies() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2023-11-01";
+ this.apiVersion = "2024-04-01";
this.backupVaults = new BackupVaultsClientImpl(this);
this.operationResults = new OperationResultsClientImpl(this);
this.operationStatus = new OperationStatusClientImpl(this);
@@ -468,6 +484,7 @@ public DppResourceGuardProxiesClient getDppResourceGuardProxies() {
this.fetchSecondaryRecoveryPoints = new FetchSecondaryRecoveryPointsClientImpl(this);
this.fetchCrossRegionRestoreJobs = new FetchCrossRegionRestoreJobsClientImpl(this);
this.fetchCrossRegionRestoreJobsOperations = new FetchCrossRegionRestoreJobsOperationsClientImpl(this);
+ this.backupInstancesExtensionRoutings = new BackupInstancesExtensionRoutingsClientImpl(this);
this.jobs = new JobsClientImpl(this);
this.restorableTimeRanges = new RestorableTimeRangesClientImpl(this);
this.exportJobs = new ExportJobsClientImpl(this);
@@ -537,8 +554,8 @@ public Mono getLroFinalResultOrError(AsyncPollResponse,
if (errorBody != null) {
// try to deserialize error body to ManagementError
try {
- managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class,
- SerializerEncoding.JSON);
+ managementError = this.getSerializerAdapter()
+ .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
if (managementError.getCode() == null || managementError.getMessage() == null) {
managementError = null;
}
@@ -579,7 +596,7 @@ public int getStatusCode() {
}
public String getHeaderValue(String s) {
- return httpHeaders.getValue(s);
+ return httpHeaders.getValue(HttpHeaderName.fromString(s));
}
public HttpHeaders getHeaders() {
diff --git a/sdk/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 3b69cd443485..4599f8fb07cc 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
@@ -177,9 +177,7 @@ 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.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -204,9 +202,7 @@ private Mono> listNextSingl
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
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 9e06d8171f61..17160822baac 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
@@ -27,12 +27,14 @@ public DataProtectionOperationsImpl(DataProtectionOperationsClient innerClient,
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
- return Utils.mapPage(inner, inner1 -> new ClientDiscoveryValueForSingleApiImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new ClientDiscoveryValueForSingleApiImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
- return Utils.mapPage(inner, inner1 -> new ClientDiscoveryValueForSingleApiImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new ClientDiscoveryValueForSingleApiImpl(inner1, this.manager()));
}
private DataProtectionOperationsClient serviceClient() {
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 7dac85d329be..105106209a10 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
@@ -611,9 +611,7 @@ 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.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -639,9 +637,7 @@ private Mono> listNextSinglePa
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
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 3bda67f38b1c..137bd75c6495 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
@@ -30,14 +30,16 @@ public DeletedBackupInstancesImpl(DeletedBackupInstancesClient innerClient,
public PagedIterable list(String resourceGroupName, String vaultName) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, vaultName);
- return Utils.mapPage(inner, inner1 -> new DeletedBackupInstanceResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.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);
- return Utils.mapPage(inner, inner1 -> new DeletedBackupInstanceResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new DeletedBackupInstanceResourceImpl(inner1, this.manager()));
}
public Response getWithResponse(String resourceGroupName, String vaultName,
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 78a9059f078f..d7b7b20f905e 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
@@ -851,9 +851,7 @@ public UnlockDeleteResponseInner unlockDelete(String resourceGroupName, String v
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -879,9 +877,7 @@ private Mono> listNextSingleP
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
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 8cca54d74ab4..d1f25b937552 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
@@ -33,14 +33,16 @@ public DppResourceGuardProxiesImpl(DppResourceGuardProxiesClient innerClient,
public PagedIterable list(String resourceGroupName, String vaultName) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, vaultName);
- return Utils.mapPage(inner, inner1 -> new ResourceGuardProxyBaseResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.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);
- return Utils.mapPage(inner, inner1 -> new ResourceGuardProxyBaseResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new ResourceGuardProxyBaseResourceImpl(inner1, this.manager()));
}
public Response getWithResponse(String resourceGroupName, String vaultName,
@@ -77,8 +79,8 @@ public void delete(String resourceGroupName, String vaultName, String resourceGu
public Response unlockDeleteWithResponse(String resourceGroupName, String vaultName,
String resourceGuardProxyName, UnlockDeleteRequest parameters, Context context) {
- Response inner = this.serviceClient().unlockDeleteWithResponse(resourceGroupName,
- vaultName, resourceGuardProxyName, parameters, context);
+ Response inner = this.serviceClient()
+ .unlockDeleteWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, parameters, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new UnlockDeleteResponseImpl(inner.getValue(), this.manager()));
@@ -99,17 +101,17 @@ public UnlockDeleteResponse unlockDelete(String resourceGroupName, String vaultN
}
public ResourceGuardProxyBaseResource getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ String vaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults");
if (vaultName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
}
- String resourceGuardProxyName = Utils.getValueFromIdByName(id, "backupResourceGuardProxies");
+ String resourceGuardProxyName = ResourceManagerUtils.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)));
@@ -118,17 +120,17 @@ public ResourceGuardProxyBaseResource getById(String id) {
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ String vaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults");
if (vaultName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
}
- String resourceGuardProxyName = Utils.getValueFromIdByName(id, "backupResourceGuardProxies");
+ String resourceGuardProxyName = ResourceManagerUtils.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)));
@@ -137,17 +139,17 @@ public Response getByIdWithResponse(String id, C
}
public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ String vaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults");
if (vaultName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
}
- String resourceGuardProxyName = Utils.getValueFromIdByName(id, "backupResourceGuardProxies");
+ String resourceGuardProxyName = ResourceManagerUtils.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)));
@@ -156,17 +158,17 @@ public void deleteById(String id) {
}
public Response deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ String vaultName = ResourceManagerUtils.getValueFromIdByName(id, "backupVaults");
if (vaultName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
}
- String resourceGuardProxyName = Utils.getValueFromIdByName(id, "backupResourceGuardProxies");
+ String resourceGuardProxyName = ResourceManagerUtils.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)));
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 7d23af2d5892..450aa1fec798 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
@@ -18,6 +18,10 @@ public final class FeatureValidationResponseBaseImpl implements FeatureValidatio
this.serviceManager = serviceManager;
}
+ public String objectType() {
+ return this.innerModel().objectType();
+ }
+
public FeatureValidationResponseBaseInner innerModel() {
return this.innerObject;
}
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
index 89459203c6da..56e6a2910042 100644
--- 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
@@ -276,9 +276,7 @@ public PagedIterable list(String resourceGroupName,
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -304,9 +302,7 @@ private Mono> listNextSinglePageAsync
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
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
index 527fa388dbc0..f3d19ae04488 100644
--- 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
@@ -30,14 +30,14 @@ public PagedIterable list(String resourceGroupName, Stri
CrossRegionRestoreJobsRequest parameters) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, location, parameters);
- return Utils.mapPage(inner, inner1 -> new AzureBackupJobResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.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()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AzureBackupJobResourceImpl(inner1, this.manager()));
}
private FetchCrossRegionRestoreJobsOperationsClient serviceClient() {
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
index 310c2d792663..8326e6bf0830 100644
--- 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
@@ -291,9 +291,7 @@ public PagedIterable list(String resource
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -319,9 +317,7 @@ private Mono> listNextSingl
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
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
index 24ad5988fe4c..1fc5ba447ecd 100644
--- 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
@@ -10,8 +10,8 @@
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;
+import com.azure.resourcemanager.dataprotection.models.FetchSecondaryRPsRequestParameters;
public final class FetchSecondaryRecoveryPointsImpl implements FetchSecondaryRecoveryPoints {
private static final ClientLogger LOGGER = new ClientLogger(FetchSecondaryRecoveryPointsImpl.class);
@@ -30,14 +30,16 @@ public PagedIterable list(String resourceGroup
FetchSecondaryRPsRequestParameters parameters) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, location, parameters);
- return Utils.mapPage(inner, inner1 -> new AzureBackupRecoveryPointResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.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()));
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new AzureBackupRecoveryPointResourceImpl(inner1, this.manager()));
}
private FetchSecondaryRecoveryPointsClient serviceClient() {
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 52117a3fc00b..053ddc57d997 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
@@ -363,9 +363,7 @@ 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.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -391,9 +389,7 @@ private Mono> listNextSinglePageAsync
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
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 c8db886c0d65..601dd16928e6 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
@@ -29,13 +29,13 @@ public JobsImpl(JobsClient innerClient,
public PagedIterable list(String resourceGroupName, String vaultName) {
PagedIterable inner = this.serviceClient().list(resourceGroupName, vaultName);
- return Utils.mapPage(inner, inner1 -> new AzureBackupJobResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AzureBackupJobResourceImpl(inner1, this.manager()));
}
public PagedIterable list(String resourceGroupName, String vaultName, Context context) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, vaultName, context);
- return Utils.mapPage(inner, inner1 -> new AzureBackupJobResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AzureBackupJobResourceImpl(inner1, this.manager()));
}
public Response getWithResponse(String resourceGroupName, String vaultName, String jobId,
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 9e24d9cd2736..024f87daabb4 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
@@ -18,6 +18,10 @@ public final class OperationJobExtendedInfoImpl implements OperationJobExtendedI
this.serviceManager = serviceManager;
}
+ public String objectType() {
+ return this.innerModel().objectType();
+ }
+
public String jobId() {
return this.innerModel().jobId();
}
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 ddaf1859bac9..257c76beb409 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
@@ -56,8 +56,8 @@ public final class RecoveryPointsClientImpl implements RecoveryPointsClient {
}
/**
- * 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")
@@ -441,9 +441,7 @@ public AzureBackupRecoveryPointResourceInner get(String resourceGroupName, Strin
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -469,9 +467,7 @@ private Mono> listNextSingl
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
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 34797257df3c..3e7f7544d9a7 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
@@ -31,20 +31,22 @@ public PagedIterable list(String resourceGroup
String backupInstanceName) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, vaultName, backupInstanceName);
- return Utils.mapPage(inner, inner1 -> new AzureBackupRecoveryPointResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.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);
- return Utils.mapPage(inner, inner1 -> new AzureBackupRecoveryPointResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.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);
+ Response inner = this.serviceClient()
+ .getWithResponse(resourceGroupName, vaultName, backupInstanceName, recoveryPointId, context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new AzureBackupRecoveryPointResourceImpl(inner.getValue(), this.manager()));
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 188bd58bbef7..0d611e7c56f7 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
@@ -64,16 +64,20 @@ 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;
}
@@ -89,16 +93,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;
}
@@ -106,31 +114,36 @@ public ResourceGuardProxyBaseResource apply(Context context) {
com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.vaultName = Utils.getValueFromIdByName(innerObject.id(), "backupVaults");
- this.resourceGuardProxyName = Utils.getValueFromIdByName(innerObject.id(), "backupResourceGuardProxies");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.vaultName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "backupVaults");
+ this.resourceGuardProxyName
+ = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "backupResourceGuardProxies");
}
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 fbf54bc737b8..7204d7db3a87 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,14 +89,18 @@ 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;
}
@@ -113,14 +117,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;
}
@@ -128,19 +136,23 @@ public ResourceGuardResource apply(Context context) {
com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.resourceGuardsName = Utils.getValueFromIdByName(innerObject.id(), "resourceGuards");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.resourceGuardsName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGuards");
}
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 e9f92b56aa0a..9fdbf73807de 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
@@ -63,8 +63,8 @@ public final class ResourceGuardsClientImpl implements ResourceGuardsClient {
}
/**
- * 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")
@@ -2880,9 +2880,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String r
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -2911,9 +2909,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String r
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -2941,9 +2937,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String r
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -2971,9 +2965,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String r
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -3001,9 +2993,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String r
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -3032,9 +3022,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String r
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -3062,9 +3050,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String r
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -3093,9 +3079,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String r
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -3124,9 +3108,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String r
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -3155,9 +3137,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String r
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -3185,9 +3165,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String r
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -3216,9 +3194,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String r
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -3246,9 +3222,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String r
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -3277,9 +3251,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String r
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -3308,9 +3280,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String r
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -3339,9 +3309,7 @@ public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(String r
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
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 56b2d8b38ad9..511bf8127d01 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
@@ -31,23 +31,23 @@ public ResourceGuardsImpl(ResourceGuardsClient innerClient,
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
- return Utils.mapPage(inner, inner1 -> new ResourceGuardResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ResourceGuardResourceImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
- return Utils.mapPage(inner, inner1 -> new ResourceGuardResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ResourceGuardResourceImpl(inner1, this.manager()));
}
public PagedIterable listByResourceGroup(String resourceGroupName) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
- return Utils.mapPage(inner, inner1 -> new ResourceGuardResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ResourceGuardResourceImpl(inner1, this.manager()));
}
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
PagedIterable inner
= this.serviceClient().listByResourceGroup(resourceGroupName, context);
- return Utils.mapPage(inner, inner1 -> new ResourceGuardResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ResourceGuardResourceImpl(inner1, this.manager()));
}
public Response getByResourceGroupWithResponse(String resourceGroupName,
@@ -85,91 +85,91 @@ public PagedIterable getDisableSoftDeleteRequestsObjects(String
String resourceGuardsName) {
PagedIterable inner
= this.serviceClient().getDisableSoftDeleteRequestsObjects(resourceGroupName, resourceGuardsName);
- return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.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);
- return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
}
public PagedIterable getDeleteResourceGuardProxyRequestsObjects(String resourceGroupName,
String resourceGuardsName) {
PagedIterable inner
= this.serviceClient().getDeleteResourceGuardProxyRequestsObjects(resourceGroupName, resourceGuardsName);
- return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.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);
- return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
}
public PagedIterable getBackupSecurityPinRequestsObjects(String resourceGroupName,
String resourceGuardsName) {
PagedIterable inner
= this.serviceClient().getBackupSecurityPinRequestsObjects(resourceGroupName, resourceGuardsName);
- return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.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);
- return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
}
public PagedIterable getDeleteProtectedItemRequestsObjects(String resourceGroupName,
String resourceGuardsName) {
PagedIterable inner
= this.serviceClient().getDeleteProtectedItemRequestsObjects(resourceGroupName, resourceGuardsName);
- return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.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);
- return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
}
public PagedIterable getUpdateProtectionPolicyRequestsObjects(String resourceGroupName,
String resourceGuardsName) {
PagedIterable inner
= this.serviceClient().getUpdateProtectionPolicyRequestsObjects(resourceGroupName, resourceGuardsName);
- return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.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);
- return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
}
public PagedIterable getUpdateProtectedItemRequestsObjects(String resourceGroupName,
String resourceGuardsName) {
PagedIterable inner
= this.serviceClient().getUpdateProtectedItemRequestsObjects(resourceGroupName, resourceGuardsName);
- return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.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);
- return Utils.mapPage(inner, inner1 -> new DppBaseResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.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);
+ Response inner = this.serviceClient()
+ .getDefaultDisableSoftDeleteRequestsObjectWithResponse(resourceGroupName, resourceGuardsName, requestName,
+ context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new DppBaseResourceImpl(inner.getValue(), this.manager()));
@@ -180,8 +180,8 @@ public Response getDefaultDisableSoftDeleteRequestsObjectWithRe
public DppBaseResource getDefaultDisableSoftDeleteRequestsObject(String resourceGroupName,
String resourceGuardsName, String requestName) {
- DppBaseResourceInner inner = this.serviceClient().getDefaultDisableSoftDeleteRequestsObject(resourceGroupName,
- resourceGuardsName, requestName);
+ DppBaseResourceInner inner = this.serviceClient()
+ .getDefaultDisableSoftDeleteRequestsObject(resourceGroupName, resourceGuardsName, requestName);
if (inner != null) {
return new DppBaseResourceImpl(inner, this.manager());
} else {
@@ -191,9 +191,9 @@ public DppBaseResource getDefaultDisableSoftDeleteRequestsObject(String resource
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(),
new DppBaseResourceImpl(inner.getValue(), this.manager()));
@@ -215,9 +215,9 @@ public DppBaseResource getDefaultDeleteResourceGuardProxyRequestsObject(String r
public Response getDefaultBackupSecurityPinRequestsObjectWithResponse(String resourceGroupName,
String resourceGuardsName, String requestName, Context context) {
- Response inner
- = this.serviceClient().getDefaultBackupSecurityPinRequestsObjectWithResponse(resourceGroupName,
- resourceGuardsName, requestName, context);
+ Response inner = this.serviceClient()
+ .getDefaultBackupSecurityPinRequestsObjectWithResponse(resourceGroupName, resourceGuardsName, requestName,
+ context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new DppBaseResourceImpl(inner.getValue(), this.manager()));
@@ -228,8 +228,8 @@ public Response getDefaultBackupSecurityPinRequestsObjectWithRe
public DppBaseResource getDefaultBackupSecurityPinRequestsObject(String resourceGroupName,
String resourceGuardsName, String requestName) {
- DppBaseResourceInner inner = this.serviceClient().getDefaultBackupSecurityPinRequestsObject(resourceGroupName,
- resourceGuardsName, requestName);
+ DppBaseResourceInner inner = this.serviceClient()
+ .getDefaultBackupSecurityPinRequestsObject(resourceGroupName, resourceGuardsName, requestName);
if (inner != null) {
return new DppBaseResourceImpl(inner, this.manager());
} else {
@@ -239,9 +239,9 @@ public DppBaseResource getDefaultBackupSecurityPinRequestsObject(String resource
public Response getDefaultDeleteProtectedItemRequestsObjectWithResponse(String resourceGroupName,
String resourceGuardsName, String requestName, Context context) {
- Response inner
- = this.serviceClient().getDefaultDeleteProtectedItemRequestsObjectWithResponse(resourceGroupName,
- resourceGuardsName, requestName, context);
+ Response inner = this.serviceClient()
+ .getDefaultDeleteProtectedItemRequestsObjectWithResponse(resourceGroupName, resourceGuardsName, requestName,
+ context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new DppBaseResourceImpl(inner.getValue(), this.manager()));
@@ -252,8 +252,8 @@ public Response getDefaultDeleteProtectedItemRequestsObjectWith
public DppBaseResource getDefaultDeleteProtectedItemRequestsObject(String resourceGroupName,
String resourceGuardsName, String requestName) {
- DppBaseResourceInner inner = this.serviceClient().getDefaultDeleteProtectedItemRequestsObject(resourceGroupName,
- resourceGuardsName, requestName);
+ DppBaseResourceInner inner = this.serviceClient()
+ .getDefaultDeleteProtectedItemRequestsObject(resourceGroupName, resourceGuardsName, requestName);
if (inner != null) {
return new DppBaseResourceImpl(inner, this.manager());
} else {
@@ -263,9 +263,9 @@ public DppBaseResource getDefaultDeleteProtectedItemRequestsObject(String resour
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(),
new DppBaseResourceImpl(inner.getValue(), this.manager()));
@@ -287,9 +287,9 @@ public DppBaseResource getDefaultUpdateProtectionPolicyRequestsObject(String res
public Response getDefaultUpdateProtectedItemRequestsObjectWithResponse(String resourceGroupName,
String resourceGuardsName, String requestName, Context context) {
- Response inner
- = this.serviceClient().getDefaultUpdateProtectedItemRequestsObjectWithResponse(resourceGroupName,
- resourceGuardsName, requestName, context);
+ Response inner = this.serviceClient()
+ .getDefaultUpdateProtectedItemRequestsObjectWithResponse(resourceGroupName, resourceGuardsName, requestName,
+ context);
if (inner != null) {
return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
new DppBaseResourceImpl(inner.getValue(), this.manager()));
@@ -300,8 +300,8 @@ public Response getDefaultUpdateProtectedItemRequestsObjectWith
public DppBaseResource getDefaultUpdateProtectedItemRequestsObject(String resourceGroupName,
String resourceGuardsName, String requestName) {
- DppBaseResourceInner inner = this.serviceClient().getDefaultUpdateProtectedItemRequestsObject(resourceGroupName,
- resourceGuardsName, requestName);
+ DppBaseResourceInner inner = this.serviceClient()
+ .getDefaultUpdateProtectedItemRequestsObject(resourceGroupName, resourceGuardsName, requestName);
if (inner != null) {
return new DppBaseResourceImpl(inner, this.manager());
} else {
@@ -310,12 +310,12 @@ public DppBaseResource getDefaultUpdateProtectedItemRequestsObject(String resour
}
public ResourceGuardResource getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String resourceGuardsName = Utils.getValueFromIdByName(id, "resourceGuards");
+ String resourceGuardsName = ResourceManagerUtils.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)));
@@ -324,12 +324,12 @@ public ResourceGuardResource getById(String id) {
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String resourceGuardsName = Utils.getValueFromIdByName(id, "resourceGuards");
+ String resourceGuardsName = ResourceManagerUtils.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)));
@@ -338,12 +338,12 @@ public Response getByIdWithResponse(String id, Context co
}
public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String resourceGuardsName = Utils.getValueFromIdByName(id, "resourceGuards");
+ String resourceGuardsName = ResourceManagerUtils.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)));
@@ -352,12 +352,12 @@ public void deleteById(String id) {
}
public Response deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String resourceGuardsName = Utils.getValueFromIdByName(id, "resourceGuards");
+ String resourceGuardsName = ResourceManagerUtils.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)));
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/ResourceManagerUtils.java
similarity index 99%
rename from sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/Utils.java
rename to sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceManagerUtils.java
index 887f0e7ad4d3..d2ddbf100a04 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/ResourceManagerUtils.java
@@ -19,8 +19,8 @@
import java.util.stream.Stream;
import reactor.core.publisher.Flux;
-final class Utils {
- private Utils() {
+final class ResourceManagerUtils {
+ private ResourceManagerUtils() {
}
static String getValueFromIdByName(String id, String name) {
@@ -41,7 +41,6 @@ static String getValueFromIdByName(String id, String name) {
}
}
return null;
-
}
static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) {
@@ -75,7 +74,6 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri
}
}
return null;
-
}
static