diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md index 641b64303ef1..0165b456457c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md @@ -1,14 +1,2052 @@ # Release History -## 1.7.0-beta.1 (Unreleased) +## 1.7.0-beta.1 (2026-02-09) + +- Azure Resource Manager Recovery Services Backup client library for Java. This package contains Microsoft Azure SDK for Recovery Services Backup Management SDK. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package api-version 2026-01-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Breaking Changes + +#### `models.ProtectionIntentResourceList` was removed + +#### `models.ResourceGuardProxies` was removed + +#### `models.JobResourceList` was removed + +#### `models.RecoveryPointResourceList` was removed + +#### `models.ProtectableContainerResourceList` was removed + +#### `models.WorkloadItemResourceList` was removed + +#### `models.ResourceGuardProxyBaseResourceList` was removed + +#### `models.ProtectedItemResourceList` was removed + +#### `models.ProtectionContainerResourceList` was removed + +#### `models.BackupManagementUsageList` was removed + +#### `models.ProtectionPolicyResourceList` was removed + +#### `models.BackupEngineBaseResourceList` was removed + +#### `models.IaaSvmProtectableItem` was removed + +#### `models.WorkloadProtectableItemResourceList` was removed + +#### `models.ClientDiscoveryResponse` was removed + +#### `models.AzureWorkloadSqlPointInTimeRecoveryPoint` was modified + +* `AzureWorkloadSqlPointInTimeRecoveryPoint()` was changed to private access +* `withTimeRanges(java.util.List)` was removed +* `withRecoveryPointTimeInUtc(java.time.OffsetDateTime)` was removed +* `validate()` was removed +* `withType(models.RestorePointType)` was removed +* `withRecoveryPointTierDetails(java.util.List)` was removed +* `withRecoveryPointMoveReadinessInfo(java.util.Map)` was removed +* `withExtendedInfo(models.AzureWorkloadSqlRecoveryPointExtendedInfo)` was removed +* `withRecoveryPointProperties(models.RecoveryPointProperties)` was removed + +#### `models.MabJobTaskDetails` was modified + +* `MabJobTaskDetails()` was changed to private access +* `withStartTime(java.time.OffsetDateTime)` was removed +* `withStatus(java.lang.String)` was removed +* `validate()` was removed +* `withEndTime(java.time.OffsetDateTime)` was removed +* `withDuration(java.time.Duration)` was removed +* `withTaskId(java.lang.String)` was removed + +#### `models.AzureIaaSClassicComputeVMContainer` was modified + +* `validate()` was removed + +#### `models.IaaSvmContainer` was modified + +* `validate()` was removed + +#### `models.OperationStatusExtendedInfo` was modified + +* `validate()` was removed + +#### `models.TargetRestoreInfo` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadSapAsePointInTimeRestoreRequest` was modified + +* `validate()` was removed + +#### `models.RestoreFileSpecs` was modified + +* `validate()` was removed + +#### `models.AzureIaaSComputeVMProtectedItem` was modified + +* `validate()` was removed +* `withSoftDeleteRetentionPeriod(java.lang.Integer)` was removed + +#### `models.AzureWorkloadPointInTimeRecoveryPoint` was modified + +* `validate()` was removed +* `withRecoveryPointTimeInUtc(java.time.OffsetDateTime)` was removed +* `withRecoveryPointTierDetails(java.util.List)` was removed +* `models.AzureWorkloadPointInTimeRecoveryPoint withTimeRanges(java.util.List)` -> `models.AzureWorkloadPointInTimeRecoveryPoint withTimeRanges(java.util.List)` +* `withType(models.RestorePointType)` was removed +* `withRecoveryPointProperties(models.RecoveryPointProperties)` was removed +* `withRecoveryPointMoveReadinessInfo(java.util.Map)` was removed + +#### `models.AzureFileShareProvisionIlrRequest` was modified + +* `validate()` was removed + +#### `models.RetentionDuration` was modified + +* `validate()` was removed + +#### `models.AzureVmWorkloadSapHanaHsr` was modified + +* `AzureVmWorkloadSapHanaHsr()` was changed to private access +* `withFriendlyName(java.lang.String)` was removed +* `withParentName(java.lang.String)` was removed +* `withIsProtectable(java.lang.Boolean)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `withIsAutoProtected(java.lang.Boolean)` was removed +* `withSubprotectableitemcount(java.lang.Integer)` was removed +* `withBackupManagementType(java.lang.String)` was removed +* `withPrebackupvalidation(models.PreBackupValidation)` was removed +* `validate()` was removed +* `withWorkloadType(java.lang.String)` was removed +* `withParentUniqueName(java.lang.String)` was removed +* `withIsAutoProtectable(java.lang.Boolean)` was removed +* `withServerName(java.lang.String)` was removed +* `withSubinquireditemcount(java.lang.Integer)` was removed + +#### `models.AzureWorkloadRecoveryPoint` was modified + +* `validate()` was removed +* `models.AzureWorkloadRecoveryPoint withRecoveryPointMoveReadinessInfo(java.util.Map)` -> `models.AzureWorkloadRecoveryPoint withRecoveryPointMoveReadinessInfo(java.util.Map)` +* `models.AzureWorkloadRecoveryPoint withRecoveryPointProperties(models.RecoveryPointProperties)` -> `models.AzureWorkloadRecoveryPoint withRecoveryPointProperties(models.RecoveryPointProperties)` +* `models.AzureWorkloadRecoveryPoint withRecoveryPointTimeInUtc(java.time.OffsetDateTime)` -> `models.AzureWorkloadRecoveryPoint withRecoveryPointTimeInUtc(java.time.OffsetDateTime)` +* `models.AzureWorkloadRecoveryPoint withRecoveryPointTierDetails(java.util.List)` -> `models.AzureWorkloadRecoveryPoint withRecoveryPointTierDetails(java.util.List)` +* `models.AzureWorkloadRecoveryPoint withType(models.RestorePointType)` -> `models.AzureWorkloadRecoveryPoint withType(models.RestorePointType)` + +#### `models.OperationStatusValidateOperationExtendedInfo` was modified + +* `OperationStatusValidateOperationExtendedInfo()` was changed to private access +* `withValidateOperationResponse(models.ValidateOperationResponse)` was removed +* `validate()` was removed + +#### `models.AzureVMAppContainerProtectableContainer` was modified + +* `AzureVMAppContainerProtectableContainer()` was changed to private access +* `withHealthStatus(java.lang.String)` was removed +* `withContainerId(java.lang.String)` was removed +* `validate()` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withBackupManagementType(models.BackupManagementType)` was removed + +#### `models.AzureVmWorkloadSapHanaSystemWorkloadItem` was modified + +* `AzureVmWorkloadSapHanaSystemWorkloadItem()` was changed to private access +* `withSubinquireditemcount(java.lang.Integer)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withWorkloadType(java.lang.String)` was removed +* `withSubWorkloadItemCount(java.lang.Integer)` was removed +* `validate()` was removed +* `withBackupManagementType(java.lang.String)` was removed +* `withParentName(java.lang.String)` was removed +* `withIsAutoProtectable(java.lang.Boolean)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `withServerName(java.lang.String)` was removed + +#### `models.IaasVMRestoreRequest` was modified + +* `validate()` was removed + +#### `models.OperationStatusProvisionIlrExtendedInfo` was modified + +* `OperationStatusProvisionIlrExtendedInfo()` was changed to private access +* `validate()` was removed +* `withRecoveryTarget(models.InstantItemRecoveryTarget)` was removed + +#### `models.AzureVmWorkloadSapHanaDatabaseWorkloadItem` was modified + +* `AzureVmWorkloadSapHanaDatabaseWorkloadItem()` was changed to private access +* `withSubinquireditemcount(java.lang.Integer)` was removed +* `withBackupManagementType(java.lang.String)` was removed +* `withServerName(java.lang.String)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `withSubWorkloadItemCount(java.lang.Integer)` was removed +* `withWorkloadType(java.lang.String)` was removed +* `validate()` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withParentName(java.lang.String)` was removed +* `withIsAutoProtectable(java.lang.Boolean)` was removed + +#### `models.MabFileFolderProtectedItem` was modified + +* `withSoftDeleteRetentionPeriod(java.lang.Integer)` was removed +* `validate()` was removed + +#### `models.GenericRecoveryPoint` was modified + +* `GenericRecoveryPoint()` was changed to private access +* `withFriendlyName(java.lang.String)` was removed +* `withRecoveryPointProperties(models.RecoveryPointProperties)` was removed +* `withRecoveryPointTime(java.time.OffsetDateTime)` was removed +* `validate()` was removed +* `withRecoveryPointAdditionalInfo(java.lang.String)` was removed +* `withRecoveryPointType(java.lang.String)` was removed + +#### `models.IaasVMBackupRequest` was modified + +* `validate()` was removed + +#### `models.ListRecoveryPointsRecommendedForMoveRequest` was modified + +* `validate()` was removed + +#### `models.DpmBackupEngine` was modified + +* `DpmBackupEngine()` was changed to private access +* `withIsAzureBackupAgentUpgradeAvailable(java.lang.Boolean)` was removed +* `withBackupManagementType(models.BackupManagementType)` was removed +* `withDpmVersion(java.lang.String)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withBackupEngineId(java.lang.String)` was removed +* `withIsDpmUpgradeAvailable(java.lang.Boolean)` was removed +* `withExtendedInfo(models.BackupEngineExtendedInfo)` was removed +* `withCanReRegister(java.lang.Boolean)` was removed +* `withRegistrationStatus(java.lang.String)` was removed +* `withAzureBackupAgentVersion(java.lang.String)` was removed +* `withHealthStatus(java.lang.String)` was removed +* `withBackupEngineState(java.lang.String)` was removed +* `validate()` was removed + +#### `models.MabContainerExtendedInfo` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadSqlRecoveryPoint` was modified + +* `withRecoveryPointMoveReadinessInfo(java.util.Map)` was removed +* `withRecoveryPointTierDetails(java.util.List)` was removed +* `validate()` was removed +* `withRecoveryPointProperties(models.RecoveryPointProperties)` was removed +* `withType(models.RestorePointType)` was removed +* `withRecoveryPointTimeInUtc(java.time.OffsetDateTime)` was removed +* `models.AzureWorkloadSqlRecoveryPoint withExtendedInfo(models.AzureWorkloadSqlRecoveryPointExtendedInfo)` -> `models.AzureWorkloadSqlRecoveryPoint withExtendedInfo(models.AzureWorkloadSqlRecoveryPointExtendedInfo)` + +#### `models.GenericContainerExtendedInfo` was modified + +* `validate()` was removed + +#### `models.AzureStorageProtectableContainer` was modified + +* `AzureStorageProtectableContainer()` was changed to private access +* `withContainerId(java.lang.String)` was removed +* `withBackupManagementType(models.BackupManagementType)` was removed +* `validate()` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withHealthStatus(java.lang.String)` was removed + +#### `models.NameInfo` was modified + +* `NameInfo()` was changed to private access +* `withValue(java.lang.String)` was removed +* `withLocalizedValue(java.lang.String)` was removed +* `validate()` was removed + +#### `models.MoveRPAcrossTiersRequest` was modified + +* `validate()` was removed + +#### `models.AzureVmWorkloadSapHanaDBInstance` was modified + +* `AzureVmWorkloadSapHanaDBInstance()` was changed to private access +* `withIsProtectable(java.lang.Boolean)` was removed +* `withBackupManagementType(java.lang.String)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `withSubprotectableitemcount(java.lang.Integer)` was removed +* `withWorkloadType(java.lang.String)` was removed +* `withParentName(java.lang.String)` was removed +* `withServerName(java.lang.String)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withParentUniqueName(java.lang.String)` was removed +* `withSubinquireditemcount(java.lang.Integer)` was removed +* `withIsAutoProtectable(java.lang.Boolean)` was removed +* `withIsAutoProtected(java.lang.Boolean)` was removed +* `validate()` was removed +* `withPrebackupvalidation(models.PreBackupValidation)` was removed + +#### `models.FetchTieringCostInfoForRehydrationRequest` was modified + +* `validate()` was removed + +#### `models.BackupEngineBase` was modified + +* `models.BackupEngineBase withDpmVersion(java.lang.String)` -> `models.BackupEngineBase withDpmVersion(java.lang.String)` +* `validate()` was removed +* `models.BackupEngineBase withRegistrationStatus(java.lang.String)` -> `models.BackupEngineBase withRegistrationStatus(java.lang.String)` +* `models.BackupEngineBase withHealthStatus(java.lang.String)` -> `models.BackupEngineBase withHealthStatus(java.lang.String)` +* `models.BackupEngineBase withExtendedInfo(models.BackupEngineExtendedInfo)` -> `models.BackupEngineBase withExtendedInfo(models.BackupEngineExtendedInfo)` +* `models.BackupEngineBase withIsAzureBackupAgentUpgradeAvailable(java.lang.Boolean)` -> `models.BackupEngineBase withIsAzureBackupAgentUpgradeAvailable(java.lang.Boolean)` +* `models.BackupEngineBase withBackupEngineId(java.lang.String)` -> `models.BackupEngineBase withBackupEngineId(java.lang.String)` +* `models.BackupEngineBase withAzureBackupAgentVersion(java.lang.String)` -> `models.BackupEngineBase withAzureBackupAgentVersion(java.lang.String)` +* `models.BackupEngineBase withIsDpmUpgradeAvailable(java.lang.Boolean)` -> `models.BackupEngineBase withIsDpmUpgradeAvailable(java.lang.Boolean)` +* `models.BackupEngineBase withFriendlyName(java.lang.String)` -> `models.BackupEngineBase withFriendlyName(java.lang.String)` +* `models.BackupEngineBase withCanReRegister(java.lang.Boolean)` -> `models.BackupEngineBase withCanReRegister(java.lang.Boolean)` +* `models.BackupEngineBase withBackupEngineState(java.lang.String)` -> `models.BackupEngineBase withBackupEngineState(java.lang.String)` +* `models.BackupEngineBase withBackupManagementType(models.BackupManagementType)` -> `models.BackupEngineBase withBackupManagementType(models.BackupManagementType)` + +#### `models.OperationWorkerResponse` was modified + +* `validate()` was removed +* `models.OperationWorkerResponse withHeaders(java.util.Map)` -> `models.OperationWorkerResponse withHeaders(java.util.Map)` +* `models.OperationWorkerResponse withStatusCode(models.HttpStatusCode)` -> `models.OperationWorkerResponse withStatusCode(models.HttpStatusCode)` + +#### `models.RestoreRequest` was modified + +* `validate()` was removed + +#### `models.ProtectableContainer` was modified + +* `models.ProtectableContainer withContainerId(java.lang.String)` -> `models.ProtectableContainer withContainerId(java.lang.String)` +* `models.ProtectableContainer withFriendlyName(java.lang.String)` -> `models.ProtectableContainer withFriendlyName(java.lang.String)` +* `models.ProtectableContainer withBackupManagementType(models.BackupManagementType)` -> `models.ProtectableContainer withBackupManagementType(models.BackupManagementType)` +* `models.ProtectableContainer withHealthStatus(java.lang.String)` -> `models.ProtectableContainer withHealthStatus(java.lang.String)` +* `validate()` was removed + +#### `models.PrepareDataMoveRequest` was modified + +* `validate()` was removed + +#### `models.AzureFileShareBackupRequest` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest` was modified + +* `validate()` was removed + +#### `models.IdentityInfo` was modified + +* `validate()` was removed + +#### `models.AzureVmWorkloadSapHanaDatabaseProtectedItem` was modified + +* `withSoftDeleteRetentionPeriod(java.lang.Integer)` was removed +* `validate()` was removed + +#### `models.LongTermSchedulePolicy` was modified + +* `validate()` was removed + +#### `models.AzureVmWorkloadSqlInstanceProtectableItem` was modified + +* `AzureVmWorkloadSqlInstanceProtectableItem()` was changed to private access +* `withBackupManagementType(java.lang.String)` was removed +* `withIsAutoProtectable(java.lang.Boolean)` was removed +* `withServerName(java.lang.String)` was removed +* `withIsAutoProtected(java.lang.Boolean)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `withIsProtectable(java.lang.Boolean)` was removed +* `withParentName(java.lang.String)` was removed +* `withPrebackupvalidation(models.PreBackupValidation)` was removed +* `withParentUniqueName(java.lang.String)` was removed +* `withSubinquireditemcount(java.lang.Integer)` was removed +* `withWorkloadType(java.lang.String)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withSubprotectableitemcount(java.lang.Integer)` was removed +* `validate()` was removed + +#### `models.AzureVmWorkloadSqlAvailabilityGroupProtectableItem` was modified + +* `AzureVmWorkloadSqlAvailabilityGroupProtectableItem()` was changed to private access +* `withNodesList(java.util.List)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withSubprotectableitemcount(java.lang.Integer)` was removed +* `withServerName(java.lang.String)` was removed +* `withBackupManagementType(java.lang.String)` was removed +* `withWorkloadType(java.lang.String)` was removed +* `withIsProtectable(java.lang.Boolean)` was removed +* `withIsAutoProtected(java.lang.Boolean)` was removed +* `withParentName(java.lang.String)` was removed +* `withParentUniqueName(java.lang.String)` was removed +* `withIsAutoProtectable(java.lang.Boolean)` was removed +* `validate()` was removed +* `withPrebackupvalidation(models.PreBackupValidation)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `withSubinquireditemcount(java.lang.Integer)` was removed + +#### `models.YearlyRetentionSchedule` was modified + +* `validate()` was removed + +#### `models.AzureVmWorkloadSapAseDatabaseProtectedItem` was modified + +* `withSoftDeleteRetentionPeriod(java.lang.Integer)` was removed +* `validate()` was removed + +#### `models.AzureFileShareProtectableItem` was modified + +* `AzureFileShareProtectableItem()` was changed to private access +* `withWorkloadType(java.lang.String)` was removed +* `withBackupManagementType(java.lang.String)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `validate()` was removed +* `withAzureFileShareType(models.AzureFileShareType)` was removed +* `withParentContainerFabricId(java.lang.String)` was removed +* `withParentContainerFriendlyName(java.lang.String)` was removed + +#### `models.RecoveryPointMoveReadinessInfo` was modified + +* `RecoveryPointMoveReadinessInfo()` was changed to private access +* `withIsReadyForMove(java.lang.Boolean)` was removed +* `withAdditionalInfo(java.lang.String)` was removed +* `validate()` was removed + +#### `models.PointInTimeRange` was modified + +* `PointInTimeRange()` was changed to private access +* `validate()` was removed +* `withEndTime(java.time.OffsetDateTime)` was removed +* `withStartTime(java.time.OffsetDateTime)` was removed + +#### `models.AzureWorkloadErrorInfo` was modified + +* `AzureWorkloadErrorInfo()` was changed to private access +* `withRecommendations(java.util.List)` was removed +* `withErrorString(java.lang.String)` was removed +* `withErrorCode(java.lang.Integer)` was removed +* `withErrorTitle(java.lang.String)` was removed +* `validate()` was removed +* `withAdditionalDetails(java.lang.String)` was removed + +#### `models.AzureWorkloadSqlRestoreWithRehydrateRequest` was modified + +* `validate()` was removed + +#### `models.MabContainer` was modified + +* `validate()` was removed + +#### `models.UserAssignedIdentityProperties` was modified + +* `validate()` was removed + +#### `models.AzureIaaSvmJobExtendedInfo` was modified + +* `AzureIaaSvmJobExtendedInfo()` was changed to private access +* `withEstimatedRemainingDuration(java.lang.String)` was removed +* `withTasksList(java.util.List)` was removed +* `withPropertyBag(java.util.Map)` was removed +* `withInternalPropertyBag(java.util.Map)` was removed +* `validate()` was removed +* `withDynamicErrorMessage(java.lang.String)` was removed +* `withProgressPercentage(java.lang.Double)` was removed + +#### `models.ResourceHealthDetails` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadJobTaskDetails` was modified + +* `AzureWorkloadJobTaskDetails()` was changed to private access +* `withTaskId(java.lang.String)` was removed +* `validate()` was removed +* `withStatus(java.lang.String)` was removed + +#### `models.AzureIaaSvmErrorInfo` was modified + +* `AzureIaaSvmErrorInfo()` was changed to private access +* `validate()` was removed + +#### `models.BackupResourceVaultConfig` was modified + +* `validate()` was removed + +#### `models.GenericProtectionPolicy` was modified + +* `validate()` was removed + +#### `models.SqlDataDirectory` was modified + +* `SqlDataDirectory()` was changed to private access +* `withPath(java.lang.String)` was removed +* `validate()` was removed +* `withLogicalName(java.lang.String)` was removed +* `withType(models.SqlDataDirectoryType)` was removed + +#### `models.BackupResourceEncryptionConfig` was modified + +* `validate()` was removed + +#### `models.ClientDiscoveryForServiceSpecification` was modified + +* `ClientDiscoveryForServiceSpecification()` was changed to private access +* `withLogSpecifications(java.util.List)` was removed +* `validate()` was removed + +#### `models.IaasVMRestoreWithRehydrationRequest` was modified + +* `validate()` was removed + +#### `models.ValidateOperationRequest` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadSapHanaPointInTimeRestoreRequest` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadSqlPointInTimeRestoreRequest` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadSqlAutoProtectionIntent` was modified + +* `validate()` was removed + +#### `models.BackupRequest` was modified + +* `validate()` was removed + +#### `models.ResourceGuardOperationDetail` was modified + +* `validate()` was removed + +#### `models.SubProtectionPolicy` was modified + +* `validate()` was removed + +#### `models.DpmContainerExtendedInfo` was modified + +* `validate()` was removed + +#### `models.MabJob` was modified + +* `MabJob()` was changed to private access +* `withEntityFriendlyName(java.lang.String)` was removed +* `withErrorDetails(java.util.List)` was removed +* `withBackupManagementType(models.BackupManagementType)` was removed +* `withEndTime(java.time.OffsetDateTime)` was removed +* `withExtendedInfo(models.MabJobExtendedInfo)` was removed +* `withMabServerName(java.lang.String)` was removed +* `withWorkloadType(models.WorkloadType)` was removed +* `withDuration(java.time.Duration)` was removed +* `withStartTime(java.time.OffsetDateTime)` was removed +* `withActivityId(java.lang.String)` was removed +* `withStatus(java.lang.String)` was removed +* `withOperation(java.lang.String)` was removed +* `withMabServerType(models.MabServerType)` was removed +* `validate()` was removed +* `withActionsInfo(java.util.List)` was removed + +#### `models.AzureStorageJobTaskDetails` was modified + +* `AzureStorageJobTaskDetails()` was changed to private access +* `withTaskId(java.lang.String)` was removed +* `validate()` was removed +* `withStatus(java.lang.String)` was removed + +#### `models.AzureFileShareRestoreRequest` was modified + +* `validate()` was removed + +#### `models.KeyAndSecretDetails` was modified + +* `KeyAndSecretDetails()` was changed to private access +* `withBekDetails(models.BekDetails)` was removed +* `withEncryptionMechanism(java.lang.String)` was removed +* `validate()` was removed +* `withKekDetails(models.KekDetails)` was removed + +#### `models.ErrorDetail` was modified + +* `validate()` was removed + +#### `models.ProtectionContainer` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadContainerExtendedInfo` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadSapHanaPointInTimeRecoveryPoint` was modified + +* `AzureWorkloadSapHanaPointInTimeRecoveryPoint()` was changed to private access +* `validate()` was removed +* `withRecoveryPointTimeInUtc(java.time.OffsetDateTime)` was removed +* `withRecoveryPointProperties(models.RecoveryPointProperties)` was removed +* `withType(models.RestorePointType)` was removed +* `withTimeRanges(java.util.List)` was removed +* `withRecoveryPointMoveReadinessInfo(java.util.Map)` was removed +* `withRecoveryPointTierDetails(java.util.List)` was removed + +#### `models.AzureWorkloadSapAseRestoreRequest` was modified + +* `validate()` was removed + +#### `models.AzureIaaSComputeVMProtectableItem` was modified + +* `AzureIaaSComputeVMProtectableItem()` was changed to private access +* `withResourceGroup(java.lang.String)` was removed +* `withVirtualMachineId(java.lang.String)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `withVirtualMachineVersion(java.lang.String)` was removed +* `withWorkloadType(java.lang.String)` was removed +* `withBackupManagementType(java.lang.String)` was removed +* `validate()` was removed + +#### `models.MonthlyRetentionSchedule` was modified + +* `validate()` was removed + +#### `models.RetentionPolicy` was modified + +* `validate()` was removed + +#### `models.TargetDiskNetworkAccessSettings` was modified + +* `validate()` was removed + +#### `models.PrivateEndpoint` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadSapHanaRestoreWithRehydrateRequest` was modified + +* `validate()` was removed + +#### `models.BackupResourceEncryptionConfigExtended` was modified + +* `BackupResourceEncryptionConfigExtended()` was changed to private access +* `withEncryptionAtRestType(models.EncryptionAtRestType)` was removed +* `validate()` was removed +* `withInfrastructureEncryptionState(models.InfrastructureEncryptionState)` was removed +* `withSubscriptionId(java.lang.String)` was removed +* `withLastUpdateStatus(models.LastUpdateStatus)` was removed +* `withKeyUri(java.lang.String)` was removed +* `withUserAssignedIdentity(java.lang.String)` was removed +* `withUseSystemAssignedIdentity(java.lang.Boolean)` was removed + +#### `models.MabErrorInfo` was modified + +* `MabErrorInfo()` was changed to private access +* `validate()` was removed + +#### `models.Settings` was modified + +* `validate()` was removed + +#### `models.AzureIaaSvmProtectedItem` was modified + +* `validate()` was removed +* `withSoftDeleteRetentionPeriod(java.lang.Integer)` was removed + +#### `models.ContainerIdentityInfo` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadContainerAutoProtectionIntent` was modified + +* `validate()` was removed + +#### `models.InstantItemRecoveryTarget` was modified + +* `InstantItemRecoveryTarget()` was changed to private access +* `withClientScripts(java.util.List)` was removed +* `validate()` was removed + +#### `models.WorkloadProtectableItemResource` was modified + +* `etag()` was removed + +#### `models.ProtectionPolicy` was modified + +* `validate()` was removed + +#### `models.ValidateOperationResponse` was modified + +* `ValidateOperationResponse()` was changed to private access +* `validate()` was removed +* `withValidationResults(java.util.List)` was removed + +#### `models.DpmErrorInfo` was modified + +* `DpmErrorInfo()` was changed to private access +* `withErrorString(java.lang.String)` was removed +* `validate()` was removed +* `withRecommendations(java.util.List)` was removed + +#### `models.InstantRPAdditionalDetails` was modified + +* `validate()` was removed + +#### `models.WorkloadItem` was modified + +* `models.WorkloadItem withFriendlyName(java.lang.String)` -> `models.WorkloadItem withFriendlyName(java.lang.String)` +* `validate()` was removed +* `models.WorkloadItem withBackupManagementType(java.lang.String)` -> `models.WorkloadItem withBackupManagementType(java.lang.String)` +* `models.WorkloadItem withWorkloadType(java.lang.String)` -> `models.WorkloadItem withWorkloadType(java.lang.String)` +* `models.WorkloadItem withProtectionState(models.ProtectionStatus)` -> `models.WorkloadItem withProtectionState(models.ProtectionStatus)` + +#### `models.HourlySchedule` was modified + +* `validate()` was removed + +#### `models.VaultJobExtendedInfo` was modified + +* `VaultJobExtendedInfo()` was changed to private access +* `validate()` was removed +* `withPropertyBag(java.util.Map)` was removed + +#### `models.RecoveryPointProperties` was modified + +* `RecoveryPointProperties()` was changed to private access +* `withIsSoftDeleted(java.lang.Boolean)` was removed +* `validate()` was removed +* `withExpiryTime(java.lang.String)` was removed +* `withRuleName(java.lang.String)` was removed + +#### `models.AzureWorkloadJob` was modified + +* `AzureWorkloadJob()` was changed to private access +* `withEntityFriendlyName(java.lang.String)` was removed +* `withEndTime(java.time.OffsetDateTime)` was removed +* `withActionsInfo(java.util.List)` was removed +* `withBackupManagementType(models.BackupManagementType)` was removed +* `validate()` was removed +* `withWorkloadType(java.lang.String)` was removed +* `withOperation(java.lang.String)` was removed +* `withExtendedInfo(models.AzureWorkloadJobExtendedInfo)` was removed +* `withStartTime(java.time.OffsetDateTime)` was removed +* `withStatus(java.lang.String)` was removed +* `withDuration(java.time.Duration)` was removed +* `withActivityId(java.lang.String)` was removed +* `withErrorDetails(java.util.List)` was removed + +#### `models.OperationResultInfoBase` was modified + +* `validate()` was removed + +#### `models.AzureVmWorkloadSapAseDatabaseProtectableItem` was modified + +* `AzureVmWorkloadSapAseDatabaseProtectableItem()` was changed to private access +* `withWorkloadType(java.lang.String)` was removed +* `withPrebackupvalidation(models.PreBackupValidation)` was removed +* `withSubprotectableitemcount(java.lang.Integer)` was removed +* `withBackupManagementType(java.lang.String)` was removed +* `withIsProtectable(java.lang.Boolean)` was removed +* `withSubinquireditemcount(java.lang.Integer)` was removed +* `withIsAutoProtected(java.lang.Boolean)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withParentName(java.lang.String)` was removed +* `withIsAutoProtectable(java.lang.Boolean)` was removed +* `validate()` was removed +* `withServerName(java.lang.String)` was removed +* `withParentUniqueName(java.lang.String)` was removed + +#### `models.DpmProtectedItemExtendedInfo` was modified + +* `validate()` was removed + +#### `models.AzureIaaSvmJob` was modified + +* `AzureIaaSvmJob()` was changed to private access +* `withDuration(java.time.Duration)` was removed +* `withBackupManagementType(models.BackupManagementType)` was removed +* `withEndTime(java.time.OffsetDateTime)` was removed +* `withIsUserTriggered(java.lang.Boolean)` was removed +* `validate()` was removed +* `withEntityFriendlyName(java.lang.String)` was removed +* `withErrorDetails(java.util.List)` was removed +* `withActionsInfo(java.util.List)` was removed +* `withExtendedInfo(models.AzureIaaSvmJobExtendedInfo)` was removed +* `withStartTime(java.time.OffsetDateTime)` was removed +* `withContainerName(java.lang.String)` was removed +* `withVirtualMachineVersion(java.lang.String)` was removed +* `withStatus(java.lang.String)` was removed +* `withOperation(java.lang.String)` was removed +* `withActivityId(java.lang.String)` was removed + +#### `models.FetchTieringCostSavingsInfoForVaultRequest` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadSapAsePointInTimeRecoveryPoint` was modified + +* `AzureWorkloadSapAsePointInTimeRecoveryPoint()` was changed to private access +* `withRecoveryPointProperties(models.RecoveryPointProperties)` was removed +* `withRecoveryPointTierDetails(java.util.List)` was removed +* `withRecoveryPointTimeInUtc(java.time.OffsetDateTime)` was removed +* `withType(models.RestorePointType)` was removed +* `withRecoveryPointMoveReadinessInfo(java.util.Map)` was removed +* `withTimeRanges(java.util.List)` was removed +* `validate()` was removed + +#### `models.AzureStorageErrorInfo` was modified + +* `AzureStorageErrorInfo()` was changed to private access +* `validate()` was removed +* `withErrorCode(java.lang.Integer)` was removed +* `withRecommendations(java.util.List)` was removed +* `withErrorString(java.lang.String)` was removed + +#### `models.ExtendedProperties` was modified + +* `validate()` was removed + +#### `models.DailyRetentionFormat` was modified + +* `validate()` was removed + +#### `models.SimpleRetentionPolicy` was modified + +* `validate()` was removed + +#### `models.BackupStatusRequest` was modified + +* `validate()` was removed + +#### `models.WorkloadInquiryDetails` was modified + +* `validate()` was removed + +#### `models.DpmJobExtendedInfo` was modified + +* `DpmJobExtendedInfo()` was changed to private access +* `withDynamicErrorMessage(java.lang.String)` was removed +* `withTasksList(java.util.List)` was removed +* `validate()` was removed +* `withPropertyBag(java.util.Map)` was removed + +#### `models.EncryptionDetails` was modified + +* `validate()` was removed + +#### `models.PreBackupValidation` was modified + +* `PreBackupValidation()` was changed to private access +* `withStatus(models.InquiryStatus)` was removed +* `withCode(java.lang.String)` was removed +* `validate()` was removed +* `withMessage(java.lang.String)` was removed + +#### `models.UserAssignedManagedIdentityDetails` was modified + +* `validate()` was removed + +#### `models.AzureIaaSvmProtectionPolicy` was modified + +* `validate()` was removed + +#### `models.LongTermRetentionPolicy` was modified + +* `validate()` was removed + +#### `models.AzureVmWorkloadSapAseSystemWorkloadItem` was modified + +* `AzureVmWorkloadSapAseSystemWorkloadItem()` was changed to private access +* `withFriendlyName(java.lang.String)` was removed +* `withWorkloadType(java.lang.String)` was removed +* `withSubWorkloadItemCount(java.lang.Integer)` was removed +* `withSubinquireditemcount(java.lang.Integer)` was removed +* `validate()` was removed +* `withBackupManagementType(java.lang.String)` was removed +* `withIsAutoProtectable(java.lang.Boolean)` was removed +* `withParentName(java.lang.String)` was removed +* `withServerName(java.lang.String)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed + +#### `models.IaasVmilrRegistrationRequest` was modified + +* `validate()` was removed + +#### `models.InquiryValidation` was modified + +* `validate()` was removed + +#### `models.DpmJobTaskDetails` was modified + +* `DpmJobTaskDetails()` was changed to private access +* `withTaskId(java.lang.String)` was removed +* `validate()` was removed +* `withEndTime(java.time.OffsetDateTime)` was removed +* `withDuration(java.time.Duration)` was removed +* `withStartTime(java.time.OffsetDateTime)` was removed +* `withStatus(java.lang.String)` was removed + +#### `models.MabFileFolderProtectedItemExtendedInfo` was modified + +* `validate()` was removed + +#### `models.AzureSqlProtectedItemExtendedInfo` was modified + +* `validate()` was removed + +#### `models.DailyRetentionSchedule` was modified + +* `validate()` was removed + +#### `models.RecoveryPointDiskConfiguration` was modified + +* `RecoveryPointDiskConfiguration()` was changed to private access +* `withExcludedDiskList(java.util.List)` was removed +* `validate()` was removed +* `withNumberOfDisksIncludedInBackup(java.lang.Integer)` was removed +* `withIncludedDiskList(java.util.List)` was removed +* `withNumberOfDisksAttachedToVm(java.lang.Integer)` was removed + +#### `models.RestoreRequestResource` was modified + +* `withEtag(java.lang.String)` was removed +* `validate()` was removed +* `etag()` was removed +* `withTags(java.util.Map)` was removed +* `withLocation(java.lang.String)` was removed + +#### `models.UnlockDeleteRequest` was modified + +* `validate()` was removed + +#### `models.AzureSqlProtectionPolicy` was modified + +* `validate()` was removed + +#### `models.ValidateIaasVMRestoreOperationRequest` was modified + +* `validate()` was removed + +#### `models.AzureStorageJob` was modified + +* `AzureStorageJob()` was changed to private access +* `withStorageAccountName(java.lang.String)` was removed +* `withOperation(java.lang.String)` was removed +* `withEntityFriendlyName(java.lang.String)` was removed +* `withActionsInfo(java.util.List)` was removed +* `withActivityId(java.lang.String)` was removed +* `withExtendedInfo(models.AzureStorageJobExtendedInfo)` was removed +* `withStorageAccountVersion(java.lang.String)` was removed +* `withStatus(java.lang.String)` was removed +* `withEndTime(java.time.OffsetDateTime)` was removed +* `withDuration(java.time.Duration)` was removed +* `withStartTime(java.time.OffsetDateTime)` was removed +* `withIsUserTriggered(java.lang.Boolean)` was removed +* `withBackupManagementType(models.BackupManagementType)` was removed +* `withErrorDetails(java.util.List)` was removed +* `validate()` was removed + +#### `models.WeeklyRetentionSchedule` was modified + +* `validate()` was removed + +#### `models.WeeklySchedule` was modified + +* `validate()` was removed + +#### `models.AzureVmWorkloadSqlDatabaseProtectedItem` was modified + +* `withSoftDeleteRetentionPeriod(java.lang.Integer)` was removed +* `validate()` was removed + +#### `models.RecoveryPointRehydrationInfo` was modified + +* `validate()` was removed + +#### `models.WorkloadProtectableItem` was modified + +* `models.WorkloadProtectableItem withWorkloadType(java.lang.String)` -> `models.WorkloadProtectableItem withWorkloadType(java.lang.String)` +* `models.WorkloadProtectableItem withFriendlyName(java.lang.String)` -> `models.WorkloadProtectableItem withFriendlyName(java.lang.String)` +* `models.WorkloadProtectableItem withProtectionState(models.ProtectionStatus)` -> `models.WorkloadProtectableItem withProtectionState(models.ProtectionStatus)` +* `validate()` was removed +* `models.WorkloadProtectableItem withBackupManagementType(java.lang.String)` -> `models.WorkloadProtectableItem withBackupManagementType(java.lang.String)` + +#### `models.SimpleSchedulePolicyV2` was modified + +* `validate()` was removed + +#### `models.VaultRetentionPolicy` was modified + +* `validate()` was removed + +#### `models.AzureVmWorkloadProtectedItem` was modified + +* `withSoftDeleteRetentionPeriod(java.lang.Integer)` was removed +* `validate()` was removed + +#### `models.AzureVmWorkloadItem` was modified + +* `models.AzureVmWorkloadItem withSubinquireditemcount(java.lang.Integer)` -> `models.AzureVmWorkloadItem withSubinquireditemcount(java.lang.Integer)` +* `withBackupManagementType(java.lang.String)` was removed +* `validate()` was removed +* `models.AzureVmWorkloadItem withSubWorkloadItemCount(java.lang.Integer)` -> `models.AzureVmWorkloadItem withSubWorkloadItemCount(java.lang.Integer)` +* `withWorkloadType(java.lang.String)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `models.AzureVmWorkloadItem withIsAutoProtectable(java.lang.Boolean)` -> `models.AzureVmWorkloadItem withIsAutoProtectable(java.lang.Boolean)` +* `models.AzureVmWorkloadItem withParentName(java.lang.String)` -> `models.AzureVmWorkloadItem withParentName(java.lang.String)` +* `models.AzureVmWorkloadItem withServerName(java.lang.String)` -> `models.AzureVmWorkloadItem withServerName(java.lang.String)` + +#### `models.AzureVmWorkloadSqlInstanceWorkloadItem` was modified + +* `AzureVmWorkloadSqlInstanceWorkloadItem()` was changed to private access +* `withFriendlyName(java.lang.String)` was removed +* `withWorkloadType(java.lang.String)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `withServerName(java.lang.String)` was removed +* `withIsAutoProtectable(java.lang.Boolean)` was removed +* `withSubWorkloadItemCount(java.lang.Integer)` was removed +* `withBackupManagementType(java.lang.String)` was removed +* `withSubinquireditemcount(java.lang.Integer)` was removed +* `withParentName(java.lang.String)` was removed +* `validate()` was removed +* `withDataDirectoryPaths(java.util.List)` was removed + +#### `models.IdentityBasedRestoreDetails` was modified + +* `validate()` was removed + +#### `models.AzureVmWorkloadProtectionPolicy` was modified + +* `validate()` was removed + +#### `models.SchedulePolicy` was modified + +* `validate()` was removed + +#### `models.ProtectionIntent` was modified + +* `validate()` was removed + +#### `models.AzureResourceProtectionIntent` was modified + +* `validate()` was removed + +#### `models.SecurityPinBase` was modified + +* `validate()` was removed + +#### `models.ProtectedItem` was modified + +* `validate()` was removed +* `withSoftDeleteRetentionPeriod(java.lang.Integer)` was removed +* `softDeleteRetentionPeriod()` was removed + +#### `models.AzureSqlContainer` was modified + +* `validate()` was removed + +#### `models.AzureVmWorkloadSapHanaSystemProtectableItem` was modified + +* `AzureVmWorkloadSapHanaSystemProtectableItem()` was changed to private access +* `withBackupManagementType(java.lang.String)` was removed +* `withIsProtectable(java.lang.Boolean)` was removed +* `withWorkloadType(java.lang.String)` was removed +* `withIsAutoProtected(java.lang.Boolean)` was removed +* `withSubprotectableitemcount(java.lang.Integer)` was removed +* `withParentUniqueName(java.lang.String)` was removed +* `withServerName(java.lang.String)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `validate()` was removed +* `withIsAutoProtectable(java.lang.Boolean)` was removed +* `withPrebackupvalidation(models.PreBackupValidation)` was removed +* `withParentName(java.lang.String)` was removed +* `withSubinquireditemcount(java.lang.Integer)` was removed +* `withFriendlyName(java.lang.String)` was removed + +#### `models.AzureSqlagWorkloadContainerProtectionContainer` was modified + +* `validate()` was removed + +#### `models.RecoveryPointTierInformationV2` was modified + +* `RecoveryPointTierInformationV2()` was changed to private access +* `withStatus(models.RecoveryPointTierStatus)` was removed +* `withType(models.RecoveryPointTierType)` was removed +* `withExtendedInfo(java.util.Map)` was removed +* `validate()` was removed + +#### `models.BackupResourceEncryptionConfigResource` was modified + +* `validate()` was removed +* `withTags(java.util.Map)` was removed +* `withLocation(java.lang.String)` was removed + +#### `models.AzureWorkloadSqlRecoveryPointExtendedInfo` was modified + +* `AzureWorkloadSqlRecoveryPointExtendedInfo()` was changed to private access +* `withDataDirectoryPaths(java.util.List)` was removed +* `validate()` was removed +* `withDataDirectoryTimeInUtc(java.time.OffsetDateTime)` was removed + +#### `models.AzureIaaSvmJobTaskDetails` was modified + +* `AzureIaaSvmJobTaskDetails()` was changed to private access +* `validate()` was removed +* `withDuration(java.time.Duration)` was removed +* `withStartTime(java.time.OffsetDateTime)` was removed +* `withStatus(java.lang.String)` was removed +* `withInstanceId(java.lang.String)` was removed +* `withEndTime(java.time.OffsetDateTime)` was removed +* `withProgressPercentage(java.lang.Double)` was removed +* `withTaskId(java.lang.String)` was removed +* `withTaskExecutionDetails(java.lang.String)` was removed + +#### `models.InquiryInfo` was modified + +* `validate()` was removed + +#### `models.AzureVmWorkloadSapAseDatabaseWorkloadItem` was modified + +* `AzureVmWorkloadSapAseDatabaseWorkloadItem()` was changed to private access +* `withWorkloadType(java.lang.String)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withIsAutoProtectable(java.lang.Boolean)` was removed +* `withBackupManagementType(java.lang.String)` was removed +* `withServerName(java.lang.String)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `withSubinquireditemcount(java.lang.Integer)` was removed +* `withParentName(java.lang.String)` was removed +* `withSubWorkloadItemCount(java.lang.Integer)` was removed +* `validate()` was removed + +#### `models.KekDetails` was modified + +* `KekDetails()` was changed to private access +* `withKeyUrl(java.lang.String)` was removed +* `withKeyBackupData(java.lang.String)` was removed +* `withKeyVaultId(java.lang.String)` was removed +* `validate()` was removed + +#### `models.MabJobExtendedInfo` was modified + +* `MabJobExtendedInfo()` was changed to private access +* `withPropertyBag(java.util.Map)` was removed +* `validate()` was removed +* `withDynamicErrorMessage(java.lang.String)` was removed +* `withTasksList(java.util.List)` was removed + +#### `models.TriggerDataMoveRequest` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadRestoreRequest` was modified + +* `validate()` was removed + +#### `models.VaultJob` was modified + +* `VaultJob()` was changed to private access +* `withOperation(java.lang.String)` was removed +* `withStartTime(java.time.OffsetDateTime)` was removed +* `withExtendedInfo(models.VaultJobExtendedInfo)` was removed +* `withBackupManagementType(models.BackupManagementType)` was removed +* `withStatus(java.lang.String)` was removed +* `withDuration(java.time.Duration)` was removed +* `withErrorDetails(java.util.List)` was removed +* `validate()` was removed +* `withActivityId(java.lang.String)` was removed +* `withEntityFriendlyName(java.lang.String)` was removed +* `withActionsInfo(java.util.List)` was removed +* `withEndTime(java.time.OffsetDateTime)` was removed + +#### `models.IlrRequest` was modified + +* `validate()` was removed + +#### `models.AzureVmWorkloadSqlDatabaseWorkloadItem` was modified + +* `AzureVmWorkloadSqlDatabaseWorkloadItem()` was changed to private access +* `withBackupManagementType(java.lang.String)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withIsAutoProtectable(java.lang.Boolean)` was removed +* `withSubinquireditemcount(java.lang.Integer)` was removed +* `withSubWorkloadItemCount(java.lang.Integer)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `withParentName(java.lang.String)` was removed +* `withWorkloadType(java.lang.String)` was removed +* `withServerName(java.lang.String)` was removed +* `validate()` was removed + +#### `models.AzureVmWorkloadProtectableItem` was modified + +* `models.AzureVmWorkloadProtectableItem withParentUniqueName(java.lang.String)` -> `models.AzureVmWorkloadProtectableItem withParentUniqueName(java.lang.String)` +* `withProtectionState(models.ProtectionStatus)` was removed +* `withBackupManagementType(java.lang.String)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `models.AzureVmWorkloadProtectableItem withPrebackupvalidation(models.PreBackupValidation)` -> `models.AzureVmWorkloadProtectableItem withPrebackupvalidation(models.PreBackupValidation)` +* `models.AzureVmWorkloadProtectableItem withSubprotectableitemcount(java.lang.Integer)` -> `models.AzureVmWorkloadProtectableItem withSubprotectableitemcount(java.lang.Integer)` +* `withWorkloadType(java.lang.String)` was removed +* `validate()` was removed +* `models.AzureVmWorkloadProtectableItem withIsAutoProtectable(java.lang.Boolean)` -> `models.AzureVmWorkloadProtectableItem withIsAutoProtectable(java.lang.Boolean)` +* `models.AzureVmWorkloadProtectableItem withParentName(java.lang.String)` -> `models.AzureVmWorkloadProtectableItem withParentName(java.lang.String)` +* `models.AzureVmWorkloadProtectableItem withIsAutoProtected(java.lang.Boolean)` -> `models.AzureVmWorkloadProtectableItem withIsAutoProtected(java.lang.Boolean)` +* `models.AzureVmWorkloadProtectableItem withSubinquireditemcount(java.lang.Integer)` -> `models.AzureVmWorkloadProtectableItem withSubinquireditemcount(java.lang.Integer)` +* `models.AzureVmWorkloadProtectableItem withServerName(java.lang.String)` -> `models.AzureVmWorkloadProtectableItem withServerName(java.lang.String)` +* `models.AzureVmWorkloadProtectableItem withIsProtectable(java.lang.Boolean)` -> `models.AzureVmWorkloadProtectableItem withIsProtectable(java.lang.Boolean)` + +#### `models.SecuredVMDetails` was modified + +* `validate()` was removed + +#### `models.GenericContainer` was modified + +* `validate()` was removed + +#### `models.ResourceProviders` was modified + +* `void bmsTriggerDataMove(java.lang.String,java.lang.String,models.TriggerDataMoveRequest)` -> `models.OkResponse bmsTriggerDataMove(java.lang.String,java.lang.String,models.TriggerDataMoveRequest)` +* `void bmsPrepareDataMove(java.lang.String,java.lang.String,models.PrepareDataMoveRequest,com.azure.core.util.Context)` -> `models.OkResponse bmsPrepareDataMove(java.lang.String,java.lang.String,models.PrepareDataMoveRequest,com.azure.core.util.Context)` +* `void bmsPrepareDataMove(java.lang.String,java.lang.String,models.PrepareDataMoveRequest)` -> `models.OkResponse bmsPrepareDataMove(java.lang.String,java.lang.String,models.PrepareDataMoveRequest)` +* `void bmsTriggerDataMove(java.lang.String,java.lang.String,models.TriggerDataMoveRequest,com.azure.core.util.Context)` -> `models.OkResponse bmsTriggerDataMove(java.lang.String,java.lang.String,models.TriggerDataMoveRequest,com.azure.core.util.Context)` + +#### `models.AzureVMAppContainerProtectionContainer` was modified + +* `validate()` was removed + +#### `models.ClientDiscoveryDisplay` was modified + +* `ClientDiscoveryDisplay()` was changed to private access +* `withOperation(java.lang.String)` was removed +* `withDescription(java.lang.String)` was removed +* `withProvider(java.lang.String)` was removed +* `withResource(java.lang.String)` was removed +* `validate()` was removed + +#### `models.TieringCostRehydrationInfo` was modified + +* `TieringCostRehydrationInfo()` was changed to private access +* `withRetailRehydrationCostPerGBPerMonth(double)` was removed +* `withRehydrationSizeInBytes(long)` was removed +* `validate()` was removed + +#### `models.IaasVMRecoveryPoint` was modified + +* `IaasVMRecoveryPoint()` was changed to private access +* `withOsType(java.lang.String)` was removed +* `withRecoveryPointProperties(models.RecoveryPointProperties)` was removed +* `withRecoveryPointType(java.lang.String)` was removed +* `withRecoveryPointDiskConfiguration(models.RecoveryPointDiskConfiguration)` was removed +* `withIsInstantIlrSessionActive(java.lang.Boolean)` was removed +* `withOriginalStorageAccountOption(java.lang.Boolean)` was removed +* `withRecoveryPointTierDetails(java.util.List)` was removed +* `validate()` was removed +* `withRecoveryPointAdditionalInfo(java.lang.String)` was removed +* `withSecurityType(java.lang.String)` was removed +* `withSourceVMStorageType(java.lang.String)` was removed +* `withIsSourceVMEncrypted(java.lang.Boolean)` was removed +* `withIsPrivateAccessEnabledOnAnyDisk(java.lang.Boolean)` was removed +* `withVirtualMachineSize(java.lang.String)` was removed +* `withExtendedLocation(models.ExtendedLocation)` was removed +* `withZones(java.util.List)` was removed +* `withKeyAndSecret(models.KeyAndSecretDetails)` was removed +* `withRecoveryPointMoveReadinessInfo(java.util.Map)` was removed +* `withIsManagedVirtualMachine(java.lang.Boolean)` was removed +* `withRecoveryPointTime(java.time.OffsetDateTime)` was removed + +#### `models.ClientDiscoveryForProperties` was modified + +* `ClientDiscoveryForProperties()` was changed to private access +* `withServiceSpecification(models.ClientDiscoveryForServiceSpecification)` was removed +* `validate()` was removed + +#### `models.IlrRequestResource` was modified + +* `withTags(java.util.Map)` was removed +* `etag()` was removed +* `validate()` was removed +* `withEtag(java.lang.String)` was removed +* `withLocation(java.lang.String)` was removed + +#### `models.AzureVmWorkloadSapHanaDBInstanceProtectedItem` was modified + +* `withSoftDeleteRetentionPeriod(java.lang.Integer)` was removed +* `validate()` was removed + +#### `models.AzureBackupServerContainer` was modified + +* `validate()` was removed + +#### `models.AzureBackupServerEngine` was modified + +* `AzureBackupServerEngine()` was changed to private access +* `withBackupManagementType(models.BackupManagementType)` was removed +* `withIsAzureBackupAgentUpgradeAvailable(java.lang.Boolean)` was removed +* `withBackupEngineState(java.lang.String)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withDpmVersion(java.lang.String)` was removed +* `withHealthStatus(java.lang.String)` was removed +* `withBackupEngineId(java.lang.String)` was removed +* `withExtendedInfo(models.BackupEngineExtendedInfo)` was removed +* `withCanReRegister(java.lang.Boolean)` was removed +* `withAzureBackupAgentVersion(java.lang.String)` was removed +* `withIsDpmUpgradeAvailable(java.lang.Boolean)` was removed +* `withRegistrationStatus(java.lang.String)` was removed +* `validate()` was removed + +#### `models.DailySchedule` was modified + +* `validate()` was removed + +#### `models.AzureIaaSClassicComputeVMProtectableItem` was modified + +* `AzureIaaSClassicComputeVMProtectableItem()` was changed to private access +* `withBackupManagementType(java.lang.String)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `withResourceGroup(java.lang.String)` was removed +* `withVirtualMachineVersion(java.lang.String)` was removed +* `validate()` was removed +* `withWorkloadType(java.lang.String)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withVirtualMachineId(java.lang.String)` was removed + +#### `models.ExportJobsOperationResultInfo` was modified + +* `ExportJobsOperationResultInfo()` was changed to private access +* `withBlobSasKey(java.lang.String)` was removed +* `withExcelFileBlobSasKey(java.lang.String)` was removed +* `validate()` was removed +* `withBlobUrl(java.lang.String)` was removed +* `withExcelFileBlobUrl(java.lang.String)` was removed + +#### `models.TieringPolicy` was modified + +* `validate()` was removed + +#### `models.ValidateOperationRequestResource` was modified + +* `validate()` was removed + +#### `models.AzureFileShareRecoveryPoint` was modified + +* `AzureFileShareRecoveryPoint()` was changed to private access +* `withRecoveryPointSizeInGB(java.lang.Integer)` was removed +* `withRecoveryPointType(java.lang.String)` was removed +* `withFileShareSnapshotUri(java.lang.String)` was removed +* `validate()` was removed +* `withRecoveryPointTierDetails(java.util.List)` was removed +* `withRecoveryPointProperties(models.RecoveryPointProperties)` was removed +* `withRecoveryPointTime(java.time.OffsetDateTime)` was removed + +#### `models.OperationStatusJobExtendedInfo` was modified + +* `OperationStatusJobExtendedInfo()` was changed to private access +* `validate()` was removed +* `withJobId(java.lang.String)` was removed + +#### `models.ResourceList` was modified + +* `models.ResourceList withNextLink(java.lang.String)` -> `models.ResourceList withNextLink(java.lang.String)` +* `validate()` was removed + +#### `models.AzureWorkloadBackupRequest` was modified + +* `validate()` was removed + +#### `models.WorkloadItemResource` was modified + +* `etag()` was removed + +#### `models.AzureWorkloadContainer` was modified + +* `validate()` was removed + +#### `models.ResourceGuardProxyBase` was modified + +* `validate()` was removed + +#### `models.FeatureSupportRequest` was modified + +* `validate()` was removed + +#### `models.ValidateRestoreOperationRequest` was modified + +* `validate()` was removed + +#### `models.RecoveryPointTierInformation` was modified + +* `models.RecoveryPointTierInformation withStatus(models.RecoveryPointTierStatus)` -> `models.RecoveryPointTierInformation withStatus(models.RecoveryPointTierStatus)` +* `validate()` was removed +* `models.RecoveryPointTierInformation withType(models.RecoveryPointTierType)` -> `models.RecoveryPointTierInformation withType(models.RecoveryPointTierType)` +* `models.RecoveryPointTierInformation withExtendedInfo(java.util.Map)` -> `models.RecoveryPointTierInformation withExtendedInfo(java.util.Map)` + +#### `models.AzureWorkloadAutoProtectionIntent` was modified + +* `validate()` was removed + +#### `models.FetchTieringCostInfoRequest` was modified + +* `validate()` was removed + +#### `models.Day` was modified + +* `validate()` was removed + +#### `models.DpmJob` was modified + +* `DpmJob()` was changed to private access +* `withActivityId(java.lang.String)` was removed +* `withErrorDetails(java.util.List)` was removed +* `withEntityFriendlyName(java.lang.String)` was removed +* `withExtendedInfo(models.DpmJobExtendedInfo)` was removed +* `withOperation(java.lang.String)` was removed +* `withStatus(java.lang.String)` was removed +* `withBackupManagementType(models.BackupManagementType)` was removed +* `withEndTime(java.time.OffsetDateTime)` was removed +* `withContainerType(java.lang.String)` was removed +* `withContainerName(java.lang.String)` was removed +* `validate()` was removed +* `withStartTime(java.time.OffsetDateTime)` was removed +* `withActionsInfo(java.util.List)` was removed +* `withDpmServerName(java.lang.String)` was removed +* `withWorkloadType(java.lang.String)` was removed +* `withDuration(java.time.Duration)` was removed + +#### `models.AzureVMResourceFeatureSupportRequest` was modified + +* `validate()` was removed + +#### `models.BackupEngineExtendedInfo` was modified + +* `BackupEngineExtendedInfo()` was changed to private access +* `withRefreshedAt(java.time.OffsetDateTime)` was removed +* `withAzureProtectedInstances(java.lang.Integer)` was removed +* `withProtectedItemsCount(java.lang.Integer)` was removed +* `withProtectedServersCount(java.lang.Integer)` was removed +* `withDiskCount(java.lang.Integer)` was removed +* `withUsedDiskSpace(java.lang.Double)` was removed +* `withAvailableDiskSpace(java.lang.Double)` was removed +* `validate()` was removed +* `withDatabaseName(java.lang.String)` was removed + +#### `models.AzureIaaSvmHealthDetails` was modified + +* `validate()` was removed + +#### `models.RecoveryPointTierStatus` was modified + +* `valueOf(java.lang.String)` was removed +* `toString()` was removed +* `models.RecoveryPointTierStatus[] values()` -> `java.util.Collection values()` + +#### `models.PrivateLinkServiceConnectionState` was modified + +* `validate()` was removed + +#### `models.SnapshotRestoreParameters` was modified + +* `validate()` was removed + +#### `models.AzureIaaSClassicComputeVMProtectedItem` was modified + +* `withSoftDeleteRetentionPeriod(java.lang.Integer)` was removed +* `validate()` was removed + +#### `RecoveryServicesBackupManager` was modified + +* `fluent.RecoveryServicesBackupClient serviceClient()` -> `fluent.RecoveryServicesBackupManagementClient serviceClient()` +* `resourceGuardProxies()` was removed + +#### `models.GenericProtectedItem` was modified + +* `withSoftDeleteRetentionPeriod(java.lang.Integer)` was removed +* `validate()` was removed + +#### `models.VaultJobErrorInfo` was modified + +* `VaultJobErrorInfo()` was changed to private access +* `withRecommendations(java.util.List)` was removed +* `validate()` was removed +* `withErrorCode(java.lang.Integer)` was removed +* `withErrorString(java.lang.String)` was removed + +#### `models.AzureVmWorkloadProtectedItemExtendedInfo` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadSapHanaRecoveryPoint` was modified + +* `AzureWorkloadSapHanaRecoveryPoint()` was changed to private access +* `validate()` was removed +* `withRecoveryPointMoveReadinessInfo(java.util.Map)` was removed +* `withRecoveryPointTierDetails(java.util.List)` was removed +* `withRecoveryPointTimeInUtc(java.time.OffsetDateTime)` was removed +* `withRecoveryPointProperties(models.RecoveryPointProperties)` was removed +* `withType(models.RestorePointType)` was removed + +#### `models.OperationStatusJobsExtendedInfo` was modified + +* `OperationStatusJobsExtendedInfo()` was changed to private access +* `withFailedJobsError(java.util.Map)` was removed +* `withJobIds(java.util.List)` was removed +* `validate()` was removed + +#### `models.RecoveryPoint` was modified + +* `validate()` was removed + +#### `models.OperationStatusError` was modified + +* `OperationStatusError()` was changed to private access +* `withMessage(java.lang.String)` was removed +* `validate()` was removed +* `withCode(java.lang.String)` was removed + +#### `models.PrivateEndpointConnection` was modified + +* `validate()` was removed + +#### `models.AzureBackupGoalFeatureSupportRequest` was modified + +* `validate()` was removed + +#### `models.AzureVmWorkloadSqlDatabaseProtectableItem` was modified + +* `AzureVmWorkloadSqlDatabaseProtectableItem()` was changed to private access +* `withServerName(java.lang.String)` was removed +* `withWorkloadType(java.lang.String)` was removed +* `withParentName(java.lang.String)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withPrebackupvalidation(models.PreBackupValidation)` was removed +* `withBackupManagementType(java.lang.String)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `withIsAutoProtected(java.lang.Boolean)` was removed +* `withParentUniqueName(java.lang.String)` was removed +* `withSubinquireditemcount(java.lang.Integer)` was removed +* `withSubprotectableitemcount(java.lang.Integer)` was removed +* `withIsProtectable(java.lang.Boolean)` was removed +* `withIsAutoProtectable(java.lang.Boolean)` was removed +* `validate()` was removed + +#### `models.SimpleSchedulePolicy` was modified + +* `validate()` was removed + +#### `models.SqlDataDirectoryMapping` was modified + +* `validate()` was removed + +#### `models.AzureVmWorkloadSapAseSystemProtectableItem` was modified + +* `AzureVmWorkloadSapAseSystemProtectableItem()` was changed to private access +* `validate()` was removed +* `withIsAutoProtected(java.lang.Boolean)` was removed +* `withParentUniqueName(java.lang.String)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `withWorkloadType(java.lang.String)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withPrebackupvalidation(models.PreBackupValidation)` was removed +* `withIsAutoProtectable(java.lang.Boolean)` was removed +* `withBackupManagementType(java.lang.String)` was removed +* `withParentName(java.lang.String)` was removed +* `withServerName(java.lang.String)` was removed +* `withSubinquireditemcount(java.lang.Integer)` was removed +* `withSubprotectableitemcount(java.lang.Integer)` was removed +* `withIsProtectable(java.lang.Boolean)` was removed + +#### `models.ClientScriptForConnect` was modified + +* `ClientScriptForConnect()` was changed to private access +* `withUrl(java.lang.String)` was removed +* `withScriptExtension(java.lang.String)` was removed +* `withScriptNameSuffix(java.lang.String)` was removed +* `withScriptContent(java.lang.String)` was removed +* `withOsType(java.lang.String)` was removed +* `validate()` was removed + +#### `models.MabProtectionPolicy` was modified + +* `validate()` was removed + +#### `models.SnapshotBackupAdditionalDetails` was modified + +* `validate()` was removed + +#### `models.AzureFileshareProtectedItem` was modified + +* `withSoftDeleteRetentionPeriod(java.lang.Integer)` was removed +* `validate()` was removed + +#### `models.AzureStorageJobExtendedInfo` was modified + +* `AzureStorageJobExtendedInfo()` was changed to private access +* `withTasksList(java.util.List)` was removed +* `withPropertyBag(java.util.Map)` was removed +* `validate()` was removed +* `withDynamicErrorMessage(java.lang.String)` was removed + +#### `models.Job` was modified + +* `models.Job withBackupManagementType(models.BackupManagementType)` -> `models.Job withBackupManagementType(models.BackupManagementType)` +* `models.Job withStartTime(java.time.OffsetDateTime)` -> `models.Job withStartTime(java.time.OffsetDateTime)` +* `models.Job withEndTime(java.time.OffsetDateTime)` -> `models.Job withEndTime(java.time.OffsetDateTime)` +* `models.Job withStatus(java.lang.String)` -> `models.Job withStatus(java.lang.String)` +* `models.Job withOperation(java.lang.String)` -> `models.Job withOperation(java.lang.String)` +* `validate()` was removed +* `models.Job withEntityFriendlyName(java.lang.String)` -> `models.Job withEntityFriendlyName(java.lang.String)` +* `models.Job withActivityId(java.lang.String)` -> `models.Job withActivityId(java.lang.String)` + +#### `models.PreValidateEnableBackupRequest` was modified + +* `validate()` was removed + +#### `models.KpiResourceHealthDetails` was modified + +* `validate()` was removed + +#### `models.WeeklyRetentionFormat` was modified + +* `validate()` was removed + +#### `models.DistributedNodesInfo` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadJobExtendedInfo` was modified + +* `AzureWorkloadJobExtendedInfo()` was changed to private access +* `withPropertyBag(java.util.Map)` was removed +* `withDynamicErrorMessage(java.lang.String)` was removed +* `withTasksList(java.util.List)` was removed +* `validate()` was removed + +#### `models.AzureRecoveryServiceVaultProtectionIntent` was modified + +* `validate()` was removed + +#### `models.AzureFileshareProtectedItemExtendedInfo` was modified + +* `validate()` was removed + +#### `models.AzureFileShareProtectionPolicy` was modified + +* `validate()` was removed + +#### `models.DiskExclusionProperties` was modified + +* `validate()` was removed + +#### `models.FetchTieringCostSavingsInfoForProtectedItemRequest` was modified + +* `validate()` was removed + +#### `models.AzureSqlProtectedItem` was modified + +* `withSoftDeleteRetentionPeriod(java.lang.Integer)` was removed +* `validate()` was removed + +#### `models.BackupRequestResource` was modified + +* `withEtag(java.lang.String)` was removed +* `validate()` was removed +* `etag()` was removed +* `withTags(java.util.Map)` was removed +* `withLocation(java.lang.String)` was removed + +#### `models.AzureIaaSvmProtectedItemExtendedInfo` was modified + +* `validate()` was removed + +#### `models.OperationResultInfo` was modified + +* `OperationResultInfo()` was changed to private access +* `validate()` was removed +* `withJobList(java.util.List)` was removed + +#### `models.ClientDiscoveryForLogSpecification` was modified + +* `ClientDiscoveryForLogSpecification()` was changed to private access +* `withBlobDuration(java.lang.String)` was removed +* `withDisplayName(java.lang.String)` was removed +* `withName(java.lang.String)` was removed +* `validate()` was removed + +#### `models.AzureWorkloadSapHanaRestoreRequest` was modified + +* `validate()` was removed + +#### `models.LogSchedulePolicy` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest` was modified + +* `validate()` was removed + +#### `models.ExtendedLocation` was modified + +* `validate()` was removed + +#### `models.DiskInformation` was modified + +* `DiskInformation()` was changed to private access +* `withName(java.lang.String)` was removed +* `validate()` was removed +* `withLun(java.lang.Integer)` was removed + +#### `models.AzureWorkloadPointInTimeRestoreRequest` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadSqlRestoreRequest` was modified + +* `validate()` was removed + +#### `models.AzureWorkloadSapAseRecoveryPoint` was modified + +* `AzureWorkloadSapAseRecoveryPoint()` was changed to private access +* `withRecoveryPointProperties(models.RecoveryPointProperties)` was removed +* `withRecoveryPointTierDetails(java.util.List)` was removed +* `withType(models.RestorePointType)` was removed +* `validate()` was removed +* `withRecoveryPointMoveReadinessInfo(java.util.Map)` was removed +* `withRecoveryPointTimeInUtc(java.time.OffsetDateTime)` was removed + +#### `models.BekDetails` was modified + +* `BekDetails()` was changed to private access +* `withSecretUrl(java.lang.String)` was removed +* `withSecretData(java.lang.String)` was removed +* `validate()` was removed +* `withSecretVaultId(java.lang.String)` was removed + +#### `models.AzureIaaSvmJobV2` was modified + +* `AzureIaaSvmJobV2()` was changed to private access +* `withVirtualMachineVersion(java.lang.String)` was removed +* `withActivityId(java.lang.String)` was removed +* `withContainerName(java.lang.String)` was removed +* `withEntityFriendlyName(java.lang.String)` was removed +* `withOperation(java.lang.String)` was removed +* `withExtendedInfo(models.AzureIaaSvmJobExtendedInfo)` was removed +* `withEndTime(java.time.OffsetDateTime)` was removed +* `withBackupManagementType(models.BackupManagementType)` was removed +* `validate()` was removed +* `withErrorDetails(java.util.List)` was removed +* `withStartTime(java.time.OffsetDateTime)` was removed +* `withStatus(java.lang.String)` was removed +* `withActionsInfo(java.util.List)` was removed +* `withDuration(java.time.Duration)` was removed + +#### `models.PrepareDataMoveResponse` was modified + +* `PrepareDataMoveResponse()` was changed to private access +* `withCorrelationId(java.lang.String)` was removed +* `withSourceVaultProperties(java.util.Map)` was removed +* `validate()` was removed + +#### `models.AzureStorageContainer` was modified + +* `validate()` was removed + +#### `models.TieringCostSavingInfo` was modified + +* `TieringCostSavingInfo()` was changed to private access +* `withSourceTierSizeReductionInBytes(long)` was removed +* `withRetailSourceTierCostPerGBPerMonth(double)` was removed +* `withTargetTierSizeIncreaseInBytes(long)` was removed +* `validate()` was removed +* `withRetailTargetTierCostPerGBPerMonth(double)` was removed + +#### `models.FetchTieringCostSavingsInfoForPolicyRequest` was modified + +* `validate()` was removed + +#### `models.ProtectableContainerResource` was modified + +* `etag()` was removed + +#### `models.MabContainerHealthDetails` was modified + +* `validate()` was removed + +#### `models.TargetAfsRestoreInfo` was modified + +* `validate()` was removed + +#### `models.AzureIaaSComputeVMContainer` was modified + +* `validate()` was removed + +#### `models.DpmContainer` was modified + +* `validate()` was removed + +#### `models.BackupResourceConfig` was modified + +* `validate()` was removed + +#### `models.DpmProtectedItem` was modified + +* `validate()` was removed +* `withSoftDeleteRetentionPeriod(java.lang.Integer)` was removed + +#### `models.AzureVmWorkloadSapHanaDatabaseProtectableItem` was modified + +* `AzureVmWorkloadSapHanaDatabaseProtectableItem()` was changed to private access +* `withServerName(java.lang.String)` was removed +* `withSubprotectableitemcount(java.lang.Integer)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `withProtectionState(models.ProtectionStatus)` was removed +* `withParentName(java.lang.String)` was removed +* `validate()` was removed +* `withIsAutoProtectable(java.lang.Boolean)` was removed +* `withIsProtectable(java.lang.Boolean)` was removed +* `withSubinquireditemcount(java.lang.Integer)` was removed +* `withIsAutoProtected(java.lang.Boolean)` was removed +* `withWorkloadType(java.lang.String)` was removed +* `withParentUniqueName(java.lang.String)` was removed +* `withBackupManagementType(java.lang.String)` was removed +* `withPrebackupvalidation(models.PreBackupValidation)` was removed ### Features Added -### Breaking Changes +* `models.DatabaseInRP` was added + +* `models.ThreatInfo` was added + +* `models.IaasVmProtectableItem` was added + +* `models.InstanceProtectionReadiness` was added + +* `models.SourceSideScanSummary` was added + +* `models.OkResponse` was added + +* `models.VMWorkloadPolicyType` was added + +* `models.ProtectionLevel` was added + +* `models.AzureVmWorkloadSAPHanaScaleoutProtectableItem` was added + +* `models.ThreatStatus` was added + +* `models.ThreatSeverity` was added -### Bugs Fixed +* `models.SourceSideScanStatus` was added -### Other Changes +* `models.SourceSideScanInfo` was added + +* `models.UpdateRecoveryPointRequest` was added + +* `models.ThreatState` was added + +* `models.PatchRecoveryPointPropertiesInput` was added + +* `models.AzureVmWorkloadSQLInstanceProtectedItem` was added + +* `models.PatchRecoveryPointInput` was added + +#### `models.AzureIaaSComputeVMProtectedItem` was modified + +* `withSourceSideScanInfo(models.SourceSideScanInfo)` was added +* `withSoftDeleteRetentionPeriodInDays(java.lang.Integer)` was added + +#### `models.MabFileFolderProtectedItem` was modified + +* `withSourceSideScanInfo(models.SourceSideScanInfo)` was added +* `withSoftDeleteRetentionPeriodInDays(java.lang.Integer)` was added + +#### `models.RecoveryPoints` was modified + +* `updateWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,models.UpdateRecoveryPointRequest,com.azure.core.util.Context)` was added +* `update(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,models.UpdateRecoveryPointRequest)` was added + +#### `models.AzureVmWorkloadSapHanaDatabaseProtectedItem` was modified + +* `withSoftDeleteRetentionPeriodInDays(java.lang.Integer)` was added +* `withSourceSideScanInfo(models.SourceSideScanInfo)` was added + +#### `models.BackupResourceVaultConfigResource` was modified + +* `systemData()` was added + +#### `models.AzureVmWorkloadSapAseDatabaseProtectedItem` was modified + +* `withSourceSideScanInfo(models.SourceSideScanInfo)` was added +* `withSoftDeleteRetentionPeriodInDays(java.lang.Integer)` was added + +#### `models.BackupEngineBaseResource` was modified + +* `systemData()` was added + +#### `models.BackupResourceEncryptionConfigExtendedResource` was modified + +* `systemData()` was added + +#### `models.ProtectedItemResource` was modified + +* `systemData()` was added + +#### `models.AzureIaaSvmProtectedItem` was modified + +* `withSourceSideScanInfo(models.SourceSideScanInfo)` was added +* `withSoftDeleteRetentionPeriodInDays(java.lang.Integer)` was added + +#### `models.WorkloadProtectableItemResource` was modified + +* `systemData()` was added +* `eTag()` was added + +#### `models.RecoveryPointResource` was modified + +* `systemData()` was added + +#### `models.PrivateEndpointConnectionResource` was modified + +* `systemData()` was added + +#### `models.RestoreRequestResource` was modified + +* `systemData()` was added +* `withETag(java.lang.String)` was added +* `location()` was added +* `eTag()` was added +* `tags()` was added + +#### `models.AzureVmWorkloadSqlDatabaseProtectedItem` was modified + +* `withSourceSideScanInfo(models.SourceSideScanInfo)` was added +* `protectionLevel()` was added +* `withParentProtectedItem(java.lang.String)` was added +* `parentProtectedItem()` was added +* `withSoftDeleteRetentionPeriodInDays(java.lang.Integer)` was added +* `withProtectionLevel(models.ProtectionLevel)` was added + +#### `models.AzureVmWorkloadProtectedItem` was modified + +* `withSoftDeleteRetentionPeriodInDays(java.lang.Integer)` was added +* `withSourceSideScanInfo(models.SourceSideScanInfo)` was added + +#### `models.ResourceGuardProxyBaseResource` was modified + +* `systemData()` was added + +#### `models.AzureVmWorkloadProtectionPolicy` was modified + +* `vmWorkloadPolicyType()` was added +* `withVmWorkloadPolicyType(models.VMWorkloadPolicyType)` was added + +#### `models.ProtectedItem` was modified + +* `withSoftDeleteRetentionPeriodInDays(java.lang.Integer)` was added +* `withSourceSideScanInfo(models.SourceSideScanInfo)` was added +* `softDeleteRetentionPeriodInDays()` was added +* `sourceSideScanInfo()` was added + +#### `models.RecoveryPointTierInformationV2` was modified + +* `extendedInfo()` was added +* `status()` was added +* `type()` was added + +#### `models.BackupResourceEncryptionConfigResource` was modified + +* `systemData()` was added +* `location()` was added +* `tags()` was added + +#### `models.AzureWorkloadSqlRecoveryPointExtendedInfo` was modified + +* `includedDatabases()` was added + +#### `models.IlrRequestResource` was modified + +* `location()` was added +* `eTag()` was added +* `systemData()` was added +* `withETag(java.lang.String)` was added +* `tags()` was added + +#### `models.AzureVmWorkloadSapHanaDBInstanceProtectedItem` was modified + +* `withSourceSideScanInfo(models.SourceSideScanInfo)` was added +* `withSoftDeleteRetentionPeriodInDays(java.lang.Integer)` was added + +#### `models.WorkloadItemResource` was modified + +* `systemData()` was added +* `eTag()` was added + +#### `models.RecoveryPointTierStatus` was modified + +* `RecoveryPointTierStatus()` was added + +#### `models.AzureIaaSClassicComputeVMProtectedItem` was modified + +* `withSoftDeleteRetentionPeriodInDays(java.lang.Integer)` was added +* `withSourceSideScanInfo(models.SourceSideScanInfo)` was added + +#### `models.GenericProtectedItem` was modified + +* `withSourceSideScanInfo(models.SourceSideScanInfo)` was added +* `withSoftDeleteRetentionPeriodInDays(java.lang.Integer)` was added + +#### `models.RecoveryPoint` was modified + +* `threatStatus()` was added +* `threatInfo()` was added + +#### `models.JobResource` was modified + +* `systemData()` was added + +#### `models.AzureFileshareProtectedItem` was modified + +* `withSourceSideScanInfo(models.SourceSideScanInfo)` was added +* `withSoftDeleteRetentionPeriodInDays(java.lang.Integer)` was added + +#### `models.ProtectionIntentResource` was modified + +* `systemData()` was added + +#### `models.ProtectionContainerResource` was modified + +* `systemData()` was added + +#### `models.AzureSqlProtectedItem` was modified + +* `withSoftDeleteRetentionPeriodInDays(java.lang.Integer)` was added +* `withSourceSideScanInfo(models.SourceSideScanInfo)` was added + +#### `models.BackupRequestResource` was modified + +* `withETag(java.lang.String)` was added +* `eTag()` was added +* `tags()` was added +* `location()` was added +* `systemData()` was added + +#### `models.BackupResourceConfigResource` was modified + +* `systemData()` was added + +#### `models.ProtectionPolicyResource` was modified + +* `systemData()` was added + +#### `models.ProtectableContainerResource` was modified + +* `eTag()` was added +* `systemData()` was added + +#### `models.ResourceGuardProxyOperations` was modified + +* `list(java.lang.String,java.lang.String)` was added +* `list(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.DpmProtectedItem` was modified + +* `withSourceSideScanInfo(models.SourceSideScanInfo)` was added +* `withSoftDeleteRetentionPeriodInDays(java.lang.Integer)` was added ## 1.6.0 (2025-04-17) diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md index 0610a5b0e93c..a85cbdf888ed 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md @@ -1,8 +1,8 @@ -# Azure Resource Manager RecoveryServicesBackup client library for Java +# Azure Resource Manager Recovery Services Backup client library for Java -Azure Resource Manager RecoveryServicesBackup client library for Java. +Azure Resource Manager Recovery Services Backup client library for Java. -This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2025-02-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Recovery Services Backup Management SDK. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package api-version 2026-01-01-preview. 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-recoveryservicesbackup - 1.6.0 + 1.7.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/SAMPLE.md b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/SAMPLE.md index 67a939f482bb..230baadb47e3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/SAMPLE.md +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/SAMPLE.md @@ -193,22 +193,12 @@ - [Get](#recoverypoints_get) - [List](#recoverypoints_list) +- [Update](#recoverypoints_update) ## RecoveryPointsRecommendedForMove - [List](#recoverypointsrecommendedformove_list) -## ResourceGuardProxies - -- [Get](#resourceguardproxies_get) - -## ResourceGuardProxyOperation - -- [Delete](#resourceguardproxyoperation_delete) -- [Get](#resourceguardproxyoperation_get) -- [Put](#resourceguardproxyoperation_put) -- [UnlockDelete](#resourceguardproxyoperation_unlockdelete) - ## ResourceProvider - [BmsPrepareDataMove](#resourceprovider_bmspreparedatamove) @@ -247,9 +237,7 @@ */ public final class BackupEnginesGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/Dpm/ - * BackupEngines_Get.json + * x-ms-original-file: 2026-01-01-preview/Dpm/BackupEngines_Get.json */ /** * Sample code: Get Dpm/AzureBackupServer/Lajolla Backup Engine Details. @@ -272,9 +260,7 @@ public final class BackupEnginesGetSamples { */ public final class BackupEnginesListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/Dpm/ - * BackupEngines_List.json + * x-ms-original-file: 2026-01-01-preview/Dpm/BackupEngines_List.json */ /** * Sample code: List Dpm/AzureBackupServer/Lajolla Backup Engines. @@ -296,9 +282,7 @@ public final class BackupEnginesListSamples { */ public final class BackupJobsListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/ListJobs.json + * x-ms-original-file: 2026-01-01-preview/Common/ListJobs.json */ /** * Sample code: List All Jobs. @@ -311,9 +295,7 @@ public final class BackupJobsListSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/ListJobsWithAllSupportedFilters.json + * x-ms-original-file: 2026-01-01-preview/Common/ListJobsWithAllSupportedFilters.json */ /** * Sample code: List Jobs With Filters. @@ -329,9 +311,7 @@ public final class BackupJobsListSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/ListJobsWithStartTimeAndEndTimeFilters.json + * x-ms-original-file: 2026-01-01-preview/Common/ListJobsWithStartTimeAndEndTimeFilters.json */ /** * Sample code: List Jobs With Time Filter. @@ -356,9 +336,7 @@ public final class BackupJobsListSamples { */ public final class BackupOperationResultsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/ProtectedItem_Delete_OperationResult.json + * x-ms-original-file: 2026-01-01-preview/Common/ProtectedItem_Delete_OperationResult.json */ /** * Sample code: Get Result for Protected Item Delete Operation. @@ -382,9 +360,7 @@ public final class BackupOperationResultsGetSamples { */ public final class BackupOperationStatusesGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/ProtectedItem_Delete_OperationStatus.json + * x-ms-original-file: 2026-01-01-preview/Common/ProtectedItem_Delete_OperationStatus.json */ /** * Sample code: Get Protected Item Delete Operation Status. @@ -408,9 +384,7 @@ public final class BackupOperationStatusesGetSamples { */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureWorkload/BackupPolicies_List.json + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/BackupPolicies_List.json */ /** * Sample code: List protection policies with backupManagementType filter as AzureWorkload. @@ -425,9 +399,7 @@ public final class BackupPoliciesListSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/V2Policy/v2-List-Policies.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/V2Policy/v2-List-Policies.json */ /** * Sample code: List protection policies with backupManagementType filter as AzureIaasVm with both V1 and V2 @@ -443,9 +415,7 @@ public final class BackupPoliciesListSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/BackupPolicies_List.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/BackupPolicies_List.json */ /** * Sample code: List protection policies with backupManagementType filter as AzureIaasVm. @@ -469,9 +439,7 @@ public final class BackupPoliciesListSamples { */ public final class BackupProtectableItemsListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/BackupProtectableItems_List.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/BackupProtectableItems_List.json */ /** * Sample code: List protectable items with backupManagementType filter as AzureIaasVm. @@ -495,9 +463,7 @@ public final class BackupProtectableItemsListSamples { */ public final class BackupProtectedItemsListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/BackupProtectedItems_List.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/BackupProtectedItems_List.json */ /** * Sample code: List protected items with backupManagementType filter as AzureIaasVm. @@ -521,9 +487,7 @@ public final class BackupProtectedItemsListSamples { */ public final class BackupProtectionContainersListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/ProtectionContainers_List.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/ProtectionContainers_List.json */ /** * Sample code: List Backup Protection Containers. @@ -546,9 +510,7 @@ public final class BackupProtectionContainersListSamples { */ public final class BackupProtectionIntentListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureWorkload/BackupProtectionIntent_List.json + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/BackupProtectionIntent_List.json */ /** * Sample code: List protection intent with backupManagementType filter. @@ -570,9 +532,7 @@ public final class BackupProtectionIntentListSamples { */ public final class BackupResourceEncryptionConfigsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * BackupResourceEncryptionConfig_Get.json + * x-ms-original-file: 2026-01-01-preview/BackupResourceEncryptionConfig_Get.json */ /** * Sample code: Get Vault Encryption Configuration. @@ -600,9 +560,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.InfrastructureEnc */ public final class BackupResourceEncryptionConfigsUpdateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * BackupResourceEncryptionConfig_Put.json + * x-ms-original-file: 2026-01-01-preview/BackupResourceEncryptionConfig_Put.json */ /** * Sample code: Update Vault Encryption Configuration. @@ -631,9 +589,7 @@ public final class BackupResourceEncryptionConfigsUpdateSamples { */ public final class BackupResourceStorageConfigsNonCrrGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupStorageConfig_Get.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupStorageConfig_Get.json */ /** * Sample code: Get Vault Storage Configuration. @@ -661,9 +617,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.StorageTypeState; */ public final class BackupResourceStorageConfigsNonCrrPatchSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupStorageConfig_Patch.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupStorageConfig_Patch.json */ /** * Sample code: Update Vault Storage Configuration. @@ -695,9 +649,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.StorageTypeState; */ public final class BackupResourceStorageConfigsNonCrrUpdateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupStorageConfig_Put.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupStorageConfig_Put.json */ /** * Sample code: Update Vault Storage Configuration. @@ -724,9 +676,7 @@ public final class BackupResourceStorageConfigsNonCrrUpdateSamples { */ public final class BackupResourceVaultConfigsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupResourceVaultConfigs_Get.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupResourceVaultConfigs_Get.json */ /** * Sample code: Get Vault Security Config. @@ -754,9 +704,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.SoftDeleteFeature */ public final class BackupResourceVaultConfigsPutSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupResourceVaultConfigs_Put.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupResourceVaultConfigs_Put.json */ /** * Sample code: Update Vault Security Config. @@ -787,9 +735,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.EnhancedSecurityS */ public final class BackupResourceVaultConfigsUpdateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupResourceVaultConfigs_Patch.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupResourceVaultConfigs_Patch.json */ /** * Sample code: Update Vault Security Config. @@ -818,9 +764,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.DataSourceType; */ public final class BackupStatusGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/GetBackupStatus.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/GetBackupStatus.json */ /** * Sample code: Get Azure Virtual Machine Backup Status. @@ -846,9 +790,7 @@ public final class BackupStatusGetSamples { */ public final class BackupUsageSummariesListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupProtectedItem_UsageSummary_Get.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupProtectedItem_UsageSummary_Get.json */ /** * Sample code: Get Protected Items Usages Summary. @@ -863,9 +805,7 @@ public final class BackupUsageSummariesListSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupProtectionContainers_UsageSummary_Get.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupProtectionContainers_UsageSummary_Get.json */ /** * Sample code: Get Protected Containers Usages Summary. @@ -889,9 +829,7 @@ public final class BackupUsageSummariesListSamples { */ public final class BackupWorkloadItemsListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureWorkload/BackupWorkloadItems_List.json + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/BackupWorkloadItems_List.json */ /** * Sample code: List Workload Items in Container. @@ -918,9 +856,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.IaasVMBackupReque */ public final class BackupsTriggerSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/TriggerBackup_Post.json + * x-ms-original-file: 2026-01-01-preview/Common/TriggerBackup_Post.json */ /** * Sample code: Trigger Backup. @@ -946,9 +882,7 @@ public final class BackupsTriggerSamples { */ public final class BmsPrepareDataMoveOperationResultGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * BackupDataMove/PrepareDataMoveOperationResult_Get.json + * x-ms-original-file: 2026-01-01-preview/BackupDataMove/PrepareDataMoveOperationResult_Get.json */ /** * Sample code: Get operation result for PrepareDataMove. @@ -972,9 +906,7 @@ public final class BmsPrepareDataMoveOperationResultGetSamples { */ public final class DeletedProtectionContainersListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/SoftDeletedContainers_List.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/SoftDeletedContainers_List.json */ /** * Sample code: List Backup Protection Containers. @@ -997,9 +929,7 @@ public final class DeletedProtectionContainersListSamples { */ public final class ExportJobsOperationResultsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/ExportJobsOperationResult.json + * x-ms-original-file: 2026-01-01-preview/Common/ExportJobsOperationResult.json */ /** * Sample code: Export Jobs Operation Results. @@ -1025,9 +955,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.AzureVMResourceFe */ public final class FeatureSupportValidateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/BackupFeature_Validate.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/BackupFeature_Validate.json */ /** * Sample code: Check Azure Vm Backup Feature Support. @@ -1059,9 +987,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.RehydrationPriori */ public final class FetchTieringCostPostSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * TieringCost/FetchTieringCostForRehydrate.json + * x-ms-original-file: 2026-01-01-preview/TieringCost/FetchTieringCostForRehydrate.json */ /** * Sample code: Get the rehydration cost for recovery point. @@ -1082,9 +1008,7 @@ public final class FetchTieringCostPostSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * TieringCost/FetchTieringCostForProtectedItem.json + * x-ms-original-file: 2026-01-01-preview/TieringCost/FetchTieringCostForProtectedItem.json */ /** * Sample code: Get the tiering savings cost info for protected item. @@ -1104,9 +1028,7 @@ public final class FetchTieringCostPostSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * TieringCost/FetchTieringCostForPolicy.json + * x-ms-original-file: 2026-01-01-preview/TieringCost/FetchTieringCostForPolicy.json */ /** * Sample code: Get the tiering savings cost info for policy. @@ -1124,9 +1046,7 @@ public final class FetchTieringCostPostSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * TieringCost/FetchTieringCostForVault.json + * x-ms-original-file: 2026-01-01-preview/TieringCost/FetchTieringCostForVault.json */ /** * Sample code: Get the tiering savings cost info for vault. @@ -1152,9 +1072,7 @@ public final class FetchTieringCostPostSamples { */ public final class GetTieringCostOperationResultGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * TieringCost/GetTieringCostOperationResult.json + * x-ms-original-file: 2026-01-01-preview/TieringCost/GetTieringCostOperationResult.json */ /** * Sample code: Fetch Tiering Cost Operation Result. @@ -1181,9 +1099,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.IlrRequestResourc */ public final class ItemLevelRecoveryConnectionsProvisionSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/Provision_Ilr.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/Provision_Ilr.json */ /** * Sample code: Provision Instant Item Level Recovery for Azure Vm. @@ -1215,9 +1131,7 @@ public final class ItemLevelRecoveryConnectionsProvisionSamples { */ public final class ItemLevelRecoveryConnectionsRevokeSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/Revoke_Ilr.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/Revoke_Ilr.json */ /** * Sample code: Revoke Instant Item Level Recovery for Azure Vm. @@ -1242,9 +1156,7 @@ public final class ItemLevelRecoveryConnectionsRevokeSamples { */ public final class JobCancellationsTriggerSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/TriggerCancelJob.json + * x-ms-original-file: 2026-01-01-preview/Common/TriggerCancelJob.json */ /** * Sample code: Cancel Job. @@ -1268,9 +1180,7 @@ public final class JobCancellationsTriggerSamples { */ public final class JobDetailsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/GetJobDetails.json + * x-ms-original-file: 2026-01-01-preview/Common/GetJobDetails.json */ /** * Sample code: Get Job Details. @@ -1294,9 +1204,7 @@ public final class JobDetailsGetSamples { */ public final class JobOperationResultsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/CancelJobOperationResult.json + * x-ms-original-file: 2026-01-01-preview/Common/CancelJobOperationResult.json */ /** * Sample code: Cancel Job Operation Result. @@ -1320,9 +1228,7 @@ public final class JobOperationResultsGetSamples { */ public final class JobsExportSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/TriggerExportJobs.json + * x-ms-original-file: 2026-01-01-preview/Common/TriggerExportJobs.json */ /** * Sample code: Export Jobs. @@ -1352,9 +1258,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperation */ public final class OperationOperationValidateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ValidateOperation_RestoreDisk.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ValidateOperation_RestoreDisk.json */ /** * Sample code: Validate Operation. @@ -1384,9 +1288,7 @@ public final class OperationOperationValidateSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ValidateOperation_RestoreDisk_IdentityBasedRestoreDetails.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ValidateOperation_RestoreDisk_IdentityBasedRestoreDetails.json */ /** * Sample code: Validate Operation with identityBasedRestoreDetails. @@ -1425,9 +1327,7 @@ public final class OperationOperationValidateSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * ListOperations.json + * x-ms-original-file: 2026-01-01-preview/ListOperations.json */ /** * Sample code: ListOperations. @@ -1449,9 +1349,7 @@ public final class OperationsListSamples { */ public final class PrivateEndpointGetOperationStatusSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * PrivateEndpointConnection/GetPrivateEndpointConnectionOperationStatus.json + * x-ms-original-file: 2026-01-01-preview/PrivateEndpointConnection/GetPrivateEndpointConnectionOperationStatus.json */ /** * Sample code: Get OperationStatus. @@ -1476,9 +1374,7 @@ public final class PrivateEndpointGetOperationStatusSamples { */ public final class PrivateEndpointConnectionDeleteSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * PrivateEndpointConnection/DeletePrivateEndpointConnection.json + * x-ms-original-file: 2026-01-01-preview/PrivateEndpointConnection/DeletePrivateEndpointConnection.json */ /** * Sample code: Delete PrivateEndpointConnection. @@ -1502,9 +1398,7 @@ public final class PrivateEndpointConnectionDeleteSamples { */ public final class PrivateEndpointConnectionGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * PrivateEndpointConnection/GetPrivateEndpointConnection.json + * x-ms-original-file: 2026-01-01-preview/PrivateEndpointConnection/GetPrivateEndpointConnection.json */ /** * Sample code: Get PrivateEndpointConnection. @@ -1537,9 +1431,7 @@ import java.util.Arrays; */ public final class PrivateEndpointConnectionPutSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * PrivateEndpointConnection/PutPrivateEndpointConnection.json + * x-ms-original-file: 2026-01-01-preview/PrivateEndpointConnection/PutPrivateEndpointConnection.json */ /** * Sample code: Update PrivateEndpointConnection. @@ -1573,9 +1465,7 @@ public final class PrivateEndpointConnectionPutSamples { */ public final class ProtectableContainersListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/ProtectableContainers_List.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/ProtectableContainers_List.json */ /** * Sample code: List protectable items with backupManagementType filter as AzureStorage. @@ -1600,9 +1490,7 @@ public final class ProtectableContainersListSamples { */ public final class ProtectedItemOperationResultsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectedItemOperationResults.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectedItemOperationResults.json */ /** * Sample code: Get Operation Results of Protected Vm. @@ -1628,9 +1516,7 @@ public final class ProtectedItemOperationResultsGetSamples { */ public final class ProtectedItemOperationStatusesGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectedItemOperationStatus.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectedItemOperationStatus.json */ /** * Sample code: Get Operation Status of Protected Vm. @@ -1659,9 +1545,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionState; */ public final class ProtectedItemsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/StopProtection.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/StopProtection.json */ /** * Sample code: Stop Protection with retain data on Azure IaasVm. @@ -1672,7 +1556,6 @@ public final class ProtectedItemsCreateOrUpdateSamples { com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectedItems() .define("VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1") - .withRegion((String) null) .withExistingProtectionContainer("NetSDKTestRsVault", "SwaggerTestRg", "Azure", "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1") .withProperties(new AzureIaaSComputeVMProtectedItem().withSourceResourceId( @@ -1682,9 +1565,7 @@ public final class ProtectedItemsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ConfigureProtection.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ConfigureProtection.json */ /** * Sample code: Enable Protection on Azure IaasVm. @@ -1695,7 +1576,6 @@ public final class ProtectedItemsCreateOrUpdateSamples { com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectedItems() .define("VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1") - .withRegion((String) null) .withExistingProtectionContainer("NetSDKTestRsVault", "SwaggerTestRg", "Azure", "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1") .withProperties(new AzureIaaSComputeVMProtectedItem().withSourceResourceId( @@ -1715,9 +1595,7 @@ public final class ProtectedItemsCreateOrUpdateSamples { */ public final class ProtectedItemsDeleteSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/ProtectedItem_Delete.json + * x-ms-original-file: 2026-01-01-preview/Common/ProtectedItem_Delete.json */ /** * Sample code: Delete Protection from Azure Virtual Machine. @@ -1742,9 +1620,7 @@ public final class ProtectedItemsDeleteSamples { */ public final class ProtectedItemsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ClassicCompute_ProtectedItem_Get.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json */ /** * Sample code: Get Protected Classic Virtual Machine Details. @@ -1760,9 +1636,7 @@ public final class ProtectedItemsGetSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/Compute_ProtectedItem_Get.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/Compute_ProtectedItem_Get.json */ /** * Sample code: Get Protected Virtual Machine Details. @@ -1787,9 +1661,7 @@ public final class ProtectedItemsGetSamples { */ public final class ProtectionContainerOperationResultsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/ProtectionContainers_Inquire_Result.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/ProtectionContainers_Inquire_Result.json */ /** * Sample code: Get Azure Storage Protection Container Operation Result. @@ -1813,9 +1685,7 @@ public final class ProtectionContainerOperationResultsGetSamples { */ public final class ProtectionContainerRefreshOperationResultsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/RefreshContainers_OperationResults.json + * x-ms-original-file: 2026-01-01-preview/Common/RefreshContainers_OperationResults.json */ /** * Sample code: Azure Vm Discovery Operation Result. @@ -1839,9 +1709,7 @@ public final class ProtectionContainerRefreshOperationResultsGetSamples { */ public final class ProtectionContainersGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureWorkload/ProtectionContainers_Get.json + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/ProtectionContainers_Get.json */ /** * Sample code: Get Protection Container Details. @@ -1865,9 +1733,7 @@ public final class ProtectionContainersGetSamples { */ public final class ProtectionContainersInquireSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/ProtectionContainers_Inquire.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/ProtectionContainers_Inquire.json */ /** * Sample code: Inquire Azure Storage Protection Containers. @@ -1891,9 +1757,7 @@ public final class ProtectionContainersInquireSamples { */ public final class ProtectionContainersRefreshSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/RefreshContainers.json + * x-ms-original-file: 2026-01-01-preview/Common/RefreshContainers.json */ /** * Sample code: Trigger Azure Vm Discovery. @@ -1920,9 +1784,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementT */ public final class ProtectionContainersRegisterSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/ProtectionContainers_Register.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/ProtectionContainers_Register.json */ /** * Sample code: RegisterAzure Storage ProtectionContainers. @@ -1933,7 +1795,6 @@ public final class ProtectionContainersRegisterSamples { com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionContainers() .define("StorageContainer;Storage;SwaggerTestRg;swaggertestsa") - .withRegion((String) null) .withExistingBackupFabric("swaggertestvault", "SwaggerTestRg", "Azure") .withProperties(new AzureStorageContainer().withFriendlyName("swaggertestsa") .withBackupManagementType(BackupManagementType.AZURE_STORAGE) @@ -1953,9 +1814,7 @@ public final class ProtectionContainersRegisterSamples { */ public final class ProtectionContainersUnregisterSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureWorkload/ProtectionContainers_Unregister.json + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/ProtectionContainers_Unregister.json */ /** * Sample code: Unregister Protection Container. @@ -1981,9 +1840,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.AzureResourceProt */ public final class ProtectionIntentCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectionIntent_CreateOrUpdate.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json */ /** * Sample code: Create or Update Azure Vm Protection Intent. @@ -1994,7 +1851,6 @@ public final class ProtectionIntentCreateOrUpdateSamples { com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionIntents() .define("vm;iaasvmcontainerv2;chamsrgtest;chamscandel") - .withRegion((String) null) .withExistingBackupFabric("myVault", "myRG", "Azure") .withProperties(new AzureResourceProtectionIntent().withSourceResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/chamsrgtest/providers/Microsoft.Compute/virtualMachines/chamscandel") @@ -2013,9 +1869,7 @@ public final class ProtectionIntentCreateOrUpdateSamples { */ public final class ProtectionIntentDeleteSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureWorkload/BackupProtectionIntent_Delete.json + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/BackupProtectionIntent_Delete.json */ /** * Sample code: Delete Protection intent from item. @@ -2039,9 +1893,7 @@ public final class ProtectionIntentDeleteSamples { */ public final class ProtectionIntentGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureWorkload/BackupProtectionIntent_Get.json + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/BackupProtectionIntent_Get.json */ /** * Sample code: Get ProtectionIntent for an item. @@ -2068,9 +1920,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.PreValidateEnable */ public final class ProtectionIntentValidateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectionIntent_Validate.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectionIntent_Validate.json */ /** * Sample code: Validate Enable Protection on Azure Vm. @@ -2116,7 +1966,11 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.Settings; import com.azure.resourcemanager.recoveryservicesbackup.models.SimpleRetentionPolicy; import com.azure.resourcemanager.recoveryservicesbackup.models.SimpleSchedulePolicy; import com.azure.resourcemanager.recoveryservicesbackup.models.SimpleSchedulePolicyV2; +import com.azure.resourcemanager.recoveryservicesbackup.models.SnapshotBackupAdditionalDetails; import com.azure.resourcemanager.recoveryservicesbackup.models.SubProtectionPolicy; +import com.azure.resourcemanager.recoveryservicesbackup.models.UserAssignedIdentityProperties; +import com.azure.resourcemanager.recoveryservicesbackup.models.UserAssignedManagedIdentityDetails; +import com.azure.resourcemanager.recoveryservicesbackup.models.VMWorkloadPolicyType; import com.azure.resourcemanager.recoveryservicesbackup.models.VaultRetentionPolicy; import com.azure.resourcemanager.recoveryservicesbackup.models.WeekOfMonth; import com.azure.resourcemanager.recoveryservicesbackup.models.WeeklyRetentionFormat; @@ -2131,9 +1985,31 @@ import java.util.Arrays; */ public final class ProtectionPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json + */ + /** + * Sample code: Create or Update Simple Azure Vm Protection Policy. + * + * @param manager Entry point to RecoveryServicesBackupManager. + */ + public static void createOrUpdateSimpleAzureVmProtectionPolicy( + com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { + manager.protectionPolicies() + .define("testPolicy1") + .withExistingVault("NetSDKTestRsVault", "SwaggerTestRg") + .withProperties(new AzureIaaSvmProtectionPolicy() + .withSchedulePolicy(new SimpleSchedulePolicy().withScheduleRunFrequency(ScheduleRunType.DAILY) + .withScheduleRunTimes(Arrays.asList(OffsetDateTime.parse("2018-01-24T02:00:00Z")))) + .withRetentionPolicy(new LongTermRetentionPolicy().withDailySchedule(new DailyRetentionSchedule() + .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2018-01-24T02:00:00Z"))) + .withRetentionDuration( + new RetentionDuration().withCount(1).withDurationType(RetentionDurationType.DAYS)))) + .withTimeZone("Pacific Standard Time")) + .create(); + } + + /* + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json */ /** * Sample code: Create or Update Full Azure Workload Protection Policy. @@ -2144,7 +2020,6 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionPolicies() .define("testPolicy1") - .withRegion((String) null) .withExistingVault("NetSDKTestRsVault", "SwaggerTestRg") .withProperties( new AzureVmWorkloadProtectionPolicy().withWorkLoadType(WorkloadType.SQLDATA_BASE) @@ -2197,36 +2072,7 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json - */ - /** - * Sample code: Create or Update Simple Azure Vm Protection Policy. - * - * @param manager Entry point to RecoveryServicesBackupManager. - */ - public static void createOrUpdateSimpleAzureVmProtectionPolicy( - com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { - manager.protectionPolicies() - .define("testPolicy1") - .withRegion((String) null) - .withExistingVault("NetSDKTestRsVault", "SwaggerTestRg") - .withProperties(new AzureIaaSvmProtectionPolicy() - .withSchedulePolicy(new SimpleSchedulePolicy().withScheduleRunFrequency(ScheduleRunType.DAILY) - .withScheduleRunTimes(Arrays.asList(OffsetDateTime.parse("2018-01-24T02:00:00Z")))) - .withRetentionPolicy(new LongTermRetentionPolicy().withDailySchedule(new DailyRetentionSchedule() - .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2018-01-24T02:00:00Z"))) - .withRetentionDuration( - new RetentionDuration().withCount(1).withDurationType(RetentionDurationType.DAYS)))) - .withTimeZone("Pacific Standard Time")) - .create(); - } - - /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json */ /** * Sample code: Create or Update Daily Azure Storage Protection Policy. @@ -2237,7 +2083,6 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionPolicies() .define("dailyPolicy2") - .withRegion((String) null) .withExistingVault("swaggertestvault", "SwaggerTestRg") .withProperties( new AzureFileShareProtectionPolicy().withWorkLoadType(WorkloadType.AZURE_FILE_SHARE) @@ -2277,9 +2122,7 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/ProtectionPolicies_CreateOrUpdate_Hardened.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hardened.json */ /** * Sample code: Create or Update Azure Storage Vault Standard Protection Policy. @@ -2290,7 +2133,6 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionPolicies() .define("newPolicyV2") - .withRegion((String) null) .withExistingVault("swaggertestvault", "SwaggerTestRg") .withProperties( new AzureFileShareProtectionPolicy().withWorkLoadType(WorkloadType.AZURE_FILE_SHARE) @@ -2335,9 +2177,7 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json */ /** * Sample code: Create or Update Hourly Azure Storage Protection Policy. @@ -2348,7 +2188,6 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionPolicies() .define("newPolicy2") - .withRegion((String) null) .withExistingVault("swaggertestvault", "SwaggerTestRg") .withProperties( new AzureFileShareProtectionPolicy().withWorkLoadType(WorkloadType.AZURE_FILE_SHARE) @@ -2383,9 +2222,7 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json */ /** * Sample code: Create or Update Full Azure Vm Protection Policy. @@ -2396,7 +2233,6 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionPolicies() .define("testPolicy1") - .withRegion((String) null) .withExistingVault("NetSDKTestRsVault", "SwaggerTestRg") .withProperties( new AzureIaaSvmProtectionPolicy() @@ -2436,9 +2272,7 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/V2Policy/IaaS_v2_hourly.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/V2Policy/IaaS_v2_hourly.json */ /** * Sample code: Create or Update Enhanced Azure Vm Protection Policy with Hourly backup. @@ -2449,7 +2283,6 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionPolicies() .define("v2-daily-sample") - .withRegion((String) null) .withExistingVault("NetSDKTestRsVault", "SwaggerTestRg") .withProperties( new AzureIaaSvmProtectionPolicy() @@ -2493,9 +2326,7 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/V2Policy/IaaS_v2_daily.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/V2Policy/IaaS_v2_daily.json */ /** * Sample code: Create or Update Enhanced Azure Vm Protection Policy with daily backup. @@ -2506,7 +2337,6 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionPolicies() .define("v2-daily-sample") - .withRegion((String) null) .withExistingVault("NetSDKTestRsVault", "SwaggerTestRg") .withProperties( new AzureIaaSvmProtectionPolicy() @@ -2547,6 +2377,73 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { .withSnapshotConsistencyType(IaasVMSnapshotConsistencyType.ONLY_CRASH_CONSISTENT)) .create(); } + + /* + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/ProtectionPolicies_CreateOrUpdate_SapHanaDBInstance.json + */ + /** + * Sample code: Create or Update Sap Hana DB Instance Workload Protection Policy. + * + * @param manager Entry point to RecoveryServicesBackupManager. + */ + public static void createOrUpdateSapHanaDBInstanceWorkloadProtectionPolicy( + com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { + manager.protectionPolicies() + .define("testHanaSnapshotV2Policy1") + .withExistingVault("HanaTestRsVault", "SwaggerTestRg") + .withProperties(new AzureVmWorkloadProtectionPolicy().withProtectedItemsCount(0) + .withWorkLoadType(WorkloadType.SAPHANA_DBINSTANCE) + .withVmWorkloadPolicyType(VMWorkloadPolicyType.SNAPSHOT_V2) + .withSettings(new Settings().withTimeZone("UTC").withIssqlcompression(false).withIsCompression(false)) + .withSubProtectionPolicy( + Arrays.asList(new SubProtectionPolicy().withPolicyType(PolicyType.SNAPSHOT_FULL) + .withSchedulePolicy(new SimpleSchedulePolicy().withScheduleRunFrequency(ScheduleRunType.DAILY) + .withScheduleRunTimes(Arrays.asList(OffsetDateTime.parse("2024-10-01T03:30:00.000Z")))) + .withRetentionPolicy( + new LongTermRetentionPolicy() + .withDailySchedule(new DailyRetentionSchedule() + .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2023-12-19T20:00:00.000Z"))) + .withRetentionDuration(new RetentionDuration().withCount(30) + .withDurationType(RetentionDurationType.DAYS))) + .withWeeklySchedule(new WeeklyRetentionSchedule() + .withDaysOfTheWeek(Arrays.asList(DayOfWeek.SUNDAY)) + .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2023-12-19T20:00:00.000Z"))) + .withRetentionDuration(new RetentionDuration().withCount(10) + .withDurationType(RetentionDurationType.WEEKS))) + .withMonthlySchedule( + new MonthlyRetentionSchedule() + .withRetentionScheduleFormatType(RetentionScheduleFormat.WEEKLY) + .withRetentionScheduleWeekly(new WeeklyRetentionFormat() + .withDaysOfTheWeek(Arrays.asList(DayOfWeek.SUNDAY)) + .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.SECOND))) + .withRetentionTimes( + Arrays.asList(OffsetDateTime.parse("2023-12-15T20:00:00.000Z"))) + .withRetentionDuration(new RetentionDuration().withCount(6) + .withDurationType(RetentionDurationType.MONTHS))) + .withYearlySchedule( + new YearlyRetentionSchedule() + .withRetentionScheduleFormatType(RetentionScheduleFormat.WEEKLY) + .withMonthsOfYear(Arrays.asList(MonthOfYear.JANUARY)) + .withRetentionScheduleWeekly(new WeeklyRetentionFormat() + .withDaysOfTheWeek(Arrays.asList(DayOfWeek.SUNDAY)) + .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.LAST))) + .withRetentionTimes( + Arrays.asList(OffsetDateTime.parse("2023-12-19T20:00:00.000Z"))) + .withRetentionDuration(new RetentionDuration() + .withCount(2) + .withDurationType(RetentionDurationType.YEARS)))) + .withSnapshotBackupAdditionalDetails(new SnapshotBackupAdditionalDetails() + .withInstantRpRetentionRangeInDays(5) + .withInstantRPDetails("SwaggerTestRG") + .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails() + .withIdentityArmId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/SwaggerMsiRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/SwaggerUMI") + .withIdentityName("SwaggerUMI") + .withUserAssignedIdentityProperties(new UserAssignedIdentityProperties() + .withClientId("00000000-0000-0000-0000-000000000000") + .withPrincipalId("00000000-0000-0000-0000-000000000000"))))))) + .create(); + } } ``` @@ -2558,9 +2455,7 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { */ public final class ProtectionPoliciesDeleteSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectionPolicies_Delete.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectionPolicies_Delete.json */ /** * Sample code: Delete Azure Vm Protection Policy. @@ -2583,9 +2478,7 @@ public final class ProtectionPoliciesDeleteSamples { */ public final class ProtectionPoliciesGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectionPolicies_Get.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectionPolicies_Get.json */ /** * Sample code: Get Azure IaasVm Protection Policy Details. @@ -2599,9 +2492,7 @@ public final class ProtectionPoliciesGetSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/V2Policy/v2-Get-Policy.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/V2Policy/v2-Get-Policy.json */ /** * Sample code: Get Azure IaasVm Enhanced Protection Policy Details. @@ -2613,6 +2504,21 @@ public final class ProtectionPoliciesGetSamples { manager.protectionPolicies() .getWithResponse("NetSDKTestRsVault", "SwaggerTestRg", "v2-daily-sample", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/ProtectionPolicies_Get_SapHanaDBInstance.json + */ + /** + * Sample code: Get Sap Hana DB Instance Workload Protection Policy Details. + * + * @param manager Entry point to RecoveryServicesBackupManager. + */ + public static void getSapHanaDBInstanceWorkloadProtectionPolicyDetails( + com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { + manager.protectionPolicies() + .getWithResponse("HanaTestRsVault", "SwaggerTestRg", "testHanaSnapshotV2Policy1", + com.azure.core.util.Context.NONE); + } } ``` @@ -2624,9 +2530,7 @@ public final class ProtectionPoliciesGetSamples { */ public final class ProtectionPolicyOperationResultsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectionPolicyOperationResults_Get.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectionPolicyOperationResults_Get.json */ /** * Sample code: Get Protection Policy Operation Results. @@ -2650,9 +2554,7 @@ public final class ProtectionPolicyOperationResultsGetSamples { */ public final class ProtectionPolicyOperationStatusesGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectionPolicyOperationStatuses_Get.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectionPolicyOperationStatuses_Get.json */ /** * Sample code: Get Protection Policy Operation Status. @@ -2676,9 +2578,7 @@ public final class ProtectionPolicyOperationStatusesGetSamples { */ public final class RecoveryPointsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/RecoveryPoints_Get.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/RecoveryPoints_Get.json */ /** * Sample code: Get Azure Vm Recovery Point Details. @@ -2703,9 +2603,7 @@ public final class RecoveryPointsGetSamples { */ public final class RecoveryPointsListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/RecoveryPoints_List.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/RecoveryPoints_List.json */ /** * Sample code: Get Protected Azure Vm Recovery Points. @@ -2722,175 +2620,67 @@ public final class RecoveryPointsListSamples { } ``` -### RecoveryPointsRecommendedForMove_List +### RecoveryPoints_Update ```java -import com.azure.resourcemanager.recoveryservicesbackup.models.ListRecoveryPointsRecommendedForMoveRequest; -import java.util.Arrays; - -/** - * Samples for RecoveryPointsRecommendedForMove List. - */ -public final class RecoveryPointsRecommendedForMoveListSamples { - /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/RecoveryPointsRecommendedForMove_List.json - */ - /** - * Sample code: Get Protected Azure Vm Recovery Points Recommended for Move. - * - * @param manager Entry point to RecoveryServicesBackupManager. - */ - public static void getProtectedAzureVmRecoveryPointsRecommendedForMove( - com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { - manager.recoveryPointsRecommendedForMoves() - .list("rshvault", "rshhtestmdvmrg", "Azure", - "IaasVMContainer;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall", - "VM;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall", - new ListRecoveryPointsRecommendedForMoveRequest() - .withObjectType("ListRecoveryPointsRecommendedForMoveRequest") - .withExcludedRPList(Arrays.asList("348916168024334", "348916168024335")), - com.azure.core.util.Context.NONE); - } -} -``` - -### ResourceGuardProxies_Get - -```java -/** - * Samples for ResourceGuardProxies Get. - */ -public final class ResourceGuardProxiesGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * ResourceGuardProxyCRUD/ListResourceGuardProxy.json - */ - /** - * Sample code: Get VaultGuardProxies. - * - * @param manager Entry point to RecoveryServicesBackupManager. - */ - public static void - getVaultGuardProxies(com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { - manager.resourceGuardProxies().get("sampleVault", "SampleResourceGroup", com.azure.core.util.Context.NONE); - } -} -``` - -### ResourceGuardProxyOperation_Delete +import com.azure.resourcemanager.recoveryservicesbackup.models.PatchRecoveryPointInput; +import com.azure.resourcemanager.recoveryservicesbackup.models.PatchRecoveryPointPropertiesInput; +import com.azure.resourcemanager.recoveryservicesbackup.models.UpdateRecoveryPointRequest; +import java.time.OffsetDateTime; -```java /** - * Samples for ResourceGuardProxyOperation Delete. + * Samples for RecoveryPoints Update. */ -public final class ResourceGuardProxyOperationDeleteSamples { +public final class RecoveryPointsUpdateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json + * x-ms-original-file: 2026-01-01-preview/Common/RecoveryPoints_Update.json */ /** - * Sample code: Delete ResourceGuardProxy. + * Sample code: Update Azure Vm Recovery Point Details. * * @param manager Entry point to RecoveryServicesBackupManager. */ - public static void deleteResourceGuardProxy( + public static void updateAzureVmRecoveryPointDetails( com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { - manager.resourceGuardProxyOperations() - .deleteWithResponse("sampleVault", "SampleResourceGroup", "swaggerExample", + manager.recoveryPoints() + .updateWithResponse("hanasnapshottesting", "HanaSnapshotTest", "Azure", + "VMAppContainer;compute;hanasnapshottesting;hana-eacan-2", "SAPHanaDatabase;hye;hye", + "2265668074516978193", + new UpdateRecoveryPointRequest().withProperties( + new PatchRecoveryPointInput().withRecoveryPointProperties(new PatchRecoveryPointPropertiesInput() + .withExpiryTime(OffsetDateTime.parse("2025-01-02T00:00:00.0000000Z")))), com.azure.core.util.Context.NONE); } } ``` -### ResourceGuardProxyOperation_Get - -```java -/** - * Samples for ResourceGuardProxyOperation Get. - */ -public final class ResourceGuardProxyOperationGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * ResourceGuardProxyCRUD/GetResourceGuardProxy.json - */ - /** - * Sample code: Get ResourceGuardProxy. - * - * @param manager Entry point to RecoveryServicesBackupManager. - */ - public static void - getResourceGuardProxy(com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { - manager.resourceGuardProxyOperations() - .getWithResponse("sampleVault", "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); - } -} -``` - -### ResourceGuardProxyOperation_Put - -```java -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBase; - -/** - * Samples for ResourceGuardProxyOperation Put. - */ -public final class ResourceGuardProxyOperationPutSamples { - /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * ResourceGuardProxyCRUD/PutResourceGuardProxy.json - */ - /** - * Sample code: Create ResourceGuardProxy. - * - * @param manager Entry point to RecoveryServicesBackupManager. - */ - public static void createResourceGuardProxy( - com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { - manager.resourceGuardProxyOperations() - .define("swaggerExample") - .withRegion((String) null) - .withExistingVault("sampleVault", "SampleResourceGroup") - .withProperties(new ResourceGuardProxyBase().withResourceGuardResourceId( - "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew")) - .create(); - } -} -``` - -### ResourceGuardProxyOperation_UnlockDelete +### RecoveryPointsRecommendedForMove_List ```java -import com.azure.resourcemanager.recoveryservicesbackup.models.UnlockDeleteRequest; +import com.azure.resourcemanager.recoveryservicesbackup.models.ListRecoveryPointsRecommendedForMoveRequest; import java.util.Arrays; /** - * Samples for ResourceGuardProxyOperation UnlockDelete. + * Samples for RecoveryPointsRecommendedForMove List. */ -public final class ResourceGuardProxyOperationUnlockDeleteSamples { +public final class RecoveryPointsRecommendedForMoveListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/RecoveryPointsRecommendedForMove_List.json */ /** - * Sample code: UnlockDelete ResourceGuardProxy. + * Sample code: Get Protected Azure Vm Recovery Points Recommended for Move. * * @param manager Entry point to RecoveryServicesBackupManager. */ - public static void unlockDeleteResourceGuardProxy( + public static void getProtectedAzureVmRecoveryPointsRecommendedForMove( com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { - manager.resourceGuardProxyOperations() - .unlockDeleteWithResponse("sampleVault", "SampleResourceGroup", "swaggerExample", new UnlockDeleteRequest() - .withResourceGuardOperationRequests(Arrays.asList( - "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew/deleteProtectedItemRequests/default")) - .withResourceToBeDeleted( - "/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/gaallarg/providers/Microsoft.RecoveryServices/vaults/MercuryCrrVault/backupFabrics/Azure/protectionContainers/VMAppContainer;compute;crrtestrg;crrtestvm/protectedItems/SQLDataBase;mssqlserver;testdb"), + manager.recoveryPointsRecommendedForMoves() + .list("rshvault", "rshhtestmdvmrg", "Azure", + "IaasVMContainer;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall", + "VM;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall", + new ListRecoveryPointsRecommendedForMoveRequest() + .withObjectType("ListRecoveryPointsRecommendedForMoveRequest") + .withExcludedRPList(Arrays.asList("348916168024334", "348916168024335")), com.azure.core.util.Context.NONE); } } @@ -2907,9 +2697,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.PrepareDataMoveRe */ public final class ResourceProviderBmsPrepareDataMoveSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * BackupDataMove/PrepareDataMove_Post.json + * x-ms-original-file: 2026-01-01-preview/BackupDataMove/PrepareDataMove_Post.json */ /** * Sample code: Prepare Data Move. @@ -2938,9 +2726,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.TriggerDataMoveRe */ public final class ResourceProviderBmsTriggerDataMoveSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * BackupDataMove/TriggerDataMove_Post.json + * x-ms-original-file: 2026-01-01-preview/BackupDataMove/TriggerDataMove_Post.json */ /** * Sample code: Trigger Data Move. @@ -2968,9 +2754,7 @@ public final class ResourceProviderBmsTriggerDataMoveSamples { */ public final class ResourceProviderGetOperationStatusSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * BackupDataMove/BackupDataMoveOperationStatus_Get.json + * x-ms-original-file: 2026-01-01-preview/BackupDataMove/BackupDataMoveOperationStatus_Get.json */ /** * Sample code: Get OperationStatus. @@ -2997,9 +2781,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTier */ public final class ResourceProviderMoveRecoveryPointSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * TriggerRecoveryPointMove_Post.json + * x-ms-original-file: 2026-01-01-preview/TriggerRecoveryPointMove_Post.json */ /** * Sample code: Trigger RP Move Operation. @@ -3041,9 +2823,7 @@ import java.util.Arrays; */ public final class RestoresTriggerSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreWithRehydrationRequest.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreWithRehydrationRequest.json */ /** * Sample code: Restore to New Azure IaasVm with IaasVMRestoreWithRehydrationRequest. @@ -3082,9 +2862,7 @@ public final class RestoresTriggerSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest.json */ /** * Sample code: Restore to New Azure IaasVm with IaasVMRestoreRequest. @@ -3122,8 +2900,7 @@ public final class RestoresTriggerSamples { /* * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreWithRehydrationRequest.json + * 2026-01-01-preview/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreWithRehydrationRequest.json */ /** * Sample code: Restore Disks with IaasVMRestoreWithRehydrationRequest. @@ -3155,8 +2932,7 @@ public final class RestoresTriggerSamples { /* * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json + * 2026-01-01-preview/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json */ /** * Sample code: Restore to New Azure IaasVm with IaasVMRestoreRequest with identityBasedRestoreDetails. @@ -3193,9 +2969,7 @@ public final class RestoresTriggerSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json */ /** * Sample code: Restore Disks with IaasVMRestoreRequest. @@ -3232,8 +3006,7 @@ public final class RestoresTriggerSamples { /* * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json + * 2026-01-01-preview/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json */ /** * Sample code: Restore Disks with IaasVMRestoreRequest with IdentityBasedRestoreDetails. @@ -3264,9 +3037,7 @@ public final class RestoresTriggerSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/TriggerRestore_ResourceGuardEnabled.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/TriggerRestore_ResourceGuardEnabled.json */ /** * Sample code: Restore with Resource Guard Enabled. @@ -3309,9 +3080,7 @@ public final class RestoresTriggerSamples { */ public final class SecurityPINsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupSecurityPin_Get.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupSecurityPin_Get.json */ /** * Sample code: Get Vault Security Pin. @@ -3333,9 +3102,7 @@ public final class SecurityPINsGetSamples { */ public final class TieringCostOperationStatusGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * TieringCost/GetTieringCostOperationStatus.json + * x-ms-original-file: 2026-01-01-preview/TieringCost/GetTieringCostOperationStatus.json */ /** * Sample code: Fetch Tiering Cost Operation Status. @@ -3366,9 +3133,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperation */ public final class ValidateOperationTriggerSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/TriggerValidateOperation_RestoreDisk.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/TriggerValidateOperation_RestoreDisk.json */ /** * Sample code: Trigger Validate Operation. @@ -3407,9 +3172,7 @@ public final class ValidateOperationTriggerSamples { */ public final class ValidateOperationResultsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ValidateOperationResults.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ValidateOperationResults.json */ /** * Sample code: Get Operation Results of Validate Operation. @@ -3433,9 +3196,7 @@ public final class ValidateOperationResultsGetSamples { */ public final class ValidateOperationStatusesGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ValidateOperationStatus.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ValidateOperationStatus.json */ /** * Sample code: Get Operation Status of Validate Operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml index 9d263f33b46b..5e1bcb94078d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml @@ -1,7 +1,7 @@ 4.0.0 @@ -17,8 +17,8 @@ 1.7.0-beta.1 jar - Microsoft Azure SDK for RecoveryServicesBackup Management - This package contains Microsoft Azure SDK for RecoveryServicesBackup 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 RecoveryServices Backup service. Package tag package-2025-02-01. + Microsoft Azure SDK for Recovery Services Backup Management + This package contains Microsoft Azure SDK for Recovery Services Backup 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 RecoveryServices Backup service. Package api-version 2026-01-01-preview. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - false + true diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManager.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManager.java index e5f9531671d3..54c24fb41522 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManager.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup; @@ -24,7 +24,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryServicesBackupClient; +import com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryServicesBackupManagementClient; import com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupEnginesImpl; import com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupJobsImpl; import com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupOperationResultsImpl; @@ -69,8 +69,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectionPolicyOperationStatusesImpl; import com.azure.resourcemanager.recoveryservicesbackup.implementation.RecoveryPointsImpl; import com.azure.resourcemanager.recoveryservicesbackup.implementation.RecoveryPointsRecommendedForMovesImpl; -import com.azure.resourcemanager.recoveryservicesbackup.implementation.RecoveryServicesBackupClientBuilder; -import com.azure.resourcemanager.recoveryservicesbackup.implementation.ResourceGuardProxiesImpl; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.RecoveryServicesBackupManagementClientBuilder; import com.azure.resourcemanager.recoveryservicesbackup.implementation.ResourceGuardProxyOperationsImpl; import com.azure.resourcemanager.recoveryservicesbackup.implementation.ResourceProvidersImpl; import com.azure.resourcemanager.recoveryservicesbackup.implementation.RestoresImpl; @@ -123,7 +122,6 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionPolicyOperationStatuses; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPoints; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointsRecommendedForMoves; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxies; import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyOperations; import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceProviders; import com.azure.resourcemanager.recoveryservicesbackup.models.Restores; @@ -145,92 +143,86 @@ * Open API 2.0 Specs for Azure RecoveryServices Backup service. */ public final class RecoveryServicesBackupManager { - private BackupResourceStorageConfigsNonCrrs backupResourceStorageConfigsNonCrrs; - - private ProtectionIntents protectionIntents; - - private BackupStatus backupStatus; - - private FeatureSupports featureSupports; + private ResourceProviders resourceProviders; - private BackupProtectionIntents backupProtectionIntents; + private Operations operations; - private BackupUsageSummaries backupUsageSummaries; + private BackupResourceStorageConfigsNonCrrs backupResourceStorageConfigsNonCrrs; - private Operations operations; + private BmsPrepareDataMoveOperationResults bmsPrepareDataMoveOperationResults; private BackupResourceVaultConfigs backupResourceVaultConfigs; private BackupResourceEncryptionConfigs backupResourceEncryptionConfigs; - private PrivateEndpointConnections privateEndpointConnections; - - private PrivateEndpoints privateEndpoints; + private ProtectedItems protectedItems; - private ResourceProviders resourceProviders; + private Backups backups; - private BmsPrepareDataMoveOperationResults bmsPrepareDataMoveOperationResults; + private RecoveryPointsRecommendedForMoves recoveryPointsRecommendedForMoves; - private ProtectedItems protectedItems; + private ProtectedItemOperationStatuses protectedItemOperationStatuses; private ProtectedItemOperationResults protectedItemOperationResults; + private ProtectionContainers protectionContainers; + + private BackupWorkloadItems backupWorkloadItems; + + private ProtectionContainerOperationResults protectionContainerOperationResults; + private RecoveryPoints recoveryPoints; private Restores restores; - private BackupPolicies backupPolicies; + private ItemLevelRecoveryConnections itemLevelRecoveryConnections; private ProtectionPolicies protectionPolicies; + private BackupPolicies backupPolicies; + private ProtectionPolicyOperationResults protectionPolicyOperationResults; - private BackupJobs backupJobs; + private ProtectionPolicyOperationStatuses protectionPolicyOperationStatuses; private JobDetails jobDetails; + private BackupJobs backupJobs; + private JobCancellations jobCancellations; private JobOperationResults jobOperationResults; private ExportJobsOperationResults exportJobsOperationResults; + private BackupEngines backupEngines; + + private BackupStatus backupStatus; + + private FeatureSupports featureSupports; + + private BackupProtectionIntents backupProtectionIntents; + + private BackupUsageSummaries backupUsageSummaries; + private Jobs jobs; private BackupProtectedItems backupProtectedItems; - private OperationOperations operationOperations; - private ValidateOperations validateOperations; private ValidateOperationResults validateOperationResults; private ValidateOperationStatuses validateOperationStatuses; - private BackupEngines backupEngines; - private ProtectionContainerRefreshOperationResults protectionContainerRefreshOperationResults; private ProtectableContainers protectableContainers; - private ProtectionContainers protectionContainers; - - private BackupWorkloadItems backupWorkloadItems; - - private ProtectionContainerOperationResults protectionContainerOperationResults; - - private Backups backups; - - private ProtectedItemOperationStatuses protectedItemOperationStatuses; - - private ItemLevelRecoveryConnections itemLevelRecoveryConnections; - private BackupOperationResults backupOperationResults; private BackupOperationStatuses backupOperationStatuses; - private ProtectionPolicyOperationStatuses protectionPolicyOperationStatuses; - private BackupProtectableItems backupProtectableItems; private BackupProtectionContainers backupProtectionContainers; @@ -239,25 +231,29 @@ public final class RecoveryServicesBackupManager { private SecurityPINs securityPINs; - private RecoveryPointsRecommendedForMoves recoveryPointsRecommendedForMoves; - - private ResourceGuardProxies resourceGuardProxies; - - private ResourceGuardProxyOperations resourceGuardProxyOperations; - private FetchTieringCosts fetchTieringCosts; private GetTieringCostOperationResults getTieringCostOperationResults; private TieringCostOperationStatus tieringCostOperationStatus; - private final RecoveryServicesBackupClient clientObject; + private ProtectionIntents protectionIntents; + + private PrivateEndpointConnections privateEndpointConnections; + + private PrivateEndpoints privateEndpoints; + + private ResourceGuardProxyOperations resourceGuardProxyOperations; + + private OperationOperations operationOperations; + + private final RecoveryServicesBackupManagementClient clientObject; private RecoveryServicesBackupManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new RecoveryServicesBackupClientBuilder().pipeline(httpPipeline) + this.clientObject = new RecoveryServicesBackupManagementClientBuilder().pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) @@ -265,11 +261,11 @@ private RecoveryServicesBackupManager(HttpPipeline httpPipeline, AzureProfile pr } /** - * Creates an instance of RecoveryServicesBackup service API entry point. + * Creates an instance of Recovery Services Backup service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the RecoveryServicesBackup service API instance. + * @return the Recovery Services Backup service API instance. */ public static RecoveryServicesBackupManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); @@ -278,11 +274,11 @@ public static RecoveryServicesBackupManager authenticate(TokenCredential credent } /** - * Creates an instance of RecoveryServicesBackup service API entry point. + * Creates an instance of Recovery Services Backup service API entry point. * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. - * @return the RecoveryServicesBackup service API instance. + * @return the Recovery Services Backup service API instance. */ public static RecoveryServicesBackupManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); @@ -405,11 +401,11 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { } /** - * Creates an instance of RecoveryServicesBackup service API entry point. + * Creates an instance of Recovery Services Backup service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the RecoveryServicesBackup service API instance. + * @return the Recovery Services Backup service API instance. */ public RecoveryServicesBackupManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); @@ -469,89 +465,53 @@ public RecoveryServicesBackupManager authenticate(TokenCredential credential, Az } /** - * Gets the resource collection API of BackupResourceStorageConfigsNonCrrs. - * - * @return Resource collection API of BackupResourceStorageConfigsNonCrrs. - */ - public BackupResourceStorageConfigsNonCrrs backupResourceStorageConfigsNonCrrs() { - if (this.backupResourceStorageConfigsNonCrrs == null) { - this.backupResourceStorageConfigsNonCrrs = new BackupResourceStorageConfigsNonCrrsImpl( - clientObject.getBackupResourceStorageConfigsNonCrrs(), this); - } - return backupResourceStorageConfigsNonCrrs; - } - - /** - * Gets the resource collection API of ProtectionIntents. It manages ProtectionIntentResource. - * - * @return Resource collection API of ProtectionIntents. - */ - public ProtectionIntents protectionIntents() { - if (this.protectionIntents == null) { - this.protectionIntents = new ProtectionIntentsImpl(clientObject.getProtectionIntents(), this); - } - return protectionIntents; - } - - /** - * Gets the resource collection API of BackupStatus. - * - * @return Resource collection API of BackupStatus. - */ - public BackupStatus backupStatus() { - if (this.backupStatus == null) { - this.backupStatus = new BackupStatusImpl(clientObject.getBackupStatus(), this); - } - return backupStatus; - } - - /** - * Gets the resource collection API of FeatureSupports. + * Gets the resource collection API of ResourceProviders. * - * @return Resource collection API of FeatureSupports. + * @return Resource collection API of ResourceProviders. */ - public FeatureSupports featureSupports() { - if (this.featureSupports == null) { - this.featureSupports = new FeatureSupportsImpl(clientObject.getFeatureSupports(), this); + public ResourceProviders resourceProviders() { + if (this.resourceProviders == null) { + this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this); } - return featureSupports; + return resourceProviders; } /** - * Gets the resource collection API of BackupProtectionIntents. + * Gets the resource collection API of Operations. * - * @return Resource collection API of BackupProtectionIntents. + * @return Resource collection API of Operations. */ - public BackupProtectionIntents backupProtectionIntents() { - if (this.backupProtectionIntents == null) { - this.backupProtectionIntents - = new BackupProtectionIntentsImpl(clientObject.getBackupProtectionIntents(), this); + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); } - return backupProtectionIntents; + return operations; } /** - * Gets the resource collection API of BackupUsageSummaries. + * Gets the resource collection API of BackupResourceStorageConfigsNonCrrs. * - * @return Resource collection API of BackupUsageSummaries. + * @return Resource collection API of BackupResourceStorageConfigsNonCrrs. */ - public BackupUsageSummaries backupUsageSummaries() { - if (this.backupUsageSummaries == null) { - this.backupUsageSummaries = new BackupUsageSummariesImpl(clientObject.getBackupUsageSummaries(), this); + public BackupResourceStorageConfigsNonCrrs backupResourceStorageConfigsNonCrrs() { + if (this.backupResourceStorageConfigsNonCrrs == null) { + this.backupResourceStorageConfigsNonCrrs = new BackupResourceStorageConfigsNonCrrsImpl( + clientObject.getBackupResourceStorageConfigsNonCrrs(), this); } - return backupUsageSummaries; + return backupResourceStorageConfigsNonCrrs; } /** - * Gets the resource collection API of Operations. + * Gets the resource collection API of BmsPrepareDataMoveOperationResults. * - * @return Resource collection API of Operations. + * @return Resource collection API of BmsPrepareDataMoveOperationResults. */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); + public BmsPrepareDataMoveOperationResults bmsPrepareDataMoveOperationResults() { + if (this.bmsPrepareDataMoveOperationResults == null) { + this.bmsPrepareDataMoveOperationResults = new BmsPrepareDataMoveOperationResultsImpl( + clientObject.getBmsPrepareDataMoveOperationResults(), this); } - return operations; + return bmsPrepareDataMoveOperationResults; } /** @@ -581,65 +541,53 @@ public BackupResourceEncryptionConfigs backupResourceEncryptionConfigs() { } /** - * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnectionResource. - * - * @return Resource collection API of PrivateEndpointConnections. - */ - public PrivateEndpointConnections privateEndpointConnections() { - if (this.privateEndpointConnections == null) { - this.privateEndpointConnections - = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); - } - return privateEndpointConnections; - } - - /** - * Gets the resource collection API of PrivateEndpoints. + * Gets the resource collection API of ProtectedItems. It manages ProtectedItemResource. * - * @return Resource collection API of PrivateEndpoints. + * @return Resource collection API of ProtectedItems. */ - public PrivateEndpoints privateEndpoints() { - if (this.privateEndpoints == null) { - this.privateEndpoints = new PrivateEndpointsImpl(clientObject.getPrivateEndpoints(), this); + public ProtectedItems protectedItems() { + if (this.protectedItems == null) { + this.protectedItems = new ProtectedItemsImpl(clientObject.getProtectedItems(), this); } - return privateEndpoints; + return protectedItems; } /** - * Gets the resource collection API of ResourceProviders. + * Gets the resource collection API of Backups. * - * @return Resource collection API of ResourceProviders. + * @return Resource collection API of Backups. */ - public ResourceProviders resourceProviders() { - if (this.resourceProviders == null) { - this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this); + public Backups backups() { + if (this.backups == null) { + this.backups = new BackupsImpl(clientObject.getBackups(), this); } - return resourceProviders; + return backups; } /** - * Gets the resource collection API of BmsPrepareDataMoveOperationResults. + * Gets the resource collection API of RecoveryPointsRecommendedForMoves. * - * @return Resource collection API of BmsPrepareDataMoveOperationResults. + * @return Resource collection API of RecoveryPointsRecommendedForMoves. */ - public BmsPrepareDataMoveOperationResults bmsPrepareDataMoveOperationResults() { - if (this.bmsPrepareDataMoveOperationResults == null) { - this.bmsPrepareDataMoveOperationResults = new BmsPrepareDataMoveOperationResultsImpl( - clientObject.getBmsPrepareDataMoveOperationResults(), this); + public RecoveryPointsRecommendedForMoves recoveryPointsRecommendedForMoves() { + if (this.recoveryPointsRecommendedForMoves == null) { + this.recoveryPointsRecommendedForMoves + = new RecoveryPointsRecommendedForMovesImpl(clientObject.getRecoveryPointsRecommendedForMoves(), this); } - return bmsPrepareDataMoveOperationResults; + return recoveryPointsRecommendedForMoves; } /** - * Gets the resource collection API of ProtectedItems. It manages ProtectedItemResource. + * Gets the resource collection API of ProtectedItemOperationStatuses. * - * @return Resource collection API of ProtectedItems. + * @return Resource collection API of ProtectedItemOperationStatuses. */ - public ProtectedItems protectedItems() { - if (this.protectedItems == null) { - this.protectedItems = new ProtectedItemsImpl(clientObject.getProtectedItems(), this); + public ProtectedItemOperationStatuses protectedItemOperationStatuses() { + if (this.protectedItemOperationStatuses == null) { + this.protectedItemOperationStatuses + = new ProtectedItemOperationStatusesImpl(clientObject.getProtectedItemOperationStatuses(), this); } - return protectedItems; + return protectedItemOperationStatuses; } /** @@ -656,39 +604,77 @@ public ProtectedItemOperationResults protectedItemOperationResults() { } /** - * Gets the resource collection API of RecoveryPoints. + * Gets the resource collection API of ProtectionContainers. It manages ProtectionContainerResource. * - * @return Resource collection API of RecoveryPoints. + * @return Resource collection API of ProtectionContainers. */ - public RecoveryPoints recoveryPoints() { - if (this.recoveryPoints == null) { - this.recoveryPoints = new RecoveryPointsImpl(clientObject.getRecoveryPoints(), this); + public ProtectionContainers protectionContainers() { + if (this.protectionContainers == null) { + this.protectionContainers = new ProtectionContainersImpl(clientObject.getProtectionContainers(), this); } - return recoveryPoints; + return protectionContainers; } /** - * Gets the resource collection API of Restores. + * Gets the resource collection API of BackupWorkloadItems. * - * @return Resource collection API of Restores. + * @return Resource collection API of BackupWorkloadItems. */ - public Restores restores() { - if (this.restores == null) { - this.restores = new RestoresImpl(clientObject.getRestores(), this); + public BackupWorkloadItems backupWorkloadItems() { + if (this.backupWorkloadItems == null) { + this.backupWorkloadItems = new BackupWorkloadItemsImpl(clientObject.getBackupWorkloadItems(), this); } - return restores; + return backupWorkloadItems; } /** - * Gets the resource collection API of BackupPolicies. + * Gets the resource collection API of ProtectionContainerOperationResults. * - * @return Resource collection API of BackupPolicies. + * @return Resource collection API of ProtectionContainerOperationResults. */ - public BackupPolicies backupPolicies() { - if (this.backupPolicies == null) { - this.backupPolicies = new BackupPoliciesImpl(clientObject.getBackupPolicies(), this); + public ProtectionContainerOperationResults protectionContainerOperationResults() { + if (this.protectionContainerOperationResults == null) { + this.protectionContainerOperationResults = new ProtectionContainerOperationResultsImpl( + clientObject.getProtectionContainerOperationResults(), this); } - return backupPolicies; + return protectionContainerOperationResults; + } + + /** + * Gets the resource collection API of RecoveryPoints. + * + * @return Resource collection API of RecoveryPoints. + */ + public RecoveryPoints recoveryPoints() { + if (this.recoveryPoints == null) { + this.recoveryPoints = new RecoveryPointsImpl(clientObject.getRecoveryPoints(), this); + } + return recoveryPoints; + } + + /** + * Gets the resource collection API of Restores. + * + * @return Resource collection API of Restores. + */ + public Restores restores() { + if (this.restores == null) { + this.restores = new RestoresImpl(clientObject.getRestores(), this); + } + return restores; + } + + /** + * Gets the resource collection API of ItemLevelRecoveryConnections. + * + * @return Resource collection API of ItemLevelRecoveryConnections. + */ + public ItemLevelRecoveryConnections itemLevelRecoveryConnections() { + if (this.itemLevelRecoveryConnections == null) { + this.itemLevelRecoveryConnections + = new ItemLevelRecoveryConnectionsImpl(clientObject.getItemLevelRecoveryConnections(), this); + } + return itemLevelRecoveryConnections; } /** @@ -703,6 +689,18 @@ public ProtectionPolicies protectionPolicies() { return protectionPolicies; } + /** + * Gets the resource collection API of BackupPolicies. + * + * @return Resource collection API of BackupPolicies. + */ + public BackupPolicies backupPolicies() { + if (this.backupPolicies == null) { + this.backupPolicies = new BackupPoliciesImpl(clientObject.getBackupPolicies(), this); + } + return backupPolicies; + } + /** * Gets the resource collection API of ProtectionPolicyOperationResults. * @@ -717,15 +715,16 @@ public ProtectionPolicyOperationResults protectionPolicyOperationResults() { } /** - * Gets the resource collection API of BackupJobs. + * Gets the resource collection API of ProtectionPolicyOperationStatuses. * - * @return Resource collection API of BackupJobs. + * @return Resource collection API of ProtectionPolicyOperationStatuses. */ - public BackupJobs backupJobs() { - if (this.backupJobs == null) { - this.backupJobs = new BackupJobsImpl(clientObject.getBackupJobs(), this); + public ProtectionPolicyOperationStatuses protectionPolicyOperationStatuses() { + if (this.protectionPolicyOperationStatuses == null) { + this.protectionPolicyOperationStatuses + = new ProtectionPolicyOperationStatusesImpl(clientObject.getProtectionPolicyOperationStatuses(), this); } - return backupJobs; + return protectionPolicyOperationStatuses; } /** @@ -740,6 +739,18 @@ public JobDetails jobDetails() { return jobDetails; } + /** + * Gets the resource collection API of BackupJobs. + * + * @return Resource collection API of BackupJobs. + */ + public BackupJobs backupJobs() { + if (this.backupJobs == null) { + this.backupJobs = new BackupJobsImpl(clientObject.getBackupJobs(), this); + } + return backupJobs; + } + /** * Gets the resource collection API of JobCancellations. * @@ -777,6 +788,67 @@ public ExportJobsOperationResults exportJobsOperationResults() { return exportJobsOperationResults; } + /** + * Gets the resource collection API of BackupEngines. + * + * @return Resource collection API of BackupEngines. + */ + public BackupEngines backupEngines() { + if (this.backupEngines == null) { + this.backupEngines = new BackupEnginesImpl(clientObject.getBackupEngines(), this); + } + return backupEngines; + } + + /** + * Gets the resource collection API of BackupStatus. + * + * @return Resource collection API of BackupStatus. + */ + public BackupStatus backupStatus() { + if (this.backupStatus == null) { + this.backupStatus = new BackupStatusImpl(clientObject.getBackupStatus(), this); + } + return backupStatus; + } + + /** + * Gets the resource collection API of FeatureSupports. + * + * @return Resource collection API of FeatureSupports. + */ + public FeatureSupports featureSupports() { + if (this.featureSupports == null) { + this.featureSupports = new FeatureSupportsImpl(clientObject.getFeatureSupports(), this); + } + return featureSupports; + } + + /** + * Gets the resource collection API of BackupProtectionIntents. + * + * @return Resource collection API of BackupProtectionIntents. + */ + public BackupProtectionIntents backupProtectionIntents() { + if (this.backupProtectionIntents == null) { + this.backupProtectionIntents + = new BackupProtectionIntentsImpl(clientObject.getBackupProtectionIntents(), this); + } + return backupProtectionIntents; + } + + /** + * Gets the resource collection API of BackupUsageSummaries. + * + * @return Resource collection API of BackupUsageSummaries. + */ + public BackupUsageSummaries backupUsageSummaries() { + if (this.backupUsageSummaries == null) { + this.backupUsageSummaries = new BackupUsageSummariesImpl(clientObject.getBackupUsageSummaries(), this); + } + return backupUsageSummaries; + } + /** * Gets the resource collection API of Jobs. * @@ -801,18 +873,6 @@ public BackupProtectedItems backupProtectedItems() { return backupProtectedItems; } - /** - * Gets the resource collection API of OperationOperations. - * - * @return Resource collection API of OperationOperations. - */ - public OperationOperations operationOperations() { - if (this.operationOperations == null) { - this.operationOperations = new OperationOperationsImpl(clientObject.getOperationOperations(), this); - } - return operationOperations; - } - /** * Gets the resource collection API of ValidateOperations. * @@ -851,18 +911,6 @@ public ValidateOperationStatuses validateOperationStatuses() { return validateOperationStatuses; } - /** - * Gets the resource collection API of BackupEngines. - * - * @return Resource collection API of BackupEngines. - */ - public BackupEngines backupEngines() { - if (this.backupEngines == null) { - this.backupEngines = new BackupEnginesImpl(clientObject.getBackupEngines(), this); - } - return backupEngines; - } - /** * Gets the resource collection API of ProtectionContainerRefreshOperationResults. * @@ -888,81 +936,6 @@ public ProtectableContainers protectableContainers() { return protectableContainers; } - /** - * Gets the resource collection API of ProtectionContainers. It manages ProtectionContainerResource. - * - * @return Resource collection API of ProtectionContainers. - */ - public ProtectionContainers protectionContainers() { - if (this.protectionContainers == null) { - this.protectionContainers = new ProtectionContainersImpl(clientObject.getProtectionContainers(), this); - } - return protectionContainers; - } - - /** - * Gets the resource collection API of BackupWorkloadItems. - * - * @return Resource collection API of BackupWorkloadItems. - */ - public BackupWorkloadItems backupWorkloadItems() { - if (this.backupWorkloadItems == null) { - this.backupWorkloadItems = new BackupWorkloadItemsImpl(clientObject.getBackupWorkloadItems(), this); - } - return backupWorkloadItems; - } - - /** - * Gets the resource collection API of ProtectionContainerOperationResults. - * - * @return Resource collection API of ProtectionContainerOperationResults. - */ - public ProtectionContainerOperationResults protectionContainerOperationResults() { - if (this.protectionContainerOperationResults == null) { - this.protectionContainerOperationResults = new ProtectionContainerOperationResultsImpl( - clientObject.getProtectionContainerOperationResults(), this); - } - return protectionContainerOperationResults; - } - - /** - * Gets the resource collection API of Backups. - * - * @return Resource collection API of Backups. - */ - public Backups backups() { - if (this.backups == null) { - this.backups = new BackupsImpl(clientObject.getBackups(), this); - } - return backups; - } - - /** - * Gets the resource collection API of ProtectedItemOperationStatuses. - * - * @return Resource collection API of ProtectedItemOperationStatuses. - */ - public ProtectedItemOperationStatuses protectedItemOperationStatuses() { - if (this.protectedItemOperationStatuses == null) { - this.protectedItemOperationStatuses - = new ProtectedItemOperationStatusesImpl(clientObject.getProtectedItemOperationStatuses(), this); - } - return protectedItemOperationStatuses; - } - - /** - * Gets the resource collection API of ItemLevelRecoveryConnections. - * - * @return Resource collection API of ItemLevelRecoveryConnections. - */ - public ItemLevelRecoveryConnections itemLevelRecoveryConnections() { - if (this.itemLevelRecoveryConnections == null) { - this.itemLevelRecoveryConnections - = new ItemLevelRecoveryConnectionsImpl(clientObject.getItemLevelRecoveryConnections(), this); - } - return itemLevelRecoveryConnections; - } - /** * Gets the resource collection API of BackupOperationResults. * @@ -989,19 +962,6 @@ public BackupOperationStatuses backupOperationStatuses() { return backupOperationStatuses; } - /** - * Gets the resource collection API of ProtectionPolicyOperationStatuses. - * - * @return Resource collection API of ProtectionPolicyOperationStatuses. - */ - public ProtectionPolicyOperationStatuses protectionPolicyOperationStatuses() { - if (this.protectionPolicyOperationStatuses == null) { - this.protectionPolicyOperationStatuses - = new ProtectionPolicyOperationStatusesImpl(clientObject.getProtectionPolicyOperationStatuses(), this); - } - return protectionPolicyOperationStatuses; - } - /** * Gets the resource collection API of BackupProtectableItems. * @@ -1053,44 +1013,6 @@ public SecurityPINs securityPINs() { return securityPINs; } - /** - * Gets the resource collection API of RecoveryPointsRecommendedForMoves. - * - * @return Resource collection API of RecoveryPointsRecommendedForMoves. - */ - public RecoveryPointsRecommendedForMoves recoveryPointsRecommendedForMoves() { - if (this.recoveryPointsRecommendedForMoves == null) { - this.recoveryPointsRecommendedForMoves - = new RecoveryPointsRecommendedForMovesImpl(clientObject.getRecoveryPointsRecommendedForMoves(), this); - } - return recoveryPointsRecommendedForMoves; - } - - /** - * Gets the resource collection API of ResourceGuardProxies. - * - * @return Resource collection API of ResourceGuardProxies. - */ - public ResourceGuardProxies resourceGuardProxies() { - if (this.resourceGuardProxies == null) { - this.resourceGuardProxies = new ResourceGuardProxiesImpl(clientObject.getResourceGuardProxies(), this); - } - return resourceGuardProxies; - } - - /** - * Gets the resource collection API of ResourceGuardProxyOperations. It manages ResourceGuardProxyBaseResource. - * - * @return Resource collection API of ResourceGuardProxyOperations. - */ - public ResourceGuardProxyOperations resourceGuardProxyOperations() { - if (this.resourceGuardProxyOperations == null) { - this.resourceGuardProxyOperations - = new ResourceGuardProxyOperationsImpl(clientObject.getResourceGuardProxyOperations(), this); - } - return resourceGuardProxyOperations; - } - /** * Gets the resource collection API of FetchTieringCosts. * @@ -1130,12 +1052,74 @@ public TieringCostOperationStatus tieringCostOperationStatus() { } /** - * Gets wrapped service client RecoveryServicesBackupClient providing direct access to the underlying auto-generated - * API implementation, based on Azure REST API. + * Gets the resource collection API of ProtectionIntents. It manages ProtectionIntentResource. + * + * @return Resource collection API of ProtectionIntents. + */ + public ProtectionIntents protectionIntents() { + if (this.protectionIntents == null) { + this.protectionIntents = new ProtectionIntentsImpl(clientObject.getProtectionIntents(), this); + } + return protectionIntents; + } + + /** + * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnectionResource. + * + * @return Resource collection API of PrivateEndpointConnections. + */ + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections + = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + } + return privateEndpointConnections; + } + + /** + * Gets the resource collection API of PrivateEndpoints. + * + * @return Resource collection API of PrivateEndpoints. + */ + public PrivateEndpoints privateEndpoints() { + if (this.privateEndpoints == null) { + this.privateEndpoints = new PrivateEndpointsImpl(clientObject.getPrivateEndpoints(), this); + } + return privateEndpoints; + } + + /** + * Gets the resource collection API of ResourceGuardProxyOperations. It manages ResourceGuardProxyBaseResource. + * + * @return Resource collection API of ResourceGuardProxyOperations. + */ + public ResourceGuardProxyOperations resourceGuardProxyOperations() { + if (this.resourceGuardProxyOperations == null) { + this.resourceGuardProxyOperations + = new ResourceGuardProxyOperationsImpl(clientObject.getResourceGuardProxyOperations(), this); + } + return resourceGuardProxyOperations; + } + + /** + * Gets the resource collection API of OperationOperations. + * + * @return Resource collection API of OperationOperations. + */ + public OperationOperations operationOperations() { + if (this.operationOperations == null) { + this.operationOperations = new OperationOperationsImpl(clientObject.getOperationOperations(), this); + } + return operationOperations; + } + + /** + * Gets wrapped service client RecoveryServicesBackupManagementClient providing direct access to the underlying + * auto-generated API implementation, based on Azure REST API. * - * @return Wrapped service client RecoveryServicesBackupClient. + * @return Wrapped service client RecoveryServicesBackupManagementClient. */ - public RecoveryServicesBackupClient serviceClient() { + public RecoveryServicesBackupManagementClient serviceClient() { return this.clientObject; } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupEnginesClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupEnginesClient.java index ea9e3bb0195a..3d30f087ef6e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupEnginesClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupEnginesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -15,41 +15,11 @@ * An instance of this class provides access to all the operations defined in BackupEnginesClient. */ public interface BackupEnginesClient { - /** - * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of BackupEngineBase resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String vaultName, String resourceGroupName); - - /** - * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param skipToken skipToken Filter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of BackupEngineBase resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String vaultName, String resourceGroupName, String filter, - String skipToken, Context context); - /** * Returns backup management server registered to Recovery Services Vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param backupEngineName Name of the backup management server. * @param filter OData filter options. * @param skipToken skipToken Filter. @@ -66,8 +36,8 @@ Response getWithResponse(String vaultName, String /** * Returns backup management server registered to Recovery Services Vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param backupEngineName Name of the backup management server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -76,4 +46,34 @@ Response getWithResponse(String vaultName, String */ @ServiceMethod(returns = ReturnType.SINGLE) BackupEngineBaseResourceInner get(String vaultName, String resourceGroupName, String backupEngineName); + + /** + * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of BackupEngineBase resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String vaultName, String resourceGroupName); + + /** + * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter options. + * @param skipToken skipToken Filter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of BackupEngineBase resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String vaultName, String resourceGroupName, String filter, + String skipToken, Context context); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupJobsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupJobsClient.java index 4f9ae0326581..20817534556c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupJobsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupJobsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -17,8 +17,8 @@ public interface BackupJobsClient { /** * Provides a pageable list of jobs. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -30,8 +30,8 @@ public interface BackupJobsClient { /** * Provides a pageable list of jobs. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupOperationResultsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupOperationResultsClient.java index 4ea795a6d852..5f5c850e4693 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupOperationResultsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupOperationResultsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -21,7 +21,7 @@ public interface BackupOperationResultsClient { * part of the Location header of the operation response. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -40,7 +40,7 @@ public interface BackupOperationResultsClient { * part of the Location header of the operation response. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupOperationStatusesClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupOperationStatusesClient.java index 8d47d48b5da6..34e204ebad92 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupOperationStatusesClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupOperationStatusesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -20,7 +20,7 @@ public interface BackupOperationStatusesClient { * create jobs. This method returns the list of jobs when the operation is complete. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,7 +38,7 @@ Response getWithResponse(String vaultName, String resource * create jobs. This method returns the list of jobs when the operation is complete. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupPoliciesClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupPoliciesClient.java index df3bf1d867f1..7ff7ffe64d8f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupPoliciesClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -18,8 +18,8 @@ public interface BackupPoliciesClient { * Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch * scoped results. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -32,8 +32,8 @@ public interface BackupPoliciesClient { * Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch * scoped results. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectableItemsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectableItemsClient.java index 7da9a7ee1b86..e22f75cefc6a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectableItemsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectableItemsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -19,7 +19,7 @@ public interface BackupProtectableItemsClient { * pagination parameters. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -33,7 +33,7 @@ public interface BackupProtectableItemsClient { * pagination parameters. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectedItemsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectedItemsClient.java index ceff8e466610..568996aa1a40 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectedItemsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectedItemsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -18,7 +18,7 @@ public interface BackupProtectedItemsClient { * Provides a pageable list of all items that are backed up within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -31,7 +31,7 @@ public interface BackupProtectedItemsClient { * Provides a pageable list of all items that are backed up within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectionContainersClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectionContainersClient.java index a7eb06bc343d..c677861318fc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectionContainersClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectionContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -18,7 +18,7 @@ public interface BackupProtectionContainersClient { * Lists the containers registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -31,7 +31,7 @@ public interface BackupProtectionContainersClient { * Lists the containers registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectionIntentsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectionIntentsClient.java index 9dbd497ad003..82f4e78b1909 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectionIntentsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectionIntentsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -18,7 +18,7 @@ public interface BackupProtectionIntentsClient { * Provides a pageable list of all intents that are present within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -31,7 +31,7 @@ public interface BackupProtectionIntentsClient { * Provides a pageable list of all intents that are present within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceEncryptionConfigsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceEncryptionConfigsClient.java index 40931c72d807..63210b8fc9aa 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceEncryptionConfigsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceEncryptionConfigsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -18,8 +18,8 @@ public interface BackupResourceEncryptionConfigsClient { /** * Fetches Vault Encryption config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -33,8 +33,8 @@ Response getWithResponse(St /** * Fetches Vault Encryption config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -46,8 +46,8 @@ Response getWithResponse(St /** * Updates Vault encryption config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault encryption input config request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -62,8 +62,8 @@ Response updateWithResponse(String vaultName, String resourceGroupName, /** * Updates Vault encryption config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault encryption input config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceStorageConfigsNonCrrsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceStorageConfigsNonCrrsClient.java index eecc7a6ede46..cf503ca82a88 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceStorageConfigsNonCrrsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceStorageConfigsNonCrrsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -17,8 +17,8 @@ public interface BackupResourceStorageConfigsNonCrrsClient { /** * Fetches resource storage config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,8 +32,8 @@ Response getWithResponse(String vaultName, St /** * Fetches resource storage config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -45,8 +45,8 @@ Response getWithResponse(String vaultName, St /** * Updates vault storage model type. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault storage config request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -61,8 +61,8 @@ Response updateWithResponse(String vaultName, /** * Updates vault storage model type. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault storage config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -76,8 +76,8 @@ BackupResourceConfigResourceInner update(String vaultName, String resourceGroupN /** * Updates vault storage model type. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault storage config request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -92,8 +92,8 @@ Response patchWithResponse(String vaultName, String resourceGroupName, /** * Updates vault storage model type. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault storage config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceVaultConfigsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceVaultConfigsClient.java index d78a57965536..62c6d7ea1373 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceVaultConfigsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceVaultConfigsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -17,8 +17,8 @@ public interface BackupResourceVaultConfigsClient { /** * Fetches resource vault config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,8 +32,8 @@ Response getWithResponse(String vaultNam /** * Fetches resource vault config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -45,8 +45,8 @@ Response getWithResponse(String vaultNam /** * Updates vault security config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource config request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -55,14 +55,14 @@ Response getWithResponse(String vaultNam * @return backup resource vault config details along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String vaultName, String resourceGroupName, + Response putWithResponse(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters, Context context); /** * Updates vault security config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -70,14 +70,14 @@ Response updateWithResponse(String vault * @return backup resource vault config details. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupResourceVaultConfigResourceInner update(String vaultName, String resourceGroupName, + BackupResourceVaultConfigResourceInner put(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters); /** * Updates vault security config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource config request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -86,14 +86,14 @@ BackupResourceVaultConfigResourceInner update(String vaultName, String resourceG * @return backup resource vault config details along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response putWithResponse(String vaultName, String resourceGroupName, + Response updateWithResponse(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters, Context context); /** * Updates vault security config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -101,6 +101,6 @@ Response putWithResponse(String vaultNam * @return backup resource vault config details. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupResourceVaultConfigResourceInner put(String vaultName, String resourceGroupName, + BackupResourceVaultConfigResourceInner update(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupStatusClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupStatusClient.java index 303e494cb856..0e5acd72ed4c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupStatusClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupStatusClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupUsageSummariesClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupUsageSummariesClient.java index ae2ed88aa7c8..828878881df4 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupUsageSummariesClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupUsageSummariesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -18,7 +18,7 @@ public interface BackupUsageSummariesClient { * Fetches the backup management usage summaries of the vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -31,7 +31,7 @@ public interface BackupUsageSummariesClient { * Fetches the backup management usage summaries of the vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupWorkloadItemsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupWorkloadItemsClient.java index 43817f0d367b..8bd383448336 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupWorkloadItemsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupWorkloadItemsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -19,10 +19,10 @@ public interface BackupWorkloadItemsClient { * pagination * parameters. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -37,10 +37,10 @@ PagedIterable list(String vaultName, String resourceG * pagination * parameters. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupsClient.java index 428222718134..4c4cbd0998cd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -18,11 +18,11 @@ public interface BackupsClient { * Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the * operation, call GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item for which backup needs to be triggered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters resource backup request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,11 +38,11 @@ Response triggerWithResponse(String vaultName, String resourceGroupName, S * Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the * operation, call GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item for which backup needs to be triggered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters resource backup request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BmsPrepareDataMoveOperationResultsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BmsPrepareDataMoveOperationResultsClient.java index ce4b0994bf90..4f1170f70b9c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BmsPrepareDataMoveOperationResultsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BmsPrepareDataMoveOperationResultsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -15,11 +15,11 @@ */ public interface BmsPrepareDataMoveOperationResultsClient { /** - * Fetches Operation Result for Prepare Data Move. + * Fetches operation status for data move operation on vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the BackupResourceConfigResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -31,11 +31,11 @@ Response getWithResponse(String String operationId, Context context); /** - * Fetches Operation Result for Prepare Data Move. + * Fetches operation status for data move operation on vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the BackupResourceConfigResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/DeletedProtectionContainersClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/DeletedProtectionContainersClient.java index 34fffe273bab..624f241c505a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/DeletedProtectionContainersClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/DeletedProtectionContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -17,7 +17,7 @@ public interface DeletedProtectionContainersClient { /** * Lists the soft deleted containers registered to Recovery Services Vault. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -30,7 +30,7 @@ public interface DeletedProtectionContainersClient { /** * Lists the soft deleted containers registered to Recovery Services Vault. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param filter OData filter options. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ExportJobsOperationResultsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ExportJobsOperationResultsClient.java index 04bebbffd934..845a68ee6946 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ExportJobsOperationResultsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ExportJobsOperationResultsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -19,9 +19,9 @@ public interface ExportJobsOperationResultsClient { * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId OperationID which represents the export job. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the JobResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,9 +37,9 @@ Response getWithResponse(String vaultName, * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId OperationID which represents the export job. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the JobResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/FeatureSupportsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/FeatureSupportsClient.java index 53b66d28a408..04d8d53dfc96 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/FeatureSupportsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/FeatureSupportsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/FetchTieringCostsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/FetchTieringCostsClient.java index cb9a8056e3ed..0b91fc9c5fd5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/FetchTieringCostsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/FetchTieringCostsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -21,7 +21,7 @@ public interface FetchTieringCostsClient { * Status of the operation can be fetched using GetTieringCostOperationStatus API and result using * GetTieringCostOperationResult API. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param parameters Fetch Tiering Cost Request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,7 +38,7 @@ SyncPoller, TieringCostInfoInner> beginPost(Str * Status of the operation can be fetched using GetTieringCostOperationStatus API and result using * GetTieringCostOperationResult API. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param parameters Fetch Tiering Cost Request. * @param context The context to associate with this operation. @@ -56,7 +56,7 @@ SyncPoller, TieringCostInfoInner> beginPost(Str * Status of the operation can be fetched using GetTieringCostOperationStatus API and result using * GetTieringCostOperationResult API. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param parameters Fetch Tiering Cost Request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,7 +72,7 @@ SyncPoller, TieringCostInfoInner> beginPost(Str * Status of the operation can be fetched using GetTieringCostOperationStatus API and result using * GetTieringCostOperationResult API. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param parameters Fetch Tiering Cost Request. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/GetTieringCostOperationResultsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/GetTieringCostOperationResultsClient.java index 22236873f91d..f0e996f218bb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/GetTieringCostOperationResultsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/GetTieringCostOperationResultsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -17,7 +17,7 @@ public interface GetTieringCostOperationResultsClient { /** * Gets the result of async operation for tiering cost. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -33,7 +33,7 @@ Response getWithResponse(String resourceGroupName, String /** * Gets the result of async operation for tiering cost. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ItemLevelRecoveryConnectionsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ItemLevelRecoveryConnectionsClient.java index d7a35fb6f5db..496af3cdaa1f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ItemLevelRecoveryConnectionsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ItemLevelRecoveryConnectionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -20,13 +20,12 @@ public interface ItemLevelRecoveryConnectionsClient { * of * provisioning, call GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be provisioned - * for this backed up data. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource ILR request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -45,13 +44,12 @@ Response provisionWithResponse(String vaultName, String resourceGroupName, * of * provisioning, call GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be provisioned - * for this backed up data. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource ILR request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -65,13 +63,12 @@ void provision(String vaultName, String resourceGroupName, String fabricName, St * Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer * displaying all recoverable files and folders. This is an asynchronous operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be revoked for - * this backed up data. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -86,13 +83,12 @@ Response revokeWithResponse(String vaultName, String resourceGroupName, St * Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer * displaying all recoverable files and folders. This is an asynchronous operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be revoked for - * this backed up data. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobCancellationsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobCancellationsClient.java index e56816e9c7d7..46268b3c813a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobCancellationsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobCancellationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -17,9 +17,9 @@ public interface JobCancellationsClient { * Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call * GetCancelOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Name of the job to cancel. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the job whose details are to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -33,9 +33,9 @@ public interface JobCancellationsClient { * Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call * GetCancelOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Name of the job to cancel. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the job whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobDetailsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobDetailsClient.java index 6ecbe4129daa..ac4aaf22ee46 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobDetailsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobDetailsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -17,8 +17,8 @@ public interface JobDetailsClient { /** * Gets extended information associated with the job. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Name of the job whose details are to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -33,8 +33,8 @@ Response getWithResponse(String vaultName, String resourceGrou /** * Gets extended information associated with the job. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Name of the job whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobOperationResultsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobOperationResultsClient.java index 2a33e2c149bc..5b6844050255 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobOperationResultsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobOperationResultsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -16,10 +16,10 @@ public interface JobOperationResultsClient { /** * Fetches the result of any operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job name whose operation result has to be fetched. - * @param operationId OperationID which represents the operation whose result has to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the JobResource. + * @param operationId The name of the JobResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -33,10 +33,10 @@ Response getWithResponse(String vaultName, String resourceGroupName, Strin /** * Fetches the result of any operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job name whose operation result has to be fetched. - * @param operationId OperationID which represents the operation whose result has to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the JobResource. + * @param operationId The name of the JobResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobsClient.java index d7fcc56ea801..80d2e6efc93d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -17,7 +17,7 @@ public interface JobsClient { * Triggers export of jobs specified by filters and returns an OperationID to track. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -32,7 +32,7 @@ public interface JobsClient { * Triggers export of jobs specified by filters and returns an OperationID to track. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationOperationsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationOperationsClient.java index 613d9b0ece7b..1605f4b0e651 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationOperationsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -19,7 +19,7 @@ public interface OperationOperationsClient { * Validate operation for specified backed up item. This is a synchronous operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -35,7 +35,7 @@ Response validateWithResponse(String vaultName, * Validate operation for specified backed up item. This is a synchronous operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsClient.java index 1076bda133fa..666357241a9a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -15,7 +15,7 @@ */ public interface OperationsClient { /** - * Returns the list of available operations. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -26,7 +26,7 @@ public interface OperationsClient { PagedIterable list(); /** - * Returns the list of available operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/PrivateEndpointConnectionsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/PrivateEndpointConnectionsClient.java index 42e87d6e9f34..53660a836cda 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/PrivateEndpointConnectionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -19,8 +19,8 @@ public interface PrivateEndpointConnectionsClient { /** * Get Private Endpoint Connection. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -35,8 +35,8 @@ Response getWithResponse(String vaultNam /** * Get Private Endpoint Connection. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -50,8 +50,8 @@ PrivateEndpointConnectionResourceInner get(String vaultName, String resourceGrou /** * Approve or Reject Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -67,8 +67,8 @@ SyncPoller, PrivateEndpointCo /** * Approve or Reject Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -85,8 +85,8 @@ SyncPoller, PrivateEndpointCo /** * Approve or Reject Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,8 +101,8 @@ PrivateEndpointConnectionResourceInner put(String vaultName, String resourceGrou /** * Approve or Reject Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -118,8 +118,8 @@ PrivateEndpointConnectionResourceInner put(String vaultName, String resourceGrou /** * Delete Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -133,8 +133,8 @@ SyncPoller, Void> beginDelete(String vaultName, String resource /** * Delete Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -149,8 +149,8 @@ SyncPoller, Void> beginDelete(String vaultName, String resource /** * Delete Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -162,8 +162,8 @@ SyncPoller, Void> beginDelete(String vaultName, String resource /** * Delete Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/PrivateEndpointsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/PrivateEndpointsClient.java index 4824733ee9dd..d3b0058c8e32 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/PrivateEndpointsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/PrivateEndpointsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -17,10 +17,10 @@ public interface PrivateEndpointsClient { /** * Gets the operation status for a private endpoint connection. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param operationId Operation id. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateEndpointConnectionName The name of the PrivateEndpointConnectionResource. + * @param operationId The name of the PrivateEndpointConnectionResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -34,10 +34,10 @@ Response getOperationStatusWithResponse(String vaultName, /** * Gets the operation status for a private endpoint connection. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param operationId Operation id. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateEndpointConnectionName The name of the PrivateEndpointConnectionResource. + * @param operationId The name of the PrivateEndpointConnectionResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectableContainersClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectableContainersClient.java index 46c7ba6b99a6..5ddd54a353af 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectableContainersClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectableContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -18,7 +18,7 @@ public interface ProtectableContainersClient { * Lists the containers that can be registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName The fabricName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -33,7 +33,7 @@ PagedIterable list(String vaultName, String r * Lists the containers that can be registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName The fabricName parameter. * @param filter OData filter options. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectedItemOperationResultsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectedItemOperationResultsClient.java index 944b84bd7b3c..adbd5d0278fa 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectedItemOperationResultsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectedItemOperationResultsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -17,12 +17,12 @@ public interface ProtectedItemOperationResultsClient { /** * Fetches the result of any operation on the backup item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param protectedItemName The name of the ProtectedItemResource. + * @param operationId The name of the ProtectedItemResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,12 +36,12 @@ Response getWithResponse(String vaultName, String re /** * Fetches the result of any operation on the backup item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param protectedItemName The name of the ProtectedItemResource. + * @param operationId The name of the ProtectedItemResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectedItemOperationStatusesClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectedItemOperationStatusesClient.java index 5759692ff55d..b3bac26cbb34 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectedItemOperationStatusesClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectedItemOperationStatusesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -20,12 +20,12 @@ public interface ProtectedItemOperationStatusesClient { * operations * create jobs. This method returns the list of jobs associated with the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID represents the operation whose status needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param protectedItemName The name of the ProtectedItemResource. + * @param operationId The name of the ProtectedItemResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -42,12 +42,12 @@ Response getWithResponse(String vaultName, String resource * operations * create jobs. This method returns the list of jobs associated with the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID represents the operation whose status needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param protectedItemName The name of the ProtectedItemResource. + * @param operationId The name of the ProtectedItemResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectedItemsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectedItemsClient.java index 08443967e1a6..a338c1f8416e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectedItemsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectedItemsClient.java @@ -1,13 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectedItemResourceInner; /** @@ -19,10 +21,10 @@ public interface ProtectedItemsClient { * operation, * call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param protectedItemName Backed up item name whose details are to be fetched. * @param filter OData filter options. * @param context The context to associate with this operation. @@ -40,10 +42,10 @@ Response getWithResponse(String vaultName, String re * operation, * call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param protectedItemName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -58,32 +60,52 @@ ProtectedItemResourceInner get(String vaultName, String resourceGroupName, Strin * Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an * asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Item name to be backed up. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param parameters resource backed up item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of base class for backup items. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ProtectedItemResourceInner> beginCreateOrUpdate(String vaultName, + String resourceGroupName, String fabricName, String containerName, String protectedItemName, + ProtectedItemResourceInner parameters); + + /** + * Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an + * asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters resource backed up item. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for backup items along with {@link Response}. + * @return the {@link SyncPoller} for polling of base class for backup items. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String vaultName, String resourceGroupName, - String fabricName, String containerName, String protectedItemName, ProtectedItemResourceInner parameters, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ProtectedItemResourceInner> beginCreateOrUpdate(String vaultName, + String resourceGroupName, String fabricName, String containerName, String protectedItemName, + ProtectedItemResourceInner parameters, Context context); /** * Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an * asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Item name to be backed up. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters resource backed up item. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -94,16 +116,36 @@ Response createOrUpdateWithResponse(String vaultName ProtectedItemResourceInner createOrUpdate(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, ProtectedItemResourceInner parameters); + /** + * Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an + * asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param parameters resource backed up item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return base class for backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProtectedItemResourceInner createOrUpdate(String vaultName, String resourceGroupName, String fabricName, + String containerName, String protectedItemName, ProtectedItemResourceInner parameters, Context context); + /** * Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of * the * request, call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -119,11 +161,11 @@ Response deleteWithResponse(String vaultName, String resourceGroupName, St * the * request, call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionContainerOperationResultsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionContainerOperationResultsClient.java index f565ee7dab85..4b8205a54885 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionContainerOperationResultsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionContainerOperationResultsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -17,11 +17,11 @@ public interface ProtectionContainerOperationResultsClient { /** * Fetches the result of any operation on the container. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Container name whose information should be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param operationId The name of the ProtectionContainerResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -35,11 +35,11 @@ Response getWithResponse(String vaultName, Str /** * Fetches the result of any operation on the container. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Container name whose information should be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param operationId The name of the ProtectionContainerResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionContainerRefreshOperationResultsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionContainerRefreshOperationResultsClient.java index 3e002fc4f661..fe5847d07330 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionContainerRefreshOperationResultsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionContainerRefreshOperationResultsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -18,7 +18,7 @@ public interface ProtectionContainerRefreshOperationResultsClient { * Provides the result of the refresh operation triggered by the BeginRefresh operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName Fabric name associated with the container. * @param operationId Operation ID associated with the operation whose result needs to be fetched. * @param context The context to associate with this operation. @@ -35,7 +35,7 @@ Response getWithResponse(String vaultName, String resourceGroupName, Strin * Provides the result of the refresh operation triggered by the BeginRefresh operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName Fabric name associated with the container. * @param operationId Operation ID associated with the operation whose result needs to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionContainersClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionContainersClient.java index 7fd6a4992dda..218446294f6f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionContainersClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -19,9 +19,9 @@ public interface ProtectionContainersClient { /** * Gets details of the specific container registered to your Recovery Services Vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @param containerName Name of the container whose details need to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -36,9 +36,9 @@ Response getWithResponse(String vaultName, Str /** * Gets details of the specific container registered to your Recovery Services Vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -55,10 +55,10 @@ ProtectionContainerResourceInner get(String vaultName, String resourceGroupName, * of * the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container to be registered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -76,10 +76,10 @@ SyncPoller, ProtectionContainerReso * of * the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container to be registered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -98,10 +98,10 @@ SyncPoller, ProtectionContainerReso * of * the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container to be registered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -118,10 +118,10 @@ ProtectionContainerResourceInner register(String vaultName, String resourceGroup * of * the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container to be registered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -138,10 +138,10 @@ ProtectionContainerResourceInner register(String vaultName, String resourceGroup * determine * whether the backend service has finished processing the request, call Get Container Operation Result API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. - * @param containerName Name of the container which needs to be unregistered from the Recovery Services Vault. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -157,10 +157,10 @@ Response unregisterWithResponse(String vaultName, String resourceGroupName * determine * whether the backend service has finished processing the request, call Get Container Operation Result API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. - * @param containerName Name of the container which needs to be unregistered from the Recovery Services Vault. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -169,14 +169,12 @@ Response unregisterWithResponse(String vaultName, String resourceGroupName void unregister(String vaultName, String resourceGroupName, String fabricName, String containerName); /** - * Inquires all the protectable items under the given container. - * * This is an async operation and the results should be tracked using location header or Azure-async-url. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric Name associated with the container. - * @param containerName Name of the container in which inquiry needs to be triggered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -189,14 +187,12 @@ Response inquireWithResponse(String vaultName, String resourceGroupName, S String containerName, String filter, Context context); /** - * Inquires all the protectable items under the given container. - * * This is an async operation and the results should be tracked using location header or Azure-async-url. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric Name associated with the container. - * @param containerName Name of the container in which inquiry needs to be triggered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -209,7 +205,7 @@ Response inquireWithResponse(String vaultName, String resourceGroupName, S * asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName Fabric name associated the container. * @param filter OData filter options. * @param context The context to associate with this operation. @@ -227,7 +223,7 @@ Response refreshWithResponse(String vaultName, String resourceGroupName, S * asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName Fabric name associated the container. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionIntentsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionIntentsClient.java index 5fea840f2d8a..3d1ce92f71b0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionIntentsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionIntentsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -16,48 +16,14 @@ * An instance of this class provides access to all the operations defined in ProtectionIntentsClient. */ public interface ProtectionIntentsClient { - /** - * It will validate followings - * 1. Vault capacity - * 2. VM is already protected - * 3. Any VM related configuration passed in properties. - * - * @param azureRegion Azure region to hit Api. - * @param parameters Enable backup validation request on Virtual Machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response contract for enable backup validation request along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response validateWithResponse(String azureRegion, - PreValidateEnableBackupRequest parameters, Context context); - - /** - * It will validate followings - * 1. Vault capacity - * 2. VM is already protected - * 3. Any VM related configuration passed in properties. - * - * @param azureRegion Azure region to hit Api. - * @param parameters Enable backup validation request on Virtual Machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response contract for enable backup validation request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PreValidateEnableBackupResponseInner validate(String azureRegion, PreValidateEnableBackupRequest parameters); - /** * Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of * the operation, * call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @param intentObjectName Backed up item name whose details are to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -74,9 +40,9 @@ Response getWithResponse(String vaultName, String * the operation, * call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @param intentObjectName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -90,10 +56,10 @@ ProtectionIntentResourceInner get(String vaultName, String resourceGroupName, St /** * Create Intent for Enabling backup of an item. This is a synchronous operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param intentObjectName Intent object name. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param intentObjectName Backed up item name whose details are to be fetched. * @param parameters resource backed up item. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -108,10 +74,10 @@ Response createOrUpdateWithResponse(String vaultN /** * Create Intent for Enabling backup of an item. This is a synchronous operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param intentObjectName Intent object name. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param intentObjectName Backed up item name whose details are to be fetched. * @param parameters resource backed up item. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -125,10 +91,10 @@ ProtectionIntentResourceInner createOrUpdate(String vaultName, String resourceGr /** * Used to remove intent from an item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the intent. - * @param intentObjectName Intent to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param intentObjectName Backed up item name whose details are to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -142,14 +108,48 @@ Response deleteWithResponse(String vaultName, String resourceGroupName, St /** * Used to remove intent from an item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the intent. - * @param intentObjectName Intent to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param intentObjectName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String vaultName, String resourceGroupName, String fabricName, String intentObjectName); + + /** + * It will validate followings + * 1. Vault capacity + * 2. VM is already protected + * 3. Any VM related configuration passed in properties. + * + * @param azureRegion Azure region to hit Api. + * @param parameters Enable backup validation request on Virtual Machine. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response contract for enable backup validation request along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response validateWithResponse(String azureRegion, + PreValidateEnableBackupRequest parameters, Context context); + + /** + * It will validate followings + * 1. Vault capacity + * 2. VM is already protected + * 3. Any VM related configuration passed in properties. + * + * @param azureRegion Azure region to hit Api. + * @param parameters Enable backup validation request on Virtual Machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response contract for enable backup validation request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PreValidateEnableBackupResponseInner validate(String azureRegion, PreValidateEnableBackupRequest parameters); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPoliciesClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPoliciesClient.java index 01ee92d17d99..1537bf0a1601 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPoliciesClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPoliciesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -20,8 +20,8 @@ public interface ProtectionPoliciesClient { * Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous * operation. Status of the operation can be fetched using GetPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName Backup policy information to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -37,8 +37,8 @@ Response getWithResponse(String vaultName, String * Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous * operation. Status of the operation can be fetched using GetPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName Backup policy information to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -52,9 +52,9 @@ Response getWithResponse(String vaultName, String * Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched * using GetPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be created. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @param parameters resource backup policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -70,9 +70,9 @@ Response createOrUpdateWithResponse(String vaultN * Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched * using GetPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be created. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @param parameters resource backup policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -88,9 +88,9 @@ ProtectionPolicyResourceInner createOrUpdate(String vaultName, String resourceGr * the * operation can be fetched using GetProtectionPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -104,9 +104,9 @@ ProtectionPolicyResourceInner createOrUpdate(String vaultName, String resourceGr * the * operation can be fetched using GetProtectionPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -122,9 +122,9 @@ SyncPoller, Void> beginDelete(String vaultName, String resource * the * operation can be fetched using GetProtectionPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -137,9 +137,9 @@ SyncPoller, Void> beginDelete(String vaultName, String resource * the * operation can be fetched using GetProtectionPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPolicyOperationResultsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPolicyOperationResultsClient.java index 07b755f7562d..685f94eaba2a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPolicyOperationResultsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPolicyOperationResultsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -17,10 +17,10 @@ public interface ProtectionPolicyOperationResultsClient { /** * Provides the result of an operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's result needs to be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the ProtectionPolicyResource. + * @param operationId The name of the ProtectionPolicyResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -34,10 +34,10 @@ Response getWithResponse(String vaultName, String /** * Provides the result of an operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's result needs to be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the ProtectionPolicyResource. + * @param operationId The name of the ProtectionPolicyResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPolicyOperationStatusesClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPolicyOperationStatusesClient.java index e0cce043dc2a..5dd0a4aa8798 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPolicyOperationStatusesClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPolicyOperationStatusesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -20,10 +20,10 @@ public interface ProtectionPolicyOperationStatusesClient { * operations * create jobs. This method returns the list of jobs associated with operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's status needs to be fetched. - * @param operationId Operation ID which represents an operation whose status needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the ProtectionPolicyResource. + * @param operationId The name of the ProtectionPolicyResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -40,10 +40,10 @@ Response getWithResponse(String vaultName, String resource * operations * create jobs. This method returns the list of jobs associated with operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's status needs to be fetched. - * @param operationId Operation ID which represents an operation whose status needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the ProtectionPolicyResource. + * @param operationId The name of the ProtectionPolicyResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryPointsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryPointsClient.java index 22d909dc1230..5fad2408774b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryPointsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryPointsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -10,19 +10,61 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.RecoveryPointResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.UpdateRecoveryPointRequest; /** * An instance of this class provides access to all the operations defined in RecoveryPointsClient. */ public interface RecoveryPointsClient { + /** + * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous + * operation. + * To know the status of the operation, call the GetProtectedItemOperationResult API. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return base class for backup copies along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String vaultName, String resourceGroupName, String fabricName, + String containerName, String protectedItemName, String recoveryPointId, Context context); + + /** + * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous + * operation. + * To know the status of the operation, call the GetProtectedItemOperationResult API. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return base class for backup copies. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RecoveryPointResourceInner get(String vaultName, String resourceGroupName, String fabricName, String containerName, + String protectedItemName, String recoveryPointId); + /** * Lists the backup copies for the backed up item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item whose backup copies are to be fetched. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -35,11 +77,11 @@ PagedIterable list(String vaultName, String resource /** * Lists the backup copies for the backed up item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item whose backup copies are to be fetched. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -52,16 +94,15 @@ PagedIterable list(String vaultName, String resource String containerName, String protectedItemName, String filter, Context context); /** - * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous - * operation. - * To know the status of the operation, call the GetProtectedItemOperationResult API. + * UpdateRecoveryPoint to update recovery point for given RecoveryPointID. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with backed up item. - * @param containerName Container name associated with backed up item. - * @param protectedItemName Backed up item name whose backup data needs to be fetched. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the VaultResource. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. + * @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. @@ -69,26 +110,26 @@ PagedIterable list(String vaultName, String resource * @return base class for backup copies along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String vaultName, String resourceGroupName, String fabricName, - String containerName, String protectedItemName, String recoveryPointId, Context context); + Response updateWithResponse(String resourceGroupName, String vaultName, + String fabricName, String containerName, String protectedItemName, String recoveryPointId, + UpdateRecoveryPointRequest parameters, Context context); /** - * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous - * operation. - * To know the status of the operation, call the GetProtectedItemOperationResult API. + * UpdateRecoveryPoint to update recovery point for given RecoveryPointID. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with backed up item. - * @param containerName Container name associated with backed up item. - * @param protectedItemName Backed up item name whose backup data needs to be fetched. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the VaultResource. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. + * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base class for backup copies. */ @ServiceMethod(returns = ReturnType.SINGLE) - RecoveryPointResourceInner get(String vaultName, String resourceGroupName, String fabricName, String containerName, - String protectedItemName, String recoveryPointId); + RecoveryPointResourceInner update(String resourceGroupName, String vaultName, String fabricName, + String containerName, String protectedItemName, String recoveryPointId, UpdateRecoveryPointRequest parameters); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryPointsRecommendedForMovesClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryPointsRecommendedForMovesClient.java index 719030238499..495487b3e183 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryPointsRecommendedForMovesClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryPointsRecommendedForMovesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -18,11 +18,11 @@ public interface RecoveryPointsRecommendedForMovesClient { /** * Lists the recovery points recommended for move to another tier. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters List Recovery points Recommended for Move Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,11 +36,11 @@ PagedIterable list(String vaultName, String resource /** * Lists the recovery points recommended for move to another tier. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters List Recovery points Recommended for Move Request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryServicesBackupClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryServicesBackupManagementClient.java similarity index 96% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryServicesBackupClient.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryServicesBackupManagementClient.java index 585bf1b39f59..4fbf3fbeea52 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryServicesBackupClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryServicesBackupManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -8,30 +8,30 @@ import java.time.Duration; /** - * The interface for RecoveryServicesBackupClient class. + * The interface for RecoveryServicesBackupManagementClient class. */ -public interface RecoveryServicesBackupClient { +public interface RecoveryServicesBackupManagementClient { /** - * Gets The subscription Id. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -47,109 +47,102 @@ public interface RecoveryServicesBackupClient { Duration getDefaultPollInterval(); /** - * Gets the BackupResourceStorageConfigsNonCrrsClient object to access its operations. - * - * @return the BackupResourceStorageConfigsNonCrrsClient object. - */ - BackupResourceStorageConfigsNonCrrsClient getBackupResourceStorageConfigsNonCrrs(); - - /** - * Gets the ProtectionIntentsClient object to access its operations. + * Gets the ResourceProvidersClient object to access its operations. * - * @return the ProtectionIntentsClient object. + * @return the ResourceProvidersClient object. */ - ProtectionIntentsClient getProtectionIntents(); + ResourceProvidersClient getResourceProviders(); /** - * Gets the BackupStatusClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the BackupStatusClient object. + * @return the OperationsClient object. */ - BackupStatusClient getBackupStatus(); + OperationsClient getOperations(); /** - * Gets the FeatureSupportsClient object to access its operations. + * Gets the BackupResourceStorageConfigsNonCrrsClient object to access its operations. * - * @return the FeatureSupportsClient object. + * @return the BackupResourceStorageConfigsNonCrrsClient object. */ - FeatureSupportsClient getFeatureSupports(); + BackupResourceStorageConfigsNonCrrsClient getBackupResourceStorageConfigsNonCrrs(); /** - * Gets the BackupProtectionIntentsClient object to access its operations. + * Gets the BmsPrepareDataMoveOperationResultsClient object to access its operations. * - * @return the BackupProtectionIntentsClient object. + * @return the BmsPrepareDataMoveOperationResultsClient object. */ - BackupProtectionIntentsClient getBackupProtectionIntents(); + BmsPrepareDataMoveOperationResultsClient getBmsPrepareDataMoveOperationResults(); /** - * Gets the BackupUsageSummariesClient object to access its operations. + * Gets the BackupResourceVaultConfigsClient object to access its operations. * - * @return the BackupUsageSummariesClient object. + * @return the BackupResourceVaultConfigsClient object. */ - BackupUsageSummariesClient getBackupUsageSummaries(); + BackupResourceVaultConfigsClient getBackupResourceVaultConfigs(); /** - * Gets the OperationsClient object to access its operations. + * Gets the BackupResourceEncryptionConfigsClient object to access its operations. * - * @return the OperationsClient object. + * @return the BackupResourceEncryptionConfigsClient object. */ - OperationsClient getOperations(); + BackupResourceEncryptionConfigsClient getBackupResourceEncryptionConfigs(); /** - * Gets the BackupResourceVaultConfigsClient object to access its operations. + * Gets the ProtectedItemsClient object to access its operations. * - * @return the BackupResourceVaultConfigsClient object. + * @return the ProtectedItemsClient object. */ - BackupResourceVaultConfigsClient getBackupResourceVaultConfigs(); + ProtectedItemsClient getProtectedItems(); /** - * Gets the BackupResourceEncryptionConfigsClient object to access its operations. + * Gets the BackupsClient object to access its operations. * - * @return the BackupResourceEncryptionConfigsClient object. + * @return the BackupsClient object. */ - BackupResourceEncryptionConfigsClient getBackupResourceEncryptionConfigs(); + BackupsClient getBackups(); /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. + * Gets the RecoveryPointsRecommendedForMovesClient object to access its operations. * - * @return the PrivateEndpointConnectionsClient object. + * @return the RecoveryPointsRecommendedForMovesClient object. */ - PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + RecoveryPointsRecommendedForMovesClient getRecoveryPointsRecommendedForMoves(); /** - * Gets the PrivateEndpointsClient object to access its operations. + * Gets the ProtectedItemOperationStatusesClient object to access its operations. * - * @return the PrivateEndpointsClient object. + * @return the ProtectedItemOperationStatusesClient object. */ - PrivateEndpointsClient getPrivateEndpoints(); + ProtectedItemOperationStatusesClient getProtectedItemOperationStatuses(); /** - * Gets the ResourceProvidersClient object to access its operations. + * Gets the ProtectedItemOperationResultsClient object to access its operations. * - * @return the ResourceProvidersClient object. + * @return the ProtectedItemOperationResultsClient object. */ - ResourceProvidersClient getResourceProviders(); + ProtectedItemOperationResultsClient getProtectedItemOperationResults(); /** - * Gets the BmsPrepareDataMoveOperationResultsClient object to access its operations. + * Gets the ProtectionContainersClient object to access its operations. * - * @return the BmsPrepareDataMoveOperationResultsClient object. + * @return the ProtectionContainersClient object. */ - BmsPrepareDataMoveOperationResultsClient getBmsPrepareDataMoveOperationResults(); + ProtectionContainersClient getProtectionContainers(); /** - * Gets the ProtectedItemsClient object to access its operations. + * Gets the BackupWorkloadItemsClient object to access its operations. * - * @return the ProtectedItemsClient object. + * @return the BackupWorkloadItemsClient object. */ - ProtectedItemsClient getProtectedItems(); + BackupWorkloadItemsClient getBackupWorkloadItems(); /** - * Gets the ProtectedItemOperationResultsClient object to access its operations. + * Gets the ProtectionContainerOperationResultsClient object to access its operations. * - * @return the ProtectedItemOperationResultsClient object. + * @return the ProtectionContainerOperationResultsClient object. */ - ProtectedItemOperationResultsClient getProtectedItemOperationResults(); + ProtectionContainerOperationResultsClient getProtectionContainerOperationResults(); /** * Gets the RecoveryPointsClient object to access its operations. @@ -166,11 +159,11 @@ public interface RecoveryServicesBackupClient { RestoresClient getRestores(); /** - * Gets the BackupPoliciesClient object to access its operations. + * Gets the ItemLevelRecoveryConnectionsClient object to access its operations. * - * @return the BackupPoliciesClient object. + * @return the ItemLevelRecoveryConnectionsClient object. */ - BackupPoliciesClient getBackupPolicies(); + ItemLevelRecoveryConnectionsClient getItemLevelRecoveryConnections(); /** * Gets the ProtectionPoliciesClient object to access its operations. @@ -179,6 +172,13 @@ public interface RecoveryServicesBackupClient { */ ProtectionPoliciesClient getProtectionPolicies(); + /** + * Gets the BackupPoliciesClient object to access its operations. + * + * @return the BackupPoliciesClient object. + */ + BackupPoliciesClient getBackupPolicies(); + /** * Gets the ProtectionPolicyOperationResultsClient object to access its operations. * @@ -187,11 +187,11 @@ public interface RecoveryServicesBackupClient { ProtectionPolicyOperationResultsClient getProtectionPolicyOperationResults(); /** - * Gets the BackupJobsClient object to access its operations. + * Gets the ProtectionPolicyOperationStatusesClient object to access its operations. * - * @return the BackupJobsClient object. + * @return the ProtectionPolicyOperationStatusesClient object. */ - BackupJobsClient getBackupJobs(); + ProtectionPolicyOperationStatusesClient getProtectionPolicyOperationStatuses(); /** * Gets the JobDetailsClient object to access its operations. @@ -200,6 +200,13 @@ public interface RecoveryServicesBackupClient { */ JobDetailsClient getJobDetails(); + /** + * Gets the BackupJobsClient object to access its operations. + * + * @return the BackupJobsClient object. + */ + BackupJobsClient getBackupJobs(); + /** * Gets the JobCancellationsClient object to access its operations. * @@ -221,6 +228,41 @@ public interface RecoveryServicesBackupClient { */ ExportJobsOperationResultsClient getExportJobsOperationResults(); + /** + * Gets the BackupEnginesClient object to access its operations. + * + * @return the BackupEnginesClient object. + */ + BackupEnginesClient getBackupEngines(); + + /** + * Gets the BackupStatusClient object to access its operations. + * + * @return the BackupStatusClient object. + */ + BackupStatusClient getBackupStatus(); + + /** + * Gets the FeatureSupportsClient object to access its operations. + * + * @return the FeatureSupportsClient object. + */ + FeatureSupportsClient getFeatureSupports(); + + /** + * Gets the BackupProtectionIntentsClient object to access its operations. + * + * @return the BackupProtectionIntentsClient object. + */ + BackupProtectionIntentsClient getBackupProtectionIntents(); + + /** + * Gets the BackupUsageSummariesClient object to access its operations. + * + * @return the BackupUsageSummariesClient object. + */ + BackupUsageSummariesClient getBackupUsageSummaries(); + /** * Gets the JobsClient object to access its operations. * @@ -235,13 +277,6 @@ public interface RecoveryServicesBackupClient { */ BackupProtectedItemsClient getBackupProtectedItems(); - /** - * Gets the OperationOperationsClient object to access its operations. - * - * @return the OperationOperationsClient object. - */ - OperationOperationsClient getOperationOperations(); - /** * Gets the ValidateOperationsClient object to access its operations. * @@ -263,13 +298,6 @@ public interface RecoveryServicesBackupClient { */ ValidateOperationStatusesClient getValidateOperationStatuses(); - /** - * Gets the BackupEnginesClient object to access its operations. - * - * @return the BackupEnginesClient object. - */ - BackupEnginesClient getBackupEngines(); - /** * Gets the ProtectionContainerRefreshOperationResultsClient object to access its operations. * @@ -284,48 +312,6 @@ public interface RecoveryServicesBackupClient { */ ProtectableContainersClient getProtectableContainers(); - /** - * Gets the ProtectionContainersClient object to access its operations. - * - * @return the ProtectionContainersClient object. - */ - ProtectionContainersClient getProtectionContainers(); - - /** - * Gets the BackupWorkloadItemsClient object to access its operations. - * - * @return the BackupWorkloadItemsClient object. - */ - BackupWorkloadItemsClient getBackupWorkloadItems(); - - /** - * Gets the ProtectionContainerOperationResultsClient object to access its operations. - * - * @return the ProtectionContainerOperationResultsClient object. - */ - ProtectionContainerOperationResultsClient getProtectionContainerOperationResults(); - - /** - * Gets the BackupsClient object to access its operations. - * - * @return the BackupsClient object. - */ - BackupsClient getBackups(); - - /** - * Gets the ProtectedItemOperationStatusesClient object to access its operations. - * - * @return the ProtectedItemOperationStatusesClient object. - */ - ProtectedItemOperationStatusesClient getProtectedItemOperationStatuses(); - - /** - * Gets the ItemLevelRecoveryConnectionsClient object to access its operations. - * - * @return the ItemLevelRecoveryConnectionsClient object. - */ - ItemLevelRecoveryConnectionsClient getItemLevelRecoveryConnections(); - /** * Gets the BackupOperationResultsClient object to access its operations. * @@ -340,13 +326,6 @@ public interface RecoveryServicesBackupClient { */ BackupOperationStatusesClient getBackupOperationStatuses(); - /** - * Gets the ProtectionPolicyOperationStatusesClient object to access its operations. - * - * @return the ProtectionPolicyOperationStatusesClient object. - */ - ProtectionPolicyOperationStatusesClient getProtectionPolicyOperationStatuses(); - /** * Gets the BackupProtectableItemsClient object to access its operations. * @@ -376,44 +355,58 @@ public interface RecoveryServicesBackupClient { SecurityPINsClient getSecurityPINs(); /** - * Gets the RecoveryPointsRecommendedForMovesClient object to access its operations. + * Gets the FetchTieringCostsClient object to access its operations. * - * @return the RecoveryPointsRecommendedForMovesClient object. + * @return the FetchTieringCostsClient object. */ - RecoveryPointsRecommendedForMovesClient getRecoveryPointsRecommendedForMoves(); + FetchTieringCostsClient getFetchTieringCosts(); /** - * Gets the ResourceGuardProxiesClient object to access its operations. + * Gets the GetTieringCostOperationResultsClient object to access its operations. * - * @return the ResourceGuardProxiesClient object. + * @return the GetTieringCostOperationResultsClient object. */ - ResourceGuardProxiesClient getResourceGuardProxies(); + GetTieringCostOperationResultsClient getGetTieringCostOperationResults(); /** - * Gets the ResourceGuardProxyOperationsClient object to access its operations. + * Gets the TieringCostOperationStatusClient object to access its operations. * - * @return the ResourceGuardProxyOperationsClient object. + * @return the TieringCostOperationStatusClient object. */ - ResourceGuardProxyOperationsClient getResourceGuardProxyOperations(); + TieringCostOperationStatusClient getTieringCostOperationStatus(); /** - * Gets the FetchTieringCostsClient object to access its operations. + * Gets the ProtectionIntentsClient object to access its operations. * - * @return the FetchTieringCostsClient object. + * @return the ProtectionIntentsClient object. */ - FetchTieringCostsClient getFetchTieringCosts(); + ProtectionIntentsClient getProtectionIntents(); /** - * Gets the GetTieringCostOperationResultsClient object to access its operations. + * Gets the PrivateEndpointConnectionsClient object to access its operations. * - * @return the GetTieringCostOperationResultsClient object. + * @return the PrivateEndpointConnectionsClient object. */ - GetTieringCostOperationResultsClient getGetTieringCostOperationResults(); + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); /** - * Gets the TieringCostOperationStatusClient object to access its operations. + * Gets the PrivateEndpointsClient object to access its operations. * - * @return the TieringCostOperationStatusClient object. + * @return the PrivateEndpointsClient object. */ - TieringCostOperationStatusClient getTieringCostOperationStatus(); + PrivateEndpointsClient getPrivateEndpoints(); + + /** + * Gets the ResourceGuardProxyOperationsClient object to access its operations. + * + * @return the ResourceGuardProxyOperationsClient object. + */ + ResourceGuardProxyOperationsClient getResourceGuardProxyOperations(); + + /** + * Gets the OperationOperationsClient object to access its operations. + * + * @return the OperationOperationsClient object. + */ + OperationOperationsClient getOperationOperations(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceGuardProxiesClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceGuardProxiesClient.java deleted file mode 100644 index 368ed5826ecc..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceGuardProxiesClient.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.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.recoveryservicesbackup.fluent.models.ResourceGuardProxyBaseResourceInner; - -/** - * An instance of this class provides access to all the operations defined in ResourceGuardProxiesClient. - */ -public interface ResourceGuardProxiesClient { - /** - * List the ResourceGuardProxies under vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable get(String vaultName, String resourceGroupName); - - /** - * List the ResourceGuardProxies under vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable get(String vaultName, String resourceGroupName, Context context); -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceGuardProxyOperationsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceGuardProxyOperationsClient.java index 5cf2f0247315..b094676bae14 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceGuardProxyOperationsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceGuardProxyOperationsClient.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ResourceGuardProxyBaseResourceInner; @@ -19,8 +20,8 @@ public interface ResourceGuardProxyOperationsClient { /** * Returns ResourceGuardProxy under vault and with the name referenced in request. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -35,8 +36,8 @@ Response getWithResponse(String vaultName, /** * Returns ResourceGuardProxy under vault and with the name referenced in request. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -50,8 +51,8 @@ Response getWithResponse(String vaultName, * Add or Update ResourceGuardProxy under vault * Secures vault critical operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -68,8 +69,8 @@ Response putWithResponse(String vaultName, * Add or Update ResourceGuardProxy under vault * Secures vault critical operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -84,8 +85,8 @@ ResourceGuardProxyBaseResourceInner put(String vaultName, String resourceGroupNa /** * Delete ResourceGuardProxy under vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -100,8 +101,8 @@ Response deleteWithResponse(String vaultName, String resourceGroupName, St /** * Delete ResourceGuardProxy under vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -113,8 +114,8 @@ Response deleteWithResponse(String vaultName, String resourceGroupName, St /** * Secures delete ResourceGuardProxy operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -130,8 +131,8 @@ Response unlockDeleteWithResponse(String vaultName, S /** * Secures delete ResourceGuardProxy operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -142,4 +143,32 @@ Response unlockDeleteWithResponse(String vaultName, S @ServiceMethod(returns = ReturnType.SINGLE) UnlockDeleteResponseInner unlockDelete(String vaultName, String resourceGroupName, String resourceGuardProxyName, UnlockDeleteRequest parameters); + + /** + * List the ResourceGuardProxies under vault. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String vaultName, String resourceGroupName); + + /** + * List the ResourceGuardProxies under vault. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String vaultName, String resourceGroupName, + Context context); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceProvidersClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceProvidersClient.java index d2f1cc172afc..08bb48a41814 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceProvidersClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceProvidersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -12,6 +12,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.OperationStatusInner; import com.azure.resourcemanager.recoveryservicesbackup.models.MoveRPAcrossTiersRequest; +import com.azure.resourcemanager.recoveryservicesbackup.models.OkResponse; import com.azure.resourcemanager.recoveryservicesbackup.models.PrepareDataMoveRequest; import com.azure.resourcemanager.recoveryservicesbackup.models.TriggerDataMoveRequest; @@ -19,41 +20,11 @@ * An instance of this class provides access to all the operations defined in ResourceProvidersClient. */ public interface ResourceProvidersClient { - /** - * Fetches operation status for data move operation on vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getOperationStatusWithResponse(String vaultName, String resourceGroupName, - String operationId, Context context); - - /** - * Fetches operation status for data move operation on vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusInner getOperationStatus(String vaultName, String resourceGroupName, String operationId); - /** * Prepares source vault for Data Move operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Prepare data move request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -61,14 +32,14 @@ Response getOperationStatusWithResponse(String vaultName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginBmsPrepareDataMove(String vaultName, String resourceGroupName, + SyncPoller, OkResponse> beginBmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters); /** * Prepares source vault for Data Move operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Prepare data move request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,42 +48,44 @@ SyncPoller, Void> beginBmsPrepareDataMove(String vaultName, Str * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginBmsPrepareDataMove(String vaultName, String resourceGroupName, + SyncPoller, OkResponse> beginBmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters, Context context); /** * Prepares source vault for Data Move operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Prepare data move request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void bmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters); + OkResponse bmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters); /** * Prepares source vault for Data Move operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Prepare data move request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void bmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters, + OkResponse bmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters, Context context); /** * Triggers Data Move Operation on target vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Trigger data move request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -120,14 +93,14 @@ void bmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataM * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginBmsTriggerDataMove(String vaultName, String resourceGroupName, + SyncPoller, OkResponse> beginBmsTriggerDataMove(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters); /** * Triggers Data Move Operation on target vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Trigger data move request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -136,46 +109,78 @@ SyncPoller, Void> beginBmsTriggerDataMove(String vaultName, Str * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginBmsTriggerDataMove(String vaultName, String resourceGroupName, + SyncPoller, OkResponse> beginBmsTriggerDataMove(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters, Context context); /** * Triggers Data Move Operation on target vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Trigger data move request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void bmsTriggerDataMove(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters); + OkResponse bmsTriggerDataMove(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters); /** * Triggers Data Move Operation on target vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Trigger data move request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void bmsTriggerDataMove(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters, + OkResponse bmsTriggerDataMove(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters, Context context); + /** + * Fetches Operation Result for Prepare Data Move. + * + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the BackupResourceConfigResource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getOperationStatusWithResponse(String vaultName, String resourceGroupName, + String operationId, Context context); + + /** + * Fetches Operation Result for Prepare Data Move. + * + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the BackupResourceConfigResource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusInner getOperationStatus(String vaultName, String resourceGroupName, String operationId); + /** * Move recovery point from one datastore to another store. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. - * @param recoveryPointId The recoveryPointId parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters Move Resource Across Tiers Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -190,12 +195,12 @@ SyncPoller, Void> beginMoveRecoveryPoint(String vaultName, Stri /** * Move recovery point from one datastore to another store. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. - * @param recoveryPointId The recoveryPointId parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters Move Resource Across Tiers Request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -211,12 +216,12 @@ SyncPoller, Void> beginMoveRecoveryPoint(String vaultName, Stri /** * Move recovery point from one datastore to another store. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. - * @param recoveryPointId The recoveryPointId parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters Move Resource Across Tiers Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -229,12 +234,12 @@ void moveRecoveryPoint(String vaultName, String resourceGroupName, String fabric /** * Move recovery point from one datastore to another store. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. - * @param recoveryPointId The recoveryPointId parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters Move Resource Across Tiers Request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RestoresClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RestoresClient.java index d10f53eb8c14..fb85fcd55fe6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RestoresClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RestoresClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -20,12 +20,12 @@ public interface RestoresClient { * use * GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource restore request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -41,12 +41,12 @@ SyncPoller, Void> beginTrigger(String vaultName, String resourc * use * GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource restore request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -64,12 +64,12 @@ SyncPoller, Void> beginTrigger(String vaultName, String resourc * use * GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource restore request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -84,12 +84,12 @@ void trigger(String vaultName, String resourceGroupName, String fabricName, Stri * use * GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource restore request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/SecurityPINsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/SecurityPINsClient.java index e83156f1320c..4ba46a06d262 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/SecurityPINsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/SecurityPINsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -19,7 +19,7 @@ public interface SecurityPINsClient { * Get the security PIN. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters security pin request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -35,7 +35,7 @@ Response getWithResponse(String vaultName, String resourc * Get the security PIN. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/TieringCostOperationStatusClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/TieringCostOperationStatusClient.java index f24a2cefc12f..0ec600be6c37 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/TieringCostOperationStatusClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/TieringCostOperationStatusClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -17,7 +17,7 @@ public interface TieringCostOperationStatusClient { /** * Gets the status of async operations of tiering cost. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -33,7 +33,7 @@ Response getWithResponse(String resourceGroupName, String /** * Gets the status of async operations of tiering cost. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ValidateOperationResultsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ValidateOperationResultsClient.java index 8861572fc3b6..53f413ffb076 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ValidateOperationResultsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ValidateOperationResultsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -18,7 +18,7 @@ public interface ValidateOperationResultsClient { * Fetches the result of a triggered validate operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation whose result needs to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -34,7 +34,7 @@ Response getWithResponse(String vaultName, Stri * Fetches the result of a triggered validate operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation whose result needs to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ValidateOperationStatusesClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ValidateOperationStatusesClient.java index 8ca399cd19a7..9c7c582e180a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ValidateOperationStatusesClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ValidateOperationStatusesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -20,7 +20,7 @@ public interface ValidateOperationStatusesClient { * If operation has completed, this method returns the list of errors obtained while validating the operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID represents the operation whose status needs to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,7 +38,7 @@ Response getWithResponse(String vaultName, String resource * If operation has completed, this method returns the list of errors obtained while validating the operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID represents the operation whose status needs to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ValidateOperationsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ValidateOperationsClient.java index 5e376d99c6d9..64e1486cefd2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ValidateOperationsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ValidateOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent; @@ -20,7 +20,7 @@ public interface ValidateOperationsClient { * headers which can be tracked using GetValidateOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,7 +36,7 @@ SyncPoller, Void> beginTrigger(String vaultName, String resourc * headers which can be tracked using GetValidateOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -53,7 +53,7 @@ SyncPoller, Void> beginTrigger(String vaultName, String resourc * headers which can be tracked using GetValidateOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -67,7 +67,7 @@ SyncPoller, Void> beginTrigger(String vaultName, String resourc * headers which can be tracked using GetValidateOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/AzureVMResourceFeatureSupportResponseInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/AzureVMResourceFeatureSupportResponseInner.java index aa91d018d1f1..cdfe35e0ec3e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/AzureVMResourceFeatureSupportResponseInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/AzureVMResourceFeatureSupportResponseInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Response for feature support requests for Azure IaasVm. */ -@Fluent +@Immutable public final class AzureVMResourceFeatureSupportResponseInner implements JsonSerializable { /* @@ -26,7 +26,7 @@ public final class AzureVMResourceFeatureSupportResponseInner /** * Creates an instance of AzureVMResourceFeatureSupportResponseInner class. */ - public AzureVMResourceFeatureSupportResponseInner() { + private AzureVMResourceFeatureSupportResponseInner() { } /** @@ -38,25 +38,6 @@ public SupportStatus supportStatus() { return this.supportStatus; } - /** - * Set the supportStatus property: Support status of feature. - * - * @param supportStatus the supportStatus value to set. - * @return the AzureVMResourceFeatureSupportResponseInner object itself. - */ - public AzureVMResourceFeatureSupportResponseInner withSupportStatus(SupportStatus supportStatus) { - this.supportStatus = supportStatus; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupEngineBaseResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupEngineBaseResourceInner.java index 20f1fcdaa4ec..2f64728baee0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupEngineBaseResourceInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupEngineBaseResourceInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -16,18 +17,33 @@ /** * The base backup engine class. All workload specific backup engines derive from this class. */ -@Fluent -public final class BackupEngineBaseResourceInner extends Resource { +@Immutable +public final class BackupEngineBaseResourceInner extends ProxyResource { /* * BackupEngineBaseResource properties */ private BackupEngineBase properties; + /* + * Resource tags. + */ + private Map tags; + + /* + * The geo-location where the resource lives + */ + private String location; + /* * Optional ETag. */ private String etag; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -46,7 +62,7 @@ public final class BackupEngineBaseResourceInner extends Resource { /** * Creates an instance of BackupEngineBaseResourceInner class. */ - public BackupEngineBaseResourceInner() { + private BackupEngineBaseResourceInner() { } /** @@ -59,14 +75,21 @@ public BackupEngineBase properties() { } /** - * Set the properties property: BackupEngineBaseResource properties. + * Get the tags property: Resource tags. * - * @param properties the properties value to set. - * @return the BackupEngineBaseResourceInner object itself. + * @return the tags value. */ - public BackupEngineBaseResourceInner withProperties(BackupEngineBase properties) { - this.properties = properties; - return this; + public Map tags() { + return this.tags; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; } /** @@ -79,14 +102,12 @@ public String etag() { } /** - * Set the etag property: Optional ETag. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param etag the etag value to set. - * @return the BackupEngineBaseResourceInner object itself. + * @return the systemData value. */ - public BackupEngineBaseResourceInner withEtag(String etag) { - this.etag = etag; - return this; + public SystemData systemData() { + return this.systemData; } /** @@ -119,44 +140,15 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public BackupEngineBaseResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BackupEngineBaseResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -184,15 +176,17 @@ public static BackupEngineBaseResourceInner fromJson(JsonReader jsonReader) thro deserializedBackupEngineBaseResourceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedBackupEngineBaseResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedBackupEngineBaseResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBackupEngineBaseResourceInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedBackupEngineBaseResourceInner.properties = BackupEngineBase.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedBackupEngineBaseResourceInner.tags = tags; + } else if ("location".equals(fieldName)) { + deserializedBackupEngineBaseResourceInner.location = reader.getString(); } else if ("eTag".equals(fieldName)) { deserializedBackupEngineBaseResourceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedBackupEngineBaseResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupManagementUsageInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupManagementUsageInner.java index 243febb2cb24..8e7a084fca9e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupManagementUsageInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupManagementUsageInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -19,7 +19,7 @@ /** * Backup management usages of a vault. */ -@Fluent +@Immutable public final class BackupManagementUsageInner implements JsonSerializable { /* * Unit of the usage. @@ -54,7 +54,7 @@ public final class BackupManagementUsageInner implements JsonSerializable tags; + + /* + * The geo-location where the resource lives + */ + private String location; + /* * Optional ETag. */ private String etag; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -69,6 +85,46 @@ public BackupResourceConfigResourceInner withProperties(BackupResourceConfig pro return this; } + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the BackupResourceConfigResourceInner object itself. + */ + public BackupResourceConfigResourceInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the BackupResourceConfigResourceInner object itself. + */ + public BackupResourceConfigResourceInner withLocation(String location) { + this.location = location; + return this; + } + /** * Get the etag property: Optional ETag. * @@ -89,6 +145,15 @@ public BackupResourceConfigResourceInner withEtag(String etag) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -119,44 +184,15 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public BackupResourceConfigResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BackupResourceConfigResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -184,15 +220,17 @@ public static BackupResourceConfigResourceInner fromJson(JsonReader jsonReader) deserializedBackupResourceConfigResourceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedBackupResourceConfigResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedBackupResourceConfigResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBackupResourceConfigResourceInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedBackupResourceConfigResourceInner.properties = BackupResourceConfig.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedBackupResourceConfigResourceInner.tags = tags; + } else if ("location".equals(fieldName)) { + deserializedBackupResourceConfigResourceInner.location = reader.getString(); } else if ("eTag".equals(fieldName)) { deserializedBackupResourceConfigResourceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedBackupResourceConfigResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigExtendedResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigExtendedResourceInner.java index 35c88d48cb76..37ebeecc14c9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigExtendedResourceInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigExtendedResourceInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -16,18 +17,33 @@ /** * The BackupResourceEncryptionConfigExtendedResource model. */ -@Fluent -public final class BackupResourceEncryptionConfigExtendedResourceInner extends Resource { +@Immutable +public final class BackupResourceEncryptionConfigExtendedResourceInner extends ProxyResource { /* * BackupResourceEncryptionConfigExtendedResource properties */ private BackupResourceEncryptionConfigExtended properties; + /* + * Resource tags. + */ + private Map tags; + + /* + * The geo-location where the resource lives + */ + private String location; + /* * Optional ETag. */ private String etag; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -46,7 +62,7 @@ public final class BackupResourceEncryptionConfigExtendedResourceInner extends R /** * Creates an instance of BackupResourceEncryptionConfigExtendedResourceInner class. */ - public BackupResourceEncryptionConfigExtendedResourceInner() { + private BackupResourceEncryptionConfigExtendedResourceInner() { } /** @@ -59,15 +75,21 @@ public BackupResourceEncryptionConfigExtended properties() { } /** - * Set the properties property: BackupResourceEncryptionConfigExtendedResource properties. + * Get the tags property: Resource tags. * - * @param properties the properties value to set. - * @return the BackupResourceEncryptionConfigExtendedResourceInner object itself. + * @return the tags value. */ - public BackupResourceEncryptionConfigExtendedResourceInner - withProperties(BackupResourceEncryptionConfigExtended properties) { - this.properties = properties; - return this; + public Map tags() { + return this.tags; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; } /** @@ -80,14 +102,12 @@ public String etag() { } /** - * Set the etag property: Optional ETag. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param etag the etag value to set. - * @return the BackupResourceEncryptionConfigExtendedResourceInner object itself. + * @return the systemData value. */ - public BackupResourceEncryptionConfigExtendedResourceInner withEtag(String etag) { - this.etag = etag; - return this; + public SystemData systemData() { + return this.systemData; } /** @@ -120,44 +140,15 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public BackupResourceEncryptionConfigExtendedResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BackupResourceEncryptionConfigExtendedResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -186,16 +177,19 @@ public static BackupResourceEncryptionConfigExtendedResourceInner fromJson(JsonR deserializedBackupResourceEncryptionConfigExtendedResourceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedBackupResourceEncryptionConfigExtendedResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedBackupResourceEncryptionConfigExtendedResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBackupResourceEncryptionConfigExtendedResourceInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedBackupResourceEncryptionConfigExtendedResourceInner.properties = BackupResourceEncryptionConfigExtended.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedBackupResourceEncryptionConfigExtendedResourceInner.tags = tags; + } else if ("location".equals(fieldName)) { + deserializedBackupResourceEncryptionConfigExtendedResourceInner.location = reader.getString(); } else if ("eTag".equals(fieldName)) { deserializedBackupResourceEncryptionConfigExtendedResourceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedBackupResourceEncryptionConfigExtendedResourceInner.systemData + = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceVaultConfigResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceVaultConfigResourceInner.java index 7c7b29803cb2..493883050d40 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceVaultConfigResourceInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceVaultConfigResourceInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -17,17 +18,32 @@ * Backup resource vault config details. */ @Fluent -public final class BackupResourceVaultConfigResourceInner extends Resource { +public final class BackupResourceVaultConfigResourceInner extends ProxyResource { /* * BackupResourceVaultConfigResource properties */ private BackupResourceVaultConfig properties; + /* + * Resource tags. + */ + private Map tags; + + /* + * The geo-location where the resource lives + */ + private String location; + /* * Optional ETag. */ private String etag; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -69,6 +85,46 @@ public BackupResourceVaultConfigResourceInner withProperties(BackupResourceVault return this; } + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the BackupResourceVaultConfigResourceInner object itself. + */ + public BackupResourceVaultConfigResourceInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the BackupResourceVaultConfigResourceInner object itself. + */ + public BackupResourceVaultConfigResourceInner withLocation(String location) { + this.location = location; + return this; + } + /** * Get the etag property: Optional ETag. * @@ -89,6 +145,15 @@ public BackupResourceVaultConfigResourceInner withEtag(String etag) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -119,44 +184,15 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public BackupResourceVaultConfigResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BackupResourceVaultConfigResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -184,16 +220,18 @@ public static BackupResourceVaultConfigResourceInner fromJson(JsonReader jsonRea deserializedBackupResourceVaultConfigResourceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedBackupResourceVaultConfigResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedBackupResourceVaultConfigResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBackupResourceVaultConfigResourceInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedBackupResourceVaultConfigResourceInner.properties = BackupResourceVaultConfig.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedBackupResourceVaultConfigResourceInner.tags = tags; + } else if ("location".equals(fieldName)) { + deserializedBackupResourceVaultConfigResourceInner.location = reader.getString(); } else if ("eTag".equals(fieldName)) { deserializedBackupResourceVaultConfigResourceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedBackupResourceVaultConfigResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupStatusResponseInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupStatusResponseInner.java index fe6490917191..644bf8ebf817 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupStatusResponseInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupStatusResponseInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -17,7 +17,7 @@ /** * BackupStatus response. */ -@Fluent +@Immutable public final class BackupStatusResponseInner implements JsonSerializable { /* * Specifies whether the container is registered or not @@ -77,7 +77,7 @@ public final class BackupStatusResponseInner implements JsonSerializable { /* @@ -42,7 +42,7 @@ public final class ClientDiscoveryValueForSingleApiInner /** * Creates an instance of ClientDiscoveryValueForSingleApiInner class. */ - public ClientDiscoveryValueForSingleApiInner() { + private ClientDiscoveryValueForSingleApiInner() { } /** @@ -54,17 +54,6 @@ public String name() { return this.name; } - /** - * Set the name property: Name of the Operation. - * - * @param name the name value to set. - * @return the ClientDiscoveryValueForSingleApiInner object itself. - */ - public ClientDiscoveryValueForSingleApiInner withName(String name) { - this.name = name; - return this; - } - /** * Get the display property: Contains the localized display information for this particular operation. * @@ -74,17 +63,6 @@ public ClientDiscoveryDisplay display() { return this.display; } - /** - * 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. - */ - public ClientDiscoveryValueForSingleApiInner withDisplay(ClientDiscoveryDisplay display) { - this.display = display; - return this; - } - /** * Get the origin property: The intended executor of the operation;governs the display of the operation in the RBAC * UX and the audit logs UX. @@ -95,18 +73,6 @@ public String origin() { return this.origin; } - /** - * Set the origin property: The intended executor of the operation;governs the display of the operation in the RBAC - * UX and the audit logs UX. - * - * @param origin the origin value to set. - * @return the ClientDiscoveryValueForSingleApiInner object itself. - */ - public ClientDiscoveryValueForSingleApiInner withOrigin(String origin) { - this.origin = origin; - return this; - } - /** * Get the properties property: ShoeBox properties for the given operation. * @@ -116,31 +82,6 @@ public ClientDiscoveryForProperties properties() { return this.properties; } - /** - * Set the properties property: ShoeBox properties for the given operation. - * - * @param properties the properties value to set. - * @return the ClientDiscoveryValueForSingleApiInner object itself. - */ - public ClientDiscoveryValueForSingleApiInner withProperties(ClientDiscoveryForProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/JobResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/JobResourceInner.java index f270ac4dbe13..daecf685b58e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/JobResourceInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/JobResourceInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -16,18 +17,33 @@ /** * Defines workload agnostic properties for a job. */ -@Fluent -public final class JobResourceInner extends Resource { +@Immutable +public final class JobResourceInner extends ProxyResource { /* * JobResource properties */ private Job properties; + /* + * Resource tags. + */ + private Map tags; + + /* + * The geo-location where the resource lives + */ + private String location; + /* * Optional ETag. */ private String etag; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -46,7 +62,7 @@ public final class JobResourceInner extends Resource { /** * Creates an instance of JobResourceInner class. */ - public JobResourceInner() { + private JobResourceInner() { } /** @@ -59,14 +75,21 @@ public Job properties() { } /** - * Set the properties property: JobResource properties. + * Get the tags property: Resource tags. * - * @param properties the properties value to set. - * @return the JobResourceInner object itself. + * @return the tags value. */ - public JobResourceInner withProperties(Job properties) { - this.properties = properties; - return this; + public Map tags() { + return this.tags; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; } /** @@ -79,14 +102,12 @@ public String etag() { } /** - * Set the etag property: Optional ETag. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param etag the etag value to set. - * @return the JobResourceInner object itself. + * @return the systemData value. */ - public JobResourceInner withEtag(String etag) { - this.etag = etag; - return this; + public SystemData systemData() { + return this.systemData; } /** @@ -119,44 +140,15 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public JobResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JobResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -183,15 +175,17 @@ public static JobResourceInner fromJson(JsonReader jsonReader) throws IOExceptio deserializedJobResourceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedJobResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedJobResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedJobResourceInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedJobResourceInner.properties = Job.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedJobResourceInner.tags = tags; + } else if ("location".equals(fieldName)) { + deserializedJobResourceInner.location = reader.getString(); } else if ("eTag".equals(fieldName)) { deserializedJobResourceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedJobResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/OperationResultInfoBaseResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/OperationResultInfoBaseResourceInner.java index bacc0dcec57a..b2071c140e35 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/OperationResultInfoBaseResourceInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/OperationResultInfoBaseResourceInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,17 +18,27 @@ /** * Base class for operation result info. */ -@Fluent +@Immutable public final class OperationResultInfoBaseResourceInner extends OperationWorkerResponse { /* * OperationResultInfoBaseResource operation */ private OperationResultInfoBase operation; + /* + * HTTP headers associated with this operation. + */ + private Map> headers; + + /* + * HTTP Status Code of the operation. + */ + private HttpStatusCode statusCode; + /** * Creates an instance of OperationResultInfoBaseResourceInner class. */ - public OperationResultInfoBaseResourceInner() { + private OperationResultInfoBaseResourceInner() { } /** @@ -41,44 +51,23 @@ public OperationResultInfoBase operation() { } /** - * Set the operation property: OperationResultInfoBaseResource operation. + * Get the headers property: HTTP headers associated with this operation. * - * @param operation the operation value to set. - * @return the OperationResultInfoBaseResourceInner object itself. - */ - public OperationResultInfoBaseResourceInner withOperation(OperationResultInfoBase operation) { - this.operation = operation; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OperationResultInfoBaseResourceInner withStatusCode(HttpStatusCode statusCode) { - super.withStatusCode(statusCode); - return this; - } - - /** - * {@inheritDoc} + * @return the headers value. */ @Override - public OperationResultInfoBaseResourceInner withHeaders(Map> headers) { - super.withHeaders(headers); - return this; + public Map> headers() { + return this.headers; } /** - * Validates the instance. + * Get the statusCode property: HTTP Status Code of the operation. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the statusCode value. */ @Override - public void validate() { - if (operation() != null) { - operation().validate(); - } + public HttpStatusCode statusCode() { + return this.statusCode; } /** @@ -111,12 +100,12 @@ public static OperationResultInfoBaseResourceInner fromJson(JsonReader jsonReade reader.nextToken(); if ("statusCode".equals(fieldName)) { - deserializedOperationResultInfoBaseResourceInner - .withStatusCode(HttpStatusCode.fromString(reader.getString())); + deserializedOperationResultInfoBaseResourceInner.statusCode + = HttpStatusCode.fromString(reader.getString()); } else if ("headers".equals(fieldName)) { Map> headers = reader.readMap(reader1 -> reader1.readArray(reader2 -> reader2.getString())); - deserializedOperationResultInfoBaseResourceInner.withHeaders(headers); + deserializedOperationResultInfoBaseResourceInner.headers = headers; } else if ("operation".equals(fieldName)) { deserializedOperationResultInfoBaseResourceInner.operation = OperationResultInfoBase.fromJson(reader); diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/OperationStatusInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/OperationStatusInner.java index a4d748ee05a8..e6bdffeb6bc9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/OperationStatusInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/OperationStatusInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -20,7 +20,7 @@ /** * Operation status. */ -@Fluent +@Immutable public final class OperationStatusInner implements JsonSerializable { /* * ID of the operation. @@ -60,7 +60,7 @@ public final class OperationStatusInner implements JsonSerializable { /* @@ -53,7 +53,7 @@ public final class PreValidateEnableBackupResponseInner /** * Creates an instance of PreValidateEnableBackupResponseInner class. */ - public PreValidateEnableBackupResponseInner() { + private PreValidateEnableBackupResponseInner() { } /** @@ -65,17 +65,6 @@ public ValidationStatus status() { return this.status; } - /** - * Set the status property: Validation Status. - * - * @param status the status value to set. - * @return the PreValidateEnableBackupResponseInner object itself. - */ - public PreValidateEnableBackupResponseInner withStatus(ValidationStatus status) { - this.status = status; - return this; - } - /** * Get the errorCode property: Response error code. * @@ -85,17 +74,6 @@ public String errorCode() { return this.errorCode; } - /** - * Set the errorCode property: Response error code. - * - * @param errorCode the errorCode value to set. - * @return the PreValidateEnableBackupResponseInner object itself. - */ - public PreValidateEnableBackupResponseInner withErrorCode(String errorCode) { - this.errorCode = errorCode; - return this; - } - /** * Get the errorMessage property: Response error message. * @@ -105,17 +83,6 @@ public String errorMessage() { return this.errorMessage; } - /** - * Set the errorMessage property: Response error message. - * - * @param errorMessage the errorMessage value to set. - * @return the PreValidateEnableBackupResponseInner object itself. - */ - public PreValidateEnableBackupResponseInner withErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - return this; - } - /** * Get the recommendation property: Recommended action for user. * @@ -125,17 +92,6 @@ public String recommendation() { return this.recommendation; } - /** - * Set the recommendation property: Recommended action for user. - * - * @param recommendation the recommendation value to set. - * @return the PreValidateEnableBackupResponseInner object itself. - */ - public PreValidateEnableBackupResponseInner withRecommendation(String recommendation) { - this.recommendation = recommendation; - return this; - } - /** * Get the containerName property: Specifies the product specific container name. E.g. * iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required @@ -147,19 +103,6 @@ public String containerName() { return this.containerName; } - /** - * Set the containerName property: Specifies the product specific container name. E.g. - * iaasvmcontainer;iaasvmcontainer;rgname;vmname. This is required - * for portal. - * - * @param containerName the containerName value to set. - * @return the PreValidateEnableBackupResponseInner object itself. - */ - public PreValidateEnableBackupResponseInner withContainerName(String containerName) { - this.containerName = containerName; - return this; - } - /** * Get the protectedItemName property: Specifies the product specific ds name. E.g. * vm;iaasvmcontainer;rgname;vmname. This is required for portal. @@ -170,26 +113,6 @@ public String protectedItemName() { return this.protectedItemName; } - /** - * Set the protectedItemName property: Specifies the product specific ds name. E.g. - * vm;iaasvmcontainer;rgname;vmname. This is required for portal. - * - * @param protectedItemName the protectedItemName value to set. - * @return the PreValidateEnableBackupResponseInner object itself. - */ - public PreValidateEnableBackupResponseInner withProtectedItemName(String protectedItemName) { - this.protectedItemName = protectedItemName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/PrivateEndpointConnectionResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/PrivateEndpointConnectionResourceInner.java index 7e13904804f0..423ca1d6aaff 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/PrivateEndpointConnectionResourceInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/PrivateEndpointConnectionResourceInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -17,17 +18,32 @@ * Private Endpoint Connection Response Properties. */ @Fluent -public final class PrivateEndpointConnectionResourceInner extends Resource { +public final class PrivateEndpointConnectionResourceInner extends ProxyResource { /* * PrivateEndpointConnectionResource properties */ private PrivateEndpointConnection properties; + /* + * Resource tags. + */ + private Map tags; + + /* + * The geo-location where the resource lives + */ + private String location; + /* * Optional ETag. */ private String etag; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -69,6 +85,46 @@ public PrivateEndpointConnectionResourceInner withProperties(PrivateEndpointConn return this; } + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the PrivateEndpointConnectionResourceInner object itself. + */ + public PrivateEndpointConnectionResourceInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the PrivateEndpointConnectionResourceInner object itself. + */ + public PrivateEndpointConnectionResourceInner withLocation(String location) { + this.location = location; + return this; + } + /** * Get the etag property: Optional ETag. * @@ -89,6 +145,15 @@ public PrivateEndpointConnectionResourceInner withEtag(String etag) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -119,44 +184,15 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public PrivateEndpointConnectionResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public PrivateEndpointConnectionResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -184,16 +220,18 @@ public static PrivateEndpointConnectionResourceInner fromJson(JsonReader jsonRea deserializedPrivateEndpointConnectionResourceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedPrivateEndpointConnectionResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedPrivateEndpointConnectionResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPrivateEndpointConnectionResourceInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedPrivateEndpointConnectionResourceInner.properties = PrivateEndpointConnection.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPrivateEndpointConnectionResourceInner.tags = tags; + } else if ("location".equals(fieldName)) { + deserializedPrivateEndpointConnectionResourceInner.location = reader.getString(); } else if ("eTag".equals(fieldName)) { deserializedPrivateEndpointConnectionResourceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedPrivateEndpointConnectionResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectableContainerResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectableContainerResourceInner.java index ae6416a44041..c539e78b76f5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectableContainerResourceInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectableContainerResourceInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -16,17 +17,32 @@ /** * Protectable Container Class. */ -@Fluent -public final class ProtectableContainerResourceInner extends Resource { +@Immutable +public final class ProtectableContainerResourceInner extends ProxyResource { + /* + * Resource location. + */ + private String location; + + /* + * Resource tags. + */ + private Map tags; + + /* + * Optional ETag. + */ + private String eTag; + /* * ProtectableContainerResource properties */ private ProtectableContainer properties; /* - * Optional ETag. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private String etag; + private SystemData systemData; /* * The type of the resource. @@ -46,47 +62,52 @@ public final class ProtectableContainerResourceInner extends Resource { /** * Creates an instance of ProtectableContainerResourceInner class. */ - public ProtectableContainerResourceInner() { + private ProtectableContainerResourceInner() { } /** - * Get the properties property: ProtectableContainerResource properties. + * Get the location property: Resource location. * - * @return the properties value. + * @return the location value. */ - public ProtectableContainer properties() { - return this.properties; + public String location() { + return this.location; } /** - * Set the properties property: ProtectableContainerResource properties. + * Get the tags property: Resource tags. * - * @param properties the properties value to set. - * @return the ProtectableContainerResourceInner object itself. + * @return the tags value. */ - public ProtectableContainerResourceInner withProperties(ProtectableContainer properties) { - this.properties = properties; - return this; + public Map tags() { + return this.tags; } /** - * Get the etag property: Optional ETag. + * Get the eTag property: Optional ETag. * - * @return the etag value. + * @return the eTag value. */ - public String etag() { - return this.etag; + public String eTag() { + return this.eTag; } /** - * Set the etag property: Optional ETag. + * Get the properties property: ProtectableContainerResource properties. * - * @param etag the etag value to set. - * @return the ProtectableContainerResourceInner object itself. + * @return the properties value. */ - public ProtectableContainerResourceInner withEtag(String etag) { - this.etag = etag; - return this; + public ProtectableContainer properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; } /** @@ -119,45 +140,16 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public ProtectableContainerResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProtectableContainerResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("eTag", this.eTag); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -185,14 +177,16 @@ public static ProtectableContainerResourceInner fromJson(JsonReader jsonReader) } else if ("type".equals(fieldName)) { deserializedProtectableContainerResourceInner.type = reader.getString(); } else if ("location".equals(fieldName)) { - deserializedProtectableContainerResourceInner.withLocation(reader.getString()); + deserializedProtectableContainerResourceInner.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedProtectableContainerResourceInner.withTags(tags); + deserializedProtectableContainerResourceInner.tags = tags; + } else if ("eTag".equals(fieldName)) { + deserializedProtectableContainerResourceInner.eTag = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedProtectableContainerResourceInner.properties = ProtectableContainer.fromJson(reader); - } else if ("eTag".equals(fieldName)) { - deserializedProtectableContainerResourceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedProtectableContainerResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectedItemResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectedItemResourceInner.java index 42f943c659c7..71133e692280 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectedItemResourceInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectedItemResourceInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -17,17 +18,32 @@ * Base class for backup items. */ @Fluent -public final class ProtectedItemResourceInner extends Resource { +public final class ProtectedItemResourceInner extends ProxyResource { /* * ProtectedItemResource properties */ private ProtectedItem properties; + /* + * Resource tags. + */ + private Map tags; + + /* + * The geo-location where the resource lives + */ + private String location; + /* * Optional ETag. */ private String etag; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -69,6 +85,46 @@ public ProtectedItemResourceInner withProperties(ProtectedItem properties) { return this; } + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ProtectedItemResourceInner object itself. + */ + public ProtectedItemResourceInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the ProtectedItemResourceInner object itself. + */ + public ProtectedItemResourceInner withLocation(String location) { + this.location = location; + return this; + } + /** * Get the etag property: Optional ETag. * @@ -89,6 +145,15 @@ public ProtectedItemResourceInner withEtag(String etag) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -119,44 +184,15 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public ProtectedItemResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProtectedItemResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -183,15 +219,17 @@ public static ProtectedItemResourceInner fromJson(JsonReader jsonReader) throws deserializedProtectedItemResourceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedProtectedItemResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedProtectedItemResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedProtectedItemResourceInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedProtectedItemResourceInner.properties = ProtectedItem.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedProtectedItemResourceInner.tags = tags; + } else if ("location".equals(fieldName)) { + deserializedProtectedItemResourceInner.location = reader.getString(); } else if ("eTag".equals(fieldName)) { deserializedProtectedItemResourceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedProtectedItemResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectionContainerResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectionContainerResourceInner.java index 128477b68015..44939e8fbd26 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectionContainerResourceInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectionContainerResourceInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -17,17 +18,32 @@ * Base class for container with backup items. Containers with specific workloads are derived from this class. */ @Fluent -public final class ProtectionContainerResourceInner extends Resource { +public final class ProtectionContainerResourceInner extends ProxyResource { /* * ProtectionContainerResource properties */ private ProtectionContainer properties; + /* + * Resource tags. + */ + private Map tags; + + /* + * The geo-location where the resource lives + */ + private String location; + /* * Optional ETag. */ private String etag; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -69,6 +85,46 @@ public ProtectionContainerResourceInner withProperties(ProtectionContainer prope return this; } + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ProtectionContainerResourceInner object itself. + */ + public ProtectionContainerResourceInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the ProtectionContainerResourceInner object itself. + */ + public ProtectionContainerResourceInner withLocation(String location) { + this.location = location; + return this; + } + /** * Get the etag property: Optional ETag. * @@ -89,6 +145,15 @@ public ProtectionContainerResourceInner withEtag(String etag) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -119,44 +184,15 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public ProtectionContainerResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProtectionContainerResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -184,15 +220,17 @@ public static ProtectionContainerResourceInner fromJson(JsonReader jsonReader) t deserializedProtectionContainerResourceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedProtectionContainerResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedProtectionContainerResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedProtectionContainerResourceInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedProtectionContainerResourceInner.properties = ProtectionContainer.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedProtectionContainerResourceInner.tags = tags; + } else if ("location".equals(fieldName)) { + deserializedProtectionContainerResourceInner.location = reader.getString(); } else if ("eTag".equals(fieldName)) { deserializedProtectionContainerResourceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedProtectionContainerResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectionIntentResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectionIntentResourceInner.java index 1f3de4c4c077..bd93bf2c88ba 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectionIntentResourceInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectionIntentResourceInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -17,17 +18,32 @@ * Base class for backup ProtectionIntent. */ @Fluent -public final class ProtectionIntentResourceInner extends Resource { +public final class ProtectionIntentResourceInner extends ProxyResource { /* * ProtectionIntentResource properties */ private ProtectionIntent properties; + /* + * Resource tags. + */ + private Map tags; + + /* + * The geo-location where the resource lives + */ + private String location; + /* * Optional ETag. */ private String etag; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -69,6 +85,46 @@ public ProtectionIntentResourceInner withProperties(ProtectionIntent properties) return this; } + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ProtectionIntentResourceInner object itself. + */ + public ProtectionIntentResourceInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the ProtectionIntentResourceInner object itself. + */ + public ProtectionIntentResourceInner withLocation(String location) { + this.location = location; + return this; + } + /** * Get the etag property: Optional ETag. * @@ -89,6 +145,15 @@ public ProtectionIntentResourceInner withEtag(String etag) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -119,44 +184,15 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public ProtectionIntentResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProtectionIntentResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -184,15 +220,17 @@ public static ProtectionIntentResourceInner fromJson(JsonReader jsonReader) thro deserializedProtectionIntentResourceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedProtectionIntentResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedProtectionIntentResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedProtectionIntentResourceInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedProtectionIntentResourceInner.properties = ProtectionIntent.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedProtectionIntentResourceInner.tags = tags; + } else if ("location".equals(fieldName)) { + deserializedProtectionIntentResourceInner.location = reader.getString(); } else if ("eTag".equals(fieldName)) { deserializedProtectionIntentResourceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedProtectionIntentResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectionPolicyResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectionPolicyResourceInner.java index 374e9b0bb218..f177881876d8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectionPolicyResourceInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectionPolicyResourceInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -17,17 +18,32 @@ * Base class for backup policy. Workload-specific backup policies are derived from this class. */ @Fluent -public final class ProtectionPolicyResourceInner extends Resource { +public final class ProtectionPolicyResourceInner extends ProxyResource { /* * ProtectionPolicyResource properties */ private ProtectionPolicy properties; + /* + * Resource tags. + */ + private Map tags; + + /* + * The geo-location where the resource lives + */ + private String location; + /* * Optional ETag. */ private String etag; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -69,6 +85,46 @@ public ProtectionPolicyResourceInner withProperties(ProtectionPolicy properties) return this; } + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ProtectionPolicyResourceInner object itself. + */ + public ProtectionPolicyResourceInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the ProtectionPolicyResourceInner object itself. + */ + public ProtectionPolicyResourceInner withLocation(String location) { + this.location = location; + return this; + } + /** * Get the etag property: Optional ETag. * @@ -89,6 +145,15 @@ public ProtectionPolicyResourceInner withEtag(String etag) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -119,44 +184,15 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public ProtectionPolicyResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProtectionPolicyResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -184,15 +220,17 @@ public static ProtectionPolicyResourceInner fromJson(JsonReader jsonReader) thro deserializedProtectionPolicyResourceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedProtectionPolicyResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedProtectionPolicyResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedProtectionPolicyResourceInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedProtectionPolicyResourceInner.properties = ProtectionPolicy.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedProtectionPolicyResourceInner.tags = tags; + } else if ("location".equals(fieldName)) { + deserializedProtectionPolicyResourceInner.location = reader.getString(); } else if ("eTag".equals(fieldName)) { deserializedProtectionPolicyResourceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedProtectionPolicyResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/RecoveryPointResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/RecoveryPointResourceInner.java index 17bf49c9253e..92a38550bd17 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/RecoveryPointResourceInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/RecoveryPointResourceInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -16,18 +17,33 @@ /** * Base class for backup copies. Workload-specific backup copies are derived from this class. */ -@Fluent -public final class RecoveryPointResourceInner extends Resource { +@Immutable +public final class RecoveryPointResourceInner extends ProxyResource { /* * RecoveryPointResource properties */ private RecoveryPoint properties; + /* + * Resource tags. + */ + private Map tags; + + /* + * The geo-location where the resource lives + */ + private String location; + /* * Optional ETag. */ private String etag; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -46,7 +62,7 @@ public final class RecoveryPointResourceInner extends Resource { /** * Creates an instance of RecoveryPointResourceInner class. */ - public RecoveryPointResourceInner() { + private RecoveryPointResourceInner() { } /** @@ -59,14 +75,21 @@ public RecoveryPoint properties() { } /** - * Set the properties property: RecoveryPointResource properties. + * Get the tags property: Resource tags. * - * @param properties the properties value to set. - * @return the RecoveryPointResourceInner object itself. + * @return the tags value. */ - public RecoveryPointResourceInner withProperties(RecoveryPoint properties) { - this.properties = properties; - return this; + public Map tags() { + return this.tags; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; } /** @@ -79,14 +102,12 @@ public String etag() { } /** - * Set the etag property: Optional ETag. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param etag the etag value to set. - * @return the RecoveryPointResourceInner object itself. + * @return the systemData value. */ - public RecoveryPointResourceInner withEtag(String etag) { - this.etag = etag; - return this; + public SystemData systemData() { + return this.systemData; } /** @@ -119,44 +140,15 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public RecoveryPointResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RecoveryPointResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -183,15 +175,17 @@ public static RecoveryPointResourceInner fromJson(JsonReader jsonReader) throws deserializedRecoveryPointResourceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedRecoveryPointResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedRecoveryPointResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedRecoveryPointResourceInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedRecoveryPointResourceInner.properties = RecoveryPoint.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedRecoveryPointResourceInner.tags = tags; + } else if ("location".equals(fieldName)) { + deserializedRecoveryPointResourceInner.location = reader.getString(); } else if ("eTag".equals(fieldName)) { deserializedRecoveryPointResourceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedRecoveryPointResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ResourceGuardProxyBaseResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ResourceGuardProxyBaseResourceInner.java index c4da158cb823..f913d1c5501b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ResourceGuardProxyBaseResourceInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ResourceGuardProxyBaseResourceInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -17,17 +18,32 @@ * The ResourceGuardProxyBaseResource model. */ @Fluent -public final class ResourceGuardProxyBaseResourceInner extends Resource { +public final class ResourceGuardProxyBaseResourceInner extends ProxyResource { /* * ResourceGuardProxyBaseResource properties */ private ResourceGuardProxyBase properties; + /* + * Resource tags. + */ + private Map tags; + + /* + * The geo-location where the resource lives + */ + private String location; + /* * Optional ETag. */ private String etag; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -69,6 +85,46 @@ public ResourceGuardProxyBaseResourceInner withProperties(ResourceGuardProxyBase return this; } + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ResourceGuardProxyBaseResourceInner object itself. + */ + public ResourceGuardProxyBaseResourceInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the ResourceGuardProxyBaseResourceInner object itself. + */ + public ResourceGuardProxyBaseResourceInner withLocation(String location) { + this.location = location; + return this; + } + /** * Get the etag property: Optional ETag. * @@ -89,6 +145,15 @@ public ResourceGuardProxyBaseResourceInner withEtag(String etag) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -119,44 +184,15 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public ResourceGuardProxyBaseResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ResourceGuardProxyBaseResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -184,16 +220,18 @@ public static ResourceGuardProxyBaseResourceInner fromJson(JsonReader jsonReader deserializedResourceGuardProxyBaseResourceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedResourceGuardProxyBaseResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedResourceGuardProxyBaseResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedResourceGuardProxyBaseResourceInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedResourceGuardProxyBaseResourceInner.properties = ResourceGuardProxyBase.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedResourceGuardProxyBaseResourceInner.tags = tags; + } else if ("location".equals(fieldName)) { + deserializedResourceGuardProxyBaseResourceInner.location = reader.getString(); } else if ("eTag".equals(fieldName)) { deserializedResourceGuardProxyBaseResourceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedResourceGuardProxyBaseResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/TieringCostInfoInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/TieringCostInfoInner.java index cade748cd43f..87f9e0112a70 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/TieringCostInfoInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/TieringCostInfoInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; @@ -27,7 +27,7 @@ public class TieringCostInfoInner implements JsonSerializable { /* * Token value. @@ -34,7 +34,7 @@ public final class TokenInformationInner implements JsonSerializable { /* * This is the time when unlock delete privileges will get expired. @@ -24,7 +24,7 @@ public final class UnlockDeleteResponseInner implements JsonSerializable { /* * Base class for validate operation response. @@ -25,7 +25,7 @@ public final class ValidateOperationsResponseInner implements JsonSerializable tags; + + /* + * Optional ETag. + */ + private String eTag; + /* * WorkloadItemResource properties */ private WorkloadItem properties; /* - * Optional ETag. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private String etag; + private SystemData systemData; /* * The type of the resource. @@ -46,47 +62,52 @@ public final class WorkloadItemResourceInner extends Resource { /** * Creates an instance of WorkloadItemResourceInner class. */ - public WorkloadItemResourceInner() { + private WorkloadItemResourceInner() { } /** - * Get the properties property: WorkloadItemResource properties. + * Get the location property: Resource location. * - * @return the properties value. + * @return the location value. */ - public WorkloadItem properties() { - return this.properties; + public String location() { + return this.location; } /** - * Set the properties property: WorkloadItemResource properties. + * Get the tags property: Resource tags. * - * @param properties the properties value to set. - * @return the WorkloadItemResourceInner object itself. + * @return the tags value. */ - public WorkloadItemResourceInner withProperties(WorkloadItem properties) { - this.properties = properties; - return this; + public Map tags() { + return this.tags; } /** - * Get the etag property: Optional ETag. + * Get the eTag property: Optional ETag. * - * @return the etag value. + * @return the eTag value. */ - public String etag() { - return this.etag; + public String eTag() { + return this.eTag; } /** - * Set the etag property: Optional ETag. + * Get the properties property: WorkloadItemResource properties. * - * @param etag the etag value to set. - * @return the WorkloadItemResourceInner object itself. + * @return the properties value. */ - public WorkloadItemResourceInner withEtag(String etag) { - this.etag = etag; - return this; + public WorkloadItem properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; } /** @@ -119,45 +140,16 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public WorkloadItemResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public WorkloadItemResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("eTag", this.eTag); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -184,14 +176,16 @@ public static WorkloadItemResourceInner fromJson(JsonReader jsonReader) throws I } else if ("type".equals(fieldName)) { deserializedWorkloadItemResourceInner.type = reader.getString(); } else if ("location".equals(fieldName)) { - deserializedWorkloadItemResourceInner.withLocation(reader.getString()); + deserializedWorkloadItemResourceInner.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedWorkloadItemResourceInner.withTags(tags); + deserializedWorkloadItemResourceInner.tags = tags; + } else if ("eTag".equals(fieldName)) { + deserializedWorkloadItemResourceInner.eTag = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedWorkloadItemResourceInner.properties = WorkloadItem.fromJson(reader); - } else if ("eTag".equals(fieldName)) { - deserializedWorkloadItemResourceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedWorkloadItemResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/WorkloadProtectableItemResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/WorkloadProtectableItemResourceInner.java index 3777991a6163..db1fec4584a0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/WorkloadProtectableItemResourceInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/WorkloadProtectableItemResourceInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -16,17 +17,32 @@ /** * Base class for backup item. Workload-specific backup items are derived from this class. */ -@Fluent -public final class WorkloadProtectableItemResourceInner extends Resource { +@Immutable +public final class WorkloadProtectableItemResourceInner extends ProxyResource { + /* + * Resource location. + */ + private String location; + + /* + * Resource tags. + */ + private Map tags; + + /* + * Optional ETag. + */ + private String eTag; + /* * WorkloadProtectableItemResource properties */ private WorkloadProtectableItem properties; /* - * Optional ETag. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private String etag; + private SystemData systemData; /* * The type of the resource. @@ -46,47 +62,52 @@ public final class WorkloadProtectableItemResourceInner extends Resource { /** * Creates an instance of WorkloadProtectableItemResourceInner class. */ - public WorkloadProtectableItemResourceInner() { + private WorkloadProtectableItemResourceInner() { } /** - * Get the properties property: WorkloadProtectableItemResource properties. + * Get the location property: Resource location. * - * @return the properties value. + * @return the location value. */ - public WorkloadProtectableItem properties() { - return this.properties; + public String location() { + return this.location; } /** - * Set the properties property: WorkloadProtectableItemResource properties. + * Get the tags property: Resource tags. * - * @param properties the properties value to set. - * @return the WorkloadProtectableItemResourceInner object itself. + * @return the tags value. */ - public WorkloadProtectableItemResourceInner withProperties(WorkloadProtectableItem properties) { - this.properties = properties; - return this; + public Map tags() { + return this.tags; } /** - * Get the etag property: Optional ETag. + * Get the eTag property: Optional ETag. * - * @return the etag value. + * @return the eTag value. */ - public String etag() { - return this.etag; + public String eTag() { + return this.eTag; } /** - * Set the etag property: Optional ETag. + * Get the properties property: WorkloadProtectableItemResource properties. * - * @param etag the etag value to set. - * @return the WorkloadProtectableItemResourceInner object itself. + * @return the properties value. */ - public WorkloadProtectableItemResourceInner withEtag(String etag) { - this.etag = etag; - return this; + public WorkloadProtectableItem properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; } /** @@ -119,45 +140,16 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public WorkloadProtectableItemResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public WorkloadProtectableItemResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("eTag", this.eTag); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -185,15 +177,17 @@ public static WorkloadProtectableItemResourceInner fromJson(JsonReader jsonReade } else if ("type".equals(fieldName)) { deserializedWorkloadProtectableItemResourceInner.type = reader.getString(); } else if ("location".equals(fieldName)) { - deserializedWorkloadProtectableItemResourceInner.withLocation(reader.getString()); + deserializedWorkloadProtectableItemResourceInner.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedWorkloadProtectableItemResourceInner.withTags(tags); + deserializedWorkloadProtectableItemResourceInner.tags = tags; + } else if ("eTag".equals(fieldName)) { + deserializedWorkloadProtectableItemResourceInner.eTag = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedWorkloadProtectableItemResourceInner.properties = WorkloadProtectableItem.fromJson(reader); - } else if ("eTag".equals(fieldName)) { - deserializedWorkloadProtectableItemResourceInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedWorkloadProtectableItemResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/package-info.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/package-info.java index f5274e2dd0b1..b3ef6b67531f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/package-info.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for RecoveryServicesBackupClient. + * Package containing the inner data models for RecoveryServicesBackup. * Open API 2.0 Specs for Azure RecoveryServices Backup service. */ package com.azure.resourcemanager.recoveryservicesbackup.fluent.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/package-info.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/package-info.java index 63206c8b9fe4..f42c5372830d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/package-info.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for RecoveryServicesBackupClient. + * Package containing the service clients for RecoveryServicesBackup. * Open API 2.0 Specs for Azure RecoveryServices Backup service. */ package com.azure.resourcemanager.recoveryservicesbackup.fluent; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/AzureVMResourceFeatureSupportResponseImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/AzureVMResourceFeatureSupportResponseImpl.java index 699cc5084a8d..a7408634b8a0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/AzureVMResourceFeatureSupportResponseImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/AzureVMResourceFeatureSupportResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEngineBaseResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEngineBaseResourceImpl.java index ff88c46202b1..b737cada8f32 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEngineBaseResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEngineBaseResourceImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupEngineBaseResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineBase; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineBaseResource; @@ -33,8 +34,8 @@ public String type() { return this.innerModel().type(); } - public String location() { - return this.innerModel().location(); + public BackupEngineBase properties() { + return this.innerModel().properties(); } public Map tags() { @@ -46,14 +47,18 @@ public Map tags() { } } - public BackupEngineBase properties() { - return this.innerModel().properties(); + public String location() { + return this.innerModel().location(); } public String etag() { return this.innerModel().etag(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public BackupEngineBaseResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesClientImpl.java index 5142352b9fbb..dc94039acc5b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupEnginesClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupEngineBaseResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineBaseResourceList; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.BackupEngineBaseResourceList; import reactor.core.publisher.Mono; /** @@ -42,425 +42,292 @@ public final class BackupEnginesClientImpl implements BackupEnginesClient { /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BackupEnginesClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupEnginesClientImpl(RecoveryServicesBackupClientImpl client) { + BackupEnginesClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BackupEnginesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBackupEngines to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientBackupEngines to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBackupEngines") public interface BackupEnginesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("backupEngineName") String backupEngineName, @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("backupEngineName") String backupEngineName, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("backupEngineName") String backupEngineName, @QueryParam("$filter") String filter, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); } /** - * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. + * Returns backup management server registered to Recovery Services Vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param backupEngineName Name of the backup management server. * @param filter OData filter options. * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of BackupEngineBase resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the base backup engine class along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String vaultName, - String resourceGroupName, String filter, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String vaultName, + String resourceGroupName, String backupEngineName, String filter, String skipToken) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), filter, skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, backupEngineName, filter, skipToken, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. + * Returns backup management server registered to Recovery Services Vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param skipToken skipToken Filter. - * @param context The context to associate with this operation. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param backupEngineName Name of the backup management server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of BackupEngineBase resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the base backup engine class on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String vaultName, - String resourceGroupName, String filter, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), filter, skipToken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String vaultName, String resourceGroupName, + String backupEngineName) { + final String filter = null; + final String skipToken = null; + return getWithResponseAsync(vaultName, resourceGroupName, backupEngineName, filter, skipToken) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. + * Returns backup management server registered to Recovery Services Vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param backupEngineName Name of the backup management server. * @param filter OData filter options. * @param skipToken skipToken Filter. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of BackupEngineBase resources as paginated response with {@link PagedFlux}. + * @return the base backup engine class along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, - String filter, String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String vaultName, String resourceGroupName, + String backupEngineName, String filter, String skipToken, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, backupEngineName, filter, skipToken, accept, context); } /** - * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. + * Returns backup management server registered to Recovery Services Vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param backupEngineName Name of the backup management server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of BackupEngineBase resources as paginated response with {@link PagedFlux}. + * @return the base backup engine class. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName) { + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupEngineBaseResourceInner get(String vaultName, String resourceGroupName, String backupEngineName) { final String filter = null; final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); + return getWithResponse(vaultName, resourceGroupName, backupEngineName, filter, skipToken, Context.NONE) + .getValue(); } /** * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of BackupEngineBase resources as paginated response with {@link PagedFlux}. + * @return list of BackupEngineBase resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, - String filter, String skipToken, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String vaultName, + String resourceGroupName, String filter, String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, filter, skipToken, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter options. + * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of BackupEngineBase resources as paginated response with {@link PagedIterable}. + * @return list of BackupEngineBase resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String vaultName, String resourceGroupName) { - final String filter = null; - final String skipToken = null; - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, filter, skipToken)); + private PagedFlux listAsync(String vaultName, String resourceGroupName, + String filter, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken)); } /** * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param skipToken skipToken Filter. - * @param context The context to associate with this operation. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of BackupEngineBase resources as paginated response with {@link PagedIterable}. + * @return list of BackupEngineBase resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String vaultName, String resourceGroupName, String filter, - String skipToken, Context context) { - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, filter, skipToken, context)); + private PagedFlux listAsync(String vaultName, String resourceGroupName) { + final String filter = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken)); } /** - * Returns backup management server registered to Recovery Services Vault. + * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param backupEngineName Name of the backup management server. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the base backup engine class along with {@link Response} on successful completion of {@link Mono}. + * @return list of BackupEngineBase resources along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, - String resourceGroupName, String backupEngineName, String filter, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (backupEngineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupEngineName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, + String filter, String skipToken) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), backupEngineName, filter, skipToken, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, filter, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** - * Returns backup management server registered to Recovery Services Vault. + * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param backupEngineName Name of the backup management server. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the base backup engine class along with {@link Response} on successful completion of {@link Mono}. + * @return list of BackupEngineBase resources along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, - String resourceGroupName, String backupEngineName, String filter, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (backupEngineName == null) { - return Mono - .error(new IllegalArgumentException("Parameter backupEngineName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, + String filter, String skipToken, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), backupEngineName, filter, skipToken, accept, context); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, filter, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** - * Returns backup management server registered to Recovery Services Vault. + * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param backupEngineName Name of the backup management server. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the base backup engine class on successful completion of {@link Mono}. + * @return list of BackupEngineBase resources as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String vaultName, String resourceGroupName, - String backupEngineName) { + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String vaultName, String resourceGroupName) { final String filter = null; final String skipToken = null; - return getWithResponseAsync(vaultName, resourceGroupName, backupEngineName, filter, skipToken) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, filter, skipToken)); } /** - * Returns backup management server registered to Recovery Services Vault. + * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param backupEngineName Name of the backup management server. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the base backup engine class along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String vaultName, String resourceGroupName, - String backupEngineName, String filter, String skipToken, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, backupEngineName, filter, skipToken, context).block(); - } - - /** - * Returns backup management server registered to Recovery Services Vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param backupEngineName Name of the backup management server. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the base backup engine class. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BackupEngineBaseResourceInner get(String vaultName, String resourceGroupName, String backupEngineName) { - final String filter = null; - final String skipToken = null; - return getWithResponse(vaultName, resourceGroupName, backupEngineName, filter, skipToken, Context.NONE) - .getValue(); - } - - /** - * 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 list of BackupEngineBase resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of BackupEngineBase resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of BackupEngineBase resources as paginated response with {@link PagedIterable}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String vaultName, String resourceGroupName, String filter, + String skipToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, filter, skipToken, context)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesImpl.java index 3220612791d9..98eab90614d7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -27,18 +27,6 @@ public BackupEnginesImpl(BackupEnginesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String vaultName, String resourceGroupName) { - PagedIterable inner = this.serviceClient().list(vaultName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupEngineBaseResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(String vaultName, String resourceGroupName, String filter, - String skipToken, Context context) { - PagedIterable inner - = this.serviceClient().list(vaultName, resourceGroupName, filter, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupEngineBaseResourceImpl(inner1, this.manager())); - } - public Response getWithResponse(String vaultName, String resourceGroupName, String backupEngineName, String filter, String skipToken, Context context) { Response inner = this.serviceClient() @@ -60,6 +48,18 @@ public BackupEngineBaseResource get(String vaultName, String resourceGroupName, } } + public PagedIterable list(String vaultName, String resourceGroupName) { + PagedIterable inner = this.serviceClient().list(vaultName, resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupEngineBaseResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String vaultName, String resourceGroupName, String filter, + String skipToken, Context context) { + PagedIterable inner + = this.serviceClient().list(vaultName, resourceGroupName, filter, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BackupEngineBaseResourceImpl(inner1, this.manager())); + } + private BackupEnginesClient serviceClient() { return this.innerClient; } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsClientImpl.java index 6dd7795b9c1c..89afb19b1e8d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupJobsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.JobResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.JobResourceList; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.JobResourceList; import reactor.core.publisher.Mono; /** @@ -42,49 +42,52 @@ public final class BackupJobsClientImpl implements BackupJobsClient { /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BackupJobsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupJobsClientImpl(RecoveryServicesBackupClientImpl client) { + BackupJobsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BackupJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBackupJobs to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientBackupJobs to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBackupJobs") public interface BackupJobsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken, + @HeaderParam("Accept") String accept, Context context); } /** * Provides a pageable list of jobs. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -95,132 +98,100 @@ Mono> listNext(@PathParam(value = "nextLink", encoded @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String vaultName, String resourceGroupName, String filter, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), filter, skipToken, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, filter, skipToken, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Provides a pageable list of jobs. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Job resources along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of Job resources as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String vaultName, String resourceGroupName, - String filter, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), filter, skipToken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String vaultName, String resourceGroupName, String filter, + String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken)); } /** * Provides a pageable list of jobs. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param skipToken skipToken Filter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of Job resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, String filter, - String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String vaultName, String resourceGroupName) { + final String filter = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken)); } /** * Provides a pageable list of jobs. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter options. + * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Job resources as paginated response with {@link PagedFlux}. + * @return list of Job resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName) { - final String filter = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, String filter, + String skipToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, filter, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Provides a pageable list of jobs. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Job resources as paginated response with {@link PagedFlux}. + * @return list of Job resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, String filter, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, String filter, String skipToken, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, filter, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Provides a pageable list of jobs. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -230,14 +201,14 @@ private PagedFlux listAsync(String vaultName, String resourceG public PagedIterable list(String vaultName, String resourceGroupName) { final String filter = null; final String skipToken = null; - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, filter, skipToken)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, filter, skipToken)); } /** * Provides a pageable list of jobs. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. @@ -249,57 +220,6 @@ public PagedIterable list(String vaultName, String resourceGro @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String vaultName, String resourceGroupName, String filter, String skipToken, Context context) { - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, filter, skipToken, 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 list of Job resources along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Job resources along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, filter, skipToken, context)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsImpl.java index 2050f61daa0a..a691f7b9ee47 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupManagementUsageImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupManagementUsageImpl.java index 58d6c70d49d5..4b4550ccf9de 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupManagementUsageImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupManagementUsageImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsClientImpl.java index 9b42de6586da..028b492e0797 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsClientImpl.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.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; @@ -36,34 +35,43 @@ public final class BackupOperationResultsClientImpl implements BackupOperationRe /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BackupOperationResultsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupOperationResultsClientImpl(RecoveryServicesBackupClientImpl client) { + BackupOperationResultsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BackupOperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBackupOperationResults to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientBackupOperationResults to be + * used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBackupOperationResults") public interface BackupOperationResultsService { - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("operationId") String operationId, - @HeaderParam("Accept") String accept, Context context); + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperationResults/{operationId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("operationId") String operationId, + Context context); } /** @@ -74,7 +82,7 @@ Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-v * part of the Location header of the operation response. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -83,28 +91,9 @@ Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-v */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), operationId, accept, context)) + resourceGroupName, this.client.getSubscriptionId(), operationId, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -116,50 +105,7 @@ private Mono> getWithResponseAsync(String vaultName, String resou * part of the Location header of the operation response. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId OperationID which represents the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String operationId, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), operationId, accept, context); - } - - /** - * Provides the status of the delete operations such as deleting backed up item. Once the operation has started, the - * status code in the response would be Accepted. It will continue to be in this state till it reaches completion. - * On - * successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is - * part of the Location header of the operation response. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -179,7 +125,7 @@ private Mono getAsync(String vaultName, String resourceGroupName, String o * part of the Location header of the operation response. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -190,7 +136,8 @@ private Mono getAsync(String vaultName, String resourceGroupName, String o @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String operationId, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, operationId, context).block(); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), operationId, context); } /** @@ -201,7 +148,7 @@ public Response getWithResponse(String vaultName, String resourceGroupName * part of the Location header of the operation response. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsImpl.java index e9cddde96fa0..312301f66323 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesClientImpl.java index 619884e1bba4..d99997548624 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -37,31 +37,41 @@ public final class BackupOperationStatusesClientImpl implements BackupOperationS /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BackupOperationStatusesClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupOperationStatusesClientImpl(RecoveryServicesBackupClientImpl client) { + BackupOperationStatusesClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BackupOperationStatusesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBackupOperationStatuses to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientBackupOperationStatuses to be + * used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBackupOperationStatuses") public interface BackupOperationStatusesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupOperations/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("operationId") String operationId, @@ -74,7 +84,7 @@ Mono> get(@HostParam("$host") String endpoint, * create jobs. This method returns the list of jobs when the operation is complete. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -84,24 +94,6 @@ Mono> get(@HostParam("$host") String endpoint, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, @@ -115,48 +107,7 @@ private Mono> getWithResponseAsync(String vaultNa * create jobs. This method returns the list of jobs when the operation is complete. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId OperationID which represents the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, - String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), operationId, accept, context); - } - - /** - * Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed - * or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some operations - * create jobs. This method returns the list of jobs when the operation is complete. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -175,7 +126,7 @@ private Mono getAsync(String vaultName, String resourceGro * create jobs. This method returns the list of jobs when the operation is complete. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -186,7 +137,9 @@ private Mono getAsync(String vaultName, String resourceGro @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String operationId, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, operationId, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), operationId, accept, context); } /** @@ -195,7 +148,7 @@ public Response getWithResponse(String vaultName, String r * create jobs. This method returns the list of jobs when the operation is complete. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesImpl.java index 7916c4c2b1ba..62ce25eb30ff 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesClientImpl.java index 9ed54afc70d9..ab67f9faf0a5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupPoliciesClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionPolicyResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionPolicyResourceList; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectionPolicyResourceList; import reactor.core.publisher.Mono; /** @@ -42,51 +42,51 @@ public final class BackupPoliciesClientImpl implements BackupPoliciesClient { /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BackupPoliciesClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupPoliciesClientImpl(RecoveryServicesBackupClientImpl client) { + BackupPoliciesClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BackupPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBackupPolicies to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientBackupPolicies to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBackupPolicies") public interface BackupPoliciesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, Context context); + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); } /** * Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch * scoped results. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -97,27 +97,12 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String vaultName, String resourceGroupName, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), filter, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, filter, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -125,106 +110,90 @@ private Mono> listSinglePageAsync(S * Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch * scoped results. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectionPolicy resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of ProtectionPolicy resources as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String vaultName, - String resourceGroupName, String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String vaultName, String resourceGroupName, + String filter) { + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter)); } /** * Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch * scoped results. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of ProtectionPolicy resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, - String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String vaultName, String resourceGroupName) { + final String filter = null; + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter)); } /** * Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch * scoped results. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter options. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectionPolicy resources as paginated response with {@link PagedFlux}. + * @return list of ProtectionPolicy resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName) { - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, + String filter) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, filter, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch * scoped results. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectionPolicy resources as paginated response with {@link PagedFlux}. + * @return list of ProtectionPolicy resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, String filter, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, filter, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch * scoped results. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -233,15 +202,15 @@ private PagedFlux listAsync(String vaultName, Str @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String vaultName, String resourceGroupName) { final String filter = null; - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, filter)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, filter)); } /** * Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch * scoped results. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -252,60 +221,6 @@ public PagedIterable list(String vaultName, Strin @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String vaultName, String resourceGroupName, String filter, Context context) { - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, filter, 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 list of ProtectionPolicy resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectionPolicy resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, filter, context)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesImpl.java index ca809dc928f3..53c20dfc1e68 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsClientImpl.java index bf24bc701a10..039c98d2ac5c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectableItemsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadProtectableItemResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadProtectableItemResourceList; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.WorkloadProtectableItemResourceList; import reactor.core.publisher.Mono; /** @@ -42,43 +42,45 @@ public final class BackupProtectableItemsClientImpl implements BackupProtectable /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BackupProtectableItemsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupProtectableItemsClientImpl(RecoveryServicesBackupClientImpl client) { + BackupProtectableItemsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BackupProtectableItemsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBackupProtectableItems to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientBackupProtectableItems to be + * used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBackupProtectableItems") public interface BackupProtectableItemsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); } /** @@ -86,7 +88,7 @@ Mono> listNext( * pagination parameters. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -98,27 +100,12 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String vaultName, String resourceGroupName, String filter, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, this.client.getSubscriptionId(), filter, skipToken, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -127,41 +114,18 @@ private Mono> listSinglePage * pagination parameters. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of WorkloadProtectableItem resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of WorkloadProtectableItem resources as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String vaultName, - String resourceGroupName, String filter, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), filter, skipToken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String vaultName, String resourceGroupName, + String filter, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken)); } /** @@ -169,19 +133,17 @@ private Mono> listSinglePage * pagination parameters. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param skipToken skipToken Filter. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of WorkloadProtectableItem resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, - String filter, String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String vaultName, String resourceGroupName) { + final String filter = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken)); } /** @@ -189,18 +151,23 @@ private PagedFlux listAsync(String vaultNa * pagination parameters. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter options. + * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of WorkloadProtectableItem resources as paginated response with {@link PagedFlux}. + * @return list of WorkloadProtectableItem resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName) { - final String filter = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, + String resourceGroupName, String filter, String skipToken) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), filter, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** @@ -208,20 +175,24 @@ private PagedFlux listAsync(String vaultNa * pagination parameters. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of WorkloadProtectableItem resources as paginated response with {@link PagedFlux}. + * @return list of WorkloadProtectableItem resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, - String filter, String skipToken, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, + String resourceGroupName, String filter, String skipToken, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), filter, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** @@ -229,7 +200,7 @@ private PagedFlux listAsync(String vaultNa * pagination parameters. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -239,7 +210,7 @@ private PagedFlux listAsync(String vaultNa public PagedIterable list(String vaultName, String resourceGroupName) { final String filter = null; final String skipToken = null; - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, filter, skipToken)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, filter, skipToken)); } /** @@ -247,7 +218,7 @@ public PagedIterable list(String vaultName * pagination parameters. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. @@ -259,60 +230,6 @@ public PagedIterable list(String vaultName @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String vaultName, String resourceGroupName, String filter, String skipToken, Context context) { - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, filter, skipToken, 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 list of WorkloadProtectableItem resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of WorkloadProtectableItem resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, filter, skipToken, context)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsImpl.java index b9ecc26adc44..90b8fb318913 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsClientImpl.java index 2bcea62aa413..f8c4c24e00e6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectedItemsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectedItemResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItemResourceList; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectedItemResourceList; import reactor.core.publisher.Mono; /** @@ -42,50 +42,52 @@ public final class BackupProtectedItemsClientImpl implements BackupProtectedItem /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BackupProtectedItemsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupProtectedItemsClientImpl(RecoveryServicesBackupClientImpl client) { + BackupProtectedItemsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BackupProtectedItemsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBackupProtectedItems to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientBackupProtectedItems to be used + * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBackupProtectedItems") public interface BackupProtectedItemsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); } /** * Provides a pageable list of all items that are backed up within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -97,27 +99,12 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String vaultName, String resourceGroupName, String filter, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, this.client.getSubscriptionId(), filter, skipToken, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -125,105 +112,89 @@ private Mono> listSinglePageAsync(Stri * Provides a pageable list of all items that are backed up within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectedItem resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of ProtectedItem resources as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String vaultName, - String resourceGroupName, String filter, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), filter, skipToken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String vaultName, String resourceGroupName, String filter, + String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken)); } /** * Provides a pageable list of all items that are backed up within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param skipToken skipToken Filter. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of ProtectedItem resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, String filter, - String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String vaultName, String resourceGroupName) { + final String filter = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken)); } /** * Provides a pageable list of all items that are backed up within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter options. + * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectedItem resources as paginated response with {@link PagedFlux}. + * @return list of ProtectedItem resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName) { - final String filter = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, + String filter, String skipToken) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), filter, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Provides a pageable list of all items that are backed up within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectedItem resources as paginated response with {@link PagedFlux}. + * @return list of ProtectedItem resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, String filter, - String skipToken, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, + String filter, String skipToken, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), filter, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Provides a pageable list of all items that are backed up within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -233,14 +204,14 @@ private PagedFlux listAsync(String vaultName, String public PagedIterable list(String vaultName, String resourceGroupName) { final String filter = null; final String skipToken = null; - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, filter, skipToken)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, filter, skipToken)); } /** * Provides a pageable list of all items that are backed up within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. @@ -252,59 +223,6 @@ public PagedIterable list(String vaultName, String r @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String vaultName, String resourceGroupName, String filter, String skipToken, Context context) { - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, filter, skipToken, 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 list of ProtectedItem resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectedItem resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, filter, skipToken, context)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsImpl.java index 9a6a80fd3ec2..f6c6a15d32c4 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersClientImpl.java index 5d29a5b8c6c9..5a79b4834b4d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectionContainersClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionContainerResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionContainerResourceList; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectionContainerResourceList; import reactor.core.publisher.Mono; /** @@ -42,42 +42,44 @@ public final class BackupProtectionContainersClientImpl implements BackupProtect /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BackupProtectionContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupProtectionContainersClientImpl(RecoveryServicesBackupClientImpl client) { + BackupProtectionContainersClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BackupProtectionContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBackupProtectionContainers to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientBackupProtectionContainers to + * be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBackupProtectionContainers") public interface BackupProtectionContainersService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionContainers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); } @@ -85,7 +87,7 @@ Mono> listNext( * Lists the containers registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -96,27 +98,12 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String vaultName, String resourceGroupName, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, this.client.getSubscriptionId(), filter, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -124,101 +111,85 @@ private Mono> listSinglePageAsyn * Lists the containers registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectionContainer resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of ProtectionContainer resources as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String vaultName, - String resourceGroupName, String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String vaultName, String resourceGroupName, + String filter) { + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter)); } /** * Lists the containers registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of ProtectionContainer resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, - String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String vaultName, String resourceGroupName) { + final String filter = null; + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter)); } /** * Lists the containers registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter options. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectionContainer resources as paginated response with {@link PagedFlux}. + * @return list of ProtectionContainer resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName) { - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, + String filter) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), filter, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Lists the containers registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectionContainer resources as paginated response with {@link PagedFlux}. + * @return list of ProtectionContainer resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, String filter, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), filter, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Lists the containers registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -227,14 +198,14 @@ private PagedFlux listAsync(String vaultName, @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String vaultName, String resourceGroupName) { final String filter = null; - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, filter)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, filter)); } /** * Lists the containers registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -245,60 +216,6 @@ public PagedIterable list(String vaultName, St @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String vaultName, String resourceGroupName, String filter, Context context) { - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, filter, 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 list of ProtectionContainer resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectionContainer resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, filter, context)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersImpl.java index df5a8ed6b0da..8bebc64000ba 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsClientImpl.java index 1ec03c0b3095..f8c69e4f8e35 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectionIntentsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionIntentResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionIntentResourceList; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectionIntentResourceList; import reactor.core.publisher.Mono; /** @@ -42,50 +42,52 @@ public final class BackupProtectionIntentsClientImpl implements BackupProtection /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BackupProtectionIntentsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupProtectionIntentsClientImpl(RecoveryServicesBackupClientImpl client) { + BackupProtectionIntentsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BackupProtectionIntentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBackupProtectionIntents to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientBackupProtectionIntents to be + * used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBackupProtectionIntents") public interface BackupProtectionIntentsService { @Headers({ "Content-Type: application/json" }) - @Get("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectionIntents") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); } /** * Provides a pageable list of all intents that are present within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -97,27 +99,12 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String vaultName, String resourceGroupName, String filter, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, this.client.getSubscriptionId(), filter, skipToken, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -125,105 +112,89 @@ private Mono> listSinglePageAsync(S * Provides a pageable list of all intents that are present within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectionIntent resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of ProtectionIntent resources as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String vaultName, - String resourceGroupName, String filter, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), filter, skipToken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String vaultName, String resourceGroupName, + String filter, String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken)); } /** * Provides a pageable list of all intents that are present within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param skipToken skipToken Filter. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of ProtectionIntent resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, - String filter, String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String vaultName, String resourceGroupName) { + final String filter = null; + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken)); } /** * Provides a pageable list of all intents that are present within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter options. + * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectionIntent resources as paginated response with {@link PagedFlux}. + * @return list of ProtectionIntent resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName) { - final String filter = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, + String filter, String skipToken) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), filter, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Provides a pageable list of all intents that are present within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectionIntent resources as paginated response with {@link PagedFlux}. + * @return list of ProtectionIntent resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, String filter, String skipToken, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), filter, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Provides a pageable list of all intents that are present within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -233,14 +204,14 @@ private PagedFlux listAsync(String vaultName, Str public PagedIterable list(String vaultName, String resourceGroupName) { final String filter = null; final String skipToken = null; - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, filter, skipToken)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, filter, skipToken)); } /** * Provides a pageable list of all intents that are present within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. @@ -252,60 +223,6 @@ public PagedIterable list(String vaultName, Strin @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String vaultName, String resourceGroupName, String filter, String skipToken, Context context) { - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, filter, skipToken, 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 list of ProtectionIntent resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectionIntent resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, filter, skipToken, context)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsImpl.java index 12e0bc9f2d99..fac012245d94 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceConfigResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceConfigResourceImpl.java index dba5df86a052..695540c356ae 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceConfigResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceConfigResourceImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceConfigResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceConfig; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceConfigResource; @@ -33,8 +34,8 @@ public String type() { return this.innerModel().type(); } - public String location() { - return this.innerModel().location(); + public BackupResourceConfig properties() { + return this.innerModel().properties(); } public Map tags() { @@ -46,14 +47,18 @@ public Map tags() { } } - public BackupResourceConfig properties() { - return this.innerModel().properties(); + public String location() { + return this.innerModel().location(); } public String etag() { return this.innerModel().etag(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public BackupResourceConfigResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigExtendedResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigExtendedResourceImpl.java index b058f22b6881..26776c904dfa 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigExtendedResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigExtendedResourceImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigExtendedResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtended; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtendedResource; @@ -34,8 +35,8 @@ public String type() { return this.innerModel().type(); } - public String location() { - return this.innerModel().location(); + public BackupResourceEncryptionConfigExtended properties() { + return this.innerModel().properties(); } public Map tags() { @@ -47,14 +48,18 @@ public Map tags() { } } - public BackupResourceEncryptionConfigExtended properties() { - return this.innerModel().properties(); + public String location() { + return this.innerModel().location(); } public String etag() { return this.innerModel().etag(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public BackupResourceEncryptionConfigExtendedResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsClientImpl.java index a502cb35ff38..4866e58cee93 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -40,51 +40,70 @@ public final class BackupResourceEncryptionConfigsClientImpl implements BackupRe /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BackupResourceEncryptionConfigsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupResourceEncryptionConfigsClientImpl(RecoveryServicesBackupClientImpl client) { + BackupResourceEncryptionConfigsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BackupResourceEncryptionConfigsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBackupResourceEncryptionConfigs to be - * used by the proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientBackupResourceEncryptionConfigs + * to be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBackupResourceEncryptionConfigs") public interface BackupResourceEncryptionConfigsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") BackupResourceEncryptionConfigResource parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") BackupResourceEncryptionConfigResource parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") BackupResourceEncryptionConfigResource parameters, Context context); } /** * Fetches Vault Encryption config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -93,68 +112,18 @@ Mono> update(@HostParam("$host") String endpoint, @QueryParam("ap @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Fetches Vault Encryption config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, - String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), accept, context); - } - - /** - * Fetches Vault Encryption config. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -169,8 +138,8 @@ private Mono getAsync(Strin /** * Fetches Vault Encryption config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -180,14 +149,16 @@ private Mono getAsync(Strin @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, accept, context); } /** * Fetches Vault Encryption config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -201,8 +172,8 @@ public BackupResourceEncryptionConfigExtendedResourceInner get(String vaultName, /** * Updates Vault encryption config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault encryption input config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -212,79 +183,18 @@ public BackupResourceEncryptionConfigExtendedResourceInner get(String vaultName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResource parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), parameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates Vault encryption config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters Vault encryption input config request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String vaultName, String resourceGroupName, - BackupResourceEncryptionConfigResource parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Updates Vault encryption config. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault encryption input config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -300,8 +210,8 @@ private Mono updateAsync(String vaultName, String resourceGroupName, /** * Updates Vault encryption config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault encryption input config request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -312,14 +222,16 @@ private Mono updateAsync(String vaultName, String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse(String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResource parameters, Context context) { - return updateWithResponseAsync(vaultName, resourceGroupName, parameters, context).block(); + final String contentType = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, parameters, context); } /** * Updates Vault encryption config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault encryption input config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsImpl.java index 07a1d5c2d0ec..427f08e444c0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsClientImpl.java index 63176bb99fba..6644db4fdd45 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -40,62 +40,89 @@ public final class BackupResourceStorageConfigsNonCrrsClientImpl implements Back /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BackupResourceStorageConfigsNonCrrsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupResourceStorageConfigsNonCrrsClientImpl(RecoveryServicesBackupClientImpl client) { + BackupResourceStorageConfigsNonCrrsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BackupResourceStorageConfigsNonCrrsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBackupResourceStorageConfigsNonCrrs to be - * used by the proxy service to perform REST calls. + * The interface defining all the services for + * RecoveryServicesBackupManagementClientBackupResourceStorageConfigsNonCrrs to be used by the proxy service to + * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBackupResourceStorageConfigsNonCrrs") public interface BackupResourceStorageConfigsNonCrrsService { @Headers({ "Content-Type: application/json" }) - @Get("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") BackupResourceConfigResourceInner parameters, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Patch("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BackupResourceConfigResourceInner parameters, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BackupResourceConfigResourceInner parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig") @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> patch(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, + Mono> patch(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") BackupResourceConfigResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") BackupResourceConfigResourceInner parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response patchSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") BackupResourceConfigResourceInner parameters, Context context); } /** * Fetches resource storage config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -104,68 +131,18 @@ Mono> patch(@HostParam("$host") String endpoint, @QueryParam("api @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Fetches resource storage config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource storage details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, - String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), accept, context); - } - - /** - * Fetches resource storage config. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -179,8 +156,8 @@ private Mono getAsync(String vaultName, Strin /** * Fetches resource storage config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -190,14 +167,16 @@ private Mono getAsync(String vaultName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, accept, context); } /** * Fetches resource storage config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -211,8 +190,8 @@ public BackupResourceConfigResourceInner get(String vaultName, String resourceGr /** * Updates vault storage model type. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault storage config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -222,79 +201,18 @@ public BackupResourceConfigResourceInner get(String vaultName, String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), parameters, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates vault storage model type. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters Vault storage config request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resource storage details along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String vaultName, - String resourceGroupName, BackupResourceConfigResourceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Updates vault storage model type. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault storage config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -311,8 +229,8 @@ private Mono updateAsync(String vaultName, St /** * Updates vault storage model type. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault storage config request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -323,14 +241,17 @@ private Mono updateAsync(String vaultName, St @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse(String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters, Context context) { - return updateWithResponseAsync(vaultName, resourceGroupName, parameters, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, accept, parameters, context); } /** * Updates vault storage model type. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault storage config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -346,8 +267,8 @@ public BackupResourceConfigResourceInner update(String vaultName, String resourc /** * Updates vault storage model type. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault storage config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -357,79 +278,18 @@ public BackupResourceConfigResourceInner update(String vaultName, String resourc @ServiceMethod(returns = ReturnType.SINGLE) private Mono> patchWithResponseAsync(String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.patch(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), parameters, accept, context)) + .withContext(context -> service.patch(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates vault storage model type. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters Vault storage config request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> patchWithResponseAsync(String vaultName, String resourceGroupName, - BackupResourceConfigResourceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.patch(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Updates vault storage model type. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault storage config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -445,8 +305,8 @@ private Mono patchAsync(String vaultName, String resourceGroupName, /** * Updates vault storage model type. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault storage config request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -457,14 +317,16 @@ private Mono patchAsync(String vaultName, String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) public Response patchWithResponse(String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters, Context context) { - return patchWithResponseAsync(vaultName, resourceGroupName, parameters, context).block(); + final String contentType = "application/json"; + return service.patchSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, parameters, context); } /** * Updates vault storage model type. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault storage config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsImpl.java index 56acf840ccf4..294c375bd945 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigResourceImpl.java index c0e16a13c256..60e654e56c03 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigResourceImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceVaultConfigResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceVaultConfig; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceVaultConfigResource; @@ -33,8 +34,8 @@ public String type() { return this.innerModel().type(); } - public String location() { - return this.innerModel().location(); + public BackupResourceVaultConfig properties() { + return this.innerModel().properties(); } public Map tags() { @@ -46,14 +47,18 @@ public Map tags() { } } - public BackupResourceVaultConfig properties() { - return this.innerModel().properties(); + public String location() { + return this.innerModel().location(); } public String etag() { return this.innerModel().etag(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public BackupResourceVaultConfigResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsClientImpl.java index 4ad02af4a84a..bebb021bc0ee 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -40,63 +40,86 @@ public final class BackupResourceVaultConfigsClientImpl implements BackupResourc /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BackupResourceVaultConfigsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupResourceVaultConfigsClientImpl(RecoveryServicesBackupClientImpl client) { + BackupResourceVaultConfigsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BackupResourceVaultConfigsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBackupResourceVaultConfigs to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientBackupResourceVaultConfigs to + * be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBackupResourceVaultConfigs") public interface BackupResourceVaultConfigsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") BackupResourceVaultConfigResourceInner parameters, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> put(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") BackupResourceVaultConfigResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); + Mono> put(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BackupResourceVaultConfigResourceInner parameters, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response putSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BackupResourceVaultConfigResourceInner parameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BackupResourceVaultConfigResourceInner parameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BackupResourceVaultConfigResourceInner parameters, Context context); } /** * Fetches resource vault config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -106,69 +129,18 @@ Mono> put(@HostParam("$host") S @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Fetches resource vault config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backup resource vault config details along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, - String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), accept, context); - } - - /** - * Fetches resource vault config. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -182,8 +154,8 @@ private Mono getAsync(String vaultName, /** * Fetches resource vault config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -193,14 +165,16 @@ private Mono getAsync(String vaultName, @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, accept, context); } /** * Fetches resource vault config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -214,8 +188,8 @@ public BackupResourceVaultConfigResourceInner get(String vaultName, String resou /** * Updates vault security config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -224,82 +198,20 @@ public BackupResourceVaultConfigResourceInner get(String vaultName, String resou * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String vaultName, + private Mono> putWithResponseAsync(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), parameters, accept, context)) + return FluxUtil.withContext(context -> service.put(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates vault security config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters resource config request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backup resource vault config details along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String vaultName, - String resourceGroupName, BackupResourceVaultConfigResourceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Updates vault security config. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -307,17 +219,17 @@ private Mono> updateWithRespons * @return backup resource vault config details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String vaultName, String resourceGroupName, + private Mono putAsync(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters) { - return updateWithResponseAsync(vaultName, resourceGroupName, parameters) + return putWithResponseAsync(vaultName, resourceGroupName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Updates vault security config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource config request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -326,16 +238,19 @@ private Mono updateAsync(String vaultNam * @return backup resource vault config details along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String vaultName, - String resourceGroupName, BackupResourceVaultConfigResourceInner parameters, Context context) { - return updateWithResponseAsync(vaultName, resourceGroupName, parameters, context).block(); + public Response putWithResponse(String vaultName, String resourceGroupName, + BackupResourceVaultConfigResourceInner parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.putSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, contentType, accept, parameters, context); } /** * Updates vault security config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -343,16 +258,16 @@ public Response updateWithResponse(Strin * @return backup resource vault config details. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupResourceVaultConfigResourceInner update(String vaultName, String resourceGroupName, + public BackupResourceVaultConfigResourceInner put(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters) { - return updateWithResponse(vaultName, resourceGroupName, parameters, Context.NONE).getValue(); + return putWithResponse(vaultName, resourceGroupName, parameters, Context.NONE).getValue(); } /** * Updates vault security config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -361,82 +276,20 @@ public BackupResourceVaultConfigResourceInner update(String vaultName, String re * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync(String vaultName, + private Mono> updateWithResponseAsync(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.put(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), parameters, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates vault security config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters resource config request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backup resource vault config details along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync(String vaultName, - String resourceGroupName, BackupResourceVaultConfigResourceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.put(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Updates vault security config. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -444,17 +297,17 @@ private Mono> putWithResponseAs * @return backup resource vault config details on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono putAsync(String vaultName, String resourceGroupName, + private Mono updateAsync(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters) { - return putWithResponseAsync(vaultName, resourceGroupName, parameters) + return updateWithResponseAsync(vaultName, resourceGroupName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Updates vault security config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource config request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -463,16 +316,19 @@ private Mono putAsync(String vaultName, * @return backup resource vault config details along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response putWithResponse(String vaultName, String resourceGroupName, - BackupResourceVaultConfigResourceInner parameters, Context context) { - return putWithResponseAsync(vaultName, resourceGroupName, parameters, context).block(); + public Response updateWithResponse(String vaultName, + String resourceGroupName, BackupResourceVaultConfigResourceInner parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, accept, parameters, context); } /** * Updates vault security config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -480,8 +336,8 @@ public Response putWithResponse(String v * @return backup resource vault config details. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupResourceVaultConfigResourceInner put(String vaultName, String resourceGroupName, + public BackupResourceVaultConfigResourceInner update(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters) { - return putWithResponse(vaultName, resourceGroupName, parameters, Context.NONE).getValue(); + return updateWithResponse(vaultName, resourceGroupName, parameters, Context.NONE).getValue(); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsImpl.java index f8c09b1ed8c2..2617264993d4 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -47,10 +47,10 @@ public BackupResourceVaultConfigResource get(String vaultName, String resourceGr } } - public Response updateWithResponse(String vaultName, String resourceGroupName, + public Response putWithResponse(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters, Context context) { Response inner - = this.serviceClient().updateWithResponse(vaultName, resourceGroupName, parameters, context); + = this.serviceClient().putWithResponse(vaultName, resourceGroupName, parameters, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new BackupResourceVaultConfigResourceImpl(inner.getValue(), this.manager())); @@ -59,10 +59,10 @@ public Response updateWithResponse(String vau } } - public BackupResourceVaultConfigResource update(String vaultName, String resourceGroupName, + public BackupResourceVaultConfigResource put(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters) { BackupResourceVaultConfigResourceInner inner - = this.serviceClient().update(vaultName, resourceGroupName, parameters); + = this.serviceClient().put(vaultName, resourceGroupName, parameters); if (inner != null) { return new BackupResourceVaultConfigResourceImpl(inner, this.manager()); } else { @@ -70,10 +70,10 @@ public BackupResourceVaultConfigResource update(String vaultName, String resourc } } - public Response putWithResponse(String vaultName, String resourceGroupName, + public Response updateWithResponse(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters, Context context) { Response inner - = this.serviceClient().putWithResponse(vaultName, resourceGroupName, parameters, context); + = this.serviceClient().updateWithResponse(vaultName, resourceGroupName, parameters, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new BackupResourceVaultConfigResourceImpl(inner.getValue(), this.manager())); @@ -82,10 +82,10 @@ public Response putWithResponse(String vaultN } } - public BackupResourceVaultConfigResource put(String vaultName, String resourceGroupName, + public BackupResourceVaultConfigResource update(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters) { BackupResourceVaultConfigResourceInner inner - = this.serviceClient().put(vaultName, resourceGroupName, parameters); + = this.serviceClient().update(vaultName, resourceGroupName, parameters); if (inner != null) { return new BackupResourceVaultConfigResourceImpl(inner, this.manager()); } else { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusClientImpl.java index 47e07a875239..eeac8970b059 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusClientImpl.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; @@ -39,34 +38,42 @@ public final class BackupStatusClientImpl implements BackupStatusClient { /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BackupStatusClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupStatusClientImpl(RecoveryServicesBackupClientImpl client) { + BackupStatusClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BackupStatusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBackupStatus to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientBackupStatus to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBackupStatus") public interface BackupStatusService { - @Headers({ "Content-Type: application/json" }) - @Post("/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus") + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("azureRegion") String azureRegion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") BackupStatusRequest parameters, @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BackupStatusRequest parameters, + Context context); + + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("azureRegion") String azureRegion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BackupStatusRequest parameters, Context context); } @@ -83,65 +90,14 @@ Mono> get(@HostParam("$host") String endpoin @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String azureRegion, BackupStatusRequest parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (azureRegion == null) { - return Mono.error(new IllegalArgumentException("Parameter azureRegion is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion, - this.client.getSubscriptionId(), parameters, accept, context)) + this.client.getSubscriptionId(), contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get the container backup status. - * - * @param azureRegion Azure region to hit Api. - * @param parameters Container Backup Status Request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the container backup status along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String azureRegion, - BackupStatusRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (azureRegion == null) { - return Mono.error(new IllegalArgumentException("Parameter azureRegion is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion, - this.client.getSubscriptionId(), parameters, accept, context); - } - /** * Get the container backup status. * @@ -171,7 +127,10 @@ private Mono getAsync(String azureRegion, BackupStatu @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String azureRegion, BackupStatusRequest parameters, Context context) { - return getWithResponseAsync(azureRegion, parameters, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion, + this.client.getSubscriptionId(), contentType, accept, parameters, context); } /** diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusImpl.java index 70ddb55041a0..48ab483cb3b6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusResponseImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusResponseImpl.java index 5f422b19ef19..1cc86bb741b4 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusResponseImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesClientImpl.java index 5cfeb2007b65..85d03955c616 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupUsageSummariesClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupManagementUsageInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementUsageList; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.BackupManagementUsageList; import reactor.core.publisher.Mono; /** @@ -42,31 +42,41 @@ public final class BackupUsageSummariesClientImpl implements BackupUsageSummarie /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BackupUsageSummariesClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupUsageSummariesClientImpl(RecoveryServicesBackupClientImpl client) { + BackupUsageSummariesClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BackupUsageSummariesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBackupUsageSummaries to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientBackupUsageSummaries to be used + * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBackupUsageSummaries") public interface BackupUsageSummariesService { @Headers({ "Content-Type: application/json" }) - @Get("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, @@ -77,7 +87,7 @@ Mono> list(@HostParam("$host") String endpoi * Fetches the backup management usage summaries of the vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -89,21 +99,6 @@ Mono> list(@HostParam("$host") String endpoi @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String vaultName, String resourceGroupName, String filter, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, @@ -117,58 +112,34 @@ private Mono> listSinglePageAsync(Stri * Fetches the backup management usage summaries of the vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backup management usage for vault along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return backup management usage for vault as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String vaultName, - String resourceGroupName, String filter, String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), filter, skipToken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String vaultName, String resourceGroupName, String filter, + String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken)); } /** * Fetches the backup management usage summaries of the vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param skipToken skipToken Filter. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return backup management usage for vault as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, String filter, - String skipToken) { + private PagedFlux listAsync(String vaultName, String resourceGroupName) { + final String filter = null; + final String skipToken = null; return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken)); } @@ -176,43 +147,54 @@ private PagedFlux listAsync(String vaultName, String * Fetches the backup management usage summaries of the vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter options. + * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backup management usage for vault as paginated response with {@link PagedFlux}. + * @return backup management usage for vault along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName) { - final String filter = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, + String filter, String skipToken) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), filter, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Fetches the backup management usage summaries of the vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return backup management usage for vault as paginated response with {@link PagedFlux}. + * @return backup management usage for vault along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, String filter, - String skipToken, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, filter, skipToken, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, + String filter, String skipToken, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), filter, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Fetches the backup management usage summaries of the vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -222,14 +204,14 @@ private PagedFlux listAsync(String vaultName, String public PagedIterable list(String vaultName, String resourceGroupName) { final String filter = null; final String skipToken = null; - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, filter, skipToken)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, filter, skipToken)); } /** * Fetches the backup management usage summaries of the vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. @@ -241,6 +223,6 @@ public PagedIterable list(String vaultName, String r @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String vaultName, String resourceGroupName, String filter, String skipToken, Context context) { - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, filter, skipToken, context)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, filter, skipToken, context)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesImpl.java index 6e250734cb2f..1ccbb1a9954f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsClientImpl.java index 310ef5a9b272..808d1c1c3f5c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupWorkloadItemsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadItemResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadItemResourceList; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.WorkloadItemResourceList; import reactor.core.publisher.Mono; /** @@ -42,43 +42,46 @@ public final class BackupWorkloadItemsClientImpl implements BackupWorkloadItemsC /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BackupWorkloadItemsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupWorkloadItemsClientImpl(RecoveryServicesBackupClientImpl client) { + BackupWorkloadItemsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BackupWorkloadItemsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBackupWorkloadItems to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientBackupWorkloadItems to be used + * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBackupWorkloadItems") public interface BackupWorkloadItemsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @QueryParam("$filter") String filter, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/items") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); } @@ -87,10 +90,10 @@ Mono> listNext( * pagination * parameters. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param filter OData filter options. * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,34 +104,13 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String filter, String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, filter, skipToken, - accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, filter, + skipToken, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -137,50 +119,22 @@ private Mono> listSinglePageAsync(Strin * pagination * parameters. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param filter OData filter options. * @param skipToken skipToken Filter. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of WorkloadItem resources along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return list of WorkloadItem resources as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String vaultName, - String resourceGroupName, String fabricName, String containerName, String filter, String skipToken, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, filter, skipToken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String vaultName, String resourceGroupName, + String fabricName, String containerName, String filter, String skipToken) { + return new PagedFlux<>( + () -> listSinglePageAsync(vaultName, resourceGroupName, fabricName, containerName, filter, skipToken)); } /** @@ -188,12 +142,10 @@ private Mono> listSinglePageAsync(Strin * pagination * parameters. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container. - * @param filter OData filter options. - * @param skipToken skipToken Filter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -201,10 +153,11 @@ private Mono> listSinglePageAsync(Strin */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String vaultName, String resourceGroupName, - String fabricName, String containerName, String filter, String skipToken) { + String fabricName, String containerName) { + final String filter = null; + final String skipToken = null; return new PagedFlux<>( - () -> listSinglePageAsync(vaultName, resourceGroupName, fabricName, containerName, filter, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(vaultName, resourceGroupName, fabricName, containerName, filter, skipToken)); } /** @@ -212,23 +165,26 @@ private PagedFlux listAsync(String vaultName, String * pagination * parameters. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param filter OData filter options. + * @param skipToken skipToken Filter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of WorkloadItem resources as paginated response with {@link PagedFlux}. + * @return list of WorkloadItem resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, - String fabricName, String containerName) { - final String filter = null; - final String skipToken = null; - return new PagedFlux<>( - () -> listSinglePageAsync(vaultName, resourceGroupName, fabricName, containerName, filter, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, + String fabricName, String containerName, String filter, String skipToken) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, fabricName, containerName, filter, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** @@ -236,23 +192,27 @@ private PagedFlux listAsync(String vaultName, String * pagination * parameters. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of WorkloadItem resources as paginated response with {@link PagedFlux}. + * @return list of WorkloadItem resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, String fabricName, String containerName, String filter, String skipToken, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, fabricName, containerName, - filter, skipToken, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, fabricName, containerName, filter, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** @@ -260,10 +220,10 @@ private PagedFlux listAsync(String vaultName, String * pagination * parameters. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -275,7 +235,7 @@ public PagedIterable list(String vaultName, String re final String filter = null; final String skipToken = null; return new PagedIterable<>( - listAsync(vaultName, resourceGroupName, fabricName, containerName, filter, skipToken)); + () -> listSinglePage(vaultName, resourceGroupName, fabricName, containerName, filter, skipToken)); } /** @@ -283,10 +243,10 @@ public PagedIterable list(String vaultName, String re * pagination * parameters. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. @@ -299,57 +259,6 @@ public PagedIterable list(String vaultName, String re public PagedIterable list(String vaultName, String resourceGroupName, String fabricName, String containerName, String filter, String skipToken, Context context) { return new PagedIterable<>( - listAsync(vaultName, resourceGroupName, fabricName, containerName, filter, skipToken, 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 list of WorkloadItem resources along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of WorkloadItem resources along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + () -> listSinglePage(vaultName, resourceGroupName, fabricName, containerName, filter, skipToken, context)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsImpl.java index e2cb9de4fbee..6acda5f3dcbf 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsClientImpl.java index e45dcfafe3e6..cca10629d9a6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -38,46 +38,57 @@ public final class BackupsClientImpl implements BackupsClient { /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BackupsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BackupsClientImpl(RecoveryServicesBackupClientImpl client) { + BackupsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BackupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBackups to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientBackups to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBackups") public interface BackupsService { - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> trigger(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @PathParam("protectedItemName") String protectedItemName, - @BodyParam("application/json") BackupRequestResource parameters, @HeaderParam("Accept") String accept, - Context context); + Mono> trigger(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") BackupRequestResource parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/backup") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response triggerSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") BackupRequestResource parameters, Context context); } /** * Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the * operation, call GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item for which backup needs to be triggered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters resource backup request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -87,41 +98,11 @@ Mono> trigger(@HostParam("$host") String endpoint, @QueryParam("a @ServiceMethod(returns = ReturnType.SINGLE) private Mono> triggerWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, BackupRequestResource parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.trigger(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, - parameters, accept, context)) + .withContext(context -> service.trigger(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, + protectedItemName, contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -129,66 +110,11 @@ private Mono> triggerWithResponseAsync(String vaultName, String r * Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the * operation, call GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item for which backup needs to be triggered. - * @param parameters resource backup request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> triggerWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, - String containerName, String protectedItemName, BackupRequestResource parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.trigger(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, parameters, accept, context); - } - - /** - * Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the - * operation, call GetProtectedItemOperationResult API. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item for which backup needs to be triggered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters resource backup request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -206,11 +132,11 @@ private Mono triggerAsync(String vaultName, String resourceGroupName, Stri * Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the * operation, call GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item for which backup needs to be triggered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters resource backup request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -221,19 +147,21 @@ private Mono triggerAsync(String vaultName, String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public Response triggerWithResponse(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, BackupRequestResource parameters, Context context) { - return triggerWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - parameters, context).block(); + final String contentType = "application/json"; + return service.triggerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, protectedItemName, + contentType, parameters, context); } /** * Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the * operation, call GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item for which backup needs to be triggered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters resource backup request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsImpl.java index 4d90ee456290..600b3b0d8dc5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsClientImpl.java index a7a8dd9cdcbf..479f94481ef5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -37,43 +37,52 @@ public final class BmsPrepareDataMoveOperationResultsClientImpl implements BmsPr /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of BmsPrepareDataMoveOperationResultsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BmsPrepareDataMoveOperationResultsClientImpl(RecoveryServicesBackupClientImpl client) { + BmsPrepareDataMoveOperationResultsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(BmsPrepareDataMoveOperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientBmsPrepareDataMoveOperationResults to be - * used by the proxy service to perform REST calls. + * The interface defining all the services for + * RecoveryServicesBackupManagementClientBmsPrepareDataMoveOperationResults to be used by the proxy service to + * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientBmsPrepareDataMoveOperationResults") public interface BmsPrepareDataMoveOperationResultsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationResults/{operationId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("operationId") String operationId, - @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationResults/{operationId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); } /** - * Fetches Operation Result for Prepare Data Move. + * Fetches operation status for data move operation on vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the BackupResourceConfigResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -83,77 +92,19 @@ Mono> get(@HostParam("$ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), operationId, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, operationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Fetches Operation Result for Prepare Data Move. + * Fetches operation status for data move operation on vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation result response for Vault Storage Config along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, - String resourceGroupName, String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), operationId, accept, context); - } - - /** - * Fetches Operation Result for Prepare Data Move. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the BackupResourceConfigResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -167,11 +118,11 @@ private Mono getAsync(String vau } /** - * Fetches Operation Result for Prepare Data Move. + * Fetches operation status for data move operation on vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the BackupResourceConfigResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -181,15 +132,17 @@ private Mono getAsync(String vau @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String operationId, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, operationId, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, operationId, accept, context); } /** - * Fetches Operation Result for Prepare Data Move. + * Fetches operation status for data move operation on vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the BackupResourceConfigResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsImpl.java index 8c0369f54cc9..98f843443c64 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ClientDiscoveryValueForSingleApiImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ClientDiscoveryValueForSingleApiImpl.java index dde8c7a5a7ae..ca1c73adcfac 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ClientDiscoveryValueForSingleApiImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ClientDiscoveryValueForSingleApiImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/DeletedProtectionContainersClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/DeletedProtectionContainersClientImpl.java index 18ad2be0e488..4455040766f4 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/DeletedProtectionContainersClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/DeletedProtectionContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.recoveryservicesbackup.fluent.DeletedProtectionContainersClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionContainerResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionContainerResourceList; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectionContainerResourceList; import reactor.core.publisher.Mono; /** @@ -42,49 +42,49 @@ public final class DeletedProtectionContainersClientImpl implements DeletedProte /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of DeletedProtectionContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - DeletedProtectionContainersClientImpl(RecoveryServicesBackupClientImpl client) { + DeletedProtectionContainersClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(DeletedProtectionContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientDeletedProtectionContainers to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientDeletedProtectionContainers to + * be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientDeletedProtectionContainers") public interface DeletedProtectionContainersService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupDeletedProtectionContainers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupDeletedProtectionContainers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); } /** * Lists the soft deleted containers registered to Recovery Services Vault. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param filter OData filter options. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -96,128 +96,97 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String vaultName, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, vaultName, this.client.getApiVersion(), filter, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, filter, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the soft deleted containers registered to Recovery Services Vault. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param filter OData filter options. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectionContainer resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of ProtectionContainer resources as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String vaultName, String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, vaultName, - this.client.getApiVersion(), filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String vaultName, + String filter) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName, filter)); } /** * Lists the soft deleted containers registered to Recovery Services Vault. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. - * @param filter OData filter options. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of ProtectionContainer resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String vaultName, - String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String resourceGroupName, String vaultName) { + final String filter = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName, filter)); } /** * Lists the soft deleted containers registered to Recovery Services Vault. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. + * @param filter OData filter options. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectionContainer resources as paginated response with {@link PagedFlux}. + * @return list of ProtectionContainer resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String vaultName) { - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String vaultName, + String filter) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, filter, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Lists the soft deleted containers registered to Recovery Services Vault. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectionContainer resources as paginated response with {@link PagedFlux}. + * @return list of ProtectionContainer resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String vaultName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String vaultName, String filter, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName, filter, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, filter, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Lists the soft deleted containers registered to Recovery Services Vault. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -227,13 +196,13 @@ private PagedFlux listAsync(String resourceGro @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String vaultName) { final String filter = null; - return new PagedIterable<>(listAsync(resourceGroupName, vaultName, filter)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, vaultName, filter)); } /** * Lists the soft deleted containers registered to Recovery Services Vault. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param filter OData filter options. * @param context The context to associate with this operation. @@ -245,60 +214,6 @@ public PagedIterable list(String resourceGroup @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String vaultName, String filter, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, vaultName, filter, 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 list of ProtectionContainer resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectionContainer resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, vaultName, filter, context)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/DeletedProtectionContainersImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/DeletedProtectionContainersImpl.java index 4213b19e859a..35c56a1fc264 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/DeletedProtectionContainersImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/DeletedProtectionContainersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsClientImpl.java index f5d3698e6b9d..2d0326243efd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -37,35 +37,43 @@ public final class ExportJobsOperationResultsClientImpl implements ExportJobsOpe /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ExportJobsOperationResultsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ExportJobsOperationResultsClientImpl(RecoveryServicesBackupClientImpl client) { + ExportJobsOperationResultsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ExportJobsOperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientExportJobsOperationResults to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientExportJobsOperationResults to + * be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientExportJobsOperationResults") public interface ExportJobsOperationResultsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("operationId") String operationId, - @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/operationResults/{operationId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); } /** @@ -73,9 +81,9 @@ Mono> get(@HostParam("$host") Str * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId OperationID which represents the export job. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the JobResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -85,28 +93,10 @@ Mono> get(@HostParam("$host") Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), operationId, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, operationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -115,51 +105,9 @@ private Mono> getWithResponseAsyn * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId OperationID which represents the export job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation result of operation triggered by Export Jobs API along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, - String resourceGroupName, String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), operationId, accept, context); - } - - /** - * Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also - * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized - * format. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId OperationID which represents the export job. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the JobResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -177,9 +125,9 @@ private Mono getAsync(String vaultName, St * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId OperationID which represents the export job. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the JobResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -189,7 +137,9 @@ private Mono getAsync(String vaultName, St @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String operationId, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, operationId, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, operationId, accept, context); } /** @@ -197,9 +147,9 @@ public Response getWithResponse(String vau * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId OperationID which represents the export job. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the JobResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsImpl.java index 44ce7d038524..c1f10fc77d49 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsClientImpl.java index 387210054b8b..0873a8805acf 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsClientImpl.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; @@ -39,34 +38,42 @@ public final class FeatureSupportsClientImpl implements FeatureSupportsClient { /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of FeatureSupportsClientImpl. * * @param client the instance of the service client containing this operation class. */ - FeatureSupportsClientImpl(RecoveryServicesBackupClientImpl client) { + FeatureSupportsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(FeatureSupportsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientFeatureSupports to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientFeatureSupports to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientFeatureSupports") public interface FeatureSupportsService { - @Headers({ "Content-Type: application/json" }) - @Post("/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures") + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> validate(@HostParam("$host") String endpoint, + Mono> validate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("azureRegion") String azureRegion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") FeatureSupportRequest parameters, @HeaderParam("Accept") String accept, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") FeatureSupportRequest parameters, + Context context); + + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupValidateFeatures") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response validateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("azureRegion") String azureRegion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") FeatureSupportRequest parameters, Context context); } @@ -84,66 +91,14 @@ Mono> validate(@HostParam(" @ServiceMethod(returns = ReturnType.SINGLE) private Mono> validateWithResponseAsync(String azureRegion, FeatureSupportRequest parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (azureRegion == null) { - return Mono.error(new IllegalArgumentException("Parameter azureRegion is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.validate(this.client.getEndpoint(), this.client.getApiVersion(), - azureRegion, this.client.getSubscriptionId(), parameters, accept, context)) + azureRegion, this.client.getSubscriptionId(), contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * It will validate if given feature with resource properties is supported in service. - * - * @param azureRegion Azure region to hit Api. - * @param parameters Feature support request object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response for feature support requests for Azure IaasVm along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> validateWithResponseAsync(String azureRegion, - FeatureSupportRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (azureRegion == null) { - return Mono.error(new IllegalArgumentException("Parameter azureRegion is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validate(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion, - this.client.getSubscriptionId(), parameters, accept, context); - } - /** * It will validate if given feature with resource properties is supported in service. * @@ -174,7 +129,10 @@ private Mono validateAsync(String az @ServiceMethod(returns = ReturnType.SINGLE) public Response validateWithResponse(String azureRegion, FeatureSupportRequest parameters, Context context) { - return validateWithResponseAsync(azureRegion, parameters, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.validateSync(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion, + this.client.getSubscriptionId(), contentType, accept, parameters, context); } /** diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsImpl.java index 698dbd850ee2..e47224d48828 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FetchTieringCostsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FetchTieringCostsClientImpl.java index bc4caae0160f..4a2146134b5c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FetchTieringCostsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FetchTieringCostsClientImpl.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; @@ -21,6 +20,7 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -44,36 +44,43 @@ public final class FetchTieringCostsClientImpl implements FetchTieringCostsClien /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of FetchTieringCostsClientImpl. * * @param client the instance of the service client containing this operation class. */ - FetchTieringCostsClientImpl(RecoveryServicesBackupClientImpl client) { + FetchTieringCostsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(FetchTieringCostsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientFetchTieringCosts to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientFetchTieringCosts to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientFetchTieringCosts") public interface FetchTieringCostsService { - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTieringCost/default/fetchTieringCost") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> post(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> post(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FetchTieringCostInfoRequest parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FetchTieringCostInfoRequest parameters, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTieringCost/default/fetchTieringCost") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response postSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FetchTieringCostInfoRequest parameters, Context context); } /** @@ -81,7 +88,7 @@ Mono>> post(@HostParam("$host") String endpoint, * Status of the operation can be fetched using GetTieringCostOperationStatus API and result using * GetTieringCostOperationResult API. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param parameters Fetch Tiering Cost Request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -93,30 +100,10 @@ Mono>> post(@HostParam("$host") String endpoint, @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> postWithResponseAsync(String resourceGroupName, String vaultName, FetchTieringCostInfoRequest parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.post(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, vaultName, this.client.getApiVersion(), parameters, accept, context)) + return FluxUtil.withContext(context -> service.post(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -125,43 +112,21 @@ private Mono>> postWithResponseAsync(String resourceGr * Status of the operation can be fetched using GetTieringCostOperationStatus API and result using * GetTieringCostOperationResult API. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param parameters Fetch Tiering Cost Request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for tiering cost response along with {@link Response} on successful completion of - * {@link Mono}. + * @return base class for tiering cost response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> postWithResponseAsync(String resourceGroupName, String vaultName, - FetchTieringCostInfoRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + private Response postWithResponse(String resourceGroupName, String vaultName, + FetchTieringCostInfoRequest parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.post(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, vaultName, - this.client.getApiVersion(), parameters, accept, context); + return service.postSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, contentType, accept, parameters, Context.NONE); } /** @@ -169,20 +134,22 @@ private Mono>> postWithResponseAsync(String resourceGr * Status of the operation can be fetched using GetTieringCostOperationStatus API and result using * GetTieringCostOperationResult API. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param parameters Fetch Tiering Cost Request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of base class for tiering cost response. + * @return base class for tiering cost response along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, TieringCostInfoInner> beginPostAsync(String resourceGroupName, - String vaultName, FetchTieringCostInfoRequest parameters) { - Mono>> mono = postWithResponseAsync(resourceGroupName, vaultName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - TieringCostInfoInner.class, TieringCostInfoInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response postWithResponse(String resourceGroupName, String vaultName, + FetchTieringCostInfoRequest parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.postSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, contentType, accept, parameters, context); } /** @@ -190,10 +157,9 @@ private PollerFlux, TieringCostInfoInner> begin * Status of the operation can be fetched using GetTieringCostOperationStatus API and result using * GetTieringCostOperationResult API. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param parameters Fetch Tiering Cost Request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -201,12 +167,10 @@ private PollerFlux, TieringCostInfoInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, TieringCostInfoInner> beginPostAsync(String resourceGroupName, - String vaultName, FetchTieringCostInfoRequest parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = postWithResponseAsync(resourceGroupName, vaultName, parameters, context); + String vaultName, FetchTieringCostInfoRequest parameters) { + Mono>> mono = postWithResponseAsync(resourceGroupName, vaultName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - TieringCostInfoInner.class, TieringCostInfoInner.class, context); + TieringCostInfoInner.class, TieringCostInfoInner.class, this.client.getContext()); } /** @@ -214,7 +178,7 @@ private PollerFlux, TieringCostInfoInner> begin * Status of the operation can be fetched using GetTieringCostOperationStatus API and result using * GetTieringCostOperationResult API. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param parameters Fetch Tiering Cost Request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -225,7 +189,9 @@ private PollerFlux, TieringCostInfoInner> begin @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TieringCostInfoInner> beginPost(String resourceGroupName, String vaultName, FetchTieringCostInfoRequest parameters) { - return this.beginPostAsync(resourceGroupName, vaultName, parameters).getSyncPoller(); + Response response = postWithResponse(resourceGroupName, vaultName, parameters); + return this.client.getLroResult(response, + TieringCostInfoInner.class, TieringCostInfoInner.class, Context.NONE); } /** @@ -233,7 +199,7 @@ public SyncPoller, TieringCostInfoInner> beginP * Status of the operation can be fetched using GetTieringCostOperationStatus API and result using * GetTieringCostOperationResult API. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param parameters Fetch Tiering Cost Request. * @param context The context to associate with this operation. @@ -245,7 +211,9 @@ public SyncPoller, TieringCostInfoInner> beginP @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TieringCostInfoInner> beginPost(String resourceGroupName, String vaultName, FetchTieringCostInfoRequest parameters, Context context) { - return this.beginPostAsync(resourceGroupName, vaultName, parameters, context).getSyncPoller(); + Response response = postWithResponse(resourceGroupName, vaultName, parameters, context); + return this.client.getLroResult(response, + TieringCostInfoInner.class, TieringCostInfoInner.class, context); } /** @@ -253,7 +221,7 @@ public SyncPoller, TieringCostInfoInner> beginP * Status of the operation can be fetched using GetTieringCostOperationStatus API and result using * GetTieringCostOperationResult API. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param parameters Fetch Tiering Cost Request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -273,28 +241,7 @@ private Mono postAsync(String resourceGroupName, String va * Status of the operation can be fetched using GetTieringCostOperationStatus API and result using * GetTieringCostOperationResult API. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param parameters Fetch Tiering Cost Request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for tiering cost response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono postAsync(String resourceGroupName, String vaultName, - FetchTieringCostInfoRequest parameters, Context context) { - return beginPostAsync(resourceGroupName, vaultName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Provides the details of the tiering related sizes and cost. - * Status of the operation can be fetched using GetTieringCostOperationStatus API and result using - * GetTieringCostOperationResult API. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param parameters Fetch Tiering Cost Request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -305,7 +252,7 @@ private Mono postAsync(String resourceGroupName, String va @ServiceMethod(returns = ReturnType.SINGLE) public TieringCostInfoInner post(String resourceGroupName, String vaultName, FetchTieringCostInfoRequest parameters) { - return postAsync(resourceGroupName, vaultName, parameters).block(); + return beginPost(resourceGroupName, vaultName, parameters).getFinalResult(); } /** @@ -313,7 +260,7 @@ public TieringCostInfoInner post(String resourceGroupName, String vaultName, * Status of the operation can be fetched using GetTieringCostOperationStatus API and result using * GetTieringCostOperationResult API. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param parameters Fetch Tiering Cost Request. * @param context The context to associate with this operation. @@ -325,6 +272,6 @@ public TieringCostInfoInner post(String resourceGroupName, String vaultName, @ServiceMethod(returns = ReturnType.SINGLE) public TieringCostInfoInner post(String resourceGroupName, String vaultName, FetchTieringCostInfoRequest parameters, Context context) { - return postAsync(resourceGroupName, vaultName, parameters, context).block(); + return beginPost(resourceGroupName, vaultName, parameters, context).getFinalResult(); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FetchTieringCostsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FetchTieringCostsImpl.java index af5b3dccfd02..a3fe113eafc6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FetchTieringCostsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FetchTieringCostsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/GetTieringCostOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/GetTieringCostOperationResultsClientImpl.java index 3f711344cede..d6bec29af50a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/GetTieringCostOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/GetTieringCostOperationResultsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -37,41 +37,49 @@ public final class GetTieringCostOperationResultsClientImpl implements GetTierin /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of GetTieringCostOperationResultsClientImpl. * * @param client the instance of the service client containing this operation class. */ - GetTieringCostOperationResultsClientImpl(RecoveryServicesBackupClientImpl client) { + GetTieringCostOperationResultsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(GetTieringCostOperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientGetTieringCostOperationResults to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientGetTieringCostOperationResults + * to be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientGetTieringCostOperationResults") public interface GetTieringCostOperationResultsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTieringCost/default/operationResults/{operationId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, - @PathParam("operationId") String operationId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTieringCost/default/operationResults/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); } /** * Gets the result of async operation for tiering cost. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -83,75 +91,17 @@ Mono> get(@HostParam("$host") String endpoint, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String vaultName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, vaultName, operationId, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, operationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the result of async operation for tiering cost. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param operationId The operationId parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of async operation for tiering cost along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String vaultName, - String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, vaultName, - operationId, this.client.getApiVersion(), accept, context); - } - - /** - * Gets the result of async operation for tiering cost. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -168,7 +118,7 @@ private Mono getAsync(String resourceGroupName, String vau /** * Gets the result of async operation for tiering cost. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -180,13 +130,15 @@ private Mono getAsync(String resourceGroupName, String vau @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String vaultName, String operationId, Context context) { - return getWithResponseAsync(resourceGroupName, vaultName, operationId, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, operationId, accept, context); } /** * Gets the result of async operation for tiering cost. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/GetTieringCostOperationResultsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/GetTieringCostOperationResultsImpl.java index 60090d941ffc..0292b7d80d29 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/GetTieringCostOperationResultsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/GetTieringCostOperationResultsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsClientImpl.java index 34ed5da9f65e..3a0ab72c7a1b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -38,49 +38,71 @@ public final class ItemLevelRecoveryConnectionsClientImpl implements ItemLevelRe /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ItemLevelRecoveryConnectionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ItemLevelRecoveryConnectionsClientImpl(RecoveryServicesBackupClientImpl client) { + ItemLevelRecoveryConnectionsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ItemLevelRecoveryConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientItemLevelRecoveryConnections to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientItemLevelRecoveryConnections to + * be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientItemLevelRecoveryConnections") public interface ItemLevelRecoveryConnectionsService { - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> provision(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @PathParam("protectedItemName") String protectedItemName, - @PathParam("recoveryPointId") String recoveryPointId, - @BodyParam("application/json") IlrRequestResource parameters, @HeaderParam("Accept") String accept, - Context context); + Mono> provision(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, + @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") IlrRequestResource parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/provisionInstantItemRecovery") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response provisionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, + @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") IlrRequestResource parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> revoke(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @PathParam("protectedItemName") String protectedItemName, - @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Accept") String accept, - Context context); + Mono> revoke(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, + @PathParam("recoveryPointId") String recoveryPointId, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/revokeInstantItemRecovery") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response revokeSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, + @PathParam("recoveryPointId") String recoveryPointId, Context context); } /** @@ -89,13 +111,12 @@ Mono> revoke(@HostParam("$host") String endpoint, @QueryParam("ap * of * provisioning, call GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be provisioned - * for this backed up data. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource ILR request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -106,45 +127,11 @@ Mono> revoke(@HostParam("$host") String endpoint, @QueryParam("ap private Mono> provisionWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, IlrRequestResource parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (recoveryPointId == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPointId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.provision(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, - recoveryPointId, parameters, accept, context)) + .withContext(context -> service.provision(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, + protectedItemName, recoveryPointId, contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -154,78 +141,12 @@ private Mono> provisionWithResponseAsync(String vaultName, String * of * provisioning, call GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be provisioned - * for this backed up data. - * @param parameters resource ILR request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> provisionWithResponseAsync(String vaultName, String resourceGroupName, - String fabricName, String containerName, String protectedItemName, String recoveryPointId, - IlrRequestResource parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (recoveryPointId == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPointId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.provision(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, recoveryPointId, parameters, - accept, context); - } - - /** - * Provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a file - * explorer displaying all the recoverable files and folders. This is an asynchronous operation. To know the status - * of - * provisioning, call GetProtectedItemOperationResult API. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be provisioned - * for this backed up data. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource ILR request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -245,13 +166,12 @@ private Mono provisionAsync(String vaultName, String resourceGroupName, St * of * provisioning, call GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be provisioned - * for this backed up data. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource ILR request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -263,8 +183,10 @@ private Mono provisionAsync(String vaultName, String resourceGroupName, St public Response provisionWithResponse(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, IlrRequestResource parameters, Context context) { - return provisionWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - recoveryPointId, parameters, context).block(); + final String contentType = "application/json"; + return service.provisionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, protectedItemName, + recoveryPointId, contentType, parameters, context); } /** @@ -273,13 +195,12 @@ public Response provisionWithResponse(String vaultName, String resourceGro * of * provisioning, call GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be provisioned - * for this backed up data. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource ILR request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -296,13 +217,12 @@ public void provision(String vaultName, String resourceGroupName, String fabricN * Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer * displaying all recoverable files and folders. This is an asynchronous operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be revoked for - * this backed up data. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -311,40 +231,10 @@ public void provision(String vaultName, String resourceGroupName, String fabricN @ServiceMethod(returns = ReturnType.SINGLE) private Mono> revokeWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (recoveryPointId == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPointId is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.revoke(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, - recoveryPointId, accept, context)) + .withContext(context -> service.revoke(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, + protectedItemName, recoveryPointId, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -352,69 +242,12 @@ private Mono> revokeWithResponseAsync(String vaultName, String re * Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer * displaying all recoverable files and folders. This is an asynchronous operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be revoked for - * this backed up data. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> revokeWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, - String containerName, String protectedItemName, String recoveryPointId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (recoveryPointId == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPointId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.revoke(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, recoveryPointId, accept, - context); - } - - /** - * Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer - * displaying all recoverable files and folders. This is an asynchronous operation. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be revoked for - * this backed up data. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -431,13 +264,12 @@ private Mono revokeAsync(String vaultName, String resourceGroupName, Strin * Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer * displaying all recoverable files and folders. This is an asynchronous operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be revoked for - * this backed up data. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -447,21 +279,21 @@ private Mono revokeAsync(String vaultName, String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public Response revokeWithResponse(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, Context context) { - return revokeWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - recoveryPointId, context).block(); + return service.revokeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, protectedItemName, + recoveryPointId, context); } /** * Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer * displaying all recoverable files and folders. This is an asynchronous operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be revoked for - * this backed up data. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsImpl.java index 87dd4abde988..37d6acbdc74b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsClientImpl.java index ffdeec64e711..2c8cbade6b81 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsClientImpl.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; @@ -36,43 +35,52 @@ public final class JobCancellationsClientImpl implements JobCancellationsClient /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of JobCancellationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - JobCancellationsClientImpl(RecoveryServicesBackupClientImpl client) { + JobCancellationsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(JobCancellationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientJobCancellations to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientJobCancellations to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientJobCancellations") public interface JobCancellationsService { - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> trigger(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("jobName") String jobName, - @HeaderParam("Accept") String accept, Context context); + Mono> trigger(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("jobName") String jobName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/cancel") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response triggerSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("jobName") String jobName, Context context); } /** * Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call * GetCancelOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Name of the job to cancel. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the job whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -80,28 +88,9 @@ Mono> trigger(@HostParam("$host") String endpoint, @QueryParam("a */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> triggerWithResponseAsync(String vaultName, String resourceGroupName, String jobName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.trigger(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), jobName, accept, context)) + .withContext(context -> service.trigger(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, jobName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -109,49 +98,9 @@ private Mono> triggerWithResponseAsync(String vaultName, String r * Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call * GetCancelOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Name of the job to cancel. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> triggerWithResponseAsync(String vaultName, String resourceGroupName, String jobName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.trigger(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), jobName, accept, context); - } - - /** - * Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call - * GetCancelOperationResult API. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Name of the job to cancel. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the job whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -166,9 +115,9 @@ private Mono triggerAsync(String vaultName, String resourceGroupName, Stri * Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call * GetCancelOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Name of the job to cancel. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the job whose details are to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -178,16 +127,17 @@ private Mono triggerAsync(String vaultName, String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public Response triggerWithResponse(String vaultName, String resourceGroupName, String jobName, Context context) { - return triggerWithResponseAsync(vaultName, resourceGroupName, jobName, context).block(); + return service.triggerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, jobName, context); } /** * Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call * GetCancelOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Name of the job to cancel. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the job whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsImpl.java index 777ef1b3cf55..2164c1bf7d61 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsClientImpl.java index f5095506734a..2937016c3e9b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -37,42 +37,50 @@ public final class JobDetailsClientImpl implements JobDetailsClient { /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of JobDetailsClientImpl. * * @param client the instance of the service client containing this operation class. */ - JobDetailsClientImpl(RecoveryServicesBackupClientImpl client) { + JobDetailsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(JobDetailsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientJobDetails to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientJobDetails to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientJobDetails") public interface JobDetailsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("jobName") String jobName, - @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("jobName") String jobName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("jobName") String jobName, @HeaderParam("Accept") String accept, Context context); } /** * Gets extended information associated with the job. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Name of the job whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -83,76 +91,18 @@ Mono> get(@HostParam("$host") String endpoint, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String jobName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), jobName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, jobName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets extended information associated with the job. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Name of the job whose details are to be fetched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return extended information associated with the job along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, - String jobName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), jobName, accept, context); - } - - /** - * Gets extended information associated with the job. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Name of the job whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -168,8 +118,8 @@ private Mono getAsync(String vaultName, String resourceGroupNa /** * Gets extended information associated with the job. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Name of the job whose details are to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -180,14 +130,16 @@ private Mono getAsync(String vaultName, String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String jobName, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, jobName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, jobName, accept, context); } /** * Gets extended information associated with the job. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Name of the job whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsImpl.java index 8d0d02b4865b..b034ff3ea1ec 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsClientImpl.java index 6127426fd521..b2139380430f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsClientImpl.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.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; @@ -36,43 +35,52 @@ public final class JobOperationResultsClientImpl implements JobOperationResultsC /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of JobOperationResultsClientImpl. * * @param client the instance of the service client containing this operation class. */ - JobOperationResultsClientImpl(RecoveryServicesBackupClientImpl client) { + JobOperationResultsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(JobOperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientJobOperationResults to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientJobOperationResults to be used + * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientJobOperationResults") public interface JobOperationResultsService { - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("jobName") String jobName, - @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("jobName") String jobName, @PathParam("operationId") String operationId, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobs/{jobName}/operationResults/{operationId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("jobName") String jobName, @PathParam("operationId") String operationId, Context context); } /** * Fetches the result of any operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job name whose operation result has to be fetched. - * @param operationId OperationID which represents the operation whose result has to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the JobResource. + * @param operationId The name of the JobResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -81,84 +89,19 @@ Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-v @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String jobName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), jobName, operationId, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, jobName, operationId, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Fetches the result of any operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job name whose operation result has to be fetched. - * @param operationId OperationID which represents the operation whose result has to be fetched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String jobName, - String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), jobName, operationId, accept, context); - } - - /** - * Fetches the result of any operation. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job name whose operation result has to be fetched. - * @param operationId OperationID which represents the operation whose result has to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the JobResource. + * @param operationId The name of the JobResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -173,10 +116,10 @@ private Mono getAsync(String vaultName, String resourceGroupName, String j /** * Fetches the result of any operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job name whose operation result has to be fetched. - * @param operationId OperationID which represents the operation whose result has to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the JobResource. + * @param operationId The name of the JobResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -186,16 +129,17 @@ private Mono getAsync(String vaultName, String resourceGroupName, String j @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String jobName, String operationId, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, jobName, operationId, context).block(); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, jobName, operationId, context); } /** * Fetches the result of any operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job name whose operation result has to be fetched. - * @param operationId OperationID which represents the operation whose result has to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the JobResource. + * @param operationId The name of the JobResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsImpl.java index ccf686a7b81c..7613e4c6fc5f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobResourceImpl.java index 9b4b399e382b..8ea5de90d3ba 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobResourceImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.JobResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.Job; import com.azure.resourcemanager.recoveryservicesbackup.models.JobResource; @@ -33,8 +34,8 @@ public String type() { return this.innerModel().type(); } - public String location() { - return this.innerModel().location(); + public Job properties() { + return this.innerModel().properties(); } public Map tags() { @@ -46,14 +47,18 @@ public Map tags() { } } - public Job properties() { - return this.innerModel().properties(); + public String location() { + return this.innerModel().location(); } public String etag() { return this.innerModel().etag(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public JobResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsClientImpl.java index ab800a98e5bd..9994f8aea9b7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsClientImpl.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; @@ -36,40 +35,48 @@ public final class JobsClientImpl implements JobsClient { /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of JobsClientImpl. * * @param client the instance of the service client containing this operation class. */ - JobsClientImpl(RecoveryServicesBackupClientImpl client) { + JobsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(JobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientJobs to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientJobs to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientJobs") public interface JobsService { - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> export(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + Mono> export(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupJobsExport") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response exportSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter, Context context); } /** * Triggers export of jobs specified by filters and returns an OperationID to track. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -78,25 +85,9 @@ Mono> export(@HostParam("$host") String endpoint, @QueryParam("ap */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> exportWithResponseAsync(String vaultName, String resourceGroupName, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.export(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), filter, accept, context)) + resourceGroupName, this.client.getSubscriptionId(), filter, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -104,43 +95,7 @@ private Mono> exportWithResponseAsync(String vaultName, String re * Triggers export of jobs specified by filters and returns an OperationID to track. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> exportWithResponseAsync(String vaultName, String resourceGroupName, String filter, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.export(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), filter, accept, context); - } - - /** - * Triggers export of jobs specified by filters and returns an OperationID to track. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -156,7 +111,7 @@ private Mono exportAsync(String vaultName, String resourceGroupName) { * Triggers export of jobs specified by filters and returns an OperationID to track. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -167,14 +122,15 @@ private Mono exportAsync(String vaultName, String resourceGroupName) { @ServiceMethod(returns = ReturnType.SINGLE) public Response exportWithResponse(String vaultName, String resourceGroupName, String filter, Context context) { - return exportWithResponseAsync(vaultName, resourceGroupName, filter, context).block(); + return service.exportSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), filter, context); } /** * Triggers export of jobs specified by filters and returns an OperationID to track. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsImpl.java index eed499aa05a4..e9009446172b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsClientImpl.java index a403f4001a0f..2c378ae85e5e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsClientImpl.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; @@ -39,43 +38,52 @@ public final class OperationOperationsClientImpl implements OperationOperationsC /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of OperationOperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationOperationsClientImpl(RecoveryServicesBackupClientImpl client) { + OperationOperationsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(OperationOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientOperationOperations to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientOperationOperations to be used + * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientOperationOperations") public interface OperationOperationsService { - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperation") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> validate(@HostParam("$host") String endpoint, + Mono> validate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ValidateOperationRequestResource parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ValidateOperationRequestResource parameters, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperation") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response validateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ValidateOperationRequestResource parameters, Context context); } /** * Validate operation for specified backed up item. This is a synchronous operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -85,30 +93,11 @@ Mono> validate(@HostParam("$host") Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono> validateWithResponseAsync(String vaultName, String resourceGroupName, ValidateOperationRequestResource parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.validate(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), parameters, accept, context)) + resourceGroupName, this.client.getSubscriptionId(), contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -116,48 +105,7 @@ private Mono> validateWithResponseAsyn * Validate operation for specified backed up item. This is a synchronous operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters resource validate operation request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> validateWithResponseAsync(String vaultName, - String resourceGroupName, ValidateOperationRequestResource parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validate(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Validate operation for specified backed up item. This is a synchronous operation. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -175,7 +123,7 @@ private Mono validateAsync(String vaultName, St * Validate operation for specified backed up item. This is a synchronous operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -186,14 +134,17 @@ private Mono validateAsync(String vaultName, St @ServiceMethod(returns = ReturnType.SINGLE) public Response validateWithResponse(String vaultName, String resourceGroupName, ValidateOperationRequestResource parameters, Context context) { - return validateWithResponseAsync(vaultName, resourceGroupName, parameters, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.validateSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, + resourceGroupName, this.client.getSubscriptionId(), contentType, accept, parameters, context); } /** * Validate operation for specified backed up item. This is a synchronous operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsImpl.java index 200e6a1f5cac..aee38fd4fde1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationResultInfoBaseResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationResultInfoBaseResourceImpl.java index a8d48d3dc5b2..753a1a300f7d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationResultInfoBaseResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationResultInfoBaseResourceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationStatusImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationStatusImpl.java index f4da428bca10..80c5bab18d55 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationStatusImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationStatusImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsClientImpl.java index abfbcd99ea44..dffa53aae052 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ClientDiscoveryValueForSingleApiInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryResponse; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ClientDiscoveryResponse; import reactor.core.publisher.Mono; /** @@ -42,31 +42,38 @@ public final class OperationsClientImpl implements OperationsClient { /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(RecoveryServicesBackupClientImpl client) { + OperationsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientOperations to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientOperations to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.RecoveryServices/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.RecoveryServices/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,11 +81,18 @@ Mono> list(@HostParam("$host") String endpoint @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Returns the list of available operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -87,10 +101,6 @@ Mono> listNext(@PathParam(value = "nextLink", */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -101,59 +111,54 @@ private Mono> listSinglePag } /** - * Returns the list of available operations. + * List the operations for the provider. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operations List response which contains list of available APIs along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return operations List response which contains list of available APIs as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Returns the list of available operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operations List response which contains list of available APIs as paginated response with - * {@link PagedFlux}. + * @return operations List response which contains list of available APIs along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Returns the list of available operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operations List response which contains list of available APIs as paginated response with - * {@link PagedFlux}. + * @return operations List response which contains list of available APIs along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Returns the list of available operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -162,11 +167,11 @@ private PagedFlux listAsync(Context conte */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** - * Returns the list of available operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -177,7 +182,7 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -192,13 +197,6 @@ public PagedIterable list(Context context */ @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(), @@ -206,6 +204,24 @@ private Mono> listNextSingl .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operations List response which contains list of available APIs along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -214,23 +230,14 @@ private Mono> listNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operations List response which contains list of available APIs along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return operations List response which contains list of available APIs along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsImpl.java index 9e253cb1294d..dfb4b0a9ea26 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PreValidateEnableBackupResponseImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PreValidateEnableBackupResponseImpl.java index b7ff860d25e5..0c6a85d1d196 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PreValidateEnableBackupResponseImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PreValidateEnableBackupResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionResourceImpl.java index 81ab8bcf6ab2..93c993da34a9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionResourceImpl.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.PrivateEndpointConnectionResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnection; @@ -30,8 +31,8 @@ public String type() { return this.innerModel().type(); } - public String location() { - return this.innerModel().location(); + public PrivateEndpointConnection properties() { + return this.innerModel().properties(); } public Map tags() { @@ -43,14 +44,18 @@ public Map tags() { } } - public PrivateEndpointConnection properties() { - return this.innerModel().properties(); + public String location() { + return this.innerModel().location(); } public String etag() { return this.innerModel().etag(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsClientImpl.java index 45228cb007eb..7d7fef74fc6a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -23,6 +23,7 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -45,66 +46,90 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of PrivateEndpointConnectionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - PrivateEndpointConnectionsClientImpl(RecoveryServicesBackupClientImpl client) { + PrivateEndpointConnectionsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientPrivateEndpointConnections to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientPrivateEndpointConnections to + * be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientPrivateEndpointConnections") public interface PrivateEndpointConnectionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> put(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, + Mono>> put(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @BodyParam("application/json") PrivateEndpointConnectionResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnectionResourceInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response putSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnectionResourceInner parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, Context context); + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); } /** * Get Private Endpoint Connection. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -114,77 +139,19 @@ Mono>> delete(@HostParam("$host") String endpoint, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), privateEndpointConnectionName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, privateEndpointConnectionName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get Private Endpoint Connection. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private Endpoint Connection along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, - String resourceGroupName, String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), privateEndpointConnectionName, accept, context); - } - - /** - * Get Private Endpoint Connection. This call is made by Backup Admin. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -201,8 +168,8 @@ private Mono getAsync(String vaultName, /** * Get Private Endpoint Connection. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -213,14 +180,16 @@ private Mono getAsync(String vaultName, @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String privateEndpointConnectionName, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, privateEndpointConnectionName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, privateEndpointConnectionName, accept, context); } /** * Get Private Endpoint Connection. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -236,8 +205,8 @@ public PrivateEndpointConnectionResourceInner get(String vaultName, String resou /** * Approve or Reject Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -249,116 +218,65 @@ public PrivateEndpointConnectionResourceInner get(String vaultName, String resou @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> putWithResponseAsync(String vaultName, String resourceGroupName, String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.put(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), privateEndpointConnectionName, parameters, accept, - context)) + .withContext(context -> service.put(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, privateEndpointConnectionName, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Approve or Reject Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param parameters Request body for operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private Endpoint Connection Response Properties along with {@link Response} on successful completion of - * {@link Mono}. + * @return private Endpoint Connection Response Properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> putWithResponseAsync(String vaultName, String resourceGroupName, - String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + private Response putWithResponse(String vaultName, String resourceGroupName, + String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.put(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), privateEndpointConnectionName, parameters, accept, context); + return service.putSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, privateEndpointConnectionName, contentType, accept, parameters, Context.NONE); } /** * Approve or Reject Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param parameters Request body for operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of private Endpoint Connection Response Properties. + * @return private Endpoint Connection Response Properties along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PrivateEndpointConnectionResourceInner> - beginPutAsync(String vaultName, String resourceGroupName, String privateEndpointConnectionName, - PrivateEndpointConnectionResourceInner parameters) { - Mono>> mono - = putWithResponseAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters); - return this.client.getLroResult( - mono, this.client.getHttpPipeline(), PrivateEndpointConnectionResourceInner.class, - PrivateEndpointConnectionResourceInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response putWithResponse(String vaultName, String resourceGroupName, + String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.putSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, privateEndpointConnectionName, contentType, accept, parameters, context); } /** * Approve or Reject Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @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. @@ -367,20 +285,19 @@ private Mono>> putWithResponseAsync(String vaultName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionResourceInner> beginPutAsync(String vaultName, String resourceGroupName, String privateEndpointConnectionName, - PrivateEndpointConnectionResourceInner parameters, Context context) { - context = this.client.mergeContext(context); + PrivateEndpointConnectionResourceInner parameters) { Mono>> mono - = putWithResponseAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters, context); + = putWithResponseAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters); return this.client.getLroResult( mono, this.client.getHttpPipeline(), PrivateEndpointConnectionResourceInner.class, - PrivateEndpointConnectionResourceInner.class, context); + PrivateEndpointConnectionResourceInner.class, this.client.getContext()); } /** * Approve or Reject Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -392,15 +309,18 @@ private Mono>> putWithResponseAsync(String vaultName, public SyncPoller, PrivateEndpointConnectionResourceInner> beginPut(String vaultName, String resourceGroupName, String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner parameters) { - return this.beginPutAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters) - .getSyncPoller(); + Response response + = putWithResponse(vaultName, resourceGroupName, privateEndpointConnectionName, parameters); + return this.client.getLroResult( + response, PrivateEndpointConnectionResourceInner.class, PrivateEndpointConnectionResourceInner.class, + Context.NONE); } /** * Approve or Reject Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -413,15 +333,18 @@ private Mono>> putWithResponseAsync(String vaultName, public SyncPoller, PrivateEndpointConnectionResourceInner> beginPut(String vaultName, String resourceGroupName, String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner parameters, Context context) { - return this.beginPutAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters, context) - .getSyncPoller(); + Response response + = putWithResponse(vaultName, resourceGroupName, privateEndpointConnectionName, parameters, context); + return this.client.getLroResult( + response, PrivateEndpointConnectionResourceInner.class, PrivateEndpointConnectionResourceInner.class, + context); } /** * Approve or Reject Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -439,28 +362,8 @@ private Mono putAsync(String vaultName, /** * Approve or Reject Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return private Endpoint Connection Response Properties on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono putAsync(String vaultName, String resourceGroupName, - String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner parameters, Context context) { - return beginPutAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Approve or Reject Private Endpoint requests. This call is made by Backup Admin. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -471,14 +374,14 @@ private Mono putAsync(String vaultName, @ServiceMethod(returns = ReturnType.SINGLE) public PrivateEndpointConnectionResourceInner put(String vaultName, String resourceGroupName, String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner parameters) { - return putAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters).block(); + return beginPut(vaultName, resourceGroupName, privateEndpointConnectionName, parameters).getFinalResult(); } /** * Approve or Reject Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -490,14 +393,15 @@ public PrivateEndpointConnectionResourceInner put(String vaultName, String resou @ServiceMethod(returns = ReturnType.SINGLE) public PrivateEndpointConnectionResourceInner put(String vaultName, String resourceGroupName, String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner parameters, Context context) { - return putAsync(vaultName, resourceGroupName, privateEndpointConnectionName, parameters, context).block(); + return beginPut(vaultName, resourceGroupName, privateEndpointConnectionName, parameters, context) + .getFinalResult(); } /** * Delete Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -507,99 +411,55 @@ public PrivateEndpointConnectionResourceInner put(String vaultName, String resou @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String vaultName, String resourceGroupName, String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), privateEndpointConnectionName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, privateEndpointConnectionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String vaultName, String resourceGroupName, - String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), privateEndpointConnectionName, accept, context); + private Response deleteWithResponse(String vaultName, String resourceGroupName, + String privateEndpointConnectionName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, privateEndpointConnectionName, Context.NONE); } /** * Delete Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String vaultName, String resourceGroupName, - String privateEndpointConnectionName) { - Mono>> mono - = deleteWithResponseAsync(vaultName, resourceGroupName, privateEndpointConnectionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String vaultName, String resourceGroupName, + String privateEndpointConnectionName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, privateEndpointConnectionName, context); } /** * Delete Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -607,19 +467,18 @@ private PollerFlux, Void> beginDeleteAsync(String vaultName, St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String vaultName, String resourceGroupName, - String privateEndpointConnectionName, Context context) { - context = this.client.mergeContext(context); + String privateEndpointConnectionName) { Mono>> mono - = deleteWithResponseAsync(vaultName, resourceGroupName, privateEndpointConnectionName, context); + = deleteWithResponseAsync(vaultName, resourceGroupName, privateEndpointConnectionName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Delete Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -629,14 +488,15 @@ private PollerFlux, Void> beginDeleteAsync(String vaultName, St @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String vaultName, String resourceGroupName, String privateEndpointConnectionName) { - return this.beginDeleteAsync(vaultName, resourceGroupName, privateEndpointConnectionName).getSyncPoller(); + Response response = deleteWithResponse(vaultName, resourceGroupName, privateEndpointConnectionName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Delete Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -647,15 +507,16 @@ public SyncPoller, Void> beginDelete(String vaultName, String r @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String vaultName, String resourceGroupName, String privateEndpointConnectionName, Context context) { - return this.beginDeleteAsync(vaultName, resourceGroupName, privateEndpointConnectionName, context) - .getSyncPoller(); + Response response + = deleteWithResponse(vaultName, resourceGroupName, privateEndpointConnectionName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Delete Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -671,27 +532,8 @@ private Mono deleteAsync(String vaultName, String resourceGroupName, Strin /** * Delete Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String vaultName, String resourceGroupName, String privateEndpointConnectionName, - Context context) { - return beginDeleteAsync(vaultName, resourceGroupName, privateEndpointConnectionName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Private Endpoint requests. This call is made by Backup Admin. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -699,14 +541,14 @@ private Mono deleteAsync(String vaultName, String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String vaultName, String resourceGroupName, String privateEndpointConnectionName) { - deleteAsync(vaultName, resourceGroupName, privateEndpointConnectionName).block(); + beginDelete(vaultName, resourceGroupName, privateEndpointConnectionName).getFinalResult(); } /** * Delete Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -716,6 +558,6 @@ public void delete(String vaultName, String resourceGroupName, String privateEnd @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String vaultName, String resourceGroupName, String privateEndpointConnectionName, Context context) { - deleteAsync(vaultName, resourceGroupName, privateEndpointConnectionName, context).block(); + beginDelete(vaultName, resourceGroupName, privateEndpointConnectionName, context).getFinalResult(); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsImpl.java index d1f934121dd9..f18d98a39e62 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsClientImpl.java index 0ef8da5ba929..30182e91f5b3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -37,34 +37,43 @@ public final class PrivateEndpointsClientImpl implements PrivateEndpointsClient /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of PrivateEndpointsClientImpl. * * @param client the instance of the service client containing this operation class. */ - PrivateEndpointsClientImpl(RecoveryServicesBackupClientImpl client) { + PrivateEndpointsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(PrivateEndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientPrivateEndpoints to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientPrivateEndpoints to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientPrivateEndpoints") public interface PrivateEndpointsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}/operationsStatus/{operationId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getOperationStatus(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, + Mono> getOperationStatus(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}/operationsStatus/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getOperationStatusSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); } @@ -72,10 +81,10 @@ Mono> getOperationStatus(@HostParam("$host") Stri /** * Gets the operation status for a private endpoint connection. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param operationId Operation id. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateEndpointConnectionName The name of the PrivateEndpointConnectionResource. + * @param operationId The name of the PrivateEndpointConnectionResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -85,32 +94,10 @@ Mono> getOperationStatus(@HostParam("$host") Stri @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getOperationStatusWithResponseAsync(String vaultName, String resourceGroupName, String privateEndpointConnectionName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getOperationStatus(this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, resourceGroupName, this.client.getSubscriptionId(), privateEndpointConnectionName, + this.client.getSubscriptionId(), resourceGroupName, vaultName, privateEndpointConnectionName, operationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -118,56 +105,10 @@ private Mono> getOperationStatusWithResponseAsync /** * Gets the operation status for a private endpoint connection. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param operationId Operation id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation status for a private endpoint connection along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getOperationStatusWithResponseAsync(String vaultName, - String resourceGroupName, String privateEndpointConnectionName, String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getOperationStatus(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), privateEndpointConnectionName, operationId, accept, - context); - } - - /** - * Gets the operation status for a private endpoint connection. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param operationId Operation id. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateEndpointConnectionName The name of the PrivateEndpointConnectionResource. + * @param operationId The name of the PrivateEndpointConnectionResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -183,10 +124,10 @@ private Mono getOperationStatusAsync(String vaultName, Str /** * Gets the operation status for a private endpoint connection. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param operationId Operation id. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateEndpointConnectionName The name of the PrivateEndpointConnectionResource. + * @param operationId The name of the PrivateEndpointConnectionResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -196,17 +137,19 @@ private Mono getOperationStatusAsync(String vaultName, Str @ServiceMethod(returns = ReturnType.SINGLE) public Response getOperationStatusWithResponse(String vaultName, String resourceGroupName, String privateEndpointConnectionName, String operationId, Context context) { - return getOperationStatusWithResponseAsync(vaultName, resourceGroupName, privateEndpointConnectionName, - operationId, context).block(); + final String accept = "application/json"; + return service.getOperationStatusSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, privateEndpointConnectionName, operationId, + accept, context); } /** * Gets the operation status for a private endpoint connection. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param operationId Operation id. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateEndpointConnectionName The name of the PrivateEndpointConnectionResource. + * @param operationId The name of the PrivateEndpointConnectionResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsImpl.java index 519795564371..b2a2db2d4be3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainerResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainerResourceImpl.java index ed75d64db20b..21e0fa3df3e3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainerResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainerResourceImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectableContainerResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainer; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainerResource; @@ -46,12 +47,16 @@ public Map tags() { } } + public String eTag() { + return this.innerModel().eTag(); + } + public ProtectableContainer properties() { return this.innerModel().properties(); } - public String etag() { - return this.innerModel().etag(); + public SystemData systemData() { + return this.innerModel().systemData(); } public ProtectableContainerResourceInner innerModel() { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersClientImpl.java index 7f2753f7d2ba..f69597313a3b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectableContainersClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectableContainerResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainerResourceList; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectableContainerResourceList; import reactor.core.publisher.Mono; /** @@ -42,50 +42,52 @@ public final class ProtectableContainersClientImpl implements ProtectableContain /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ProtectableContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ProtectableContainersClientImpl(RecoveryServicesBackupClientImpl client) { + ProtectableContainersClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ProtectableContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientProtectableContainers to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientProtectableContainers to be + * used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientProtectableContainers") public interface ProtectableContainersService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectableContainers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); } /** * Lists the containers that can be registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName The fabricName parameter. * @param filter OData filter options. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -97,30 +99,12 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String vaultName, String resourceGroupName, String fabricName, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, this.client.getSubscriptionId(), fabricName, filter, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -128,53 +112,26 @@ private Mono> listSinglePageAsy * Lists the containers that can be registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName The fabricName parameter. * @param filter OData filter options. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectableContainer resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of ProtectableContainer resources as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String vaultName, - String resourceGroupName, String fabricName, String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String vaultName, String resourceGroupName, + String fabricName, String filter) { + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, fabricName, filter)); } /** * Lists the containers that can be registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName The fabricName parameter. - * @param filter OData filter options. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -182,55 +139,63 @@ private Mono> listSinglePageAsy */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String vaultName, String resourceGroupName, - String fabricName, String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, fabricName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); + String fabricName) { + final String filter = null; + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, fabricName, filter)); } /** * Lists the containers that can be registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName The fabricName parameter. + * @param filter OData filter options. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectableContainer resources as paginated response with {@link PagedFlux}. + * @return list of ProtectableContainer resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, - String fabricName) { - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, fabricName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, + String fabricName, String filter) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), fabricName, filter, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Lists the containers that can be registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName The fabricName parameter. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectableContainer resources as paginated response with {@link PagedFlux}. + * @return list of ProtectableContainer resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, String fabricName, String filter, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, fabricName, filter, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), fabricName, filter, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Lists the containers that can be registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName The fabricName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -241,14 +206,14 @@ private PagedFlux listAsync(String vaultName, public PagedIterable list(String vaultName, String resourceGroupName, String fabricName) { final String filter = null; - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, fabricName, filter)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, fabricName, filter)); } /** * Lists the containers that can be registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName The fabricName parameter. * @param filter OData filter options. * @param context The context to associate with this operation. @@ -260,60 +225,6 @@ public PagedIterable list(String vaultName, S @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String vaultName, String resourceGroupName, String fabricName, String filter, Context context) { - return new PagedIterable<>(listAsync(vaultName, resourceGroupName, fabricName, filter, 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 list of ProtectableContainer resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ProtectableContainer resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, fabricName, filter, context)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersImpl.java index 301c94d97b00..ca38ac659f39 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsClientImpl.java index c057ba16e4f1..5d208843b503 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -37,47 +37,58 @@ public final class ProtectedItemOperationResultsClientImpl implements ProtectedI /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ProtectedItemOperationResultsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ProtectedItemOperationResultsClientImpl(RecoveryServicesBackupClientImpl client) { + ProtectedItemOperationResultsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ProtectedItemOperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientProtectedItemOperationResults to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientProtectedItemOperationResults + * to be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientProtectedItemOperationResults") public interface ProtectedItemOperationResultsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @PathParam("protectedItemName") String protectedItemName, - @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationResults/{operationId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, Context context); } /** * Fetches the result of any operation on the backup item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param protectedItemName The name of the ProtectedItemResource. + * @param operationId The name of the ProtectedItemResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -86,104 +97,23 @@ Mono> get(@HostParam("$host") String endpoi @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, - operationId, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, + protectedItemName, operationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Fetches the result of any operation on the backup item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID which represents the operation whose result needs to be fetched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for backup items along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, - String fabricName, String containerName, String protectedItemName, String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, operationId, accept, - context); - } - - /** - * Fetches the result of any operation on the backup item. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param protectedItemName The name of the ProtectedItemResource. + * @param operationId The name of the ProtectedItemResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -199,12 +129,12 @@ private Mono getAsync(String vaultName, String resou /** * Fetches the result of any operation on the backup item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param protectedItemName The name of the ProtectedItemResource. + * @param operationId The name of the ProtectedItemResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -214,19 +144,20 @@ private Mono getAsync(String vaultName, String resou @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String operationId, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - operationId, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, fabricName, containerName, protectedItemName, operationId, accept, context); } /** * Fetches the result of any operation on the backup item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param protectedItemName The name of the ProtectedItemResource. + * @param operationId The name of the ProtectedItemResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsImpl.java index 82cee2527462..3e760a35b331 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesClientImpl.java index 0f22f4e25d85..aa740772da98 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -37,36 +37,47 @@ public final class ProtectedItemOperationStatusesClientImpl implements Protected /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ProtectedItemOperationStatusesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ProtectedItemOperationStatusesClientImpl(RecoveryServicesBackupClientImpl client) { + ProtectedItemOperationStatusesClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ProtectedItemOperationStatusesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientProtectedItemOperationStatuses to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientProtectedItemOperationStatuses + * to be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientProtectedItemOperationStatuses") public interface ProtectedItemOperationStatusesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @PathParam("protectedItemName") String protectedItemName, - @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/operationsStatus/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, Context context); } /** @@ -75,12 +86,12 @@ Mono> get(@HostParam("$host") String endpoint, * operations * create jobs. This method returns the list of jobs associated with the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID represents the operation whose status needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param protectedItemName The name of the ProtectedItemResource. + * @param operationId The name of the ProtectedItemResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -89,39 +100,11 @@ Mono> get(@HostParam("$host") String endpoint, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, - operationId, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, + protectedItemName, operationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -131,68 +114,12 @@ private Mono> getWithResponseAsync(String vaultNa * operations * create jobs. This method returns the list of jobs associated with the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID represents the operation whose status needs to be fetched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, - String fabricName, String containerName, String protectedItemName, String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, operationId, accept, - context); - } - - /** - * Fetches the status of an operation such as triggering a backup, restore. The status can be in progress, completed - * or failed. You can refer to the OperationStatus enum for all the possible states of the operation. Some - * operations - * create jobs. This method returns the list of jobs associated with the operation. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID represents the operation whose status needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param protectedItemName The name of the ProtectedItemResource. + * @param operationId The name of the ProtectedItemResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -211,12 +138,12 @@ private Mono getAsync(String vaultName, String resourceGro * operations * create jobs. This method returns the list of jobs associated with the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID represents the operation whose status needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param protectedItemName The name of the ProtectedItemResource. + * @param operationId The name of the ProtectedItemResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -226,8 +153,9 @@ private Mono getAsync(String vaultName, String resourceGro @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String operationId, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - operationId, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, fabricName, containerName, protectedItemName, operationId, accept, context); } /** @@ -236,12 +164,12 @@ public Response getWithResponse(String vaultName, String r * operations * create jobs. This method returns the list of jobs associated with the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID represents the operation whose status needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param protectedItemName The name of the ProtectedItemResource. + * @param operationId The name of the ProtectedItemResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesImpl.java index 2c673a5c9174..0001cb79682b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemResourceImpl.java index 0058813ab8c7..6aa3808b5ba3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemResourceImpl.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectedItemResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItem; @@ -30,8 +31,8 @@ public String type() { return this.innerModel().type(); } - public String location() { - return this.innerModel().location(); + public ProtectedItem properties() { + return this.innerModel().properties(); } public Map tags() { @@ -43,14 +44,18 @@ public Map tags() { } } - public ProtectedItem properties() { - return this.innerModel().properties(); + public String location() { + return this.innerModel().location(); } public String etag() { return this.innerModel().etag(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -93,18 +98,16 @@ public ProtectedItemResourceImpl withExistingProtectionContainer(String vaultNam public ProtectedItemResource create() { this.innerObject = serviceManager.serviceClient() .getProtectedItems() - .createOrUpdateWithResponse(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - this.innerModel(), Context.NONE) - .getValue(); + .createOrUpdate(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, + this.innerModel(), Context.NONE); return this; } public ProtectedItemResource create(Context context) { this.innerObject = serviceManager.serviceClient() .getProtectedItems() - .createOrUpdateWithResponse(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - this.innerModel(), context) - .getValue(); + .createOrUpdate(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, + this.innerModel(), context); return this; } @@ -122,18 +125,16 @@ public ProtectedItemResourceImpl update() { public ProtectedItemResource apply() { this.innerObject = serviceManager.serviceClient() .getProtectedItems() - .createOrUpdateWithResponse(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - this.innerModel(), Context.NONE) - .getValue(); + .createOrUpdate(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, + this.innerModel(), Context.NONE); return this; } public ProtectedItemResource apply(Context context) { this.innerObject = serviceManager.serviceClient() .getProtectedItems() - .createOrUpdateWithResponse(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - this.innerModel(), context) - .getValue(); + .createOrUpdate(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, + this.innerModel(), context); return this; } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsClientImpl.java index 616d36b6d0e9..9fa29cdd5078 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -22,10 +22,16 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectedItemResourceInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -40,58 +46,89 @@ public final class ProtectedItemsClientImpl implements ProtectedItemsClient { /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ProtectedItemsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ProtectedItemsClientImpl(RecoveryServicesBackupClientImpl client) { + ProtectedItemsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ProtectedItemsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientProtectedItems to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientProtectedItems to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientProtectedItems") public interface ProtectedItemsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @PathParam("protectedItemName") String protectedItemName, - @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @PathParam("protectedItemName") String protectedItemName, - @BodyParam("application/json") ProtectedItemResourceInner parameters, @HeaderParam("Accept") String accept, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ProtectedItemResourceInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ProtectedItemResourceInner parameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @PathParam("protectedItemName") String protectedItemName, - @HeaderParam("Accept") String accept, Context context); + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, Context context); } /** @@ -99,10 +136,10 @@ Mono> delete(@HostParam("$host") String endpoint, @QueryParam("ap * operation, * call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param protectedItemName Backed up item name whose details are to be fetched. * @param filter OData filter options. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -113,36 +150,11 @@ Mono> delete(@HostParam("$host") String endpoint, @QueryParam("ap @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, - filter, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, + protectedItemName, filter, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -151,61 +163,10 @@ private Mono> getWithResponseAsync(String v * operation, * call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item name whose details are to be fetched. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for backup items along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, - String fabricName, String containerName, String protectedItemName, String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, filter, accept, context); - } - - /** - * Provides the details of the backed up item. This is an asynchronous operation. To know the status of the - * operation, - * call the GetItemOperationResult API. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param protectedItemName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -225,10 +186,10 @@ private Mono getAsync(String vaultName, String resou * operation, * call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param protectedItemName Backed up item name whose details are to be fetched. * @param filter OData filter options. * @param context The context to associate with this operation. @@ -240,8 +201,9 @@ private Mono getAsync(String vaultName, String resou @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String filter, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, filter, - context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, fabricName, containerName, protectedItemName, filter, accept, context); } /** @@ -249,10 +211,10 @@ public Response getWithResponse(String vaultName, St * operation, * call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param protectedItemName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -271,11 +233,11 @@ public ProtectedItemResourceInner get(String vaultName, String resourceGroupName * Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an * asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Item name to be backed up. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters resource backed up item. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -283,44 +245,14 @@ public ProtectedItemResourceInner get(String vaultName, String resourceGroupName * @return base class for backup items along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String vaultName, - String resourceGroupName, String fabricName, String containerName, String protectedItemName, - ProtectedItemResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + private Mono>> createOrUpdateWithResponseAsync(String vaultName, String resourceGroupName, + String fabricName, String containerName, String protectedItemName, ProtectedItemResourceInner parameters) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, - protectedItemName, parameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, + protectedItemName, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -328,114 +260,162 @@ private Mono> createOrUpdateWithResponseAsy * Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an * asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Item name to be backed up. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters resource backed up item. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for backup items along with {@link Response} on successful completion of {@link Mono}. + * @return base class for backup items along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String vaultName, - String resourceGroupName, String fabricName, String containerName, String protectedItemName, - ProtectedItemResourceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + private Response createOrUpdateWithResponse(String vaultName, String resourceGroupName, + String fabricName, String containerName, String protectedItemName, ProtectedItemResourceInner parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, - parameters, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, protectedItemName, + contentType, accept, parameters, Context.NONE); } /** * Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an * asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Item name to be backed up. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters resource backed up item. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for backup items on successful completion of {@link Mono}. + * @return base class for backup items along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String vaultName, String resourceGroupName, - String fabricName, String containerName, String protectedItemName, ProtectedItemResourceInner parameters) { - return createOrUpdateWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, - protectedItemName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Response createOrUpdateWithResponse(String vaultName, String resourceGroupName, + String fabricName, String containerName, String protectedItemName, ProtectedItemResourceInner parameters, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, protectedItemName, + contentType, accept, parameters, context); + } + + /** + * Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an + * asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param parameters resource backed up item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 base class for backup items. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ProtectedItemResourceInner> beginCreateOrUpdateAsync( + String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, + ProtectedItemResourceInner parameters) { + Mono>> mono = createOrUpdateWithResponseAsync(vaultName, resourceGroupName, + fabricName, containerName, protectedItemName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ProtectedItemResourceInner.class, ProtectedItemResourceInner.class, + this.client.getContext()); + } + + /** + * Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an + * asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param parameters resource backed up item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of base class for backup items. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ProtectedItemResourceInner> beginCreateOrUpdate( + String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, + ProtectedItemResourceInner parameters) { + Response response = createOrUpdateWithResponse(vaultName, resourceGroupName, fabricName, + containerName, protectedItemName, parameters); + return this.client.getLroResult(response, + ProtectedItemResourceInner.class, ProtectedItemResourceInner.class, Context.NONE); } /** * Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an * asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Item name to be backed up. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters resource backed up item. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for backup items along with {@link Response}. + * @return the {@link SyncPoller} for polling of base class for backup items. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ProtectedItemResourceInner> beginCreateOrUpdate( + String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, + ProtectedItemResourceInner parameters, Context context) { + Response response = createOrUpdateWithResponse(vaultName, resourceGroupName, fabricName, + containerName, protectedItemName, parameters, context); + return this.client.getLroResult(response, + ProtectedItemResourceInner.class, ProtectedItemResourceInner.class, context); + } + + /** + * Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an + * asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param parameters resource backed up item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return base class for backup items on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String vaultName, String resourceGroupName, - String fabricName, String containerName, String protectedItemName, ProtectedItemResourceInner parameters, - Context context) { - return createOrUpdateWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, - protectedItemName, parameters, context).block(); + private Mono createOrUpdateAsync(String vaultName, String resourceGroupName, + String fabricName, String containerName, String protectedItemName, ProtectedItemResourceInner parameters) { + return beginCreateOrUpdateAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, + parameters).last().flatMap(this.client::getLroFinalResultOrError); } /** * Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an * asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Item name to be backed up. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters resource backed up item. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -445,59 +425,31 @@ public Response createOrUpdateWithResponse(String va @ServiceMethod(returns = ReturnType.SINGLE) public ProtectedItemResourceInner createOrUpdate(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, ProtectedItemResourceInner parameters) { - return createOrUpdateWithResponse(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - parameters, Context.NONE).getValue(); + return beginCreateOrUpdate(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, + parameters).getFinalResult(); } /** - * Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of - * the - * request, call the GetItemOperationResult API. + * Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an + * asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param parameters resource backed up item. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return base class for backup items. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, - String containerName, String protectedItemName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public ProtectedItemResourceInner createOrUpdate(String vaultName, String resourceGroupName, String fabricName, + String containerName, String protectedItemName, ProtectedItemResourceInner parameters, Context context) { + return beginCreateOrUpdate(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, + parameters, context).getFinalResult(); } /** @@ -505,12 +457,11 @@ private Mono> deleteWithResponseAsync(String vaultName, String re * the * request, call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item to be deleted. - * @param context The context to associate with this operation. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -518,36 +469,12 @@ private Mono> deleteWithResponseAsync(String vaultName, String re */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, - String containerName, String protectedItemName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, accept, context); + String containerName, String protectedItemName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, + protectedItemName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -555,11 +482,11 @@ private Mono> deleteWithResponseAsync(String vaultName, String re * the * request, call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -577,11 +504,11 @@ private Mono deleteAsync(String vaultName, String resourceGroupName, Strin * the * request, call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -591,8 +518,9 @@ private Mono deleteAsync(String vaultName, String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, Context context) { - return deleteWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - context).block(); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, protectedItemName, + context); } /** @@ -600,11 +528,11 @@ public Response deleteWithResponse(String vaultName, String resourceGroupN * the * request, call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsImpl.java index 19dcd5b629f1..ecd9cb9e3064 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsClientImpl.java index 195c4071fcc2..4da3d037c869 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -37,46 +37,56 @@ public final class ProtectionContainerOperationResultsClientImpl implements Prot /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ProtectionContainerOperationResultsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ProtectionContainerOperationResultsClientImpl(RecoveryServicesBackupClientImpl client) { + ProtectionContainerOperationResultsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ProtectionContainerOperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientProtectionContainerOperationResults to be - * used by the proxy service to perform REST calls. + * The interface defining all the services for + * RecoveryServicesBackupManagementClientProtectionContainerOperationResults to be used by the proxy service to + * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientProtectionContainerOperationResults") public interface ProtectionContainerOperationResultsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @PathParam("operationId") String operationId, - @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/operationResults/{operationId}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); } /** * Fetches the result of any operation on the container. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Container name whose information should be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param operationId The name of the ProtectionContainerResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -86,94 +96,22 @@ Mono> get(@HostParam("$host") String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, operationId, accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, operationId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Fetches the result of any operation on the container. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Container name whose information should be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for container with backup items along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, - String resourceGroupName, String fabricName, String containerName, String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, operationId, accept, context); - } - - /** - * Fetches the result of any operation on the container. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Container name whose information should be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param operationId The name of the ProtectionContainerResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -189,11 +127,11 @@ private Mono getAsync(String vaultName, String /** * Fetches the result of any operation on the container. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Container name whose information should be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param operationId The name of the ProtectionContainerResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -203,18 +141,19 @@ private Mono getAsync(String vaultName, String @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String fabricName, String containerName, String operationId, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, operationId, context) - .block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, fabricName, containerName, operationId, accept, context); } /** * Fetches the result of any operation on the container. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Container name whose information should be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param operationId The name of the ProtectionContainerResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsImpl.java index da6f10053ca2..bc6ecc6f25dc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsClientImpl.java index ef452f40a17a..57dccdd4a2dc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsClientImpl.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.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; @@ -38,14 +37,14 @@ public final class ProtectionContainerRefreshOperationResultsClientImpl /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ProtectionContainerRefreshOperationResultsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ProtectionContainerRefreshOperationResultsClientImpl(RecoveryServicesBackupClientImpl client) { + ProtectionContainerRefreshOperationResultsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ProtectionContainerRefreshOperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; @@ -53,27 +52,36 @@ public final class ProtectionContainerRefreshOperationResultsClientImpl /** * The interface defining all the services for - * RecoveryServicesBackupClientProtectionContainerRefreshOperationResults to be used by the proxy service to perform - * REST calls. + * RecoveryServicesBackupManagementClientProtectionContainerRefreshOperationResults to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientProtectionContainerRefreshOperationResults") public interface ProtectionContainerRefreshOperationResultsService { - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); + @PathParam("operationId") String operationId, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/operationResults/{operationId}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, + @PathParam("operationId") String operationId, Context context); } /** * Provides the result of the refresh operation triggered by the BeginRefresh operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName Fabric name associated with the container. * @param operationId Operation ID associated with the operation whose result needs to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -84,31 +92,9 @@ Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-v @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, operationId, accept, context)) + resourceGroupName, this.client.getSubscriptionId(), fabricName, operationId, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -116,50 +102,7 @@ private Mono> getWithResponseAsync(String vaultName, String resou * Provides the result of the refresh operation triggered by the BeginRefresh operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param operationId Operation ID associated with the operation whose result needs to be fetched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, - String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, operationId, accept, context); - } - - /** - * Provides the result of the refresh operation triggered by the BeginRefresh operation. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName Fabric name associated with the container. * @param operationId Operation ID associated with the operation whose result needs to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -177,7 +120,7 @@ private Mono getAsync(String vaultName, String resourceGroupName, String f * Provides the result of the refresh operation triggered by the BeginRefresh operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName Fabric name associated with the container. * @param operationId Operation ID associated with the operation whose result needs to be fetched. * @param context The context to associate with this operation. @@ -189,14 +132,15 @@ private Mono getAsync(String vaultName, String resourceGroupName, String f @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String fabricName, String operationId, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, fabricName, operationId, context).block(); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), fabricName, operationId, context); } /** * Provides the result of the refresh operation triggered by the BeginRefresh operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName Fabric name associated with the container. * @param operationId Operation ID associated with the operation whose result needs to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsImpl.java index 0c53545602d2..a0a2adb4ebb9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerResourceImpl.java index 327b150c3630..9fa6f259a84c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerResourceImpl.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; import com.azure.core.http.rest.Response; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionContainerResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionContainer; @@ -31,8 +32,8 @@ public String type() { return this.innerModel().type(); } - public String location() { - return this.innerModel().location(); + public ProtectionContainer properties() { + return this.innerModel().properties(); } public Map tags() { @@ -44,14 +45,18 @@ public Map tags() { } } - public ProtectionContainer properties() { - return this.innerModel().properties(); + public String location() { + return this.innerModel().location(); } public String etag() { return this.innerModel().etag(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersClientImpl.java index f8e392ec4aa6..cdedc90c4096 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -24,6 +24,7 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -46,84 +47,132 @@ public final class ProtectionContainersClientImpl implements ProtectionContainer /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ProtectionContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ProtectionContainersClientImpl(RecoveryServicesBackupClientImpl client) { + ProtectionContainersClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ProtectionContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientProtectionContainers to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientProtectionContainers to be used + * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientProtectionContainers") public interface ProtectionContainersService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @HeaderParam("Accept") String accept, Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> register(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, - @BodyParam("application/json") ProtectionContainerResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); + Mono>> register(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ProtectionContainerResourceInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response registerSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ProtectionContainerResourceInner parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> unregister(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @HeaderParam("Accept") String accept, Context context); + Mono> unregister(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response unregisterSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> inquire(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, + Mono> inquire(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @QueryParam("$filter") String filter, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/inquire") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response inquireSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @QueryParam("$filter") String filter, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> refresh(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> refresh(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + Response refreshSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, Context context); } /** * Gets details of the specific container registered to your Recovery Services Vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -134,84 +183,18 @@ Mono> refresh(@HostParam("$host") String endpoint, @QueryParam("a @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String containerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, accept, context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets details of the specific container registered to your Recovery Services Vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. - * @param containerName Name of the container whose details need to be fetched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of the specific container registered to your Recovery Services Vault along with {@link Response} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, - String resourceGroupName, String fabricName, String containerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, accept, context); - } - - /** - * Gets details of the specific container registered to your Recovery Services Vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -229,9 +212,9 @@ private Mono getAsync(String vaultName, String /** * Gets details of the specific container registered to your Recovery Services Vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @param containerName Name of the container whose details need to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -242,15 +225,17 @@ private Mono getAsync(String vaultName, String @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String fabricName, String containerName, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, fabricName, containerName, accept, context); } /** * Gets details of the specific container registered to your Recovery Services Vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -269,10 +254,10 @@ public ProtectionContainerResourceInner get(String vaultName, String resourceGro * of * the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container to be registered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -283,37 +268,12 @@ public ProtectionContainerResourceInner get(String vaultName, String resourceGro @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> registerWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, ProtectionContainerResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.register(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, parameters, accept, - context)) + .withContext(context -> service.register(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, contentType, + accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -323,51 +283,24 @@ private Mono>> registerWithResponseAsync(String vaultN * of * the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container to be registered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param parameters Request body for operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for container with backup items along with {@link Response} on successful completion of - * {@link Mono}. + * @return base class for container with backup items along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> registerWithResponseAsync(String vaultName, String resourceGroupName, - String fabricName, String containerName, ProtectionContainerResourceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + private Response registerWithResponse(String vaultName, String resourceGroupName, String fabricName, + String containerName, ProtectionContainerResourceInner parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.register(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, parameters, accept, context); + return service.registerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, contentType, + accept, parameters, Context.NONE); } /** @@ -376,25 +309,25 @@ private Mono>> registerWithResponseAsync(String vaultN * of * the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container to be registered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param parameters Request body for operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of base class for container with backup items. + * @return base class for container with backup items along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ProtectionContainerResourceInner> - beginRegisterAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, - ProtectionContainerResourceInner parameters) { - Mono>> mono - = registerWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ProtectionContainerResourceInner.class, - ProtectionContainerResourceInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response registerWithResponse(String vaultName, String resourceGroupName, String fabricName, + String containerName, ProtectionContainerResourceInner parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.registerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, contentType, + accept, parameters, context); } /** @@ -403,12 +336,11 @@ private Mono>> registerWithResponseAsync(String vaultN * of * the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container to be registered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @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. @@ -417,13 +349,12 @@ private Mono>> registerWithResponseAsync(String vaultN @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ProtectionContainerResourceInner> beginRegisterAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, - ProtectionContainerResourceInner parameters, Context context) { - context = this.client.mergeContext(context); + ProtectionContainerResourceInner parameters) { Mono>> mono - = registerWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, parameters, context); + = registerWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), ProtectionContainerResourceInner.class, - ProtectionContainerResourceInner.class, context); + ProtectionContainerResourceInner.class, this.client.getContext()); } /** @@ -432,10 +363,10 @@ private Mono>> registerWithResponseAsync(String vaultN * of * the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container to be registered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -446,8 +377,10 @@ private Mono>> registerWithResponseAsync(String vaultN public SyncPoller, ProtectionContainerResourceInner> beginRegister( String vaultName, String resourceGroupName, String fabricName, String containerName, ProtectionContainerResourceInner parameters) { - return this.beginRegisterAsync(vaultName, resourceGroupName, fabricName, containerName, parameters) - .getSyncPoller(); + Response response + = registerWithResponse(vaultName, resourceGroupName, fabricName, containerName, parameters); + return this.client.getLroResult(response, + ProtectionContainerResourceInner.class, ProtectionContainerResourceInner.class, Context.NONE); } /** @@ -456,10 +389,10 @@ public SyncPoller, ProtectionContai * of * the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container to be registered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -471,8 +404,10 @@ public SyncPoller, ProtectionContai public SyncPoller, ProtectionContainerResourceInner> beginRegister( String vaultName, String resourceGroupName, String fabricName, String containerName, ProtectionContainerResourceInner parameters, Context context) { - return this.beginRegisterAsync(vaultName, resourceGroupName, fabricName, containerName, parameters, context) - .getSyncPoller(); + Response response + = registerWithResponse(vaultName, resourceGroupName, fabricName, containerName, parameters, context); + return this.client.getLroResult(response, + ProtectionContainerResourceInner.class, ProtectionContainerResourceInner.class, context); } /** @@ -481,10 +416,10 @@ public SyncPoller, ProtectionContai * of * the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container to be registered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -504,34 +439,10 @@ private Mono registerAsync(String vaultName, S * of * the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container to be registered. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for container with backup items on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono registerAsync(String vaultName, String resourceGroupName, - String fabricName, String containerName, ProtectionContainerResourceInner parameters, Context context) { - return beginRegisterAsync(vaultName, resourceGroupName, fabricName, containerName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Registers the container with Recovery Services vault. - * This is an asynchronous operation. To track the operation status, use location header to call get latest status - * of - * the operation. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container to be registered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -541,7 +452,7 @@ private Mono registerAsync(String vaultName, S @ServiceMethod(returns = ReturnType.SINGLE) public ProtectionContainerResourceInner register(String vaultName, String resourceGroupName, String fabricName, String containerName, ProtectionContainerResourceInner parameters) { - return registerAsync(vaultName, resourceGroupName, fabricName, containerName, parameters).block(); + return beginRegister(vaultName, resourceGroupName, fabricName, containerName, parameters).getFinalResult(); } /** @@ -550,10 +461,10 @@ public ProtectionContainerResourceInner register(String vaultName, String resour * of * the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container to be registered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -564,7 +475,8 @@ public ProtectionContainerResourceInner register(String vaultName, String resour @ServiceMethod(returns = ReturnType.SINGLE) public ProtectionContainerResourceInner register(String vaultName, String resourceGroupName, String fabricName, String containerName, ProtectionContainerResourceInner parameters, Context context) { - return registerAsync(vaultName, resourceGroupName, fabricName, containerName, parameters, context).block(); + return beginRegister(vaultName, resourceGroupName, fabricName, containerName, parameters, context) + .getFinalResult(); } /** @@ -572,10 +484,10 @@ public ProtectionContainerResourceInner register(String vaultName, String resour * determine * whether the backend service has finished processing the request, call Get Container Operation Result API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. - * @param containerName Name of the container which needs to be unregistered from the Recovery Services Vault. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -584,32 +496,9 @@ public ProtectionContainerResourceInner register(String vaultName, String resour @ServiceMethod(returns = ReturnType.SINGLE) private Mono> unregisterWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String containerName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.unregister(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, accept, context)) + .withContext(context -> service.unregister(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -618,55 +507,10 @@ private Mono> unregisterWithResponseAsync(String vaultName, Strin * determine * whether the backend service has finished processing the request, call Get Container Operation Result API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. - * @param containerName Name of the container which needs to be unregistered from the Recovery Services Vault. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> unregisterWithResponseAsync(String vaultName, String resourceGroupName, - String fabricName, String containerName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.unregister(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, accept, context); - } - - /** - * Unregisters the given container from your Recovery Services Vault. This is an asynchronous operation. To - * determine - * whether the backend service has finished processing the request, call Get Container Operation Result API. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. - * @param containerName Name of the container which needs to be unregistered from the Recovery Services Vault. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -684,10 +528,10 @@ private Mono unregisterAsync(String vaultName, String resourceGroupName, S * determine * whether the backend service has finished processing the request, call Get Container Operation Result API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. - * @param containerName Name of the container which needs to be unregistered from the Recovery Services Vault. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -697,7 +541,8 @@ private Mono unregisterAsync(String vaultName, String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response unregisterWithResponse(String vaultName, String resourceGroupName, String fabricName, String containerName, Context context) { - return unregisterWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, context).block(); + return service.unregisterSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, context); } /** @@ -705,10 +550,10 @@ public Response unregisterWithResponse(String vaultName, String resourceGr * determine * whether the backend service has finished processing the request, call Get Container Operation Result API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. - * @param containerName Name of the container which needs to be unregistered from the Recovery Services Vault. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -719,14 +564,12 @@ public void unregister(String vaultName, String resourceGroupName, String fabric } /** - * Inquires all the protectable items under the given container. - * * This is an async operation and the results should be tracked using location header or Azure-async-url. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric Name associated with the container. - * @param containerName Name of the container in which inquiry needs to be triggered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param filter OData filter options. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -736,89 +579,18 @@ public void unregister(String vaultName, String resourceGroupName, String fabric @ServiceMethod(returns = ReturnType.SINGLE) private Mono> inquireWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.inquire(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, filter, accept, context)) + return FluxUtil.withContext(context -> service.inquire(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, filter, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Inquires all the protectable items under the given container. - * * This is an async operation and the results should be tracked using location header or Azure-async-url. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric Name associated with the container. - * @param containerName Name of the container in which inquiry needs to be triggered. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> inquireWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, - String containerName, String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.inquire(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, filter, accept, context); - } - - /** - * Inquires all the protectable items under the given container. - * - * This is an async operation and the results should be tracked using location header or Azure-async-url. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric Name associated with the container. - * @param containerName Name of the container in which inquiry needs to be triggered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -833,14 +605,12 @@ private Mono inquireAsync(String vaultName, String resourceGroupName, Stri } /** - * Inquires all the protectable items under the given container. - * * This is an async operation and the results should be tracked using location header or Azure-async-url. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric Name associated with the container. - * @param containerName Name of the container in which inquiry needs to be triggered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -851,19 +621,17 @@ private Mono inquireAsync(String vaultName, String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public Response inquireWithResponse(String vaultName, String resourceGroupName, String fabricName, String containerName, String filter, Context context) { - return inquireWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, filter, context) - .block(); + return service.inquireSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, filter, context); } /** - * Inquires all the protectable items under the given container. - * * This is an async operation and the results should be tracked using location header or Azure-async-url. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric Name associated with the container. - * @param containerName Name of the container in which inquiry needs to be triggered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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,7 +647,7 @@ public void inquire(String vaultName, String resourceGroupName, String fabricNam * asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName Fabric name associated the container. * @param filter OData filter options. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -890,28 +658,9 @@ public void inquire(String vaultName, String resourceGroupName, String fabricNam @ServiceMethod(returns = ReturnType.SINGLE) private Mono> refreshWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.refresh(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, filter, accept, context)) + resourceGroupName, this.client.getSubscriptionId(), fabricName, filter, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -920,48 +669,7 @@ private Mono> refreshWithResponseAsync(String vaultName, String r * asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated the container. - * @param filter OData filter options. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> refreshWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, - String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.refresh(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, filter, accept, context); - } - - /** - * Discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is an - * asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName Fabric name associated the container. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -980,7 +688,7 @@ private Mono refreshAsync(String vaultName, String resourceGroupName, Stri * asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName Fabric name associated the container. * @param filter OData filter options. * @param context The context to associate with this operation. @@ -992,7 +700,8 @@ private Mono refreshAsync(String vaultName, String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public Response refreshWithResponse(String vaultName, String resourceGroupName, String fabricName, String filter, Context context) { - return refreshWithResponseAsync(vaultName, resourceGroupName, fabricName, filter, context).block(); + return service.refreshSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), fabricName, filter, context); } /** @@ -1000,7 +709,7 @@ public Response refreshWithResponse(String vaultName, String resourceGroup * asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName Fabric name associated the container. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersImpl.java index 6a4ceccc697d..acbbe8e8ea3b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentResourceImpl.java index fb950b4e2c9d..58b6251a750a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentResourceImpl.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionIntentResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionIntent; @@ -30,8 +31,8 @@ public String type() { return this.innerModel().type(); } - public String location() { - return this.innerModel().location(); + public ProtectionIntent properties() { + return this.innerModel().properties(); } public Map tags() { @@ -43,14 +44,18 @@ public Map tags() { } } - public ProtectionIntent properties() { - return this.innerModel().properties(); + public String location() { + return this.innerModel().location(); } public String etag() { return this.innerModel().etag(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentsClientImpl.java index 869ecf789a14..c30b9d8cbb4d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -43,205 +43,103 @@ public final class ProtectionIntentsClientImpl implements ProtectionIntentsClien /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ProtectionIntentsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ProtectionIntentsClientImpl(RecoveryServicesBackupClientImpl client) { + ProtectionIntentsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ProtectionIntentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientProtectionIntents to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientProtectionIntents to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientProtectionIntents") public interface ProtectionIntentsService { @Headers({ "Content-Type: application/json" }) - @Post("/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> validate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("azureRegion") String azureRegion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") PreValidateEnableBackupRequest parameters, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("intentObjectName") String intentObjectName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("intentObjectName") String intentObjectName, @HeaderParam("Accept") String accept, - Context context); + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("intentObjectName") String intentObjectName, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("intentObjectName") String intentObjectName, - @BodyParam("application/json") ProtectionIntentResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("intentObjectName") String intentObjectName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ProtectionIntentResourceInner parameters, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("intentObjectName") String intentObjectName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ProtectionIntentResourceInner parameters, Context context); @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}") + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}") @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("intentObjectName") String intentObjectName, Context context); - } - - /** - * It will validate followings - * 1. Vault capacity - * 2. VM is already protected - * 3. Any VM related configuration passed in properties. - * - * @param azureRegion Azure region to hit Api. - * @param parameters Enable backup validation request on Virtual Machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response contract for enable backup validation request along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> validateWithResponseAsync(String azureRegion, - PreValidateEnableBackupRequest parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (azureRegion == null) { - return Mono.error(new IllegalArgumentException("Parameter azureRegion is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.validate(this.client.getEndpoint(), this.client.getApiVersion(), - azureRegion, this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * It will validate followings - * 1. Vault capacity - * 2. VM is already protected - * 3. Any VM related configuration passed in properties. - * - * @param azureRegion Azure region to hit Api. - * @param parameters Enable backup validation request on Virtual Machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response contract for enable backup validation request along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> validateWithResponseAsync(String azureRegion, - PreValidateEnableBackupRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (azureRegion == null) { - return Mono.error(new IllegalArgumentException("Parameter azureRegion is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validate(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion, - this.client.getSubscriptionId(), parameters, accept, context); - } + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("intentObjectName") String intentObjectName, + Context context); - /** - * It will validate followings - * 1. Vault capacity - * 2. VM is already protected - * 3. Any VM related configuration passed in properties. - * - * @param azureRegion Azure region to hit Api. - * @param parameters Enable backup validation request on Virtual Machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response contract for enable backup validation request on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateAsync(String azureRegion, - PreValidateEnableBackupRequest parameters) { - return validateWithResponseAsync(azureRegion, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/backupProtectionIntent/{intentObjectName}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("intentObjectName") String intentObjectName, + Context context); - /** - * It will validate followings - * 1. Vault capacity - * 2. VM is already protected - * 3. Any VM related configuration passed in properties. - * - * @param azureRegion Azure region to hit Api. - * @param parameters Enable backup validation request on Virtual Machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response contract for enable backup validation request along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response validateWithResponse(String azureRegion, - PreValidateEnableBackupRequest parameters, Context context) { - return validateWithResponseAsync(azureRegion, parameters, context).block(); - } + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> validate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("azureRegion") String azureRegion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PreValidateEnableBackupRequest parameters, Context context); - /** - * It will validate followings - * 1. Vault capacity - * 2. VM is already protected - * 3. Any VM related configuration passed in properties. - * - * @param azureRegion Azure region to hit Api. - * @param parameters Enable backup validation request on Virtual Machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response contract for enable backup validation request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PreValidateEnableBackupResponseInner validate(String azureRegion, - PreValidateEnableBackupRequest parameters) { - return validateWithResponse(azureRegion, parameters, Context.NONE).getValue(); + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response validateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("azureRegion") String azureRegion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PreValidateEnableBackupRequest parameters, Context context); } /** @@ -249,9 +147,9 @@ public PreValidateEnableBackupResponseInner validate(String azureRegion, * the operation, * call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @param intentObjectName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -262,32 +160,11 @@ public PreValidateEnableBackupResponseInner validate(String azureRegion, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String intentObjectName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (intentObjectName == null) { - return Mono - .error(new IllegalArgumentException("Parameter intentObjectName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, intentObjectName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, intentObjectName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -296,56 +173,9 @@ private Mono> getWithResponseAsync(Strin * the operation, * call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param intentObjectName Backed up item name whose details are to be fetched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for backup ProtectionIntent along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, - String resourceGroupName, String fabricName, String intentObjectName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (intentObjectName == null) { - return Mono - .error(new IllegalArgumentException("Parameter intentObjectName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, intentObjectName, accept, context); - } - - /** - * Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of - * the operation, - * call the GetItemOperationResult API. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @param intentObjectName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -364,9 +194,9 @@ private Mono getAsync(String vaultName, String re * the operation, * call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @param intentObjectName Backed up item name whose details are to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -377,7 +207,9 @@ private Mono getAsync(String vaultName, String re @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String fabricName, String intentObjectName, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, fabricName, intentObjectName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, fabricName, intentObjectName, accept, context); } /** @@ -385,9 +217,9 @@ public Response getWithResponse(String vaultName, * the operation, * call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @param intentObjectName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -403,10 +235,10 @@ public ProtectionIntentResourceInner get(String vaultName, String resourceGroupN /** * Create Intent for Enabling backup of an item. This is a synchronous operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param intentObjectName Intent object name. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param intentObjectName Backed up item name whose details are to be fetched. * @param parameters resource backed up item. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -418,101 +250,22 @@ public ProtectionIntentResourceInner get(String vaultName, String resourceGroupN private Mono> createOrUpdateWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String intentObjectName, ProtectionIntentResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (intentObjectName == null) { - return Mono - .error(new IllegalArgumentException("Parameter intentObjectName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, resourceGroupName, this.client.getSubscriptionId(), fabricName, intentObjectName, parameters, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, intentObjectName, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create Intent for Enabling backup of an item. This is a synchronous operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param intentObjectName Intent object name. - * @param parameters resource backed up item. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for backup ProtectionIntent along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String vaultName, - String resourceGroupName, String fabricName, String intentObjectName, ProtectionIntentResourceInner parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (intentObjectName == null) { - return Mono - .error(new IllegalArgumentException("Parameter intentObjectName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, intentObjectName, parameters, accept, - context); - } - - /** - * Create Intent for Enabling backup of an item. This is a synchronous operation. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param intentObjectName Intent object name. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param intentObjectName Backed up item name whose details are to be fetched. * @param parameters resource backed up item. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -529,10 +282,10 @@ private Mono createOrUpdateAsync(String vaultName /** * Create Intent for Enabling backup of an item. This is a synchronous operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param intentObjectName Intent object name. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param intentObjectName Backed up item name whose details are to be fetched. * @param parameters resource backed up item. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -544,17 +297,20 @@ private Mono createOrUpdateAsync(String vaultName public Response createOrUpdateWithResponse(String vaultName, String resourceGroupName, String fabricName, String intentObjectName, ProtectionIntentResourceInner parameters, Context context) { - return createOrUpdateWithResponseAsync(vaultName, resourceGroupName, fabricName, intentObjectName, parameters, - context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, intentObjectName, contentType, + accept, parameters, context); } /** * Create Intent for Enabling backup of an item. This is a synchronous operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param intentObjectName Intent object name. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param intentObjectName Backed up item name whose details are to be fetched. * @param parameters resource backed up item. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -571,10 +327,10 @@ public ProtectionIntentResourceInner createOrUpdate(String vaultName, String res /** * Used to remove intent from an item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the intent. - * @param intentObjectName Intent to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param intentObjectName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -583,84 +339,19 @@ public ProtectionIntentResourceInner createOrUpdate(String vaultName, String res @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String intentObjectName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (intentObjectName == null) { - return Mono - .error(new IllegalArgumentException("Parameter intentObjectName is required and cannot be null.")); - } return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, intentObjectName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, intentObjectName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Used to remove intent from an item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the intent. - * @param intentObjectName Intent to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, - String intentObjectName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (intentObjectName == null) { - return Mono - .error(new IllegalArgumentException("Parameter intentObjectName is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, intentObjectName, context); - } - - /** - * Used to remove intent from an item. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the intent. - * @param intentObjectName Intent to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param intentObjectName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -676,10 +367,10 @@ private Mono deleteAsync(String vaultName, String resourceGroupName, Strin /** * Used to remove intent from an item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the intent. - * @param intentObjectName Intent to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param intentObjectName Backed up item name whose details are to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -689,16 +380,17 @@ private Mono deleteAsync(String vaultName, String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String vaultName, String resourceGroupName, String fabricName, String intentObjectName, Context context) { - return deleteWithResponseAsync(vaultName, resourceGroupName, fabricName, intentObjectName, context).block(); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, intentObjectName, context); } /** * Used to remove intent from an item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the intent. - * @param intentObjectName Intent to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param intentObjectName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -707,4 +399,90 @@ public Response deleteWithResponse(String vaultName, String resourceGroupN public void delete(String vaultName, String resourceGroupName, String fabricName, String intentObjectName) { deleteWithResponse(vaultName, resourceGroupName, fabricName, intentObjectName, Context.NONE); } + + /** + * It will validate followings + * 1. Vault capacity + * 2. VM is already protected + * 3. Any VM related configuration passed in properties. + * + * @param azureRegion Azure region to hit Api. + * @param parameters Enable backup validation request on Virtual Machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response contract for enable backup validation request along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> validateWithResponseAsync(String azureRegion, + PreValidateEnableBackupRequest parameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.validate(this.client.getEndpoint(), this.client.getApiVersion(), + azureRegion, this.client.getSubscriptionId(), contentType, accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * It will validate followings + * 1. Vault capacity + * 2. VM is already protected + * 3. Any VM related configuration passed in properties. + * + * @param azureRegion Azure region to hit Api. + * @param parameters Enable backup validation request on Virtual Machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response contract for enable backup validation request on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateAsync(String azureRegion, + PreValidateEnableBackupRequest parameters) { + return validateWithResponseAsync(azureRegion, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * It will validate followings + * 1. Vault capacity + * 2. VM is already protected + * 3. Any VM related configuration passed in properties. + * + * @param azureRegion Azure region to hit Api. + * @param parameters Enable backup validation request on Virtual Machine. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response contract for enable backup validation request along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response validateWithResponse(String azureRegion, + PreValidateEnableBackupRequest parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.validateSync(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion, + this.client.getSubscriptionId(), contentType, accept, parameters, context); + } + + /** + * It will validate followings + * 1. Vault capacity + * 2. VM is already protected + * 3. Any VM related configuration passed in properties. + * + * @param azureRegion Azure region to hit Api. + * @param parameters Enable backup validation request on Virtual Machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response contract for enable backup validation request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PreValidateEnableBackupResponseInner validate(String azureRegion, + PreValidateEnableBackupRequest parameters) { + return validateWithResponse(azureRegion, parameters, Context.NONE).getValue(); + } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentsImpl.java index 965f15e6cbc3..92292f4729df 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -29,27 +29,6 @@ public ProtectionIntentsImpl(ProtectionIntentsClient innerClient, this.serviceManager = serviceManager; } - public Response validateWithResponse(String azureRegion, - PreValidateEnableBackupRequest parameters, Context context) { - Response inner - = this.serviceClient().validateWithResponse(azureRegion, parameters, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PreValidateEnableBackupResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PreValidateEnableBackupResponse validate(String azureRegion, PreValidateEnableBackupRequest parameters) { - PreValidateEnableBackupResponseInner inner = this.serviceClient().validate(azureRegion, parameters); - if (inner != null) { - return new PreValidateEnableBackupResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String vaultName, String resourceGroupName, String fabricName, String intentObjectName, Context context) { Response inner @@ -83,6 +62,27 @@ public void delete(String vaultName, String resourceGroupName, String fabricName this.serviceClient().delete(vaultName, resourceGroupName, fabricName, intentObjectName); } + public Response validateWithResponse(String azureRegion, + PreValidateEnableBackupRequest parameters, Context context) { + Response inner + = this.serviceClient().validateWithResponse(azureRegion, parameters, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PreValidateEnableBackupResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PreValidateEnableBackupResponse validate(String azureRegion, PreValidateEnableBackupRequest parameters) { + PreValidateEnableBackupResponseInner inner = this.serviceClient().validate(azureRegion, parameters); + if (inner != null) { + return new PreValidateEnableBackupResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public ProtectionIntentResource getById(String id) { String vaultName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); if (vaultName == null) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPoliciesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPoliciesClientImpl.java index 5b1979e76baa..ea2fa9539849 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPoliciesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPoliciesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -23,6 +23,7 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -45,64 +46,89 @@ public final class ProtectionPoliciesClientImpl implements ProtectionPoliciesCli /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ProtectionPoliciesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ProtectionPoliciesClientImpl(RecoveryServicesBackupClientImpl client) { + ProtectionPoliciesClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ProtectionPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientProtectionPolicies to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientProtectionPolicies to be used + * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientProtectionPolicies") public interface ProtectionPoliciesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("policyName") String policyName, - @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("policyName") String policyName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("policyName") String policyName, @HeaderParam("Accept") String accept, Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("policyName") String policyName, - @BodyParam("application/json") ProtectionPolicyResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("policyName") String policyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ProtectionPolicyResourceInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("policyName") String policyName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ProtectionPolicyResourceInner parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("policyName") String policyName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}") - @ExpectedResponses({ 200, 204 }) + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("policyName") String policyName, - @HeaderParam("Accept") String accept, Context context); + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("policyName") String policyName, Context context); } /** * Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous * operation. Status of the operation can be fetched using GetPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName Backup policy information to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -112,28 +138,10 @@ Mono>> delete(@HostParam("$host") String endpoint, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String policyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), policyName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, policyName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -141,48 +149,8 @@ private Mono> getWithResponseAsync(Strin * Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous * operation. Status of the operation can be fetched using GetPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy information to be fetched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for backup policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, - String resourceGroupName, String policyName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), policyName, accept, context); - } - - /** - * Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous - * operation. Status of the operation can be fetched using GetPolicyOperationResult API. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName Backup policy information to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -200,8 +168,8 @@ private Mono getAsync(String vaultName, String re * Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous * operation. Status of the operation can be fetched using GetPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName Backup policy information to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -212,15 +180,17 @@ private Mono getAsync(String vaultName, String re @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String policyName, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, policyName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, policyName, accept, context); } /** * Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous * operation. Status of the operation can be fetched using GetPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName Backup policy information to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -236,9 +206,9 @@ public ProtectionPolicyResourceInner get(String vaultName, String resourceGroupN * Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched * using GetPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be created. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @param parameters resource backup policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -248,33 +218,12 @@ public ProtectionPolicyResourceInner get(String vaultName, String resourceGroupN @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync(String vaultName, String resourceGroupName, String policyName, ProtectionPolicyResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, resourceGroupName, this.client.getSubscriptionId(), policyName, parameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, vaultName, policyName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -282,55 +231,9 @@ private Mono> createOrUpdateWithResponse * Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched * using GetPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be created. - * @param parameters resource backup policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for backup policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String vaultName, - String resourceGroupName, String policyName, ProtectionPolicyResourceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), policyName, parameters, accept, context); - } - - /** - * Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched - * using GetPolicyOperationResult API. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be created. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @param parameters resource backup policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -348,9 +251,9 @@ private Mono createOrUpdateAsync(String vaultName * Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched * using GetPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be created. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @param parameters resource backup policy. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -361,16 +264,20 @@ private Mono createOrUpdateAsync(String vaultName @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse(String vaultName, String resourceGroupName, String policyName, ProtectionPolicyResourceInner parameters, Context context) { - return createOrUpdateWithResponseAsync(vaultName, resourceGroupName, policyName, parameters, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, policyName, contentType, accept, parameters, + context); } /** * Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched * using GetPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be created. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @param parameters resource backup policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -389,9 +296,9 @@ public ProtectionPolicyResourceInner createOrUpdate(String vaultName, String res * the * operation can be fetched using GetProtectionPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -400,28 +307,9 @@ public ProtectionPolicyResourceInner createOrUpdate(String vaultName, String res @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String vaultName, String resourceGroupName, String policyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), policyName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, policyName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -430,40 +318,18 @@ private Mono>> deleteWithResponseAsync(String vaultNam * the * operation can be fetched using GetProtectionPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be deleted. - * @param context The context to associate with this operation. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String vaultName, String resourceGroupName, - String policyName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), policyName, accept, context); + private Response deleteWithResponse(String vaultName, String resourceGroupName, String policyName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, policyName, Context.NONE); } /** @@ -471,20 +337,20 @@ private Mono>> deleteWithResponseAsync(String vaultNam * the * operation can be fetched using GetProtectionPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String vaultName, String resourceGroupName, - String policyName) { - Mono>> mono = deleteWithResponseAsync(vaultName, resourceGroupName, policyName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String vaultName, String resourceGroupName, String policyName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, policyName, context); } /** @@ -492,10 +358,9 @@ private PollerFlux, Void> beginDeleteAsync(String vaultName, St * the * operation can be fetched using GetProtectionPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be deleted. - * @param context The context to associate with this operation. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -503,12 +368,10 @@ private PollerFlux, Void> beginDeleteAsync(String vaultName, St */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String vaultName, String resourceGroupName, - String policyName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(vaultName, resourceGroupName, policyName, context); + String policyName) { + Mono>> mono = deleteWithResponseAsync(vaultName, resourceGroupName, policyName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -516,9 +379,9 @@ private PollerFlux, Void> beginDeleteAsync(String vaultName, St * the * operation can be fetched using GetProtectionPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -527,7 +390,8 @@ private PollerFlux, Void> beginDeleteAsync(String vaultName, St @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String vaultName, String resourceGroupName, String policyName) { - return this.beginDeleteAsync(vaultName, resourceGroupName, policyName).getSyncPoller(); + Response response = deleteWithResponse(vaultName, resourceGroupName, policyName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -535,9 +399,9 @@ public SyncPoller, Void> beginDelete(String vaultName, String r * the * operation can be fetched using GetProtectionPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -547,7 +411,8 @@ public SyncPoller, Void> beginDelete(String vaultName, String r @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String vaultName, String resourceGroupName, String policyName, Context context) { - return this.beginDeleteAsync(vaultName, resourceGroupName, policyName, context).getSyncPoller(); + Response response = deleteWithResponse(vaultName, resourceGroupName, policyName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -555,9 +420,9 @@ public SyncPoller, Void> beginDelete(String vaultName, String r * the * operation can be fetched using GetProtectionPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -574,36 +439,16 @@ private Mono deleteAsync(String vaultName, String resourceGroupName, Strin * the * operation can be fetched using GetProtectionPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be deleted. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String vaultName, String resourceGroupName, String policyName, Context context) { - return beginDeleteAsync(vaultName, resourceGroupName, policyName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of - * the - * operation can be fetched using GetProtectionPolicyOperationResult API. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String vaultName, String resourceGroupName, String policyName) { - deleteAsync(vaultName, resourceGroupName, policyName).block(); + beginDelete(vaultName, resourceGroupName, policyName).getFinalResult(); } /** @@ -611,9 +456,9 @@ public void delete(String vaultName, String resourceGroupName, String policyName * the * operation can be fetched using GetProtectionPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -621,6 +466,6 @@ public void delete(String vaultName, String resourceGroupName, String policyName */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String vaultName, String resourceGroupName, String policyName, Context context) { - deleteAsync(vaultName, resourceGroupName, policyName, context).block(); + beginDelete(vaultName, resourceGroupName, policyName, context).getFinalResult(); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPoliciesImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPoliciesImpl.java index 29e09118e54c..e99fd567ec9f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPoliciesImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPoliciesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationResultsClientImpl.java index 501514431b36..a6d66752cb54 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationResultsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -37,44 +37,55 @@ public final class ProtectionPolicyOperationResultsClientImpl implements Protect /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ProtectionPolicyOperationResultsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ProtectionPolicyOperationResultsClientImpl(RecoveryServicesBackupClientImpl client) { + ProtectionPolicyOperationResultsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ProtectionPolicyOperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientProtectionPolicyOperationResults to be - * used by the proxy service to perform REST calls. + * The interface defining all the services for + * RecoveryServicesBackupManagementClientProtectionPolicyOperationResults to be used by the proxy service to perform + * REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientProtectionPolicyOperationResults") public interface ProtectionPolicyOperationResultsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("policyName") String policyName, - @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("policyName") String policyName, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operationResults/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("policyName") String policyName, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, Context context); } /** * Provides the result of an operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's result needs to be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the ProtectionPolicyResource. + * @param operationId The name of the ProtectionPolicyResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -83,84 +94,19 @@ Mono> get(@HostParam("$host") String end @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String policyName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), policyName, operationId, accept, context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, policyName, operationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Provides the result of an operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's result needs to be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for backup policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, - String resourceGroupName, String policyName, String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), policyName, operationId, accept, context); - } - - /** - * Provides the result of an operation. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's result needs to be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the ProtectionPolicyResource. + * @param operationId The name of the ProtectionPolicyResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -176,10 +122,10 @@ private Mono getAsync(String vaultName, String re /** * Provides the result of an operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's result needs to be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the ProtectionPolicyResource. + * @param operationId The name of the ProtectionPolicyResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -189,16 +135,18 @@ private Mono getAsync(String vaultName, String re @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String policyName, String operationId, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, policyName, operationId, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, policyName, operationId, accept, context); } /** * Provides the result of an operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's result needs to be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the ProtectionPolicyResource. + * @param operationId The name of the ProtectionPolicyResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationResultsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationResultsImpl.java index 3ea8a8059a16..ce658eccfc2f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationResultsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationResultsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationStatusesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationStatusesClientImpl.java index d0b8f4c854f8..574b8e56776f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationStatusesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationStatusesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -37,35 +37,46 @@ public final class ProtectionPolicyOperationStatusesClientImpl implements Protec /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ProtectionPolicyOperationStatusesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ProtectionPolicyOperationStatusesClientImpl(RecoveryServicesBackupClientImpl client) { + ProtectionPolicyOperationStatusesClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ProtectionPolicyOperationStatusesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientProtectionPolicyOperationStatuses to be - * used by the proxy service to perform REST calls. + * The interface defining all the services for + * RecoveryServicesBackupManagementClientProtectionPolicyOperationStatuses to be used by the proxy service to + * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientProtectionPolicyOperationStatuses") public interface ProtectionPolicyOperationStatusesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("policyName") String policyName, - @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("policyName") String policyName, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}/operations/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("policyName") String policyName, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, Context context); } /** @@ -74,10 +85,10 @@ Mono> get(@HostParam("$host") String endpoint, * operations * create jobs. This method returns the list of jobs associated with operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's status needs to be fetched. - * @param operationId Operation ID which represents an operation whose status needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the ProtectionPolicyResource. + * @param operationId The name of the ProtectionPolicyResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -86,31 +97,9 @@ Mono> get(@HostParam("$host") String endpoint, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String policyName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), policyName, operationId, accept, context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, policyName, operationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -120,56 +109,10 @@ private Mono> getWithResponseAsync(String vaultNa * operations * create jobs. This method returns the list of jobs associated with operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's status needs to be fetched. - * @param operationId Operation ID which represents an operation whose status needs to be fetched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, - String policyName, String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (policyName == null) { - return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), policyName, operationId, accept, context); - } - - /** - * Provides the status of the asynchronous operations like backup, restore. The status can be in progress, completed - * or failed. You can refer to the Operation Status enum for all the possible states of an operation. Some - * operations - * create jobs. This method returns the list of jobs associated with operation. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's status needs to be fetched. - * @param operationId Operation ID which represents an operation whose status needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the ProtectionPolicyResource. + * @param operationId The name of the ProtectionPolicyResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -188,10 +131,10 @@ private Mono getAsync(String vaultName, String resourceGro * operations * create jobs. This method returns the list of jobs associated with operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's status needs to be fetched. - * @param operationId Operation ID which represents an operation whose status needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the ProtectionPolicyResource. + * @param operationId The name of the ProtectionPolicyResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -201,7 +144,9 @@ private Mono getAsync(String vaultName, String resourceGro @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String policyName, String operationId, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, policyName, operationId, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, policyName, operationId, accept, context); } /** @@ -210,10 +155,10 @@ public Response getWithResponse(String vaultName, String r * operations * create jobs. This method returns the list of jobs associated with operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's status needs to be fetched. - * @param operationId Operation ID which represents an operation whose status needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the ProtectionPolicyResource. + * @param operationId The name of the ProtectionPolicyResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationStatusesImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationStatusesImpl.java index 54b094e29354..ac5e48cad53e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationStatusesImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationStatusesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyResourceImpl.java index 1b598d2fa0ce..e2906fac43e5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyResourceImpl.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionPolicyResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionPolicy; @@ -30,8 +31,8 @@ public String type() { return this.innerModel().type(); } - public String location() { - return this.innerModel().location(); + public ProtectionPolicy properties() { + return this.innerModel().properties(); } public Map tags() { @@ -43,14 +44,18 @@ public Map tags() { } } - public ProtectionPolicy properties() { - return this.innerModel().properties(); + public String location() { + return this.innerModel().location(); } public String etag() { return this.innerModel().etag(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointResourceImpl.java index 213209c3795e..51c299945ae1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointResourceImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.RecoveryPointResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPoint; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointResource; @@ -33,8 +34,8 @@ public String type() { return this.innerModel().type(); } - public String location() { - return this.innerModel().location(); + public RecoveryPoint properties() { + return this.innerModel().properties(); } public Map tags() { @@ -46,14 +47,18 @@ public Map tags() { } } - public RecoveryPoint properties() { - return this.innerModel().properties(); + public String location() { + return this.innerModel().location(); } public String etag() { return this.innerModel().etag(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public RecoveryPointResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsClientImpl.java index f8f53ca8d085..1abd979c12cc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsClientImpl.java @@ -1,15 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; +import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -27,7 +29,8 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.RecoveryPointResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointResourceList; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.RecoveryPointResourceList; +import com.azure.resourcemanager.recoveryservicesbackup.models.UpdateRecoveryPointRequest; import reactor.core.publisher.Mono; /** @@ -42,121 +45,205 @@ public final class RecoveryPointsClientImpl implements RecoveryPointsClient { /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of RecoveryPointsClientImpl. * * @param client the instance of the service client containing this operation class. */ - RecoveryPointsClientImpl(RecoveryServicesBackupClientImpl client) { + RecoveryPointsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(RecoveryPointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientRecoveryPoints to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientRecoveryPoints to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientRecoveryPoints") public interface RecoveryPointsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @PathParam("protectedItemName") String protectedItemName, - @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, + @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @PathParam("protectedItemName") String protectedItemName, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, + @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateRecoveryPointRequest parameters, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, + @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") UpdateRecoveryPointRequest parameters, + Context context); } /** - * Lists the backup copies for the backed up item. + * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous + * operation. + * To know the status of the operation, call the GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item whose backup copies are to be fetched. - * @param filter OData filter options. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RecoveryPoint resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return base class for backup copies along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String vaultName, - String resourceGroupName, String fabricName, String containerName, String protectedItemName, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, + String fabricName, String containerName, String protectedItemName, String recoveryPointId) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, - filter, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, + protectedItemName, recoveryPointId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous + * operation. + * To know the status of the operation, call the GetProtectedItemOperationResult API. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return base class for backup copies on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String vaultName, String resourceGroupName, String fabricName, + String containerName, String protectedItemName, String recoveryPointId) { + return getWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, + recoveryPointId).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous + * operation. + * To know the status of the operation, call the GetProtectedItemOperationResult API. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return base class for backup copies along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String vaultName, String resourceGroupName, + String fabricName, String containerName, String protectedItemName, String recoveryPointId, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, fabricName, containerName, protectedItemName, recoveryPointId, accept, + context); + } + + /** + * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous + * operation. + * To know the status of the operation, call the GetProtectedItemOperationResult API. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return base class for backup copies. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RecoveryPointResourceInner get(String vaultName, String resourceGroupName, String fabricName, + String containerName, String protectedItemName, String recoveryPointId) { + return getWithResponse(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, + recoveryPointId, Context.NONE).getValue(); + } + /** * Lists the backup copies for the backed up item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item whose backup copies are to be fetched. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param filter OData filter options. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -165,50 +252,25 @@ private Mono> listSinglePageAsync(Stri */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String vaultName, - String resourceGroupName, String fabricName, String containerName, String protectedItemName, String filter, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } + String resourceGroupName, String fabricName, String containerName, String protectedItemName, String filter) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, + protectedItemName, filter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the backup copies for the backed up item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item whose backup copies are to be fetched. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param filter OData filter options. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -219,17 +281,17 @@ private Mono> listSinglePageAsync(Stri private PagedFlux listAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String filter) { return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, fabricName, containerName, - protectedItemName, filter), nextLink -> listNextSinglePageAsync(nextLink)); + protectedItemName, filter)); } /** * Lists the backup copies for the backed up item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item whose backup copies are to be fetched. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -240,39 +302,68 @@ private PagedFlux listAsync(String vaultName, String String fabricName, String containerName, String protectedItemName) { final String filter = null; return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, fabricName, containerName, - protectedItemName, filter), nextLink -> listNextSinglePageAsync(nextLink)); + protectedItemName, filter)); } /** * Lists the backup copies for the backed up item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item whose backup copies are to be fetched. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param filter OData filter options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of RecoveryPoint resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, + String fabricName, String containerName, String protectedItemName, String filter) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, + containerName, protectedItemName, filter, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); + } + + /** + * Lists the backup copies for the backed up item. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RecoveryPoint resources as paginated response with {@link PagedFlux}. + * @return list of RecoveryPoint resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String filter, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, fabricName, containerName, - protectedItemName, filter, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, fabricName, containerName, protectedItemName, filter, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Lists the backup copies for the backed up item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item whose backup copies are to be fetched. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -283,17 +374,17 @@ public PagedIterable list(String vaultName, String r String containerName, String protectedItemName) { final String filter = null; return new PagedIterable<>( - listAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, filter)); + () -> listSinglePage(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, filter)); } /** * Lists the backup copies for the backed up item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item whose backup copies are to be fetched. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -304,156 +395,70 @@ public PagedIterable list(String vaultName, String r @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String filter, Context context) { - return new PagedIterable<>( - listAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, filter, context)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, fabricName, containerName, + protectedItemName, filter, context)); } /** - * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous - * operation. - * To know the status of the operation, call the GetProtectedItemOperationResult API. + * UpdateRecoveryPoint to update recovery point for given RecoveryPointID. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with backed up item. - * @param containerName Container name associated with backed up item. - * @param protectedItemName Backed up item name whose backup data needs to be fetched. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the VaultResource. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. + * @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 base class for backup copies along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, - String fabricName, String containerName, String protectedItemName, String recoveryPointId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (recoveryPointId == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPointId is required and cannot be null.")); - } + private Mono> updateWithResponseAsync(String resourceGroupName, + String vaultName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, + UpdateRecoveryPointRequest parameters) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, - recoveryPointId, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, + protectedItemName, recoveryPointId, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous - * operation. - * To know the status of the operation, call the GetProtectedItemOperationResult API. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with backed up item. - * @param containerName Container name associated with backed up item. - * @param protectedItemName Backed up item name whose backup data needs to be fetched. - * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return base class for backup copies along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, - String fabricName, String containerName, String protectedItemName, String recoveryPointId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (recoveryPointId == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPointId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, recoveryPointId, accept, - context); - } - - /** - * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous - * operation. - * To know the status of the operation, call the GetProtectedItemOperationResult API. + * UpdateRecoveryPoint to update recovery point for given RecoveryPointID. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with backed up item. - * @param containerName Container name associated with backed up item. - * @param protectedItemName Backed up item name whose backup data needs to be fetched. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the VaultResource. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. + * @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 base class for backup copies on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String vaultName, String resourceGroupName, String fabricName, - String containerName, String protectedItemName, String recoveryPointId) { - return getWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - recoveryPointId).flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono updateAsync(String resourceGroupName, String vaultName, String fabricName, + String containerName, String protectedItemName, String recoveryPointId, UpdateRecoveryPointRequest parameters) { + return updateWithResponseAsync(resourceGroupName, vaultName, fabricName, containerName, protectedItemName, + recoveryPointId, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous - * operation. - * To know the status of the operation, call the GetProtectedItemOperationResult API. + * UpdateRecoveryPoint to update recovery point for given RecoveryPointID. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with backed up item. - * @param containerName Container name associated with backed up item. - * @param protectedItemName Backed up item name whose backup data needs to be fetched. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the VaultResource. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. + * @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. @@ -461,85 +466,35 @@ private Mono getAsync(String vaultName, String resou * @return base class for backup copies along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String vaultName, String resourceGroupName, - String fabricName, String containerName, String protectedItemName, String recoveryPointId, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - recoveryPointId, context).block(); + public Response updateWithResponse(String resourceGroupName, String vaultName, + String fabricName, String containerName, String protectedItemName, String recoveryPointId, + UpdateRecoveryPointRequest parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, protectedItemName, + recoveryPointId, contentType, accept, parameters, context); } /** - * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous - * operation. - * To know the status of the operation, call the GetProtectedItemOperationResult API. + * UpdateRecoveryPoint to update recovery point for given RecoveryPointID. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with backed up item. - * @param containerName Container name associated with backed up item. - * @param protectedItemName Backed up item name whose backup data needs to be fetched. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the VaultResource. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. + * @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 base class for backup copies. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RecoveryPointResourceInner get(String vaultName, String resourceGroupName, String fabricName, - String containerName, String protectedItemName, String recoveryPointId) { - return getWithResponse(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - recoveryPointId, Context.NONE).getValue(); - } - - /** - * 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 list of RecoveryPoint resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RecoveryPoint resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + public RecoveryPointResourceInner update(String resourceGroupName, String vaultName, String fabricName, + String containerName, String protectedItemName, String recoveryPointId, UpdateRecoveryPointRequest parameters) { + return updateWithResponse(resourceGroupName, vaultName, fabricName, containerName, protectedItemName, + recoveryPointId, parameters, Context.NONE).getValue(); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsImpl.java index b06e1487ecba..1341afced6da 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -13,6 +13,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.RecoveryPointResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointResource; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPoints; +import com.azure.resourcemanager.recoveryservicesbackup.models.UpdateRecoveryPointRequest; public final class RecoveryPointsImpl implements RecoveryPoints { private static final ClientLogger LOGGER = new ClientLogger(RecoveryPointsImpl.class); @@ -27,6 +28,30 @@ public RecoveryPointsImpl(RecoveryPointsClient innerClient, this.serviceManager = serviceManager; } + public Response getWithResponse(String vaultName, String resourceGroupName, + String fabricName, String containerName, String protectedItemName, String recoveryPointId, Context context) { + Response inner = this.serviceClient() + .getWithResponse(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, + recoveryPointId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RecoveryPointResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RecoveryPointResource get(String vaultName, String resourceGroupName, String fabricName, + String containerName, String protectedItemName, String recoveryPointId) { + RecoveryPointResourceInner inner = this.serviceClient() + .get(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId); + if (inner != null) { + return new RecoveryPointResourceImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable list(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName) { PagedIterable inner @@ -41,11 +66,12 @@ public PagedIterable list(String vaultName, String resour return ResourceManagerUtils.mapPage(inner, inner1 -> new RecoveryPointResourceImpl(inner1, this.manager())); } - public Response getWithResponse(String vaultName, String resourceGroupName, - String fabricName, String containerName, String protectedItemName, String recoveryPointId, Context context) { + public Response updateWithResponse(String resourceGroupName, String vaultName, + String fabricName, String containerName, String protectedItemName, String recoveryPointId, + UpdateRecoveryPointRequest parameters, Context context) { Response inner = this.serviceClient() - .getWithResponse(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - recoveryPointId, context); + .updateWithResponse(resourceGroupName, vaultName, fabricName, containerName, protectedItemName, + recoveryPointId, parameters, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new RecoveryPointResourceImpl(inner.getValue(), this.manager())); @@ -54,10 +80,11 @@ public Response getWithResponse(String vaultName, String } } - public RecoveryPointResource get(String vaultName, String resourceGroupName, String fabricName, - String containerName, String protectedItemName, String recoveryPointId) { + public RecoveryPointResource update(String resourceGroupName, String vaultName, String fabricName, + String containerName, String protectedItemName, String recoveryPointId, UpdateRecoveryPointRequest parameters) { RecoveryPointResourceInner inner = this.serviceClient() - .get(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId); + .update(resourceGroupName, vaultName, fabricName, containerName, protectedItemName, recoveryPointId, + parameters); if (inner != null) { return new RecoveryPointResourceImpl(inner, this.manager()); } else { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsRecommendedForMovesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsRecommendedForMovesClientImpl.java index b4e660019167..98f2640ed47d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsRecommendedForMovesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsRecommendedForMovesClientImpl.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; @@ -29,8 +28,8 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsRecommendedForMovesClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.RecoveryPointResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.RecoveryPointResourceList; import com.azure.resourcemanager.recoveryservicesbackup.models.ListRecoveryPointsRecommendedForMoveRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointResourceList; import reactor.core.publisher.Mono; /** @@ -45,55 +44,58 @@ public final class RecoveryPointsRecommendedForMovesClientImpl implements Recove /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of RecoveryPointsRecommendedForMovesClientImpl. * * @param client the instance of the service client containing this operation class. */ - RecoveryPointsRecommendedForMovesClientImpl(RecoveryServicesBackupClientImpl client) { + RecoveryPointsRecommendedForMovesClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(RecoveryPointsRecommendedForMovesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientRecoveryPointsRecommendedForMoves to be - * used by the proxy service to perform REST calls. + * The interface defining all the services for + * RecoveryServicesBackupManagementClientRecoveryPointsRecommendedForMoves to be used by the proxy service to + * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientRecoveryPointsRecommendedForMoves") public interface RecoveryPointsRecommendedForMovesService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPointsRecommendedForMove") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @PathParam("protectedItemName") String protectedItemName, - @BodyParam("application/json") ListRecoveryPointsRecommendedForMoveRequest parameters, - @HeaderParam("Accept") String accept, Context context); + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ListRecoveryPointsRecommendedForMoveRequest parameters, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPointsRecommendedForMove") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ListRecoveryPointsRecommendedForMoveRequest parameters, Context context); } /** * Lists the recovery points recommended for move to another tier. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters List Recovery points Recommended for Move Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -105,157 +107,99 @@ Mono> listNext( private Mono> listSinglePageAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, ListRecoveryPointsRecommendedForMoveRequest parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, - parameters, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, + protectedItemName, accept, parameters, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the recovery points recommended for move to another tier. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters List Recovery points Recommended for Move Request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RecoveryPoint resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return list of RecoveryPoint resources as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String vaultName, - String resourceGroupName, String fabricName, String containerName, String protectedItemName, - ListRecoveryPointsRecommendedForMoveRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, parameters, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String vaultName, String resourceGroupName, + String fabricName, String containerName, String protectedItemName, + ListRecoveryPointsRecommendedForMoveRequest parameters) { + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, fabricName, containerName, + protectedItemName, parameters)); } /** * Lists the recovery points recommended for move to another tier. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters List Recovery points Recommended for Move Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RecoveryPoint resources as paginated response with {@link PagedFlux}. + * @return list of RecoveryPoint resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, ListRecoveryPointsRecommendedForMoveRequest parameters) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, fabricName, containerName, - protectedItemName, parameters), nextLink -> listNextSinglePageAsync(nextLink)); + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, + containerName, protectedItemName, accept, parameters, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Lists the recovery points recommended for move to another tier. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters List Recovery points Recommended for Move Request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RecoveryPoint resources as paginated response with {@link PagedFlux}. + * @return list of RecoveryPoint resources along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String vaultName, String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, ListRecoveryPointsRecommendedForMoveRequest parameters, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName, fabricName, containerName, - protectedItemName, parameters, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, + containerName, protectedItemName, accept, parameters, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); } /** * Lists the recovery points recommended for move to another tier. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters List Recovery points Recommended for Move Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -265,18 +209,18 @@ private PagedFlux listAsync(String vaultName, String @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, ListRecoveryPointsRecommendedForMoveRequest parameters) { - return new PagedIterable<>( - listAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, fabricName, containerName, + protectedItemName, parameters)); } /** * Lists the recovery points recommended for move to another tier. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters List Recovery points Recommended for Move Request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -288,60 +232,7 @@ public PagedIterable list(String vaultName, String r public PagedIterable list(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, ListRecoveryPointsRecommendedForMoveRequest parameters, Context context) { - return new PagedIterable<>( - listAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters, 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 list of RecoveryPoint resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of RecoveryPoint resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, fabricName, containerName, + protectedItemName, parameters, context)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsRecommendedForMovesImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsRecommendedForMovesImpl.java index f8c97f5e6d1c..00721b4272a8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsRecommendedForMovesImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsRecommendedForMovesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupClientBuilder.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupManagementClientBuilder.java similarity index 61% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupClientBuilder.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupManagementClientBuilder.java index 3de0126266a9..b87487037d16 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupClientBuilder.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -15,39 +15,39 @@ import java.time.Duration; /** - * A builder for creating a new instance of the RecoveryServicesBackupClientImpl type. + * A builder for creating a new instance of the RecoveryServicesBackupManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = { RecoveryServicesBackupClientImpl.class }) -public final class RecoveryServicesBackupClientBuilder { +@ServiceClientBuilder(serviceClients = { RecoveryServicesBackupManagementClientImpl.class }) +public final class RecoveryServicesBackupManagementClientBuilder { /* - * The subscription Id. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The subscription Id. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. - * @return the RecoveryServicesBackupClientBuilder. + * @param endpoint the endpoint value. + * @return the RecoveryServicesBackupManagementClientBuilder. */ - public RecoveryServicesBackupClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public RecoveryServicesBackupManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. - * @return the RecoveryServicesBackupClientBuilder. + * @param subscriptionId the subscriptionId value. + * @return the RecoveryServicesBackupManagementClientBuilder. */ - public RecoveryServicesBackupClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public RecoveryServicesBackupManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -60,9 +60,9 @@ public RecoveryServicesBackupClientBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the RecoveryServicesBackupClientBuilder. + * @return the RecoveryServicesBackupManagementClientBuilder. */ - public RecoveryServicesBackupClientBuilder environment(AzureEnvironment environment) { + public RecoveryServicesBackupManagementClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public RecoveryServicesBackupClientBuilder environment(AzureEnvironment environm * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the RecoveryServicesBackupClientBuilder. + * @return the RecoveryServicesBackupManagementClientBuilder. */ - public RecoveryServicesBackupClientBuilder pipeline(HttpPipeline pipeline) { + public RecoveryServicesBackupManagementClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -92,9 +92,9 @@ public RecoveryServicesBackupClientBuilder pipeline(HttpPipeline pipeline) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the RecoveryServicesBackupClientBuilder. + * @return the RecoveryServicesBackupManagementClientBuilder. */ - public RecoveryServicesBackupClientBuilder defaultPollInterval(Duration defaultPollInterval) { + public RecoveryServicesBackupManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -108,19 +108,19 @@ public RecoveryServicesBackupClientBuilder defaultPollInterval(Duration defaultP * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the RecoveryServicesBackupClientBuilder. + * @return the RecoveryServicesBackupManagementClientBuilder. */ - public RecoveryServicesBackupClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public RecoveryServicesBackupManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of RecoveryServicesBackupClientImpl with the provided parameters. + * Builds an instance of RecoveryServicesBackupManagementClientImpl with the provided parameters. * - * @return an instance of RecoveryServicesBackupClientImpl. + * @return an instance of RecoveryServicesBackupManagementClientImpl. */ - public RecoveryServicesBackupClientImpl buildClient() { + public RecoveryServicesBackupManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) @@ -131,8 +131,9 @@ public RecoveryServicesBackupClientImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - RecoveryServicesBackupClientImpl client = new RecoveryServicesBackupClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + RecoveryServicesBackupManagementClientImpl client + = new RecoveryServicesBackupManagementClientImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupManagementClientImpl.java similarity index 95% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupClientImpl.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupManagementClientImpl.java index 85cbbf62a726..e43173d1ed46 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -15,12 +15,15 @@ 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.SyncPollerFactory; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupEnginesClient; @@ -67,8 +70,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPolicyOperationStatusesClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsRecommendedForMovesClient; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryServicesBackupClient; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxiesClient; +import com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryServicesBackupManagementClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.RestoresClient; @@ -87,31 +89,17 @@ import reactor.core.publisher.Mono; /** - * Initializes a new instance of the RecoveryServicesBackupClientImpl type. + * Initializes a new instance of the RecoveryServicesBackupManagementClientImpl type. */ -@ServiceClient(builder = RecoveryServicesBackupClientBuilder.class) -public final class RecoveryServicesBackupClientImpl implements RecoveryServicesBackupClient { +@ServiceClient(builder = RecoveryServicesBackupManagementClientBuilder.class) +public final class RecoveryServicesBackupManagementClientImpl implements RecoveryServicesBackupManagementClient { /** - * The subscription Id. - */ - private final String subscriptionId; - - /** - * Gets The subscription Id. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -120,12 +108,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -133,6 +121,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -176,213 +178,199 @@ public Duration getDefaultPollInterval() { } /** - * The BackupResourceStorageConfigsNonCrrsClient object to access its operations. - */ - private final BackupResourceStorageConfigsNonCrrsClient backupResourceStorageConfigsNonCrrs; - - /** - * Gets the BackupResourceStorageConfigsNonCrrsClient object to access its operations. - * - * @return the BackupResourceStorageConfigsNonCrrsClient object. - */ - public BackupResourceStorageConfigsNonCrrsClient getBackupResourceStorageConfigsNonCrrs() { - return this.backupResourceStorageConfigsNonCrrs; - } - - /** - * The ProtectionIntentsClient object to access its operations. + * The ResourceProvidersClient object to access its operations. */ - private final ProtectionIntentsClient protectionIntents; + private final ResourceProvidersClient resourceProviders; /** - * Gets the ProtectionIntentsClient object to access its operations. + * Gets the ResourceProvidersClient object to access its operations. * - * @return the ProtectionIntentsClient object. + * @return the ResourceProvidersClient object. */ - public ProtectionIntentsClient getProtectionIntents() { - return this.protectionIntents; + public ResourceProvidersClient getResourceProviders() { + return this.resourceProviders; } /** - * The BackupStatusClient object to access its operations. + * The OperationsClient object to access its operations. */ - private final BackupStatusClient backupStatus; + private final OperationsClient operations; /** - * Gets the BackupStatusClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the BackupStatusClient object. + * @return the OperationsClient object. */ - public BackupStatusClient getBackupStatus() { - return this.backupStatus; + public OperationsClient getOperations() { + return this.operations; } /** - * The FeatureSupportsClient object to access its operations. + * The BackupResourceStorageConfigsNonCrrsClient object to access its operations. */ - private final FeatureSupportsClient featureSupports; + private final BackupResourceStorageConfigsNonCrrsClient backupResourceStorageConfigsNonCrrs; /** - * Gets the FeatureSupportsClient object to access its operations. + * Gets the BackupResourceStorageConfigsNonCrrsClient object to access its operations. * - * @return the FeatureSupportsClient object. + * @return the BackupResourceStorageConfigsNonCrrsClient object. */ - public FeatureSupportsClient getFeatureSupports() { - return this.featureSupports; + public BackupResourceStorageConfigsNonCrrsClient getBackupResourceStorageConfigsNonCrrs() { + return this.backupResourceStorageConfigsNonCrrs; } /** - * The BackupProtectionIntentsClient object to access its operations. + * The BmsPrepareDataMoveOperationResultsClient object to access its operations. */ - private final BackupProtectionIntentsClient backupProtectionIntents; + private final BmsPrepareDataMoveOperationResultsClient bmsPrepareDataMoveOperationResults; /** - * Gets the BackupProtectionIntentsClient object to access its operations. + * Gets the BmsPrepareDataMoveOperationResultsClient object to access its operations. * - * @return the BackupProtectionIntentsClient object. + * @return the BmsPrepareDataMoveOperationResultsClient object. */ - public BackupProtectionIntentsClient getBackupProtectionIntents() { - return this.backupProtectionIntents; + public BmsPrepareDataMoveOperationResultsClient getBmsPrepareDataMoveOperationResults() { + return this.bmsPrepareDataMoveOperationResults; } /** - * The BackupUsageSummariesClient object to access its operations. + * The BackupResourceVaultConfigsClient object to access its operations. */ - private final BackupUsageSummariesClient backupUsageSummaries; + private final BackupResourceVaultConfigsClient backupResourceVaultConfigs; /** - * Gets the BackupUsageSummariesClient object to access its operations. + * Gets the BackupResourceVaultConfigsClient object to access its operations. * - * @return the BackupUsageSummariesClient object. + * @return the BackupResourceVaultConfigsClient object. */ - public BackupUsageSummariesClient getBackupUsageSummaries() { - return this.backupUsageSummaries; + public BackupResourceVaultConfigsClient getBackupResourceVaultConfigs() { + return this.backupResourceVaultConfigs; } /** - * The OperationsClient object to access its operations. + * The BackupResourceEncryptionConfigsClient object to access its operations. */ - private final OperationsClient operations; + private final BackupResourceEncryptionConfigsClient backupResourceEncryptionConfigs; /** - * Gets the OperationsClient object to access its operations. + * Gets the BackupResourceEncryptionConfigsClient object to access its operations. * - * @return the OperationsClient object. + * @return the BackupResourceEncryptionConfigsClient object. */ - public OperationsClient getOperations() { - return this.operations; + public BackupResourceEncryptionConfigsClient getBackupResourceEncryptionConfigs() { + return this.backupResourceEncryptionConfigs; } /** - * The BackupResourceVaultConfigsClient object to access its operations. + * The ProtectedItemsClient object to access its operations. */ - private final BackupResourceVaultConfigsClient backupResourceVaultConfigs; + private final ProtectedItemsClient protectedItems; /** - * Gets the BackupResourceVaultConfigsClient object to access its operations. + * Gets the ProtectedItemsClient object to access its operations. * - * @return the BackupResourceVaultConfigsClient object. + * @return the ProtectedItemsClient object. */ - public BackupResourceVaultConfigsClient getBackupResourceVaultConfigs() { - return this.backupResourceVaultConfigs; + public ProtectedItemsClient getProtectedItems() { + return this.protectedItems; } /** - * The BackupResourceEncryptionConfigsClient object to access its operations. + * The BackupsClient object to access its operations. */ - private final BackupResourceEncryptionConfigsClient backupResourceEncryptionConfigs; + private final BackupsClient backups; /** - * Gets the BackupResourceEncryptionConfigsClient object to access its operations. + * Gets the BackupsClient object to access its operations. * - * @return the BackupResourceEncryptionConfigsClient object. + * @return the BackupsClient object. */ - public BackupResourceEncryptionConfigsClient getBackupResourceEncryptionConfigs() { - return this.backupResourceEncryptionConfigs; + public BackupsClient getBackups() { + return this.backups; } /** - * The PrivateEndpointConnectionsClient object to access its operations. + * The RecoveryPointsRecommendedForMovesClient object to access its operations. */ - private final PrivateEndpointConnectionsClient privateEndpointConnections; + private final RecoveryPointsRecommendedForMovesClient recoveryPointsRecommendedForMoves; /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. + * Gets the RecoveryPointsRecommendedForMovesClient object to access its operations. * - * @return the PrivateEndpointConnectionsClient object. + * @return the RecoveryPointsRecommendedForMovesClient object. */ - public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { - return this.privateEndpointConnections; + public RecoveryPointsRecommendedForMovesClient getRecoveryPointsRecommendedForMoves() { + return this.recoveryPointsRecommendedForMoves; } /** - * The PrivateEndpointsClient object to access its operations. + * The ProtectedItemOperationStatusesClient object to access its operations. */ - private final PrivateEndpointsClient privateEndpoints; + private final ProtectedItemOperationStatusesClient protectedItemOperationStatuses; /** - * Gets the PrivateEndpointsClient object to access its operations. + * Gets the ProtectedItemOperationStatusesClient object to access its operations. * - * @return the PrivateEndpointsClient object. + * @return the ProtectedItemOperationStatusesClient object. */ - public PrivateEndpointsClient getPrivateEndpoints() { - return this.privateEndpoints; + public ProtectedItemOperationStatusesClient getProtectedItemOperationStatuses() { + return this.protectedItemOperationStatuses; } /** - * The ResourceProvidersClient object to access its operations. + * The ProtectedItemOperationResultsClient object to access its operations. */ - private final ResourceProvidersClient resourceProviders; + private final ProtectedItemOperationResultsClient protectedItemOperationResults; /** - * Gets the ResourceProvidersClient object to access its operations. + * Gets the ProtectedItemOperationResultsClient object to access its operations. * - * @return the ResourceProvidersClient object. + * @return the ProtectedItemOperationResultsClient object. */ - public ResourceProvidersClient getResourceProviders() { - return this.resourceProviders; + public ProtectedItemOperationResultsClient getProtectedItemOperationResults() { + return this.protectedItemOperationResults; } /** - * The BmsPrepareDataMoveOperationResultsClient object to access its operations. + * The ProtectionContainersClient object to access its operations. */ - private final BmsPrepareDataMoveOperationResultsClient bmsPrepareDataMoveOperationResults; + private final ProtectionContainersClient protectionContainers; /** - * Gets the BmsPrepareDataMoveOperationResultsClient object to access its operations. + * Gets the ProtectionContainersClient object to access its operations. * - * @return the BmsPrepareDataMoveOperationResultsClient object. + * @return the ProtectionContainersClient object. */ - public BmsPrepareDataMoveOperationResultsClient getBmsPrepareDataMoveOperationResults() { - return this.bmsPrepareDataMoveOperationResults; + public ProtectionContainersClient getProtectionContainers() { + return this.protectionContainers; } /** - * The ProtectedItemsClient object to access its operations. + * The BackupWorkloadItemsClient object to access its operations. */ - private final ProtectedItemsClient protectedItems; + private final BackupWorkloadItemsClient backupWorkloadItems; /** - * Gets the ProtectedItemsClient object to access its operations. + * Gets the BackupWorkloadItemsClient object to access its operations. * - * @return the ProtectedItemsClient object. + * @return the BackupWorkloadItemsClient object. */ - public ProtectedItemsClient getProtectedItems() { - return this.protectedItems; + public BackupWorkloadItemsClient getBackupWorkloadItems() { + return this.backupWorkloadItems; } /** - * The ProtectedItemOperationResultsClient object to access its operations. + * The ProtectionContainerOperationResultsClient object to access its operations. */ - private final ProtectedItemOperationResultsClient protectedItemOperationResults; + private final ProtectionContainerOperationResultsClient protectionContainerOperationResults; /** - * Gets the ProtectedItemOperationResultsClient object to access its operations. + * Gets the ProtectionContainerOperationResultsClient object to access its operations. * - * @return the ProtectedItemOperationResultsClient object. + * @return the ProtectionContainerOperationResultsClient object. */ - public ProtectedItemOperationResultsClient getProtectedItemOperationResults() { - return this.protectedItemOperationResults; + public ProtectionContainerOperationResultsClient getProtectionContainerOperationResults() { + return this.protectionContainerOperationResults; } /** @@ -414,17 +402,17 @@ public RestoresClient getRestores() { } /** - * The BackupPoliciesClient object to access its operations. + * The ItemLevelRecoveryConnectionsClient object to access its operations. */ - private final BackupPoliciesClient backupPolicies; + private final ItemLevelRecoveryConnectionsClient itemLevelRecoveryConnections; /** - * Gets the BackupPoliciesClient object to access its operations. + * Gets the ItemLevelRecoveryConnectionsClient object to access its operations. * - * @return the BackupPoliciesClient object. + * @return the ItemLevelRecoveryConnectionsClient object. */ - public BackupPoliciesClient getBackupPolicies() { - return this.backupPolicies; + public ItemLevelRecoveryConnectionsClient getItemLevelRecoveryConnections() { + return this.itemLevelRecoveryConnections; } /** @@ -441,6 +429,20 @@ public ProtectionPoliciesClient getProtectionPolicies() { return this.protectionPolicies; } + /** + * The BackupPoliciesClient object to access its operations. + */ + private final BackupPoliciesClient backupPolicies; + + /** + * Gets the BackupPoliciesClient object to access its operations. + * + * @return the BackupPoliciesClient object. + */ + public BackupPoliciesClient getBackupPolicies() { + return this.backupPolicies; + } + /** * The ProtectionPolicyOperationResultsClient object to access its operations. */ @@ -456,17 +458,17 @@ public ProtectionPolicyOperationResultsClient getProtectionPolicyOperationResult } /** - * The BackupJobsClient object to access its operations. + * The ProtectionPolicyOperationStatusesClient object to access its operations. */ - private final BackupJobsClient backupJobs; + private final ProtectionPolicyOperationStatusesClient protectionPolicyOperationStatuses; /** - * Gets the BackupJobsClient object to access its operations. + * Gets the ProtectionPolicyOperationStatusesClient object to access its operations. * - * @return the BackupJobsClient object. + * @return the ProtectionPolicyOperationStatusesClient object. */ - public BackupJobsClient getBackupJobs() { - return this.backupJobs; + public ProtectionPolicyOperationStatusesClient getProtectionPolicyOperationStatuses() { + return this.protectionPolicyOperationStatuses; } /** @@ -484,17 +486,31 @@ public JobDetailsClient getJobDetails() { } /** - * The JobCancellationsClient object to access its operations. + * The BackupJobsClient object to access its operations. */ - private final JobCancellationsClient jobCancellations; + private final BackupJobsClient backupJobs; /** - * Gets the JobCancellationsClient object to access its operations. + * Gets the BackupJobsClient object to access its operations. * - * @return the JobCancellationsClient object. + * @return the BackupJobsClient object. */ - public JobCancellationsClient getJobCancellations() { - return this.jobCancellations; + public BackupJobsClient getBackupJobs() { + return this.backupJobs; + } + + /** + * The JobCancellationsClient object to access its operations. + */ + private final JobCancellationsClient jobCancellations; + + /** + * Gets the JobCancellationsClient object to access its operations. + * + * @return the JobCancellationsClient object. + */ + public JobCancellationsClient getJobCancellations() { + return this.jobCancellations; } /** @@ -525,6 +541,76 @@ public ExportJobsOperationResultsClient getExportJobsOperationResults() { return this.exportJobsOperationResults; } + /** + * The BackupEnginesClient object to access its operations. + */ + private final BackupEnginesClient backupEngines; + + /** + * Gets the BackupEnginesClient object to access its operations. + * + * @return the BackupEnginesClient object. + */ + public BackupEnginesClient getBackupEngines() { + return this.backupEngines; + } + + /** + * The BackupStatusClient object to access its operations. + */ + private final BackupStatusClient backupStatus; + + /** + * Gets the BackupStatusClient object to access its operations. + * + * @return the BackupStatusClient object. + */ + public BackupStatusClient getBackupStatus() { + return this.backupStatus; + } + + /** + * The FeatureSupportsClient object to access its operations. + */ + private final FeatureSupportsClient featureSupports; + + /** + * Gets the FeatureSupportsClient object to access its operations. + * + * @return the FeatureSupportsClient object. + */ + public FeatureSupportsClient getFeatureSupports() { + return this.featureSupports; + } + + /** + * The BackupProtectionIntentsClient object to access its operations. + */ + private final BackupProtectionIntentsClient backupProtectionIntents; + + /** + * Gets the BackupProtectionIntentsClient object to access its operations. + * + * @return the BackupProtectionIntentsClient object. + */ + public BackupProtectionIntentsClient getBackupProtectionIntents() { + return this.backupProtectionIntents; + } + + /** + * The BackupUsageSummariesClient object to access its operations. + */ + private final BackupUsageSummariesClient backupUsageSummaries; + + /** + * Gets the BackupUsageSummariesClient object to access its operations. + * + * @return the BackupUsageSummariesClient object. + */ + public BackupUsageSummariesClient getBackupUsageSummaries() { + return this.backupUsageSummaries; + } + /** * The JobsClient object to access its operations. */ @@ -553,20 +639,6 @@ public BackupProtectedItemsClient getBackupProtectedItems() { return this.backupProtectedItems; } - /** - * The OperationOperationsClient object to access its operations. - */ - private final OperationOperationsClient operationOperations; - - /** - * Gets the OperationOperationsClient object to access its operations. - * - * @return the OperationOperationsClient object. - */ - public OperationOperationsClient getOperationOperations() { - return this.operationOperations; - } - /** * The ValidateOperationsClient object to access its operations. */ @@ -609,20 +681,6 @@ public ValidateOperationStatusesClient getValidateOperationStatuses() { return this.validateOperationStatuses; } - /** - * The BackupEnginesClient object to access its operations. - */ - private final BackupEnginesClient backupEngines; - - /** - * Gets the BackupEnginesClient object to access its operations. - * - * @return the BackupEnginesClient object. - */ - public BackupEnginesClient getBackupEngines() { - return this.backupEngines; - } - /** * The ProtectionContainerRefreshOperationResultsClient object to access its operations. */ @@ -651,90 +709,6 @@ public ProtectableContainersClient getProtectableContainers() { return this.protectableContainers; } - /** - * The ProtectionContainersClient object to access its operations. - */ - private final ProtectionContainersClient protectionContainers; - - /** - * Gets the ProtectionContainersClient object to access its operations. - * - * @return the ProtectionContainersClient object. - */ - public ProtectionContainersClient getProtectionContainers() { - return this.protectionContainers; - } - - /** - * The BackupWorkloadItemsClient object to access its operations. - */ - private final BackupWorkloadItemsClient backupWorkloadItems; - - /** - * Gets the BackupWorkloadItemsClient object to access its operations. - * - * @return the BackupWorkloadItemsClient object. - */ - public BackupWorkloadItemsClient getBackupWorkloadItems() { - return this.backupWorkloadItems; - } - - /** - * The ProtectionContainerOperationResultsClient object to access its operations. - */ - private final ProtectionContainerOperationResultsClient protectionContainerOperationResults; - - /** - * Gets the ProtectionContainerOperationResultsClient object to access its operations. - * - * @return the ProtectionContainerOperationResultsClient object. - */ - public ProtectionContainerOperationResultsClient getProtectionContainerOperationResults() { - return this.protectionContainerOperationResults; - } - - /** - * The BackupsClient object to access its operations. - */ - private final BackupsClient backups; - - /** - * Gets the BackupsClient object to access its operations. - * - * @return the BackupsClient object. - */ - public BackupsClient getBackups() { - return this.backups; - } - - /** - * The ProtectedItemOperationStatusesClient object to access its operations. - */ - private final ProtectedItemOperationStatusesClient protectedItemOperationStatuses; - - /** - * Gets the ProtectedItemOperationStatusesClient object to access its operations. - * - * @return the ProtectedItemOperationStatusesClient object. - */ - public ProtectedItemOperationStatusesClient getProtectedItemOperationStatuses() { - return this.protectedItemOperationStatuses; - } - - /** - * The ItemLevelRecoveryConnectionsClient object to access its operations. - */ - private final ItemLevelRecoveryConnectionsClient itemLevelRecoveryConnections; - - /** - * Gets the ItemLevelRecoveryConnectionsClient object to access its operations. - * - * @return the ItemLevelRecoveryConnectionsClient object. - */ - public ItemLevelRecoveryConnectionsClient getItemLevelRecoveryConnections() { - return this.itemLevelRecoveryConnections; - } - /** * The BackupOperationResultsClient object to access its operations. */ @@ -763,20 +737,6 @@ public BackupOperationStatusesClient getBackupOperationStatuses() { return this.backupOperationStatuses; } - /** - * The ProtectionPolicyOperationStatusesClient object to access its operations. - */ - private final ProtectionPolicyOperationStatusesClient protectionPolicyOperationStatuses; - - /** - * Gets the ProtectionPolicyOperationStatusesClient object to access its operations. - * - * @return the ProtectionPolicyOperationStatusesClient object. - */ - public ProtectionPolicyOperationStatusesClient getProtectionPolicyOperationStatuses() { - return this.protectionPolicyOperationStatuses; - } - /** * The BackupProtectableItemsClient object to access its operations. */ @@ -834,161 +794,188 @@ public SecurityPINsClient getSecurityPINs() { } /** - * The RecoveryPointsRecommendedForMovesClient object to access its operations. + * The FetchTieringCostsClient object to access its operations. */ - private final RecoveryPointsRecommendedForMovesClient recoveryPointsRecommendedForMoves; + private final FetchTieringCostsClient fetchTieringCosts; /** - * Gets the RecoveryPointsRecommendedForMovesClient object to access its operations. + * Gets the FetchTieringCostsClient object to access its operations. * - * @return the RecoveryPointsRecommendedForMovesClient object. + * @return the FetchTieringCostsClient object. */ - public RecoveryPointsRecommendedForMovesClient getRecoveryPointsRecommendedForMoves() { - return this.recoveryPointsRecommendedForMoves; + public FetchTieringCostsClient getFetchTieringCosts() { + return this.fetchTieringCosts; } /** - * The ResourceGuardProxiesClient object to access its operations. + * The GetTieringCostOperationResultsClient object to access its operations. */ - private final ResourceGuardProxiesClient resourceGuardProxies; + private final GetTieringCostOperationResultsClient getTieringCostOperationResults; /** - * Gets the ResourceGuardProxiesClient object to access its operations. + * Gets the GetTieringCostOperationResultsClient object to access its operations. * - * @return the ResourceGuardProxiesClient object. + * @return the GetTieringCostOperationResultsClient object. */ - public ResourceGuardProxiesClient getResourceGuardProxies() { - return this.resourceGuardProxies; + public GetTieringCostOperationResultsClient getGetTieringCostOperationResults() { + return this.getTieringCostOperationResults; } /** - * The ResourceGuardProxyOperationsClient object to access its operations. + * The TieringCostOperationStatusClient object to access its operations. */ - private final ResourceGuardProxyOperationsClient resourceGuardProxyOperations; + private final TieringCostOperationStatusClient tieringCostOperationStatus; /** - * Gets the ResourceGuardProxyOperationsClient object to access its operations. + * Gets the TieringCostOperationStatusClient object to access its operations. * - * @return the ResourceGuardProxyOperationsClient object. + * @return the TieringCostOperationStatusClient object. */ - public ResourceGuardProxyOperationsClient getResourceGuardProxyOperations() { - return this.resourceGuardProxyOperations; + public TieringCostOperationStatusClient getTieringCostOperationStatus() { + return this.tieringCostOperationStatus; } /** - * The FetchTieringCostsClient object to access its operations. + * The ProtectionIntentsClient object to access its operations. */ - private final FetchTieringCostsClient fetchTieringCosts; + private final ProtectionIntentsClient protectionIntents; /** - * Gets the FetchTieringCostsClient object to access its operations. + * Gets the ProtectionIntentsClient object to access its operations. * - * @return the FetchTieringCostsClient object. + * @return the ProtectionIntentsClient object. */ - public FetchTieringCostsClient getFetchTieringCosts() { - return this.fetchTieringCosts; + public ProtectionIntentsClient getProtectionIntents() { + return this.protectionIntents; } /** - * The GetTieringCostOperationResultsClient object to access its operations. + * The PrivateEndpointConnectionsClient object to access its operations. */ - private final GetTieringCostOperationResultsClient getTieringCostOperationResults; + private final PrivateEndpointConnectionsClient privateEndpointConnections; /** - * Gets the GetTieringCostOperationResultsClient object to access its operations. + * Gets the PrivateEndpointConnectionsClient object to access its operations. * - * @return the GetTieringCostOperationResultsClient object. + * @return the PrivateEndpointConnectionsClient object. */ - public GetTieringCostOperationResultsClient getGetTieringCostOperationResults() { - return this.getTieringCostOperationResults; + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; } /** - * The TieringCostOperationStatusClient object to access its operations. + * The PrivateEndpointsClient object to access its operations. */ - private final TieringCostOperationStatusClient tieringCostOperationStatus; + private final PrivateEndpointsClient privateEndpoints; /** - * Gets the TieringCostOperationStatusClient object to access its operations. + * Gets the PrivateEndpointsClient object to access its operations. * - * @return the TieringCostOperationStatusClient object. + * @return the PrivateEndpointsClient object. */ - public TieringCostOperationStatusClient getTieringCostOperationStatus() { - return this.tieringCostOperationStatus; + public PrivateEndpointsClient getPrivateEndpoints() { + return this.privateEndpoints; + } + + /** + * The ResourceGuardProxyOperationsClient object to access its operations. + */ + private final ResourceGuardProxyOperationsClient resourceGuardProxyOperations; + + /** + * Gets the ResourceGuardProxyOperationsClient object to access its operations. + * + * @return the ResourceGuardProxyOperationsClient object. + */ + public ResourceGuardProxyOperationsClient getResourceGuardProxyOperations() { + return this.resourceGuardProxyOperations; + } + + /** + * The OperationOperationsClient object to access its operations. + */ + private final OperationOperationsClient operationOperations; + + /** + * Gets the OperationOperationsClient object to access its operations. + * + * @return the OperationOperationsClient object. + */ + public OperationOperationsClient getOperationOperations() { + return this.operationOperations; } /** - * Initializes an instance of RecoveryServicesBackupClient client. + * Initializes an instance of RecoveryServicesBackupManagementClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The subscription Id. - * @param endpoint server parameter. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ - RecoveryServicesBackupClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + RecoveryServicesBackupManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2025-02-01"; - this.backupResourceStorageConfigsNonCrrs = new BackupResourceStorageConfigsNonCrrsClientImpl(this); - this.protectionIntents = new ProtectionIntentsClientImpl(this); - this.backupStatus = new BackupStatusClientImpl(this); - this.featureSupports = new FeatureSupportsClientImpl(this); - this.backupProtectionIntents = new BackupProtectionIntentsClientImpl(this); - this.backupUsageSummaries = new BackupUsageSummariesClientImpl(this); + this.subscriptionId = subscriptionId; + this.apiVersion = "2026-01-01-preview"; + this.resourceProviders = new ResourceProvidersClientImpl(this); this.operations = new OperationsClientImpl(this); + this.backupResourceStorageConfigsNonCrrs = new BackupResourceStorageConfigsNonCrrsClientImpl(this); + this.bmsPrepareDataMoveOperationResults = new BmsPrepareDataMoveOperationResultsClientImpl(this); this.backupResourceVaultConfigs = new BackupResourceVaultConfigsClientImpl(this); this.backupResourceEncryptionConfigs = new BackupResourceEncryptionConfigsClientImpl(this); - this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); - this.privateEndpoints = new PrivateEndpointsClientImpl(this); - this.resourceProviders = new ResourceProvidersClientImpl(this); - this.bmsPrepareDataMoveOperationResults = new BmsPrepareDataMoveOperationResultsClientImpl(this); this.protectedItems = new ProtectedItemsClientImpl(this); + this.backups = new BackupsClientImpl(this); + this.recoveryPointsRecommendedForMoves = new RecoveryPointsRecommendedForMovesClientImpl(this); + this.protectedItemOperationStatuses = new ProtectedItemOperationStatusesClientImpl(this); this.protectedItemOperationResults = new ProtectedItemOperationResultsClientImpl(this); + this.protectionContainers = new ProtectionContainersClientImpl(this); + this.backupWorkloadItems = new BackupWorkloadItemsClientImpl(this); + this.protectionContainerOperationResults = new ProtectionContainerOperationResultsClientImpl(this); this.recoveryPoints = new RecoveryPointsClientImpl(this); this.restores = new RestoresClientImpl(this); - this.backupPolicies = new BackupPoliciesClientImpl(this); + this.itemLevelRecoveryConnections = new ItemLevelRecoveryConnectionsClientImpl(this); this.protectionPolicies = new ProtectionPoliciesClientImpl(this); + this.backupPolicies = new BackupPoliciesClientImpl(this); this.protectionPolicyOperationResults = new ProtectionPolicyOperationResultsClientImpl(this); - this.backupJobs = new BackupJobsClientImpl(this); + this.protectionPolicyOperationStatuses = new ProtectionPolicyOperationStatusesClientImpl(this); this.jobDetails = new JobDetailsClientImpl(this); + this.backupJobs = new BackupJobsClientImpl(this); this.jobCancellations = new JobCancellationsClientImpl(this); this.jobOperationResults = new JobOperationResultsClientImpl(this); this.exportJobsOperationResults = new ExportJobsOperationResultsClientImpl(this); + this.backupEngines = new BackupEnginesClientImpl(this); + this.backupStatus = new BackupStatusClientImpl(this); + this.featureSupports = new FeatureSupportsClientImpl(this); + this.backupProtectionIntents = new BackupProtectionIntentsClientImpl(this); + this.backupUsageSummaries = new BackupUsageSummariesClientImpl(this); this.jobs = new JobsClientImpl(this); this.backupProtectedItems = new BackupProtectedItemsClientImpl(this); - this.operationOperations = new OperationOperationsClientImpl(this); this.validateOperations = new ValidateOperationsClientImpl(this); this.validateOperationResults = new ValidateOperationResultsClientImpl(this); this.validateOperationStatuses = new ValidateOperationStatusesClientImpl(this); - this.backupEngines = new BackupEnginesClientImpl(this); this.protectionContainerRefreshOperationResults = new ProtectionContainerRefreshOperationResultsClientImpl(this); this.protectableContainers = new ProtectableContainersClientImpl(this); - this.protectionContainers = new ProtectionContainersClientImpl(this); - this.backupWorkloadItems = new BackupWorkloadItemsClientImpl(this); - this.protectionContainerOperationResults = new ProtectionContainerOperationResultsClientImpl(this); - this.backups = new BackupsClientImpl(this); - this.protectedItemOperationStatuses = new ProtectedItemOperationStatusesClientImpl(this); - this.itemLevelRecoveryConnections = new ItemLevelRecoveryConnectionsClientImpl(this); this.backupOperationResults = new BackupOperationResultsClientImpl(this); this.backupOperationStatuses = new BackupOperationStatusesClientImpl(this); - this.protectionPolicyOperationStatuses = new ProtectionPolicyOperationStatusesClientImpl(this); this.backupProtectableItems = new BackupProtectableItemsClientImpl(this); this.backupProtectionContainers = new BackupProtectionContainersClientImpl(this); this.deletedProtectionContainers = new DeletedProtectionContainersClientImpl(this); this.securityPINs = new SecurityPINsClientImpl(this); - this.recoveryPointsRecommendedForMoves = new RecoveryPointsRecommendedForMovesClientImpl(this); - this.resourceGuardProxies = new ResourceGuardProxiesClientImpl(this); - this.resourceGuardProxyOperations = new ResourceGuardProxyOperationsClientImpl(this); this.fetchTieringCosts = new FetchTieringCostsClientImpl(this); this.getTieringCostOperationResults = new GetTieringCostOperationResultsClientImpl(this); this.tieringCostOperationStatus = new TieringCostOperationStatusClientImpl(this); + this.protectionIntents = new ProtectionIntentsClientImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.privateEndpoints = new PrivateEndpointsClientImpl(this); + this.resourceGuardProxyOperations = new ResourceGuardProxyOperationsClientImpl(this); + this.operationOperations = new OperationOperationsClientImpl(this); } /** @@ -1028,6 +1015,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * @@ -1117,5 +1121,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(RecoveryServicesBackupClientImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(RecoveryServicesBackupManagementClientImpl.class); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxiesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxiesClientImpl.java deleted file mode 100644 index ad4b0ad54714..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxiesClientImpl.java +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.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.recoveryservicesbackup.fluent.ResourceGuardProxiesClient; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ResourceGuardProxyBaseResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBaseResourceList; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ResourceGuardProxiesClient. - */ -public final class ResourceGuardProxiesClientImpl implements ResourceGuardProxiesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ResourceGuardProxiesService service; - - /** - * The service client containing this operation class. - */ - private final RecoveryServicesBackupClientImpl client; - - /** - * Initializes an instance of ResourceGuardProxiesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ResourceGuardProxiesClientImpl(RecoveryServicesBackupClientImpl client) { - this.service = RestProxy.create(ResourceGuardProxiesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for RecoveryServicesBackupClientResourceGuardProxies to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") - public interface ResourceGuardProxiesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List the ResourceGuardProxies under vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuardProxyBase resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getSinglePageAsync(String vaultName, - String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List the ResourceGuardProxies under vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuardProxyBase resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getSinglePageAsync(String vaultName, - String resourceGroupName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List the ResourceGuardProxies under vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getAsync(String vaultName, String resourceGroupName) { - return new PagedFlux<>(() -> getSinglePageAsync(vaultName, resourceGroupName), - nextLink -> getNextSinglePageAsync(nextLink)); - } - - /** - * List the ResourceGuardProxies under vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getAsync(String vaultName, String resourceGroupName, - Context context) { - return new PagedFlux<>(() -> getSinglePageAsync(vaultName, resourceGroupName, context), - nextLink -> getNextSinglePageAsync(nextLink, context)); - } - - /** - * List the ResourceGuardProxies under vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable get(String vaultName, String resourceGroupName) { - return new PagedIterable<>(getAsync(vaultName, resourceGroupName)); - } - - /** - * List the ResourceGuardProxies under vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable get(String vaultName, String resourceGroupName, - Context context) { - return new PagedIterable<>(getAsync(vaultName, resourceGroupName, 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 list of ResourceGuardProxyBase resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getNextSinglePageAsync(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.getNext(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 list of ResourceGuardProxyBase resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getNextSinglePageAsync(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.getNext(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/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxiesImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxiesImpl.java deleted file mode 100644 index 627263ac9dee..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxiesImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.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.recoveryservicesbackup.fluent.ResourceGuardProxiesClient; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ResourceGuardProxyBaseResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxies; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBaseResource; - -public final class ResourceGuardProxiesImpl implements ResourceGuardProxies { - private static final ClientLogger LOGGER = new ClientLogger(ResourceGuardProxiesImpl.class); - - private final ResourceGuardProxiesClient innerClient; - - private final com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager serviceManager; - - public ResourceGuardProxiesImpl(ResourceGuardProxiesClient innerClient, - com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable get(String vaultName, String resourceGroupName) { - PagedIterable inner - = this.serviceClient().get(vaultName, resourceGroupName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ResourceGuardProxyBaseResourceImpl(inner1, this.manager())); - } - - public PagedIterable get(String vaultName, String resourceGroupName, - Context context) { - PagedIterable inner - = this.serviceClient().get(vaultName, resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ResourceGuardProxyBaseResourceImpl(inner1, this.manager())); - } - - private ResourceGuardProxiesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxyBaseResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxyBaseResourceImpl.java index 317427bd1af2..044d746b7abb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxyBaseResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxyBaseResourceImpl.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; import com.azure.core.http.rest.Response; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ResourceGuardProxyBaseResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBase; @@ -33,8 +34,8 @@ public String type() { return this.innerModel().type(); } - public String location() { - return this.innerModel().location(); + public ResourceGuardProxyBase properties() { + return this.innerModel().properties(); } public Map tags() { @@ -46,14 +47,18 @@ public Map tags() { } } - public ResourceGuardProxyBase properties() { - return this.innerModel().properties(); + public String location() { + return this.innerModel().location(); } public String etag() { return this.innerModel().etag(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxyOperationsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxyOperationsClientImpl.java index d1188410aeba..055142493f06 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxyOperationsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxyOperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -20,6 +20,10 @@ 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; @@ -28,6 +32,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ResourceGuardProxyBaseResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.UnlockDeleteResponseInner; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ResourceGuardProxyBaseResourceList; import com.azure.resourcemanager.recoveryservicesbackup.models.UnlockDeleteRequest; import reactor.core.publisher.Mono; @@ -43,77 +48,128 @@ public final class ResourceGuardProxyOperationsClientImpl implements ResourceGua /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ResourceGuardProxyOperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ResourceGuardProxyOperationsClientImpl(RecoveryServicesBackupClientImpl client) { + ResourceGuardProxyOperationsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ResourceGuardProxyOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientResourceGuardProxyOperations to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientResourceGuardProxyOperations to + * be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientResourceGuardProxyOperations") public interface ResourceGuardProxyOperationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("resourceGuardProxyName") String resourceGuardProxyName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("resourceGuardProxyName") String resourceGuardProxyName, @HeaderParam("Accept") String accept, + Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> put(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, + Mono> put(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("resourceGuardProxyName") String resourceGuardProxyName, - @BodyParam("application/json") ResourceGuardProxyBaseResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ResourceGuardProxyBaseResourceInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response putSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("resourceGuardProxyName") String resourceGuardProxyName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ResourceGuardProxyBaseResourceInner parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("resourceGuardProxyName") String resourceGuardProxyName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGuardProxyName") String resourceGuardProxyName, @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("resourceGuardProxyName") String resourceGuardProxyName, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> unlockDelete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, + Mono> unlockDelete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("resourceGuardProxyName") String resourceGuardProxyName, - @BodyParam("application/json") UnlockDeleteRequest parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UnlockDeleteRequest parameters, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response unlockDeleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("resourceGuardProxyName") String resourceGuardProxyName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") UnlockDeleteRequest parameters, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Accept") String accept, Context context); } /** * Returns ResourceGuardProxy under vault and with the name referenced in request. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -123,77 +179,18 @@ Mono> unlockDelete(@HostParam("$host") Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String resourceGuardProxyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGuardProxyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), resourceGuardProxyName, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, resourceGuardProxyName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns ResourceGuardProxy under vault and with the name referenced in request. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceGuardProxyName The resourceGuardProxyName parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, - String resourceGroupName, String resourceGuardProxyName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGuardProxyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), resourceGuardProxyName, accept, context); - } - - /** - * Returns ResourceGuardProxy under vault and with the name referenced in request. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -210,8 +207,8 @@ private Mono getAsync(String vaultName, Str /** * Returns ResourceGuardProxy under vault and with the name referenced in request. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -222,14 +219,16 @@ private Mono getAsync(String vaultName, Str @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String resourceGuardProxyName, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, resourceGuardProxyName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, resourceGuardProxyName, accept, context); } /** * Returns ResourceGuardProxy under vault and with the name referenced in request. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -246,8 +245,8 @@ public ResourceGuardProxyBaseResourceInner get(String vaultName, String resource * Add or Update ResourceGuardProxy under vault * Secures vault critical operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -258,35 +257,12 @@ public ResourceGuardProxyBaseResourceInner get(String vaultName, String resource @ServiceMethod(returns = ReturnType.SINGLE) private Mono> putWithResponseAsync(String vaultName, String resourceGroupName, String resourceGuardProxyName, ResourceGuardProxyBaseResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGuardProxyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.put(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), resourceGuardProxyName, parameters, accept, - context)) + .withContext(context -> service.put(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, resourceGuardProxyName, contentType, + accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -294,56 +270,8 @@ private Mono> putWithResponseAsync * Add or Update ResourceGuardProxy under vault * Secures vault critical operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceGuardProxyName The resourceGuardProxyName parameter. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync(String vaultName, - String resourceGroupName, String resourceGuardProxyName, ResourceGuardProxyBaseResourceInner parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGuardProxyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.put(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), resourceGuardProxyName, parameters, accept, context); - } - - /** - * Add or Update ResourceGuardProxy under vault - * Secures vault critical operations. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -362,8 +290,8 @@ private Mono putAsync(String vaultName, Str * Add or Update ResourceGuardProxy under vault * Secures vault critical operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -375,15 +303,18 @@ private Mono putAsync(String vaultName, Str @ServiceMethod(returns = ReturnType.SINGLE) public Response putWithResponse(String vaultName, String resourceGroupName, String resourceGuardProxyName, ResourceGuardProxyBaseResourceInner parameters, Context context) { - return putWithResponseAsync(vaultName, resourceGroupName, resourceGuardProxyName, parameters, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.putSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, resourceGuardProxyName, contentType, accept, parameters, context); } /** * Add or Update ResourceGuardProxy under vault * Secures vault critical operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -401,8 +332,8 @@ public ResourceGuardProxyBaseResourceInner put(String vaultName, String resource /** * Delete ResourceGuardProxy under vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -412,77 +343,17 @@ public ResourceGuardProxyBaseResourceInner put(String vaultName, String resource @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String vaultName, String resourceGroupName, String resourceGuardProxyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGuardProxyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), resourceGuardProxyName, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, resourceGuardProxyName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete ResourceGuardProxy under vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceGuardProxyName The resourceGuardProxyName parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String vaultName, String resourceGroupName, - String resourceGuardProxyName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGuardProxyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), resourceGuardProxyName, accept, context); - } - - /** - * Delete ResourceGuardProxy under vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -498,8 +369,8 @@ private Mono deleteAsync(String vaultName, String resourceGroupName, Strin /** * Delete ResourceGuardProxy under vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -510,14 +381,15 @@ private Mono deleteAsync(String vaultName, String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String vaultName, String resourceGroupName, String resourceGuardProxyName, Context context) { - return deleteWithResponseAsync(vaultName, resourceGroupName, resourceGuardProxyName, context).block(); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, resourceGuardProxyName, context); } /** * Delete ResourceGuardProxy under vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -531,8 +403,8 @@ public void delete(String vaultName, String resourceGroupName, String resourceGu /** * Secures delete ResourceGuardProxy operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -543,89 +415,20 @@ public void delete(String vaultName, String resourceGroupName, String resourceGu @ServiceMethod(returns = ReturnType.SINGLE) private Mono> unlockDeleteWithResponseAsync(String vaultName, String resourceGroupName, String resourceGuardProxyName, UnlockDeleteRequest parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGuardProxyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.unlockDelete(this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, resourceGroupName, this.client.getSubscriptionId(), resourceGuardProxyName, parameters, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, vaultName, resourceGuardProxyName, contentType, + accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Secures delete ResourceGuardProxy operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param resourceGuardProxyName The resourceGuardProxyName parameter. - * @param parameters Request body for operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of Unlock Delete API along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> unlockDeleteWithResponseAsync(String vaultName, - String resourceGroupName, String resourceGuardProxyName, UnlockDeleteRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGuardProxyName == null) { - return Mono.error( - new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.unlockDelete(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), resourceGuardProxyName, parameters, accept, context); - } - - /** - * Secures delete ResourceGuardProxy operations. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -643,8 +446,8 @@ private Mono unlockDeleteAsync(String vaultName, Stri /** * Secures delete ResourceGuardProxy operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -656,15 +459,18 @@ private Mono unlockDeleteAsync(String vaultName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public Response unlockDeleteWithResponse(String vaultName, String resourceGroupName, String resourceGuardProxyName, UnlockDeleteRequest parameters, Context context) { - return unlockDeleteWithResponseAsync(vaultName, resourceGroupName, resourceGuardProxyName, parameters, context) - .block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.unlockDeleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, resourceGuardProxyName, contentType, accept, + parameters, context); } /** * Secures delete ResourceGuardProxy operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -678,4 +484,117 @@ public UnlockDeleteResponseInner unlockDelete(String vaultName, String resourceG return unlockDeleteWithResponse(vaultName, resourceGroupName, resourceGuardProxyName, parameters, Context.NONE) .getValue(); } + + /** + * List the ResourceGuardProxies under vault. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String vaultName, + String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the ResourceGuardProxies under vault. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String vaultName, String resourceGroupName) { + return new PagedFlux<>(() -> listSinglePageAsync(vaultName, resourceGroupName)); + } + + /** + * List the ResourceGuardProxies under vault. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, + String resourceGroupName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); + } + + /** + * List the ResourceGuardProxies under vault. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String vaultName, + String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + null, null); + } + + /** + * List the ResourceGuardProxies under vault. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String vaultName, String resourceGroupName) { + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName)); + } + + /** + * List the ResourceGuardProxies under vault. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String vaultName, String resourceGroupName, + Context context) { + return new PagedIterable<>(() -> listSinglePage(vaultName, resourceGroupName, context)); + } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxyOperationsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxyOperationsImpl.java index 1a58b6a2d4e2..f9d2f97bf4fd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxyOperationsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxyOperationsImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; @@ -84,6 +85,21 @@ public UnlockDeleteResponse unlockDelete(String vaultName, String resourceGroupN } } + public PagedIterable list(String vaultName, String resourceGroupName) { + PagedIterable inner + = this.serviceClient().list(vaultName, resourceGroupName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ResourceGuardProxyBaseResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String vaultName, String resourceGroupName, + Context context) { + PagedIterable inner + = this.serviceClient().list(vaultName, resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ResourceGuardProxyBaseResourceImpl(inner1, this.manager())); + } + public ResourceGuardProxyBaseResource getById(String id) { String vaultName = ResourceManagerUtils.getValueFromIdByName(id, "vaults"); if (vaultName == null) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceManagerUtils.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceManagerUtils.java index 789ca17ed94d..268452a916c1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceManagerUtils.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceProvidersClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceProvidersClientImpl.java index b148b94a7e34..f21b0dececdd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceProvidersClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceProvidersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -22,6 +22,7 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -29,6 +30,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.OperationStatusInner; import com.azure.resourcemanager.recoveryservicesbackup.models.MoveRPAcrossTiersRequest; +import com.azure.resourcemanager.recoveryservicesbackup.models.OkResponse; import com.azure.resourcemanager.recoveryservicesbackup.models.PrepareDataMoveRequest; import com.azure.resourcemanager.recoveryservicesbackup.models.TriggerDataMoveRequest; import java.nio.ByteBuffer; @@ -47,207 +49,114 @@ public final class ResourceProvidersClientImpl implements ResourceProvidersClien /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ResourceProvidersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ResourceProvidersClientImpl(RecoveryServicesBackupClientImpl client) { + ResourceProvidersClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientResourceProviders to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientResourceProviders to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientResourceProviders") public interface ResourceProvidersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationStatus/{operationId}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/prepareDataMove") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getOperationStatus(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("operationId") String operationId, - @HeaderParam("Accept") String accept, Context context); + Mono>> bmsPrepareDataMove(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") PrepareDataMoveRequest parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/prepareDataMove") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> bmsPrepareDataMove(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") PrepareDataMoveRequest parameters, @HeaderParam("Accept") String accept, - Context context); + Response bmsPrepareDataMoveSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") PrepareDataMoveRequest parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/triggerDataMove") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> bmsTriggerDataMove(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") TriggerDataMoveRequest parameters, @HeaderParam("Accept") String accept, - Context context); + Mono>> bmsTriggerDataMove(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") TriggerDataMoveRequest parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/move") - @ExpectedResponses({ 202 }) + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/triggerDataMove") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> moveRecoveryPoint(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @PathParam("protectedItemName") String protectedItemName, - @PathParam("recoveryPointId") String recoveryPointId, - @BodyParam("application/json") MoveRPAcrossTiersRequest parameters, @HeaderParam("Accept") String accept, - Context context); - } + Response bmsTriggerDataMoveSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") TriggerDataMoveRequest parameters, Context context); - /** - * Fetches operation status for data move operation on vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getOperationStatusWithResponseAsync(String vaultName, - String resourceGroupName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getOperationStatus(this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, resourceGroupName, this.client.getSubscriptionId(), operationId, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Fetches operation status for data move operation on vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getOperationStatusWithResponseAsync(String vaultName, - String resourceGroupName, String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getOperationStatus(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), operationId, accept, context); - } - - /** - * Fetches operation status for data move operation on vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getOperationStatusAsync(String vaultName, String resourceGroupName, - String operationId) { - return getOperationStatusWithResponseAsync(vaultName, resourceGroupName, operationId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationStatus/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getOperationStatus(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); - /** - * Fetches operation status for data move operation on vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getOperationStatusWithResponse(String vaultName, String resourceGroupName, - String operationId, Context context) { - return getOperationStatusWithResponseAsync(vaultName, resourceGroupName, operationId, context).block(); - } + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig/operationStatus/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getOperationStatusSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); - /** - * Fetches operation status for data move operation on vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusInner getOperationStatus(String vaultName, String resourceGroupName, String operationId) { - return getOperationStatusWithResponse(vaultName, resourceGroupName, operationId, Context.NONE).getValue(); + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/move") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> moveRecoveryPoint(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, + @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") MoveRPAcrossTiersRequest parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/move") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response moveRecoveryPointSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, + @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") MoveRPAcrossTiersRequest parameters, Context context); } /** * Prepares source vault for Data Move operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Prepare data move request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -257,121 +166,77 @@ public OperationStatusInner getOperationStatus(String vaultName, String resource @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> bmsPrepareDataMoveWithResponseAsync(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.bmsPrepareDataMove(this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, resourceGroupName, this.client.getSubscriptionId(), parameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Prepares source vault for Data Move operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Prepare data move request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> bmsPrepareDataMoveWithResponseAsync(String vaultName, - String resourceGroupName, PrepareDataMoveRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.bmsPrepareDataMove(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), parameters, accept, context); + private Response bmsPrepareDataMoveWithResponse(String vaultName, String resourceGroupName, + PrepareDataMoveRequest parameters) { + final String contentType = "application/json"; + return service.bmsPrepareDataMoveSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, parameters, Context.NONE); } /** * Prepares source vault for Data Move operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Prepare data move request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginBmsPrepareDataMoveAsync(String vaultName, String resourceGroupName, - PrepareDataMoveRequest parameters) { - Mono>> mono - = bmsPrepareDataMoveWithResponseAsync(vaultName, resourceGroupName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response bmsPrepareDataMoveWithResponse(String vaultName, String resourceGroupName, + PrepareDataMoveRequest parameters, Context context) { + final String contentType = "application/json"; + return service.bmsPrepareDataMoveSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, parameters, context); } /** * Prepares source vault for Data Move operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Prepare data move request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginBmsPrepareDataMoveAsync(String vaultName, String resourceGroupName, - PrepareDataMoveRequest parameters, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, OkResponse> beginBmsPrepareDataMoveAsync(String vaultName, + String resourceGroupName, PrepareDataMoveRequest parameters) { Mono>> mono - = bmsPrepareDataMoveWithResponseAsync(vaultName, resourceGroupName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = bmsPrepareDataMoveWithResponseAsync(vaultName, resourceGroupName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), OkResponse.class, + OkResponse.class, this.client.getContext()); } /** * Prepares source vault for Data Move operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Prepare data move request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -379,16 +244,18 @@ private PollerFlux, Void> beginBmsPrepareDataMoveAsync(String v * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginBmsPrepareDataMove(String vaultName, String resourceGroupName, - PrepareDataMoveRequest parameters) { - return this.beginBmsPrepareDataMoveAsync(vaultName, resourceGroupName, parameters).getSyncPoller(); + public SyncPoller, OkResponse> beginBmsPrepareDataMove(String vaultName, + String resourceGroupName, PrepareDataMoveRequest parameters) { + Response response = bmsPrepareDataMoveWithResponse(vaultName, resourceGroupName, parameters); + return this.client.getLroResult(response, OkResponse.class, OkResponse.class, + Context.NONE); } /** * Prepares source vault for Data Move operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Prepare data move request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -397,24 +264,26 @@ public SyncPoller, Void> beginBmsPrepareDataMove(String vaultNa * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginBmsPrepareDataMove(String vaultName, String resourceGroupName, - PrepareDataMoveRequest parameters, Context context) { - return this.beginBmsPrepareDataMoveAsync(vaultName, resourceGroupName, parameters, context).getSyncPoller(); + public SyncPoller, OkResponse> beginBmsPrepareDataMove(String vaultName, + String resourceGroupName, PrepareDataMoveRequest parameters, Context context) { + Response response + = bmsPrepareDataMoveWithResponse(vaultName, resourceGroupName, parameters, context); + return this.client.getLroResult(response, OkResponse.class, OkResponse.class, context); } /** * Prepares source vault for Data Move operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Prepare data move request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono bmsPrepareDataMoveAsync(String vaultName, String resourceGroupName, + private Mono bmsPrepareDataMoveAsync(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters) { return beginBmsPrepareDataMoveAsync(vaultName, resourceGroupName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); @@ -423,59 +292,43 @@ private Mono bmsPrepareDataMoveAsync(String vaultName, String resourceGrou /** * Prepares source vault for Data Move operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Prepare data move request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono bmsPrepareDataMoveAsync(String vaultName, String resourceGroupName, - PrepareDataMoveRequest parameters, Context context) { - return beginBmsPrepareDataMoveAsync(vaultName, resourceGroupName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Prepares source vault for Data Move operation. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters Prepare data move request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void bmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters) { - bmsPrepareDataMoveAsync(vaultName, resourceGroupName, parameters).block(); + public OkResponse bmsPrepareDataMove(String vaultName, String resourceGroupName, + PrepareDataMoveRequest parameters) { + return beginBmsPrepareDataMove(vaultName, resourceGroupName, parameters).getFinalResult(); } /** * Prepares source vault for Data Move operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Prepare data move request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void bmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters, + public OkResponse bmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters, Context context) { - bmsPrepareDataMoveAsync(vaultName, resourceGroupName, parameters, context).block(); + return beginBmsPrepareDataMove(vaultName, resourceGroupName, parameters, context).getFinalResult(); } /** * Triggers Data Move Operation on target vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Trigger data move request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -485,121 +338,77 @@ public void bmsPrepareDataMove(String vaultName, String resourceGroupName, Prepa @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> bmsTriggerDataMoveWithResponseAsync(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.bmsTriggerDataMove(this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, resourceGroupName, this.client.getSubscriptionId(), parameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Triggers Data Move Operation on target vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Trigger data move request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> bmsTriggerDataMoveWithResponseAsync(String vaultName, - String resourceGroupName, TriggerDataMoveRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.bmsTriggerDataMove(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), parameters, accept, context); + private Response bmsTriggerDataMoveWithResponse(String vaultName, String resourceGroupName, + TriggerDataMoveRequest parameters) { + final String contentType = "application/json"; + return service.bmsTriggerDataMoveSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, parameters, Context.NONE); } /** * Triggers Data Move Operation on target vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Trigger data move request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginBmsTriggerDataMoveAsync(String vaultName, String resourceGroupName, - TriggerDataMoveRequest parameters) { - Mono>> mono - = bmsTriggerDataMoveWithResponseAsync(vaultName, resourceGroupName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response bmsTriggerDataMoveWithResponse(String vaultName, String resourceGroupName, + TriggerDataMoveRequest parameters, Context context) { + final String contentType = "application/json"; + return service.bmsTriggerDataMoveSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, parameters, context); } /** * Triggers Data Move Operation on target vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Trigger data move request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginBmsTriggerDataMoveAsync(String vaultName, String resourceGroupName, - TriggerDataMoveRequest parameters, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, OkResponse> beginBmsTriggerDataMoveAsync(String vaultName, + String resourceGroupName, TriggerDataMoveRequest parameters) { Mono>> mono - = bmsTriggerDataMoveWithResponseAsync(vaultName, resourceGroupName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = bmsTriggerDataMoveWithResponseAsync(vaultName, resourceGroupName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), OkResponse.class, + OkResponse.class, this.client.getContext()); } /** * Triggers Data Move Operation on target vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Trigger data move request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -607,16 +416,18 @@ private PollerFlux, Void> beginBmsTriggerDataMoveAsync(String v * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginBmsTriggerDataMove(String vaultName, String resourceGroupName, - TriggerDataMoveRequest parameters) { - return this.beginBmsTriggerDataMoveAsync(vaultName, resourceGroupName, parameters).getSyncPoller(); + public SyncPoller, OkResponse> beginBmsTriggerDataMove(String vaultName, + String resourceGroupName, TriggerDataMoveRequest parameters) { + Response response = bmsTriggerDataMoveWithResponse(vaultName, resourceGroupName, parameters); + return this.client.getLroResult(response, OkResponse.class, OkResponse.class, + Context.NONE); } /** * Triggers Data Move Operation on target vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Trigger data move request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -625,24 +436,26 @@ public SyncPoller, Void> beginBmsTriggerDataMove(String vaultNa * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginBmsTriggerDataMove(String vaultName, String resourceGroupName, - TriggerDataMoveRequest parameters, Context context) { - return this.beginBmsTriggerDataMoveAsync(vaultName, resourceGroupName, parameters, context).getSyncPoller(); + public SyncPoller, OkResponse> beginBmsTriggerDataMove(String vaultName, + String resourceGroupName, TriggerDataMoveRequest parameters, Context context) { + Response response + = bmsTriggerDataMoveWithResponse(vaultName, resourceGroupName, parameters, context); + return this.client.getLroResult(response, OkResponse.class, OkResponse.class, context); } /** * Triggers Data Move Operation on target vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Trigger data move request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono bmsTriggerDataMoveAsync(String vaultName, String resourceGroupName, + private Mono bmsTriggerDataMoveAsync(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters) { return beginBmsTriggerDataMoveAsync(vaultName, resourceGroupName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); @@ -651,63 +464,122 @@ private Mono bmsTriggerDataMoveAsync(String vaultName, String resourceGrou /** * Triggers Data Move Operation on target vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Trigger data move request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono bmsTriggerDataMoveAsync(String vaultName, String resourceGroupName, - TriggerDataMoveRequest parameters, Context context) { - return beginBmsTriggerDataMoveAsync(vaultName, resourceGroupName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public OkResponse bmsTriggerDataMove(String vaultName, String resourceGroupName, + TriggerDataMoveRequest parameters) { + return beginBmsTriggerDataMove(vaultName, resourceGroupName, parameters).getFinalResult(); } /** * Triggers Data Move Operation on target vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Trigger data move request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void bmsTriggerDataMove(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters) { - bmsTriggerDataMoveAsync(vaultName, resourceGroupName, parameters).block(); + public OkResponse bmsTriggerDataMove(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters, + Context context) { + return beginBmsTriggerDataMove(vaultName, resourceGroupName, parameters, context).getFinalResult(); } /** - * Triggers Data Move Operation on target vault. + * Fetches Operation Result for Prepare Data Move. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters Trigger data move request. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the BackupResourceConfigResource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getOperationStatusWithResponseAsync(String vaultName, + String resourceGroupName, String operationId) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getOperationStatus(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, operationId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Fetches Operation Result for Prepare Data Move. + * + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the BackupResourceConfigResource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getOperationStatusAsync(String vaultName, String resourceGroupName, + String operationId) { + return getOperationStatusWithResponseAsync(vaultName, resourceGroupName, operationId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Fetches Operation Result for Prepare Data Move. + * + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the BackupResourceConfigResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void bmsTriggerDataMove(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters, - Context context) { - bmsTriggerDataMoveAsync(vaultName, resourceGroupName, parameters, context).block(); + public Response getOperationStatusWithResponse(String vaultName, String resourceGroupName, + String operationId, Context context) { + final String accept = "application/json"; + return service.getOperationStatusSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, operationId, accept, context); + } + + /** + * Fetches Operation Result for Prepare Data Move. + * + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the BackupResourceConfigResource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusInner getOperationStatus(String vaultName, String resourceGroupName, String operationId) { + return getOperationStatusWithResponse(vaultName, resourceGroupName, operationId, Context.NONE).getValue(); } /** * Move recovery point from one datastore to another store. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. - * @param recoveryPointId The recoveryPointId parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters Move Resource Across Tiers Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -718,145 +590,75 @@ public void bmsTriggerDataMove(String vaultName, String resourceGroupName, Trigg private Mono>> moveRecoveryPointWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, MoveRPAcrossTiersRequest parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (recoveryPointId == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPointId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.moveRecoveryPoint(this.client.getEndpoint(), this.client.getApiVersion(), - vaultName, resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, - protectedItemName, recoveryPointId, parameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, + protectedItemName, recoveryPointId, contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Move recovery point from one datastore to another store. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. - * @param recoveryPointId The recoveryPointId parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters Move Resource Across Tiers Request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> moveRecoveryPointWithResponseAsync(String vaultName, - String resourceGroupName, String fabricName, String containerName, String protectedItemName, - String recoveryPointId, MoveRPAcrossTiersRequest parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (recoveryPointId == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPointId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.moveRecoveryPoint(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, - recoveryPointId, parameters, accept, context); + private Response moveRecoveryPointWithResponse(String vaultName, String resourceGroupName, + String fabricName, String containerName, String protectedItemName, String recoveryPointId, + MoveRPAcrossTiersRequest parameters) { + final String contentType = "application/json"; + return service.moveRecoveryPointSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, protectedItemName, + recoveryPointId, contentType, parameters, Context.NONE); } /** * Move recovery point from one datastore to another store. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. - * @param recoveryPointId The recoveryPointId parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters Move Resource Across Tiers Request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginMoveRecoveryPointAsync(String vaultName, String resourceGroupName, + @ServiceMethod(returns = ReturnType.SINGLE) + private Response moveRecoveryPointWithResponse(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, - MoveRPAcrossTiersRequest parameters) { - Mono>> mono = moveRecoveryPointWithResponseAsync(vaultName, resourceGroupName, - fabricName, containerName, protectedItemName, recoveryPointId, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + MoveRPAcrossTiersRequest parameters, Context context) { + final String contentType = "application/json"; + return service.moveRecoveryPointSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, protectedItemName, + recoveryPointId, contentType, parameters, context); } /** * Move recovery point from one datastore to another store. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. - * @param recoveryPointId The recoveryPointId parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters Move Resource Across Tiers Request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -865,23 +667,22 @@ private PollerFlux, Void> beginMoveRecoveryPointAsync(String va @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginMoveRecoveryPointAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, - MoveRPAcrossTiersRequest parameters, Context context) { - context = this.client.mergeContext(context); + MoveRPAcrossTiersRequest parameters) { Mono>> mono = moveRecoveryPointWithResponseAsync(vaultName, resourceGroupName, - fabricName, containerName, protectedItemName, recoveryPointId, parameters, context); + fabricName, containerName, protectedItemName, recoveryPointId, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Move recovery point from one datastore to another store. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. - * @param recoveryPointId The recoveryPointId parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters Move Resource Across Tiers Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -892,21 +693,20 @@ private PollerFlux, Void> beginMoveRecoveryPointAsync(String va public SyncPoller, Void> beginMoveRecoveryPoint(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, MoveRPAcrossTiersRequest parameters) { - return this - .beginMoveRecoveryPointAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - recoveryPointId, parameters) - .getSyncPoller(); + Response response = moveRecoveryPointWithResponse(vaultName, resourceGroupName, fabricName, + containerName, protectedItemName, recoveryPointId, parameters); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Move recovery point from one datastore to another store. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. - * @param recoveryPointId The recoveryPointId parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters Move Resource Across Tiers Request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -918,21 +718,20 @@ public SyncPoller, Void> beginMoveRecoveryPoint(String vaultNam public SyncPoller, Void> beginMoveRecoveryPoint(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, MoveRPAcrossTiersRequest parameters, Context context) { - return this - .beginMoveRecoveryPointAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - recoveryPointId, parameters, context) - .getSyncPoller(); + Response response = moveRecoveryPointWithResponse(vaultName, resourceGroupName, fabricName, + containerName, protectedItemName, recoveryPointId, parameters, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Move recovery point from one datastore to another store. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. - * @param recoveryPointId The recoveryPointId parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters Move Resource Across Tiers Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -949,36 +748,12 @@ private Mono moveRecoveryPointAsync(String vaultName, String resourceGroup /** * Move recovery point from one datastore to another store. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. - * @param recoveryPointId The recoveryPointId parameter. - * @param parameters Move Resource Across Tiers Request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono moveRecoveryPointAsync(String vaultName, String resourceGroupName, String fabricName, - String containerName, String protectedItemName, String recoveryPointId, MoveRPAcrossTiersRequest parameters, - Context context) { - return beginMoveRecoveryPointAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - recoveryPointId, parameters, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Move recovery point from one datastore to another store. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. - * @param recoveryPointId The recoveryPointId parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters Move Resource Across Tiers Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -987,19 +762,19 @@ private Mono moveRecoveryPointAsync(String vaultName, String resourceGroup @ServiceMethod(returns = ReturnType.SINGLE) public void moveRecoveryPoint(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, MoveRPAcrossTiersRequest parameters) { - moveRecoveryPointAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - recoveryPointId, parameters).block(); + beginMoveRecoveryPoint(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, + recoveryPointId, parameters).getFinalResult(); } /** * Move recovery point from one datastore to another store. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. - * @param recoveryPointId The recoveryPointId parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters Move Resource Across Tiers Request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1009,7 +784,7 @@ public void moveRecoveryPoint(String vaultName, String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public void moveRecoveryPoint(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, MoveRPAcrossTiersRequest parameters, Context context) { - moveRecoveryPointAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - recoveryPointId, parameters, context).block(); + beginMoveRecoveryPoint(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, + recoveryPointId, parameters, context).getFinalResult(); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceProvidersImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceProvidersImpl.java index a1081c94e756..cfe731c12c6e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceProvidersImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceProvidersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -11,6 +11,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.OperationStatusInner; import com.azure.resourcemanager.recoveryservicesbackup.models.MoveRPAcrossTiersRequest; +import com.azure.resourcemanager.recoveryservicesbackup.models.OkResponse; import com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatus; import com.azure.resourcemanager.recoveryservicesbackup.models.PrepareDataMoveRequest; import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceProviders; @@ -29,6 +30,26 @@ public ResourceProvidersImpl(ResourceProvidersClient innerClient, this.serviceManager = serviceManager; } + public OkResponse bmsPrepareDataMove(String vaultName, String resourceGroupName, + PrepareDataMoveRequest parameters) { + return this.serviceClient().bmsPrepareDataMove(vaultName, resourceGroupName, parameters); + } + + public OkResponse bmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters, + Context context) { + return this.serviceClient().bmsPrepareDataMove(vaultName, resourceGroupName, parameters, context); + } + + public OkResponse bmsTriggerDataMove(String vaultName, String resourceGroupName, + TriggerDataMoveRequest parameters) { + return this.serviceClient().bmsTriggerDataMove(vaultName, resourceGroupName, parameters); + } + + public OkResponse bmsTriggerDataMove(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters, + Context context) { + return this.serviceClient().bmsTriggerDataMove(vaultName, resourceGroupName, parameters, context); + } + public Response getOperationStatusWithResponse(String vaultName, String resourceGroupName, String operationId, Context context) { Response inner @@ -50,24 +71,6 @@ public OperationStatus getOperationStatus(String vaultName, String resourceGroup } } - public void bmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters) { - this.serviceClient().bmsPrepareDataMove(vaultName, resourceGroupName, parameters); - } - - public void bmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters, - Context context) { - this.serviceClient().bmsPrepareDataMove(vaultName, resourceGroupName, parameters, context); - } - - public void bmsTriggerDataMove(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters) { - this.serviceClient().bmsTriggerDataMove(vaultName, resourceGroupName, parameters); - } - - public void bmsTriggerDataMove(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters, - Context context) { - this.serviceClient().bmsTriggerDataMove(vaultName, resourceGroupName, parameters, context); - } - public void moveRecoveryPoint(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, MoveRPAcrossTiersRequest parameters) { this.serviceClient() diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RestoresClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RestoresClientImpl.java index 1b2cb53311e6..dd1df34159bd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RestoresClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RestoresClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -21,6 +21,7 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -43,37 +44,48 @@ public final class RestoresClientImpl implements RestoresClient { /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of RestoresClientImpl. * * @param client the instance of the service client containing this operation class. */ - RestoresClientImpl(RecoveryServicesBackupClientImpl client) { + RestoresClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(RestoresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientRestores to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientRestores to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientRestores") public interface RestoresService { - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> trigger(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName, - @PathParam("containerName") String containerName, @PathParam("protectedItemName") String protectedItemName, - @PathParam("recoveryPointId") String recoveryPointId, - @BodyParam("application/json") RestoreRequestResource parameters, @HeaderParam("Accept") String accept, - Context context); + Mono>> trigger(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, + @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RestoreRequestResource parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/restore") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response triggerSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName, + @PathParam("protectedItemName") String protectedItemName, + @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RestoreRequestResource parameters, Context context); } /** @@ -81,12 +93,12 @@ Mono>> trigger(@HostParam("$host") String endpoint, * use * GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource restore request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -97,45 +109,11 @@ Mono>> trigger(@HostParam("$host") String endpoint, private Mono>> triggerWithResponseAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, RestoreRequestResource parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (recoveryPointId == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPointId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.trigger(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, - recoveryPointId, parameters, accept, context)) + .withContext(context -> service.trigger(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, + protectedItemName, recoveryPointId, contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -144,62 +122,25 @@ private Mono>> triggerWithResponseAsync(String vaultNa * use * GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource restore request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> triggerWithResponseAsync(String vaultName, String resourceGroupName, - String fabricName, String containerName, String protectedItemName, String recoveryPointId, - RestoreRequestResource parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (fabricName == null) { - return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); - } - if (containerName == null) { - return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); - } - if (protectedItemName == null) { - return Mono - .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); - } - if (recoveryPointId == null) { - return Mono - .error(new IllegalArgumentException("Parameter recoveryPointId is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.trigger(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), fabricName, containerName, protectedItemName, recoveryPointId, parameters, - accept, context); + private Response triggerWithResponse(String vaultName, String resourceGroupName, String fabricName, + String containerName, String protectedItemName, String recoveryPointId, RestoreRequestResource parameters) { + final String contentType = "application/json"; + return service.triggerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, protectedItemName, + recoveryPointId, contentType, parameters, Context.NONE); } /** @@ -207,26 +148,27 @@ private Mono>> triggerWithResponseAsync(String vaultNa * use * GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource restore request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginTriggerAsync(String vaultName, String resourceGroupName, - String fabricName, String containerName, String protectedItemName, String recoveryPointId, - RestoreRequestResource parameters) { - Mono>> mono = triggerWithResponseAsync(vaultName, resourceGroupName, fabricName, - containerName, protectedItemName, recoveryPointId, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response triggerWithResponse(String vaultName, String resourceGroupName, String fabricName, + String containerName, String protectedItemName, String recoveryPointId, RestoreRequestResource parameters, + Context context) { + final String contentType = "application/json"; + return service.triggerSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, protectedItemName, + recoveryPointId, contentType, parameters, context); } /** @@ -234,14 +176,13 @@ private PollerFlux, Void> beginTriggerAsync(String vaultName, S * use * GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource restore request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -250,12 +191,11 @@ private PollerFlux, Void> beginTriggerAsync(String vaultName, S @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginTriggerAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, - RestoreRequestResource parameters, Context context) { - context = this.client.mergeContext(context); + RestoreRequestResource parameters) { Mono>> mono = triggerWithResponseAsync(vaultName, resourceGroupName, fabricName, - containerName, protectedItemName, recoveryPointId, parameters, context); + containerName, protectedItemName, recoveryPointId, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -263,12 +203,12 @@ private PollerFlux, Void> beginTriggerAsync(String vaultName, S * use * GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource restore request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -279,10 +219,9 @@ private PollerFlux, Void> beginTriggerAsync(String vaultName, S public SyncPoller, Void> beginTrigger(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, RestoreRequestResource parameters) { - return this - .beginTriggerAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - recoveryPointId, parameters) - .getSyncPoller(); + Response response = triggerWithResponse(vaultName, resourceGroupName, fabricName, containerName, + protectedItemName, recoveryPointId, parameters); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -290,12 +229,12 @@ public SyncPoller, Void> beginTrigger(String vaultName, String * use * GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource restore request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -307,10 +246,9 @@ public SyncPoller, Void> beginTrigger(String vaultName, String public SyncPoller, Void> beginTrigger(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, RestoreRequestResource parameters, Context context) { - return this - .beginTriggerAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - recoveryPointId, parameters, context) - .getSyncPoller(); + Response response = triggerWithResponse(vaultName, resourceGroupName, fabricName, containerName, + protectedItemName, recoveryPointId, parameters, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -318,12 +256,12 @@ public SyncPoller, Void> beginTrigger(String vaultName, String * use * GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource restore request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -342,37 +280,12 @@ private Mono triggerAsync(String vaultName, String resourceGroupName, Stri * use * GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. - * @param parameters resource restore request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono triggerAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, - String protectedItemName, String recoveryPointId, RestoreRequestResource parameters, Context context) { - return beginTriggerAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, - recoveryPointId, parameters, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Restores the specified backed up data. This is an asynchronous operation. To know the status of this API call, - * use - * GetProtectedItemOperationResult API. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource restore request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -381,8 +294,8 @@ private Mono triggerAsync(String vaultName, String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public void trigger(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, RestoreRequestResource parameters) { - triggerAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, - parameters).block(); + beginTrigger(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, + parameters).getFinalResult(); } /** @@ -390,12 +303,12 @@ public void trigger(String vaultName, String resourceGroupName, String fabricNam * use * GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource restore request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -405,7 +318,7 @@ public void trigger(String vaultName, String resourceGroupName, String fabricNam @ServiceMethod(returns = ReturnType.SINGLE) public void trigger(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, RestoreRequestResource parameters, Context context) { - triggerAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, - parameters, context).block(); + beginTrigger(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, + parameters, context).getFinalResult(); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RestoresImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RestoresImpl.java index f5e4cbc64749..2936db8fa520 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RestoresImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RestoresImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/SecurityPINsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/SecurityPINsClientImpl.java index 36b80501680b..75a260136bf4 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/SecurityPINsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/SecurityPINsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -39,43 +39,52 @@ public final class SecurityPINsClientImpl implements SecurityPINsClient { /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of SecurityPINsClientImpl. * * @param client the instance of the service client containing this operation class. */ - SecurityPINsClientImpl(RecoveryServicesBackupClientImpl client) { + SecurityPINsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(SecurityPINsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientSecurityPINs to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientSecurityPINs to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientSecurityPINs") public interface SecurityPINsService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") SecurityPinBase parameters, @HeaderParam("Accept") String accept, - Context context); + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SecurityPinBase parameters, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupSecurityPIN") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SecurityPinBase parameters, Context context); } /** * Get the security PIN. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters security pin request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -85,28 +94,10 @@ Mono> get(@HostParam("$host") String endpoint, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, SecurityPinBase parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters != null) { - parameters.validate(); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), parameters, accept, context)) + resourceGroupName, this.client.getSubscriptionId(), accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -114,46 +105,7 @@ private Mono> getWithResponseAsync(String vaultN * Get the security PIN. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters security pin request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the security PIN along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, - SecurityPinBase parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters != null) { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Get the security PIN. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -170,7 +122,7 @@ private Mono getAsync(String vaultName, String resourceGr * Get the security PIN. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters security pin request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -181,14 +133,16 @@ private Mono getAsync(String vaultName, String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, SecurityPinBase parameters, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, parameters, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), accept, parameters, context); } /** * Get the security PIN. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/SecurityPINsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/SecurityPINsImpl.java index 4d5454cd8a61..d10dc49746d6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/SecurityPINsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/SecurityPINsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TieringCostInfoImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TieringCostInfoImpl.java index 4da0c8eec84c..92641668dac5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TieringCostInfoImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TieringCostInfoImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TieringCostOperationStatusClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TieringCostOperationStatusClientImpl.java index 8d2d5e427c23..5cfe8ab9c575 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TieringCostOperationStatusClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TieringCostOperationStatusClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -37,41 +37,49 @@ public final class TieringCostOperationStatusClientImpl implements TieringCostOp /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of TieringCostOperationStatusClientImpl. * * @param client the instance of the service client containing this operation class. */ - TieringCostOperationStatusClientImpl(RecoveryServicesBackupClientImpl client) { + TieringCostOperationStatusClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(TieringCostOperationStatusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientTieringCostOperationStatus to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientTieringCostOperationStatus to + * be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientTieringCostOperationStatus") public interface TieringCostOperationStatusService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTieringCost/default/operationsStatus/{operationId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, - @PathParam("operationId") String operationId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTieringCost/default/operationsStatus/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); } /** * Gets the status of async operations of tiering cost. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -83,75 +91,17 @@ Mono> get(@HostParam("$host") String endpoint, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String vaultName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, vaultName, operationId, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vaultName, operationId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the status of async operations of tiering cost. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param vaultName The name of the recovery services vault. - * @param operationId The operationId parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of async operations of tiering cost along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String vaultName, - String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, vaultName, - operationId, this.client.getApiVersion(), accept, context); - } - - /** - * Gets the status of async operations of tiering cost. - * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -168,7 +118,7 @@ private Mono getAsync(String resourceGroupName, String vau /** * Gets the status of async operations of tiering cost. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -180,13 +130,15 @@ private Mono getAsync(String resourceGroupName, String vau @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String vaultName, String operationId, Context context) { - return getWithResponseAsync(resourceGroupName, vaultName, operationId, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, vaultName, operationId, accept, context); } /** * Gets the status of async operations of tiering cost. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TieringCostOperationStatusImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TieringCostOperationStatusImpl.java index 32bc5343557d..9c3cfaf50b4f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TieringCostOperationStatusImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TieringCostOperationStatusImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TokenInformationImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TokenInformationImpl.java index dbb5c24b7f33..49dc76a4c17c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TokenInformationImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TokenInformationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/UnlockDeleteResponseImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/UnlockDeleteResponseImpl.java index 48b88c2aa56c..572be623b52b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/UnlockDeleteResponseImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/UnlockDeleteResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationResultsClientImpl.java index bdad7c3857ac..6a0f5810dcbf 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationResultsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -37,31 +37,41 @@ public final class ValidateOperationResultsClientImpl implements ValidateOperati /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ValidateOperationResultsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ValidateOperationResultsClientImpl(RecoveryServicesBackupClientImpl client) { + ValidateOperationResultsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ValidateOperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientValidateOperationResults to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientValidateOperationResults to be + * used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientValidateOperationResults") public interface ValidateOperationResultsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationResults/{operationId}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationResults/{operationId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("operationId") String operationId, @@ -72,7 +82,7 @@ Mono> get(@HostParam("$host") String e * Fetches the result of a triggered validate operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation whose result needs to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -82,24 +92,6 @@ Mono> get(@HostParam("$host") String e @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, @@ -111,46 +103,7 @@ private Mono> getWithResponseAsync(Str * Fetches the result of a triggered validate operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId OperationID which represents the operation whose result needs to be fetched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, - String resourceGroupName, String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), operationId, accept, context); - } - - /** - * Fetches the result of a triggered validate operation. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation whose result needs to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -168,7 +121,7 @@ private Mono getAsync(String vaultName, String * Fetches the result of a triggered validate operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation whose result needs to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -179,14 +132,16 @@ private Mono getAsync(String vaultName, String @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String operationId, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, operationId, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), operationId, accept, context); } /** * Fetches the result of a triggered validate operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation whose result needs to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationResultsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationResultsImpl.java index 1704c12587ad..882d2dcb8a53 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationResultsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationResultsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationStatusesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationStatusesClientImpl.java index 5c1e67cc8bd5..c80bcaaa688f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationStatusesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationStatusesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -37,31 +37,41 @@ public final class ValidateOperationStatusesClientImpl implements ValidateOperat /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ValidateOperationStatusesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ValidateOperationStatusesClientImpl(RecoveryServicesBackupClientImpl client) { + ValidateOperationStatusesClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ValidateOperationStatusesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientValidateOperationStatuses to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientValidateOperationStatuses to be + * used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientValidateOperationStatuses") public interface ValidateOperationStatusesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationsStatuses/{operationId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupValidateOperationsStatuses/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, @PathParam("operationId") String operationId, @@ -74,7 +84,7 @@ Mono> get(@HostParam("$host") String endpoint, * If operation has completed, this method returns the list of errors obtained while validating the operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID represents the operation whose status needs to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -84,24 +94,6 @@ Mono> get(@HostParam("$host") String endpoint, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, String operationId) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, @@ -115,48 +107,7 @@ private Mono> getWithResponseAsync(String vaultNa * If operation has completed, this method returns the list of errors obtained while validating the operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId OperationID represents the operation whose status needs to be fetched. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String vaultName, String resourceGroupName, - String operationId, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (operationId == null) { - return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), operationId, accept, context); - } - - /** - * Fetches the status of a triggered validate operation. The status can be in progress, completed - * or failed. You can refer to the OperationStatus enum for all the possible states of the operation. - * If operation has completed, this method returns the list of errors obtained while validating the operation. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID represents the operation whose status needs to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -175,7 +126,7 @@ private Mono getAsync(String vaultName, String resourceGro * If operation has completed, this method returns the list of errors obtained while validating the operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID represents the operation whose status needs to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -186,7 +137,9 @@ private Mono getAsync(String vaultName, String resourceGro @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String vaultName, String resourceGroupName, String operationId, Context context) { - return getWithResponseAsync(vaultName, resourceGroupName, operationId, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), operationId, accept, context); } /** @@ -195,7 +148,7 @@ public Response getWithResponse(String vaultName, String r * If operation has completed, this method returns the list of errors obtained while validating the operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID represents the operation whose status needs to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationStatusesImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationStatusesImpl.java index 9d3045cfc959..1b91357bb30a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationStatusesImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationStatusesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationsClientImpl.java index 49a71a356334..cf8b4fc04ac5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; @@ -21,6 +21,7 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -43,36 +44,45 @@ public final class ValidateOperationsClientImpl implements ValidateOperationsCli /** * The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; + private final RecoveryServicesBackupManagementClientImpl client; /** * Initializes an instance of ValidateOperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ValidateOperationsClientImpl(RecoveryServicesBackupClientImpl client) { + ValidateOperationsClientImpl(RecoveryServicesBackupManagementClientImpl client) { this.service = RestProxy.create(ValidateOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for RecoveryServicesBackupClientValidateOperations to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for RecoveryServicesBackupManagementClientValidateOperations to be used + * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") + @Host("{endpoint}") + @ServiceInterface(name = "RecoveryServicesBackupManagementClientValidateOperations") public interface ValidateOperationsService { - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTriggerValidateOperation") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> trigger(@HostParam("$host") String endpoint, + Mono>> trigger(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ValidateOperationRequestResource parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ValidateOperationRequestResource parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupTriggerValidateOperation") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response triggerSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ValidateOperationRequestResource parameters, Context context); } /** @@ -80,7 +90,7 @@ Mono>> trigger(@HostParam("$host") String endpoint, * headers which can be tracked using GetValidateOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -90,30 +100,10 @@ Mono>> trigger(@HostParam("$host") String endpoint, @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> triggerWithResponseAsync(String vaultName, String resourceGroupName, ValidateOperationRequestResource parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil .withContext(context -> service.trigger(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, - resourceGroupName, this.client.getSubscriptionId(), parameters, accept, context)) + resourceGroupName, this.client.getSubscriptionId(), contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -122,41 +112,19 @@ private Mono>> triggerWithResponseAsync(String vaultNa * headers which can be tracked using GetValidateOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> triggerWithResponseAsync(String vaultName, String resourceGroupName, - ValidateOperationRequestResource parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.trigger(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, - this.client.getSubscriptionId(), parameters, accept, context); + private Response triggerWithResponse(String vaultName, String resourceGroupName, + ValidateOperationRequestResource parameters) { + final String contentType = "application/json"; + return service.triggerSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), contentType, parameters, Context.NONE); } /** @@ -164,19 +132,20 @@ private Mono>> triggerWithResponseAsync(String vaultNa * headers which can be tracked using GetValidateOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginTriggerAsync(String vaultName, String resourceGroupName, - ValidateOperationRequestResource parameters) { - Mono>> mono = triggerWithResponseAsync(vaultName, resourceGroupName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response triggerWithResponse(String vaultName, String resourceGroupName, + ValidateOperationRequestResource parameters, Context context) { + final String contentType = "application/json"; + return service.triggerSync(this.client.getEndpoint(), this.client.getApiVersion(), vaultName, resourceGroupName, + this.client.getSubscriptionId(), contentType, parameters, context); } /** @@ -184,9 +153,8 @@ private PollerFlux, Void> beginTriggerAsync(String vaultName, S * headers which can be tracked using GetValidateOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -194,12 +162,10 @@ private PollerFlux, Void> beginTriggerAsync(String vaultName, S */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginTriggerAsync(String vaultName, String resourceGroupName, - ValidateOperationRequestResource parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = triggerWithResponseAsync(vaultName, resourceGroupName, parameters, context); + ValidateOperationRequestResource parameters) { + Mono>> mono = triggerWithResponseAsync(vaultName, resourceGroupName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -207,7 +173,7 @@ private PollerFlux, Void> beginTriggerAsync(String vaultName, S * headers which can be tracked using GetValidateOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -217,7 +183,8 @@ private PollerFlux, Void> beginTriggerAsync(String vaultName, S @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginTrigger(String vaultName, String resourceGroupName, ValidateOperationRequestResource parameters) { - return this.beginTriggerAsync(vaultName, resourceGroupName, parameters).getSyncPoller(); + Response response = triggerWithResponse(vaultName, resourceGroupName, parameters); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -225,7 +192,7 @@ public SyncPoller, Void> beginTrigger(String vaultName, String * headers which can be tracked using GetValidateOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -236,7 +203,8 @@ public SyncPoller, Void> beginTrigger(String vaultName, String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginTrigger(String vaultName, String resourceGroupName, ValidateOperationRequestResource parameters, Context context) { - return this.beginTriggerAsync(vaultName, resourceGroupName, parameters, context).getSyncPoller(); + Response response = triggerWithResponse(vaultName, resourceGroupName, parameters, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -244,7 +212,7 @@ public SyncPoller, Void> beginTrigger(String vaultName, String * headers which can be tracked using GetValidateOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -263,27 +231,7 @@ private Mono triggerAsync(String vaultName, String resourceGroupName, * headers which can be tracked using GetValidateOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters resource validate operation request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono triggerAsync(String vaultName, String resourceGroupName, - ValidateOperationRequestResource parameters, Context context) { - return beginTriggerAsync(vaultName, resourceGroupName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Validate operation for specified backed up item in the form of an asynchronous operation. Returns tracking - * headers which can be tracked using GetValidateOperationResult API. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -291,7 +239,7 @@ private Mono triggerAsync(String vaultName, String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public void trigger(String vaultName, String resourceGroupName, ValidateOperationRequestResource parameters) { - triggerAsync(vaultName, resourceGroupName, parameters).block(); + beginTrigger(vaultName, resourceGroupName, parameters).getFinalResult(); } /** @@ -299,7 +247,7 @@ public void trigger(String vaultName, String resourceGroupName, ValidateOperatio * headers which can be tracked using GetValidateOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -309,6 +257,6 @@ public void trigger(String vaultName, String resourceGroupName, ValidateOperatio @ServiceMethod(returns = ReturnType.SINGLE) public void trigger(String vaultName, String resourceGroupName, ValidateOperationRequestResource parameters, Context context) { - triggerAsync(vaultName, resourceGroupName, parameters, context).block(); + beginTrigger(vaultName, resourceGroupName, parameters, context).getFinalResult(); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationsImpl.java index e07d98eede2f..cd00a547c86e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationsResponseImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationsResponseImpl.java index 94d033060dc3..eb7a43a93eca 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationsResponseImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationsResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/VaultStorageConfigOperationResultResponseImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/VaultStorageConfigOperationResultResponseImpl.java index c84d23a134c9..a035ba90d408 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/VaultStorageConfigOperationResultResponseImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/VaultStorageConfigOperationResultResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/WorkloadItemResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/WorkloadItemResourceImpl.java index c401e052f86a..849db971619d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/WorkloadItemResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/WorkloadItemResourceImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadItemResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadItem; import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadItemResource; @@ -46,12 +47,16 @@ public Map tags() { } } + public String eTag() { + return this.innerModel().eTag(); + } + public WorkloadItem properties() { return this.innerModel().properties(); } - public String etag() { - return this.innerModel().etag(); + public SystemData systemData() { + return this.innerModel().systemData(); } public WorkloadItemResourceInner innerModel() { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/WorkloadProtectableItemResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/WorkloadProtectableItemResourceImpl.java index d3fb5cd44e28..155f6e93f3f0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/WorkloadProtectableItemResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/WorkloadProtectableItemResourceImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadProtectableItemResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadProtectableItem; import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadProtectableItemResource; @@ -46,12 +47,16 @@ public Map tags() { } } + public String eTag() { + return this.innerModel().eTag(); + } + public WorkloadProtectableItem properties() { return this.innerModel().properties(); } - public String etag() { - return this.innerModel().etag(); + public SystemData systemData() { + return this.innerModel().systemData(); } public WorkloadProtectableItemResourceInner innerModel() { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineBaseResourceList.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/BackupEngineBaseResourceList.java similarity index 71% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineBaseResourceList.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/BackupEngineBaseResourceList.java index 71102710bf0f..55c672837b39 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineBaseResourceList.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/BackupEngineBaseResourceList.java @@ -1,31 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.recoveryservicesbackup.models; +package com.azure.resourcemanager.recoveryservicesbackup.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupEngineBaseResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceList; import java.io.IOException; import java.util.List; /** * List of BackupEngineBase resources. */ -@Fluent +@Immutable public final class BackupEngineBaseResourceList extends ResourceList { /* * List of resources. */ private List value; + /* + * The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use + * ListNext() to fetch the next page if the total number of resources exceeds 200. + */ + private String nextLink; + /** * Creates an instance of BackupEngineBaseResourceList class. */ - public BackupEngineBaseResourceList() { + private BackupEngineBaseResourceList() { } /** @@ -38,35 +45,14 @@ public List value() { } /** - * Set the value property: List of resources. - * - * @param value the value value to set. - * @return the BackupEngineBaseResourceList object itself. - */ - public BackupEngineBaseResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BackupEngineBaseResourceList withNextLink(String nextLink) { - super.withNextLink(nextLink); - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The URI to fetch the next page of resources, with each API call returning up to 200 + * resources per page. Use ListNext() to fetch the next page if the total number of resources exceeds 200. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ @Override - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -96,7 +82,7 @@ public static BackupEngineBaseResourceList fromJson(JsonReader jsonReader) throw reader.nextToken(); if ("nextLink".equals(fieldName)) { - deserializedBackupEngineBaseResourceList.withNextLink(reader.getString()); + deserializedBackupEngineBaseResourceList.nextLink = reader.getString(); } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> BackupEngineBaseResourceInner.fromJson(reader1)); diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupManagementUsageList.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/BackupManagementUsageList.java similarity index 66% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupManagementUsageList.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/BackupManagementUsageList.java index 9c78b518b4ab..58818788867d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupManagementUsageList.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/BackupManagementUsageList.java @@ -1,32 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.recoveryservicesbackup.models; +package com.azure.resourcemanager.recoveryservicesbackup.implementation.models; -import com.azure.core.annotation.Fluent; +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.recoveryservicesbackup.fluent.models.BackupManagementUsageInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceList; import java.io.IOException; import java.util.List; /** * Backup management usage for vault. */ -@Fluent -public final class BackupManagementUsageList implements JsonSerializable { +@Immutable +public final class BackupManagementUsageList extends ResourceList { /* * The list of backup management usages for the given vault. */ private List value; + /* + * The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use + * ListNext() to fetch the next page if the total number of resources exceeds 200. + */ + private String nextLink; + /** * Creates an instance of BackupManagementUsageList class. */ - public BackupManagementUsageList() { + private BackupManagementUsageList() { } /** @@ -39,25 +45,14 @@ public List value() { } /** - * Set the value property: The list of backup management usages for the given vault. + * Get the nextLink property: The URI to fetch the next page of resources, with each API call returning up to 200 + * resources per page. Use ListNext() to fetch the next page if the total number of resources exceeds 200. * - * @param value the value value to set. - * @return the BackupManagementUsageList object itself. + * @return the nextLink value. */ - public BackupManagementUsageList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + @Override + public String nextLink() { + return this.nextLink; } /** @@ -66,6 +61,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", nextLink()); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -85,7 +81,9 @@ public static BackupManagementUsageList fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedBackupManagementUsageList.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> BackupManagementUsageInner.fromJson(reader1)); deserializedBackupManagementUsageList.value = value; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryResponse.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ClientDiscoveryResponse.java similarity index 72% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryResponse.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ClientDiscoveryResponse.java index 8b7c730671d5..697b93cdddad 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryResponse.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ClientDiscoveryResponse.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.recoveryservicesbackup.models; +package com.azure.resourcemanager.recoveryservicesbackup.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * Operations List response which contains list of available APIs. */ -@Fluent +@Immutable public final class ClientDiscoveryResponse implements JsonSerializable { /* * List of available operations. @@ -31,7 +31,7 @@ public final class ClientDiscoveryResponse implements JsonSerializable value() { return this.value; } - /** - * Set the value property: List of available operations. - * - * @param value the value value to set. - * @return the ClientDiscoveryResponse object itself. - */ - public ClientDiscoveryResponse withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: Link to the next chunk of Response. * @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link to the next chunk of Response. - * - * @param nextLink the nextLink value to set. - * @return the ClientDiscoveryResponse object itself. - */ - public ClientDiscoveryResponse withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobResourceList.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/JobResourceList.java similarity index 71% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobResourceList.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/JobResourceList.java index 047f8f277dee..96b8209f17d2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobResourceList.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/JobResourceList.java @@ -1,31 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.recoveryservicesbackup.models; +package com.azure.resourcemanager.recoveryservicesbackup.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.JobResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceList; import java.io.IOException; import java.util.List; /** * List of Job resources. */ -@Fluent +@Immutable public final class JobResourceList extends ResourceList { /* * List of resources. */ private List value; + /* + * The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use + * ListNext() to fetch the next page if the total number of resources exceeds 200. + */ + private String nextLink; + /** * Creates an instance of JobResourceList class. */ - public JobResourceList() { + private JobResourceList() { } /** @@ -38,35 +45,14 @@ public List value() { } /** - * Set the value property: List of resources. - * - * @param value the value value to set. - * @return the JobResourceList object itself. - */ - public JobResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JobResourceList withNextLink(String nextLink) { - super.withNextLink(nextLink); - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The URI to fetch the next page of resources, with each API call returning up to 200 + * resources per page. Use ListNext() to fetch the next page if the total number of resources exceeds 200. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ @Override - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -96,7 +82,7 @@ public static JobResourceList fromJson(JsonReader jsonReader) throws IOException reader.nextToken(); if ("nextLink".equals(fieldName)) { - deserializedJobResourceList.withNextLink(reader.getString()); + deserializedJobResourceList.nextLink = reader.getString(); } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> JobResourceInner.fromJson(reader1)); deserializedJobResourceList.value = value; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainerResourceList.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectableContainerResourceList.java similarity index 73% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainerResourceList.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectableContainerResourceList.java index ac48119678a1..af16ad223f4c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainerResourceList.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectableContainerResourceList.java @@ -1,31 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.recoveryservicesbackup.models; +package com.azure.resourcemanager.recoveryservicesbackup.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectableContainerResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceList; import java.io.IOException; import java.util.List; /** * List of ProtectableContainer resources. */ -@Fluent +@Immutable public final class ProtectableContainerResourceList extends ResourceList { /* * List of resources. */ private List value; + /* + * The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use + * ListNext() to fetch the next page if the total number of resources exceeds 200. + */ + private String nextLink; + /** * Creates an instance of ProtectableContainerResourceList class. */ - public ProtectableContainerResourceList() { + private ProtectableContainerResourceList() { } /** @@ -38,35 +45,14 @@ public List value() { } /** - * Set the value property: List of resources. - * - * @param value the value value to set. - * @return the ProtectableContainerResourceList object itself. - */ - public ProtectableContainerResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProtectableContainerResourceList withNextLink(String nextLink) { - super.withNextLink(nextLink); - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The URI to fetch the next page of resources, with each API call returning up to 200 + * resources per page. Use ListNext() to fetch the next page if the total number of resources exceeds 200. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ @Override - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -97,7 +83,7 @@ public static ProtectableContainerResourceList fromJson(JsonReader jsonReader) t reader.nextToken(); if ("nextLink".equals(fieldName)) { - deserializedProtectableContainerResourceList.withNextLink(reader.getString()); + deserializedProtectableContainerResourceList.nextLink = reader.getString(); } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ProtectableContainerResourceInner.fromJson(reader1)); diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemResourceList.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectedItemResourceList.java similarity index 71% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemResourceList.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectedItemResourceList.java index a49e92dfb134..6486660d035a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemResourceList.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectedItemResourceList.java @@ -1,31 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.recoveryservicesbackup.models; +package com.azure.resourcemanager.recoveryservicesbackup.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectedItemResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceList; import java.io.IOException; import java.util.List; /** * List of ProtectedItem resources. */ -@Fluent +@Immutable public final class ProtectedItemResourceList extends ResourceList { /* * List of resources. */ private List value; + /* + * The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use + * ListNext() to fetch the next page if the total number of resources exceeds 200. + */ + private String nextLink; + /** * Creates an instance of ProtectedItemResourceList class. */ - public ProtectedItemResourceList() { + private ProtectedItemResourceList() { } /** @@ -38,35 +45,14 @@ public List value() { } /** - * Set the value property: List of resources. - * - * @param value the value value to set. - * @return the ProtectedItemResourceList object itself. - */ - public ProtectedItemResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProtectedItemResourceList withNextLink(String nextLink) { - super.withNextLink(nextLink); - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The URI to fetch the next page of resources, with each API call returning up to 200 + * resources per page. Use ListNext() to fetch the next page if the total number of resources exceeds 200. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ @Override - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -96,7 +82,7 @@ public static ProtectedItemResourceList fromJson(JsonReader jsonReader) throws I reader.nextToken(); if ("nextLink".equals(fieldName)) { - deserializedProtectedItemResourceList.withNextLink(reader.getString()); + deserializedProtectedItemResourceList.nextLink = reader.getString(); } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ProtectedItemResourceInner.fromJson(reader1)); diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerResourceList.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectionContainerResourceList.java similarity index 73% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerResourceList.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectionContainerResourceList.java index 9a506f66e6cd..3816d98e9368 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerResourceList.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectionContainerResourceList.java @@ -1,31 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.recoveryservicesbackup.models; +package com.azure.resourcemanager.recoveryservicesbackup.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionContainerResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceList; import java.io.IOException; import java.util.List; /** * List of ProtectionContainer resources. */ -@Fluent +@Immutable public final class ProtectionContainerResourceList extends ResourceList { /* * List of resources. */ private List value; + /* + * The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use + * ListNext() to fetch the next page if the total number of resources exceeds 200. + */ + private String nextLink; + /** * Creates an instance of ProtectionContainerResourceList class. */ - public ProtectionContainerResourceList() { + private ProtectionContainerResourceList() { } /** @@ -38,35 +45,14 @@ public List value() { } /** - * Set the value property: List of resources. - * - * @param value the value value to set. - * @return the ProtectionContainerResourceList object itself. - */ - public ProtectionContainerResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProtectionContainerResourceList withNextLink(String nextLink) { - super.withNextLink(nextLink); - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The URI to fetch the next page of resources, with each API call returning up to 200 + * resources per page. Use ListNext() to fetch the next page if the total number of resources exceeds 200. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ @Override - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -97,7 +83,7 @@ public static ProtectionContainerResourceList fromJson(JsonReader jsonReader) th reader.nextToken(); if ("nextLink".equals(fieldName)) { - deserializedProtectionContainerResourceList.withNextLink(reader.getString()); + deserializedProtectionContainerResourceList.nextLink = reader.getString(); } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ProtectionContainerResourceInner.fromJson(reader1)); diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntentResourceList.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectionIntentResourceList.java similarity index 71% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntentResourceList.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectionIntentResourceList.java index fa2d818e435d..1a21fb9c1d4b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntentResourceList.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectionIntentResourceList.java @@ -1,31 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.recoveryservicesbackup.models; +package com.azure.resourcemanager.recoveryservicesbackup.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionIntentResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceList; import java.io.IOException; import java.util.List; /** * List of ProtectionIntent resources. */ -@Fluent +@Immutable public final class ProtectionIntentResourceList extends ResourceList { /* * List of resources. */ private List value; + /* + * The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use + * ListNext() to fetch the next page if the total number of resources exceeds 200. + */ + private String nextLink; + /** * Creates an instance of ProtectionIntentResourceList class. */ - public ProtectionIntentResourceList() { + private ProtectionIntentResourceList() { } /** @@ -38,35 +45,14 @@ public List value() { } /** - * Set the value property: List of resources. - * - * @param value the value value to set. - * @return the ProtectionIntentResourceList object itself. - */ - public ProtectionIntentResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProtectionIntentResourceList withNextLink(String nextLink) { - super.withNextLink(nextLink); - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The URI to fetch the next page of resources, with each API call returning up to 200 + * resources per page. Use ListNext() to fetch the next page if the total number of resources exceeds 200. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ @Override - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -96,7 +82,7 @@ public static ProtectionIntentResourceList fromJson(JsonReader jsonReader) throw reader.nextToken(); if ("nextLink".equals(fieldName)) { - deserializedProtectionIntentResourceList.withNextLink(reader.getString()); + deserializedProtectionIntentResourceList.nextLink = reader.getString(); } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ProtectionIntentResourceInner.fromJson(reader1)); diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyResourceList.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectionPolicyResourceList.java similarity index 71% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyResourceList.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectionPolicyResourceList.java index a672d0d05526..1b81e1d730d1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyResourceList.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectionPolicyResourceList.java @@ -1,31 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.recoveryservicesbackup.models; +package com.azure.resourcemanager.recoveryservicesbackup.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionPolicyResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceList; import java.io.IOException; import java.util.List; /** * List of ProtectionPolicy resources. */ -@Fluent +@Immutable public final class ProtectionPolicyResourceList extends ResourceList { /* * List of resources. */ private List value; + /* + * The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use + * ListNext() to fetch the next page if the total number of resources exceeds 200. + */ + private String nextLink; + /** * Creates an instance of ProtectionPolicyResourceList class. */ - public ProtectionPolicyResourceList() { + private ProtectionPolicyResourceList() { } /** @@ -38,35 +45,14 @@ public List value() { } /** - * Set the value property: List of resources. - * - * @param value the value value to set. - * @return the ProtectionPolicyResourceList object itself. - */ - public ProtectionPolicyResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ProtectionPolicyResourceList withNextLink(String nextLink) { - super.withNextLink(nextLink); - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The URI to fetch the next page of resources, with each API call returning up to 200 + * resources per page. Use ListNext() to fetch the next page if the total number of resources exceeds 200. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ @Override - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -96,7 +82,7 @@ public static ProtectionPolicyResourceList fromJson(JsonReader jsonReader) throw reader.nextToken(); if ("nextLink".equals(fieldName)) { - deserializedProtectionPolicyResourceList.withNextLink(reader.getString()); + deserializedProtectionPolicyResourceList.nextLink = reader.getString(); } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ProtectionPolicyResourceInner.fromJson(reader1)); diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointResourceList.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/RecoveryPointResourceList.java similarity index 71% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointResourceList.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/RecoveryPointResourceList.java index bfc35a1c04bf..72b62d9f8268 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointResourceList.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/RecoveryPointResourceList.java @@ -1,31 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.recoveryservicesbackup.models; +package com.azure.resourcemanager.recoveryservicesbackup.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.RecoveryPointResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceList; import java.io.IOException; import java.util.List; /** * List of RecoveryPoint resources. */ -@Fluent +@Immutable public final class RecoveryPointResourceList extends ResourceList { /* * List of resources. */ private List value; + /* + * The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use + * ListNext() to fetch the next page if the total number of resources exceeds 200. + */ + private String nextLink; + /** * Creates an instance of RecoveryPointResourceList class. */ - public RecoveryPointResourceList() { + private RecoveryPointResourceList() { } /** @@ -38,35 +45,14 @@ public List value() { } /** - * Set the value property: List of resources. - * - * @param value the value value to set. - * @return the RecoveryPointResourceList object itself. - */ - public RecoveryPointResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RecoveryPointResourceList withNextLink(String nextLink) { - super.withNextLink(nextLink); - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The URI to fetch the next page of resources, with each API call returning up to 200 + * resources per page. Use ListNext() to fetch the next page if the total number of resources exceeds 200. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ @Override - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -96,7 +82,7 @@ public static RecoveryPointResourceList fromJson(JsonReader jsonReader) throws I reader.nextToken(); if ("nextLink".equals(fieldName)) { - deserializedRecoveryPointResourceList.withNextLink(reader.getString()); + deserializedRecoveryPointResourceList.nextLink = reader.getString(); } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> RecoveryPointResourceInner.fromJson(reader1)); diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyBaseResourceList.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ResourceGuardProxyBaseResourceList.java similarity index 73% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyBaseResourceList.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ResourceGuardProxyBaseResourceList.java index 6adef0198323..fe146ffef132 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyBaseResourceList.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ResourceGuardProxyBaseResourceList.java @@ -1,31 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.recoveryservicesbackup.models; +package com.azure.resourcemanager.recoveryservicesbackup.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ResourceGuardProxyBaseResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceList; import java.io.IOException; import java.util.List; /** * List of ResourceGuardProxyBase resources. */ -@Fluent +@Immutable public final class ResourceGuardProxyBaseResourceList extends ResourceList { /* * List of resources. */ private List value; + /* + * The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use + * ListNext() to fetch the next page if the total number of resources exceeds 200. + */ + private String nextLink; + /** * Creates an instance of ResourceGuardProxyBaseResourceList class. */ - public ResourceGuardProxyBaseResourceList() { + private ResourceGuardProxyBaseResourceList() { } /** @@ -38,35 +45,14 @@ public List value() { } /** - * Set the value property: List of resources. - * - * @param value the value value to set. - * @return the ResourceGuardProxyBaseResourceList object itself. - */ - public ResourceGuardProxyBaseResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ResourceGuardProxyBaseResourceList withNextLink(String nextLink) { - super.withNextLink(nextLink); - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The URI to fetch the next page of resources, with each API call returning up to 200 + * resources per page. Use ListNext() to fetch the next page if the total number of resources exceeds 200. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ @Override - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -97,7 +83,7 @@ public static ResourceGuardProxyBaseResourceList fromJson(JsonReader jsonReader) reader.nextToken(); if ("nextLink".equals(fieldName)) { - deserializedResourceGuardProxyBaseResourceList.withNextLink(reader.getString()); + deserializedResourceGuardProxyBaseResourceList.nextLink = reader.getString(); } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ResourceGuardProxyBaseResourceInner.fromJson(reader1)); diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItemResourceList.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/WorkloadItemResourceList.java similarity index 71% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItemResourceList.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/WorkloadItemResourceList.java index 4e397ea8e99a..72a2f313fc69 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItemResourceList.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/WorkloadItemResourceList.java @@ -1,31 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.recoveryservicesbackup.models; +package com.azure.resourcemanager.recoveryservicesbackup.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadItemResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceList; import java.io.IOException; import java.util.List; /** * List of WorkloadItem resources. */ -@Fluent +@Immutable public final class WorkloadItemResourceList extends ResourceList { /* * List of resources. */ private List value; + /* + * The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use + * ListNext() to fetch the next page if the total number of resources exceeds 200. + */ + private String nextLink; + /** * Creates an instance of WorkloadItemResourceList class. */ - public WorkloadItemResourceList() { + private WorkloadItemResourceList() { } /** @@ -38,35 +45,14 @@ public List value() { } /** - * Set the value property: List of resources. - * - * @param value the value value to set. - * @return the WorkloadItemResourceList object itself. - */ - public WorkloadItemResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public WorkloadItemResourceList withNextLink(String nextLink) { - super.withNextLink(nextLink); - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The URI to fetch the next page of resources, with each API call returning up to 200 + * resources per page. Use ListNext() to fetch the next page if the total number of resources exceeds 200. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ @Override - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -96,7 +82,7 @@ public static WorkloadItemResourceList fromJson(JsonReader jsonReader) throws IO reader.nextToken(); if ("nextLink".equals(fieldName)) { - deserializedWorkloadItemResourceList.withNextLink(reader.getString()); + deserializedWorkloadItemResourceList.nextLink = reader.getString(); } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> WorkloadItemResourceInner.fromJson(reader1)); diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadProtectableItemResourceList.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/WorkloadProtectableItemResourceList.java similarity index 73% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadProtectableItemResourceList.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/WorkloadProtectableItemResourceList.java index f278aafff466..6b033ef5d58d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadProtectableItemResourceList.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/WorkloadProtectableItemResourceList.java @@ -1,31 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.recoveryservicesbackup.models; +package com.azure.resourcemanager.recoveryservicesbackup.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadProtectableItemResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceList; import java.io.IOException; import java.util.List; /** * List of WorkloadProtectableItem resources. */ -@Fluent +@Immutable public final class WorkloadProtectableItemResourceList extends ResourceList { /* * List of resources. */ private List value; + /* + * The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use + * ListNext() to fetch the next page if the total number of resources exceeds 200. + */ + private String nextLink; + /** * Creates an instance of WorkloadProtectableItemResourceList class. */ - public WorkloadProtectableItemResourceList() { + private WorkloadProtectableItemResourceList() { } /** @@ -38,35 +45,14 @@ public List value() { } /** - * Set the value property: List of resources. - * - * @param value the value value to set. - * @return the WorkloadProtectableItemResourceList object itself. - */ - public WorkloadProtectableItemResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public WorkloadProtectableItemResourceList withNextLink(String nextLink) { - super.withNextLink(nextLink); - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The URI to fetch the next page of resources, with each API call returning up to 200 + * resources per page. Use ListNext() to fetch the next page if the total number of resources exceeds 200. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ @Override - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -97,7 +83,7 @@ public static WorkloadProtectableItemResourceList fromJson(JsonReader jsonReader reader.nextToken(); if ("nextLink".equals(fieldName)) { - deserializedWorkloadProtectableItemResourceList.withNextLink(reader.getString()); + deserializedWorkloadProtectableItemResourceList.nextLink = reader.getString(); } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> WorkloadProtectableItemResourceInner.fromJson(reader1)); diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/package-info.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/package-info.java index 29a79bfff63d..ed1af0dd1190 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/package-info.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for RecoveryServicesBackupClient. + * Package containing the implementations for RecoveryServicesBackup. * Open API 2.0 Specs for Azure RecoveryServices Backup service. */ package com.azure.resourcemanager.recoveryservicesbackup.implementation; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AcquireStorageAccountLock.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AcquireStorageAccountLock.java index 5535b1c923a5..9c6dfdce810c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AcquireStorageAccountLock.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AcquireStorageAccountLock.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureBackupGoalFeatureSupportRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureBackupGoalFeatureSupportRequest.java index 89277d08d986..cc5f883b3a1b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureBackupGoalFeatureSupportRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureBackupGoalFeatureSupportRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -36,15 +36,6 @@ public String featureType() { return this.featureType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureBackupServerContainer.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureBackupServerContainer.java index 847d26f6cb17..781728d80261 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureBackupServerContainer.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureBackupServerContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -162,18 +162,6 @@ public AzureBackupServerContainer withProtectableObjectType(String protectableOb return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (extendedInfo() != null) { - extendedInfo().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureBackupServerEngine.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureBackupServerEngine.java index a6794b436efe..1b62e05238eb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureBackupServerEngine.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureBackupServerEngine.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Backup engine type when Azure Backup Server is used to manage the backups. */ -@Fluent +@Immutable public final class AzureBackupServerEngine extends BackupEngineBase { /* * Type of the backup engine. @@ -23,7 +23,7 @@ public final class AzureBackupServerEngine extends BackupEngineBase { /** * Creates an instance of AzureBackupServerEngine class. */ - public AzureBackupServerEngine() { + private AzureBackupServerEngine() { } /** @@ -36,126 +36,6 @@ public BackupEngineType backupEngineType() { return this.backupEngineType; } - /** - * {@inheritDoc} - */ - @Override - public AzureBackupServerEngine withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureBackupServerEngine withBackupManagementType(BackupManagementType backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureBackupServerEngine withRegistrationStatus(String registrationStatus) { - super.withRegistrationStatus(registrationStatus); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureBackupServerEngine withBackupEngineState(String backupEngineState) { - super.withBackupEngineState(backupEngineState); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureBackupServerEngine withHealthStatus(String healthStatus) { - super.withHealthStatus(healthStatus); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureBackupServerEngine withCanReRegister(Boolean canReRegister) { - super.withCanReRegister(canReRegister); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureBackupServerEngine withBackupEngineId(String backupEngineId) { - super.withBackupEngineId(backupEngineId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureBackupServerEngine withDpmVersion(String dpmVersion) { - super.withDpmVersion(dpmVersion); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureBackupServerEngine withAzureBackupAgentVersion(String azureBackupAgentVersion) { - super.withAzureBackupAgentVersion(azureBackupAgentVersion); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureBackupServerEngine withIsAzureBackupAgentUpgradeAvailable(Boolean isAzureBackupAgentUpgradeAvailable) { - super.withIsAzureBackupAgentUpgradeAvailable(isAzureBackupAgentUpgradeAvailable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureBackupServerEngine withIsDpmUpgradeAvailable(Boolean isDpmUpgradeAvailable) { - super.withIsDpmUpgradeAvailable(isDpmUpgradeAvailable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureBackupServerEngine withExtendedInfo(BackupEngineExtendedInfo extendedInfo) { - super.withExtendedInfo(extendedInfo); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (extendedInfo() != null) { - extendedInfo().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareBackupRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareBackupRequest.java index 9cdbc7799bd0..aebef802e5bf 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareBackupRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareBackupRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -66,15 +66,6 @@ public AzureFileShareBackupRequest withRecoveryPointExpiryTimeInUtc(OffsetDateTi return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareProtectableItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareProtectableItem.java index 888c7559786f..7b8dae9f8dce 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareProtectableItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareProtectableItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Protectable item for Azure Fileshare workloads. */ -@Fluent +@Immutable public final class AzureFileShareProtectableItem extends WorkloadProtectableItem { /* * Type of the backup item. @@ -38,7 +38,7 @@ public final class AzureFileShareProtectableItem extends WorkloadProtectableItem /** * Creates an instance of AzureFileShareProtectableItem class. */ - public AzureFileShareProtectableItem() { + private AzureFileShareProtectableItem() { } /** @@ -61,18 +61,6 @@ public String parentContainerFabricId() { return this.parentContainerFabricId; } - /** - * Set the parentContainerFabricId property: Full Fabric ID of container to which this protectable item belongs. For - * example, ARM ID. - * - * @param parentContainerFabricId the parentContainerFabricId value to set. - * @return the AzureFileShareProtectableItem object itself. - */ - public AzureFileShareProtectableItem withParentContainerFabricId(String parentContainerFabricId) { - this.parentContainerFabricId = parentContainerFabricId; - return this; - } - /** * Get the parentContainerFriendlyName property: Friendly name of container to which this protectable item belongs. * @@ -82,17 +70,6 @@ public String parentContainerFriendlyName() { return this.parentContainerFriendlyName; } - /** - * Set the parentContainerFriendlyName property: Friendly name of container to which this protectable item belongs. - * - * @param parentContainerFriendlyName the parentContainerFriendlyName value to set. - * @return the AzureFileShareProtectableItem object itself. - */ - public AzureFileShareProtectableItem withParentContainerFriendlyName(String parentContainerFriendlyName) { - this.parentContainerFriendlyName = parentContainerFriendlyName; - return this; - } - /** * Get the azureFileShareType property: File Share type XSync or XSMB. * @@ -102,62 +79,6 @@ public AzureFileShareType azureFileShareType() { return this.azureFileShareType; } - /** - * Set the azureFileShareType property: File Share type XSync or XSMB. - * - * @param azureFileShareType the azureFileShareType value to set. - * @return the AzureFileShareProtectableItem object itself. - */ - public AzureFileShareProtectableItem withAzureFileShareType(AzureFileShareType azureFileShareType) { - this.azureFileShareType = azureFileShareType; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureFileShareProtectableItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureFileShareProtectableItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureFileShareProtectableItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureFileShareProtectableItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareProtectionPolicy.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareProtectionPolicy.java index 55da8cd04cc5..745b4258f196 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareProtectionPolicy.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareProtectionPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -185,24 +185,6 @@ public AzureFileShareProtectionPolicy withProtectedItemsCount(Integer protectedI return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (schedulePolicy() != null) { - schedulePolicy().validate(); - } - if (retentionPolicy() != null) { - retentionPolicy().validate(); - } - if (vaultRetentionPolicy() != null) { - vaultRetentionPolicy().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareProvisionIlrRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareProvisionIlrRequest.java index f0e12fb44def..0af9848ed374 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareProvisionIlrRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareProvisionIlrRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -88,15 +88,6 @@ public AzureFileShareProvisionIlrRequest withSourceResourceId(String sourceResou return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareRecoveryPoint.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareRecoveryPoint.java index 150c25e29f6b..9cf1f9e1c827 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareRecoveryPoint.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareRecoveryPoint.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; @@ -17,7 +17,7 @@ /** * Azure File Share workload specific backup copy. */ -@Fluent +@Immutable public final class AzureFileShareRecoveryPoint extends RecoveryPoint { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -58,7 +58,7 @@ public final class AzureFileShareRecoveryPoint extends RecoveryPoint { /** * Creates an instance of AzureFileShareRecoveryPoint class. */ - public AzureFileShareRecoveryPoint() { + private AzureFileShareRecoveryPoint() { } /** @@ -82,18 +82,6 @@ public String recoveryPointType() { return this.recoveryPointType; } - /** - * Set the recoveryPointType property: Type of the backup copy. Specifies whether it is a crash consistent backup or - * app consistent. - * - * @param recoveryPointType the recoveryPointType value to set. - * @return the AzureFileShareRecoveryPoint object itself. - */ - public AzureFileShareRecoveryPoint withRecoveryPointType(String recoveryPointType) { - this.recoveryPointType = recoveryPointType; - return this; - } - /** * Get the recoveryPointTime property: Time at which this backup copy was created. * @@ -103,17 +91,6 @@ public OffsetDateTime recoveryPointTime() { return this.recoveryPointTime; } - /** - * Set the recoveryPointTime property: Time at which this backup copy was created. - * - * @param recoveryPointTime the recoveryPointTime value to set. - * @return the AzureFileShareRecoveryPoint object itself. - */ - public AzureFileShareRecoveryPoint withRecoveryPointTime(OffsetDateTime recoveryPointTime) { - this.recoveryPointTime = recoveryPointTime; - return this; - } - /** * Get the fileShareSnapshotUri property: Contains Url to the snapshot of fileshare, if applicable. * @@ -123,17 +100,6 @@ public String fileShareSnapshotUri() { return this.fileShareSnapshotUri; } - /** - * Set the fileShareSnapshotUri property: Contains Url to the snapshot of fileshare, if applicable. - * - * @param fileShareSnapshotUri the fileShareSnapshotUri value to set. - * @return the AzureFileShareRecoveryPoint object itself. - */ - public AzureFileShareRecoveryPoint withFileShareSnapshotUri(String fileShareSnapshotUri) { - this.fileShareSnapshotUri = fileShareSnapshotUri; - return this; - } - /** * Get the recoveryPointSizeInGB property: Contains recovery point size. * @@ -143,17 +109,6 @@ public Integer recoveryPointSizeInGB() { return this.recoveryPointSizeInGB; } - /** - * Set the recoveryPointSizeInGB property: Contains recovery point size. - * - * @param recoveryPointSizeInGB the recoveryPointSizeInGB value to set. - * @return the AzureFileShareRecoveryPoint object itself. - */ - public AzureFileShareRecoveryPoint withRecoveryPointSizeInGB(Integer recoveryPointSizeInGB) { - this.recoveryPointSizeInGB = recoveryPointSizeInGB; - return this; - } - /** * Get the recoveryPointProperties property: Properties of Recovery Point. * @@ -163,17 +118,6 @@ public RecoveryPointProperties recoveryPointProperties() { return this.recoveryPointProperties; } - /** - * Set the recoveryPointProperties property: Properties of Recovery Point. - * - * @param recoveryPointProperties the recoveryPointProperties value to set. - * @return the AzureFileShareRecoveryPoint object itself. - */ - public AzureFileShareRecoveryPoint withRecoveryPointProperties(RecoveryPointProperties recoveryPointProperties) { - this.recoveryPointProperties = recoveryPointProperties; - return this; - } - /** * Get the recoveryPointTierDetails property: Recovery point tier information. * @@ -183,39 +127,14 @@ public List recoveryPointTierDetails() { return this.recoveryPointTierDetails; } - /** - * Set the recoveryPointTierDetails property: Recovery point tier information. - * - * @param recoveryPointTierDetails the recoveryPointTierDetails value to set. - * @return the AzureFileShareRecoveryPoint object itself. - */ - public AzureFileShareRecoveryPoint - withRecoveryPointTierDetails(List recoveryPointTierDetails) { - this.recoveryPointTierDetails = recoveryPointTierDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointProperties() != null) { - recoveryPointProperties().validate(); - } - if (recoveryPointTierDetails() != null) { - recoveryPointTierDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("threatStatus", threatStatus() == null ? null : threatStatus().toString()); + jsonWriter.writeArrayField("threatInfo", threatInfo(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("objectType", this.objectType); jsonWriter.writeStringField("recoveryPointType", this.recoveryPointType); jsonWriter.writeStringField("recoveryPointTime", @@ -245,7 +164,13 @@ public static AzureFileShareRecoveryPoint fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("objectType".equals(fieldName)) { + if ("threatStatus".equals(fieldName)) { + deserializedAzureFileShareRecoveryPoint + .withThreatStatus(ThreatStatus.fromString(reader.getString())); + } else if ("threatInfo".equals(fieldName)) { + List threatInfo = reader.readArray(reader1 -> ThreatInfo.fromJson(reader1)); + deserializedAzureFileShareRecoveryPoint.withThreatInfo(threatInfo); + } else if ("objectType".equals(fieldName)) { deserializedAzureFileShareRecoveryPoint.objectType = reader.getString(); } else if ("recoveryPointType".equals(fieldName)) { deserializedAzureFileShareRecoveryPoint.recoveryPointType = reader.getString(); diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareRestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareRestoreRequest.java index ddce613894f6..766203f8cea7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareRestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareRestoreRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -201,21 +201,6 @@ public AzureFileShareRestoreRequest withTargetDetails(TargetAfsRestoreInfo targe return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (restoreFileSpecs() != null) { - restoreFileSpecs().forEach(e -> e.validate()); - } - if (targetDetails() != null) { - targetDetails().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareType.java index 86ad2c77b94a..514224945268 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileshareProtectedItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileshareProtectedItem.java index 82c36698943e..24d9dc88296c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileshareProtectedItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileshareProtectedItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -346,28 +346,18 @@ public AzureFileshareProtectedItem withPolicyName(String policyName) { * {@inheritDoc} */ @Override - public AzureFileshareProtectedItem withSoftDeleteRetentionPeriod(Integer softDeleteRetentionPeriod) { - super.withSoftDeleteRetentionPeriod(softDeleteRetentionPeriod); + public AzureFileshareProtectedItem withSoftDeleteRetentionPeriodInDays(Integer softDeleteRetentionPeriodInDays) { + super.withSoftDeleteRetentionPeriodInDays(softDeleteRetentionPeriodInDays); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - if (kpisHealths() != null) { - kpisHealths().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (extendedInfo() != null) { - extendedInfo().validate(); - } + public AzureFileshareProtectedItem withSourceSideScanInfo(SourceSideScanInfo sourceSideScanInfo) { + super.withSourceSideScanInfo(sourceSideScanInfo); + return this; } /** @@ -395,7 +385,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchiveEnabled", isArchiveEnabled()); jsonWriter.writeStringField("policyName", policyName()); - jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriod()); + jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriodInDays()); + jsonWriter.writeJsonField("sourceSideScanInfo", sourceSideScanInfo()); jsonWriter.writeStringField("protectedItemType", this.protectedItemType); jsonWriter.writeStringField("friendlyName", this.friendlyName); jsonWriter.writeStringField("protectionStatus", this.protectionStatus); @@ -467,9 +458,11 @@ public static AzureFileshareProtectedItem fromJson(JsonReader jsonReader) throws deserializedAzureFileshareProtectedItem.withPolicyName(reader.getString()); } else if ("softDeleteRetentionPeriodInDays".equals(fieldName)) { deserializedAzureFileshareProtectedItem - .withSoftDeleteRetentionPeriod(reader.getNullable(JsonReader::getInt)); + .withSoftDeleteRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); } else if ("vaultId".equals(fieldName)) { deserializedAzureFileshareProtectedItem.withVaultId(reader.getString()); + } else if ("sourceSideScanInfo".equals(fieldName)) { + deserializedAzureFileshareProtectedItem.withSourceSideScanInfo(SourceSideScanInfo.fromJson(reader)); } else if ("protectedItemType".equals(fieldName)) { deserializedAzureFileshareProtectedItem.protectedItemType = reader.getString(); } else if ("friendlyName".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileshareProtectedItemExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileshareProtectedItemExtendedInfo.java index f5af485f3dda..778820b18955 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileshareProtectedItemExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileshareProtectedItemExtendedInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -131,14 +131,6 @@ public OffsetDateTime resourceStateSyncTime() { return this.resourceStateSyncTime; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSClassicComputeVMContainer.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSClassicComputeVMContainer.java index cdcfff9d1365..9147c7e5617d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSClassicComputeVMContainer.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSClassicComputeVMContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -117,15 +117,6 @@ public AzureIaaSClassicComputeVMContainer withProtectableObjectType(String prote return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSClassicComputeVMProtectableItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSClassicComputeVMProtectableItem.java index 761ff962e775..b22d61c77bb5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSClassicComputeVMProtectableItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSClassicComputeVMProtectableItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,8 +13,8 @@ /** * IaaS VM workload-specific backup item representing the Classic Compute VM. */ -@Fluent -public final class AzureIaaSClassicComputeVMProtectableItem extends IaaSvmProtectableItem { +@Immutable +public final class AzureIaaSClassicComputeVMProtectableItem extends IaasVmProtectableItem { /* * Type of the backup item. */ @@ -23,7 +23,7 @@ public final class AzureIaaSClassicComputeVMProtectableItem extends IaaSvmProtec /** * Creates an instance of AzureIaaSClassicComputeVMProtectableItem class. */ - public AzureIaaSClassicComputeVMProtectableItem() { + private AzureIaaSClassicComputeVMProtectableItem() { } /** @@ -36,78 +36,6 @@ public String protectableItemType() { return this.protectableItemType; } - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSClassicComputeVMProtectableItem withVirtualMachineId(String virtualMachineId) { - super.withVirtualMachineId(virtualMachineId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSClassicComputeVMProtectableItem withVirtualMachineVersion(String virtualMachineVersion) { - super.withVirtualMachineVersion(virtualMachineVersion); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSClassicComputeVMProtectableItem withResourceGroup(String resourceGroup) { - super.withResourceGroup(resourceGroup); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSClassicComputeVMProtectableItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSClassicComputeVMProtectableItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSClassicComputeVMProtectableItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSClassicComputeVMProtectableItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSClassicComputeVMProtectedItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSClassicComputeVMProtectedItem.java index 3564fa6dbfdf..129765b61d84 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSClassicComputeVMProtectedItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSClassicComputeVMProtectedItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -237,34 +237,19 @@ public AzureIaaSClassicComputeVMProtectedItem withPolicyName(String policyName) * {@inheritDoc} */ @Override - public AzureIaaSClassicComputeVMProtectedItem withSoftDeleteRetentionPeriod(Integer softDeleteRetentionPeriod) { - super.withSoftDeleteRetentionPeriod(softDeleteRetentionPeriod); + public AzureIaaSClassicComputeVMProtectedItem + withSoftDeleteRetentionPeriodInDays(Integer softDeleteRetentionPeriodInDays) { + super.withSoftDeleteRetentionPeriodInDays(softDeleteRetentionPeriodInDays); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - if (healthDetails() != null) { - healthDetails().forEach(e -> e.validate()); - } - if (kpisHealths() != null) { - kpisHealths().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (extendedInfo() != null) { - extendedInfo().validate(); - } - if (extendedProperties() != null) { - extendedProperties().validate(); - } + public AzureIaaSClassicComputeVMProtectedItem withSourceSideScanInfo(SourceSideScanInfo sourceSideScanInfo) { + super.withSourceSideScanInfo(sourceSideScanInfo); + return this; } /** @@ -292,7 +277,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchiveEnabled", isArchiveEnabled()); jsonWriter.writeStringField("policyName", policyName()); - jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriod()); + jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriodInDays()); + jsonWriter.writeJsonField("sourceSideScanInfo", sourceSideScanInfo()); jsonWriter.writeStringField("protectionStatus", protectionStatus()); jsonWriter.writeStringField("protectionState", protectionState() == null ? null : protectionState().toString()); jsonWriter.writeArrayField("healthDetails", healthDetails(), (writer, element) -> writer.writeJson(element)); @@ -366,9 +352,12 @@ public static AzureIaaSClassicComputeVMProtectedItem fromJson(JsonReader jsonRea deserializedAzureIaaSClassicComputeVMProtectedItem.withPolicyName(reader.getString()); } else if ("softDeleteRetentionPeriodInDays".equals(fieldName)) { deserializedAzureIaaSClassicComputeVMProtectedItem - .withSoftDeleteRetentionPeriod(reader.getNullable(JsonReader::getInt)); + .withSoftDeleteRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); } else if ("vaultId".equals(fieldName)) { deserializedAzureIaaSClassicComputeVMProtectedItem.withVaultId(reader.getString()); + } else if ("sourceSideScanInfo".equals(fieldName)) { + deserializedAzureIaaSClassicComputeVMProtectedItem + .withSourceSideScanInfo(SourceSideScanInfo.fromJson(reader)); } else if ("friendlyName".equals(fieldName)) { deserializedAzureIaaSClassicComputeVMProtectedItem.withFriendlyName(reader.getString()); } else if ("virtualMachineId".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSComputeVMContainer.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSComputeVMContainer.java index e02a05eb6932..01aa89fbf645 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSComputeVMContainer.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSComputeVMContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -116,15 +116,6 @@ public AzureIaaSComputeVMContainer withProtectableObjectType(String protectableO return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSComputeVMProtectableItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSComputeVMProtectableItem.java index 02b61f823bc0..f47910be56c1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSComputeVMProtectableItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSComputeVMProtectableItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,8 +13,8 @@ /** * IaaS VM workload-specific backup item representing the Azure Resource Manager VM. */ -@Fluent -public final class AzureIaaSComputeVMProtectableItem extends IaaSvmProtectableItem { +@Immutable +public final class AzureIaaSComputeVMProtectableItem extends IaasVmProtectableItem { /* * Type of the backup item. */ @@ -23,7 +23,7 @@ public final class AzureIaaSComputeVMProtectableItem extends IaaSvmProtectableIt /** * Creates an instance of AzureIaaSComputeVMProtectableItem class. */ - public AzureIaaSComputeVMProtectableItem() { + private AzureIaaSComputeVMProtectableItem() { } /** @@ -36,78 +36,6 @@ public String protectableItemType() { return this.protectableItemType; } - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSComputeVMProtectableItem withVirtualMachineId(String virtualMachineId) { - super.withVirtualMachineId(virtualMachineId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSComputeVMProtectableItem withVirtualMachineVersion(String virtualMachineVersion) { - super.withVirtualMachineVersion(virtualMachineVersion); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSComputeVMProtectableItem withResourceGroup(String resourceGroup) { - super.withResourceGroup(resourceGroup); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSComputeVMProtectableItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSComputeVMProtectableItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSComputeVMProtectableItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSComputeVMProtectableItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSComputeVMProtectedItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSComputeVMProtectedItem.java index edd2575f1765..723f06b98753 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSComputeVMProtectedItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSComputeVMProtectedItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -236,34 +236,19 @@ public AzureIaaSComputeVMProtectedItem withPolicyName(String policyName) { * {@inheritDoc} */ @Override - public AzureIaaSComputeVMProtectedItem withSoftDeleteRetentionPeriod(Integer softDeleteRetentionPeriod) { - super.withSoftDeleteRetentionPeriod(softDeleteRetentionPeriod); + public AzureIaaSComputeVMProtectedItem + withSoftDeleteRetentionPeriodInDays(Integer softDeleteRetentionPeriodInDays) { + super.withSoftDeleteRetentionPeriodInDays(softDeleteRetentionPeriodInDays); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - if (healthDetails() != null) { - healthDetails().forEach(e -> e.validate()); - } - if (kpisHealths() != null) { - kpisHealths().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (extendedInfo() != null) { - extendedInfo().validate(); - } - if (extendedProperties() != null) { - extendedProperties().validate(); - } + public AzureIaaSComputeVMProtectedItem withSourceSideScanInfo(SourceSideScanInfo sourceSideScanInfo) { + super.withSourceSideScanInfo(sourceSideScanInfo); + return this; } /** @@ -291,7 +276,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchiveEnabled", isArchiveEnabled()); jsonWriter.writeStringField("policyName", policyName()); - jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriod()); + jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriodInDays()); + jsonWriter.writeJsonField("sourceSideScanInfo", sourceSideScanInfo()); jsonWriter.writeStringField("protectionStatus", protectionStatus()); jsonWriter.writeStringField("protectionState", protectionState() == null ? null : protectionState().toString()); jsonWriter.writeArrayField("healthDetails", healthDetails(), (writer, element) -> writer.writeJson(element)); @@ -364,9 +350,12 @@ public static AzureIaaSComputeVMProtectedItem fromJson(JsonReader jsonReader) th deserializedAzureIaaSComputeVMProtectedItem.withPolicyName(reader.getString()); } else if ("softDeleteRetentionPeriodInDays".equals(fieldName)) { deserializedAzureIaaSComputeVMProtectedItem - .withSoftDeleteRetentionPeriod(reader.getNullable(JsonReader::getInt)); + .withSoftDeleteRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); } else if ("vaultId".equals(fieldName)) { deserializedAzureIaaSComputeVMProtectedItem.withVaultId(reader.getString()); + } else if ("sourceSideScanInfo".equals(fieldName)) { + deserializedAzureIaaSComputeVMProtectedItem + .withSourceSideScanInfo(SourceSideScanInfo.fromJson(reader)); } else if ("friendlyName".equals(fieldName)) { deserializedAzureIaaSComputeVMProtectedItem.withFriendlyName(reader.getString()); } else if ("virtualMachineId".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmErrorInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmErrorInfo.java index d368627376b9..034c7a9de5db 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmErrorInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmErrorInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -40,7 +40,7 @@ public final class AzureIaaSvmErrorInfo implements JsonSerializable recommendations() { return this.recommendations; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmHealthDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmHealthDetails.java index fa8099579a4b..764833290b95 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmHealthDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmHealthDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -82,15 +82,6 @@ public Integer code() { return this.code; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmJob.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmJob.java index c5c394d36abb..8a4fb60dd7e7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmJob.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmJob.java @@ -1,24 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.Duration; -import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.List; /** * Azure IaaS VM workload-specific job object. */ -@Fluent +@Immutable public final class AzureIaaSvmJob extends Job { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -64,7 +63,7 @@ public final class AzureIaaSvmJob extends Job { /** * Creates an instance of AzureIaaSvmJob class. */ - public AzureIaaSvmJob() { + private AzureIaaSvmJob() { } /** @@ -87,17 +86,6 @@ public Duration duration() { return this.duration; } - /** - * Set the duration property: Time elapsed during the execution of this job. - * - * @param duration the duration value to set. - * @return the AzureIaaSvmJob object itself. - */ - public AzureIaaSvmJob withDuration(Duration duration) { - this.duration = duration; - return this; - } - /** * Get the actionsInfo property: Gets or sets the state/actions applicable on this job like cancel/retry. * @@ -107,17 +95,6 @@ public List actionsInfo() { return this.actionsInfo; } - /** - * Set the actionsInfo property: Gets or sets the state/actions applicable on this job like cancel/retry. - * - * @param actionsInfo the actionsInfo value to set. - * @return the AzureIaaSvmJob object itself. - */ - public AzureIaaSvmJob withActionsInfo(List actionsInfo) { - this.actionsInfo = actionsInfo; - return this; - } - /** * Get the errorDetails property: Error details on execution of this job. * @@ -127,17 +104,6 @@ public List errorDetails() { return this.errorDetails; } - /** - * Set the errorDetails property: Error details on execution of this job. - * - * @param errorDetails the errorDetails value to set. - * @return the AzureIaaSvmJob object itself. - */ - public AzureIaaSvmJob withErrorDetails(List errorDetails) { - this.errorDetails = errorDetails; - return this; - } - /** * Get the virtualMachineVersion property: Specifies whether the backup item is a Classic or an Azure Resource * Manager VM. @@ -148,18 +114,6 @@ public String virtualMachineVersion() { return this.virtualMachineVersion; } - /** - * Set the virtualMachineVersion property: Specifies whether the backup item is a Classic or an Azure Resource - * Manager VM. - * - * @param virtualMachineVersion the virtualMachineVersion value to set. - * @return the AzureIaaSvmJob object itself. - */ - public AzureIaaSvmJob withVirtualMachineVersion(String virtualMachineVersion) { - this.virtualMachineVersion = virtualMachineVersion; - return this; - } - /** * Get the extendedInfo property: Additional information for this job. * @@ -169,17 +123,6 @@ public AzureIaaSvmJobExtendedInfo extendedInfo() { return this.extendedInfo; } - /** - * Set the extendedInfo property: Additional information for this job. - * - * @param extendedInfo the extendedInfo value to set. - * @return the AzureIaaSvmJob object itself. - */ - public AzureIaaSvmJob withExtendedInfo(AzureIaaSvmJobExtendedInfo extendedInfo) { - this.extendedInfo = extendedInfo; - return this; - } - /** * Get the containerName property: Container name of the entity on which the current job is executing. * @@ -189,17 +132,6 @@ public String containerName() { return this.containerName; } - /** - * Set the containerName property: Container name of the entity on which the current job is executing. - * - * @param containerName the containerName value to set. - * @return the AzureIaaSvmJob object itself. - */ - public AzureIaaSvmJob withContainerName(String containerName) { - this.containerName = containerName; - return this; - } - /** * Get the isUserTriggered property: Indicated that whether the job is adhoc(true) or scheduled(false). * @@ -209,95 +141,6 @@ public Boolean isUserTriggered() { return this.isUserTriggered; } - /** - * Set the isUserTriggered property: Indicated that whether the job is adhoc(true) or scheduled(false). - * - * @param isUserTriggered the isUserTriggered value to set. - * @return the AzureIaaSvmJob object itself. - */ - public AzureIaaSvmJob withIsUserTriggered(Boolean isUserTriggered) { - this.isUserTriggered = isUserTriggered; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSvmJob withEntityFriendlyName(String entityFriendlyName) { - super.withEntityFriendlyName(entityFriendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSvmJob withBackupManagementType(BackupManagementType backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSvmJob withOperation(String operation) { - super.withOperation(operation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSvmJob withStatus(String status) { - super.withStatus(status); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSvmJob withStartTime(OffsetDateTime startTime) { - super.withStartTime(startTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSvmJob withEndTime(OffsetDateTime endTime) { - super.withEndTime(endTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSvmJob withActivityId(String activityId) { - super.withActivityId(activityId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (errorDetails() != null) { - errorDetails().forEach(e -> e.validate()); - } - if (extendedInfo() != null) { - extendedInfo().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmJobExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmJobExtendedInfo.java index 7b0301369003..c2e69918e12b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmJobExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmJobExtendedInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * Azure IaaS VM workload-specific additional information for job. */ -@Fluent +@Immutable public final class AzureIaaSvmJobExtendedInfo implements JsonSerializable { /* * List of tasks associated with this job. @@ -51,7 +51,7 @@ public final class AzureIaaSvmJobExtendedInfo implements JsonSerializable tasksList() { return this.tasksList; } - /** - * Set the tasksList property: List of tasks associated with this job. - * - * @param tasksList the tasksList value to set. - * @return the AzureIaaSvmJobExtendedInfo object itself. - */ - public AzureIaaSvmJobExtendedInfo withTasksList(List tasksList) { - this.tasksList = tasksList; - return this; - } - /** * Get the propertyBag property: Job properties. * @@ -83,17 +72,6 @@ public Map propertyBag() { return this.propertyBag; } - /** - * Set the propertyBag property: Job properties. - * - * @param propertyBag the propertyBag value to set. - * @return the AzureIaaSvmJobExtendedInfo object itself. - */ - public AzureIaaSvmJobExtendedInfo withPropertyBag(Map propertyBag) { - this.propertyBag = propertyBag; - return this; - } - /** * Get the internalPropertyBag property: Job internal properties. * @@ -103,17 +81,6 @@ public Map internalPropertyBag() { return this.internalPropertyBag; } - /** - * Set the internalPropertyBag property: Job internal properties. - * - * @param internalPropertyBag the internalPropertyBag value to set. - * @return the AzureIaaSvmJobExtendedInfo object itself. - */ - public AzureIaaSvmJobExtendedInfo withInternalPropertyBag(Map internalPropertyBag) { - this.internalPropertyBag = internalPropertyBag; - return this; - } - /** * Get the progressPercentage property: Indicates progress of the job. Null if it has not started or completed. * @@ -123,17 +90,6 @@ public Double progressPercentage() { return this.progressPercentage; } - /** - * Set the progressPercentage property: Indicates progress of the job. Null if it has not started or completed. - * - * @param progressPercentage the progressPercentage value to set. - * @return the AzureIaaSvmJobExtendedInfo object itself. - */ - public AzureIaaSvmJobExtendedInfo withProgressPercentage(Double progressPercentage) { - this.progressPercentage = progressPercentage; - return this; - } - /** * Get the estimatedRemainingDuration property: Time remaining for execution of this job. * @@ -143,17 +99,6 @@ public String estimatedRemainingDuration() { return this.estimatedRemainingDuration; } - /** - * Set the estimatedRemainingDuration property: Time remaining for execution of this job. - * - * @param estimatedRemainingDuration the estimatedRemainingDuration value to set. - * @return the AzureIaaSvmJobExtendedInfo object itself. - */ - public AzureIaaSvmJobExtendedInfo withEstimatedRemainingDuration(String estimatedRemainingDuration) { - this.estimatedRemainingDuration = estimatedRemainingDuration; - return this; - } - /** * Get the dynamicErrorMessage property: Non localized error message on job execution. * @@ -163,28 +108,6 @@ public String dynamicErrorMessage() { return this.dynamicErrorMessage; } - /** - * Set the dynamicErrorMessage property: Non localized error message on job execution. - * - * @param dynamicErrorMessage the dynamicErrorMessage value to set. - * @return the AzureIaaSvmJobExtendedInfo object itself. - */ - public AzureIaaSvmJobExtendedInfo withDynamicErrorMessage(String dynamicErrorMessage) { - this.dynamicErrorMessage = dynamicErrorMessage; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (tasksList() != null) { - tasksList().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmJobTaskDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmJobTaskDetails.java index 80c5baccd64d..b6d331fcd70f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmJobTaskDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmJobTaskDetails.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -18,7 +18,7 @@ /** * Azure IaaS VM workload-specific job task details. */ -@Fluent +@Immutable public final class AzureIaaSvmJobTaskDetails implements JsonSerializable { /* * The task display name. @@ -64,7 +64,7 @@ public final class AzureIaaSvmJobTaskDetails implements JsonSerializable actionsInfo() { return this.actionsInfo; } - /** - * Set the actionsInfo property: Gets or sets the state/actions applicable on this job like cancel/retry. - * - * @param actionsInfo the actionsInfo value to set. - * @return the AzureIaaSvmJobV2 object itself. - */ - public AzureIaaSvmJobV2 withActionsInfo(List actionsInfo) { - this.actionsInfo = actionsInfo; - return this; - } - /** * Get the containerName property: Container name of the entity on which the current job is executing. * @@ -102,17 +90,6 @@ public String containerName() { return this.containerName; } - /** - * Set the containerName property: Container name of the entity on which the current job is executing. - * - * @param containerName the containerName value to set. - * @return the AzureIaaSvmJobV2 object itself. - */ - public AzureIaaSvmJobV2 withContainerName(String containerName) { - this.containerName = containerName; - return this; - } - /** * Get the duration property: Time elapsed during the execution of this job. * @@ -122,17 +99,6 @@ public Duration duration() { return this.duration; } - /** - * Set the duration property: Time elapsed during the execution of this job. - * - * @param duration the duration value to set. - * @return the AzureIaaSvmJobV2 object itself. - */ - public AzureIaaSvmJobV2 withDuration(Duration duration) { - this.duration = duration; - return this; - } - /** * Get the errorDetails property: Error details on execution of this job. * @@ -142,17 +108,6 @@ public List errorDetails() { return this.errorDetails; } - /** - * Set the errorDetails property: Error details on execution of this job. - * - * @param errorDetails the errorDetails value to set. - * @return the AzureIaaSvmJobV2 object itself. - */ - public AzureIaaSvmJobV2 withErrorDetails(List errorDetails) { - this.errorDetails = errorDetails; - return this; - } - /** * Get the virtualMachineVersion property: Specifies whether the backup item is a Classic or an Azure Resource * Manager VM. @@ -163,18 +118,6 @@ public String virtualMachineVersion() { return this.virtualMachineVersion; } - /** - * Set the virtualMachineVersion property: Specifies whether the backup item is a Classic or an Azure Resource - * Manager VM. - * - * @param virtualMachineVersion the virtualMachineVersion value to set. - * @return the AzureIaaSvmJobV2 object itself. - */ - public AzureIaaSvmJobV2 withVirtualMachineVersion(String virtualMachineVersion) { - this.virtualMachineVersion = virtualMachineVersion; - return this; - } - /** * Get the extendedInfo property: Additional information for this job. * @@ -184,95 +127,6 @@ public AzureIaaSvmJobExtendedInfo extendedInfo() { return this.extendedInfo; } - /** - * Set the extendedInfo property: Additional information for this job. - * - * @param extendedInfo the extendedInfo value to set. - * @return the AzureIaaSvmJobV2 object itself. - */ - public AzureIaaSvmJobV2 withExtendedInfo(AzureIaaSvmJobExtendedInfo extendedInfo) { - this.extendedInfo = extendedInfo; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSvmJobV2 withEntityFriendlyName(String entityFriendlyName) { - super.withEntityFriendlyName(entityFriendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSvmJobV2 withBackupManagementType(BackupManagementType backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSvmJobV2 withOperation(String operation) { - super.withOperation(operation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSvmJobV2 withStatus(String status) { - super.withStatus(status); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSvmJobV2 withStartTime(OffsetDateTime startTime) { - super.withStartTime(startTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSvmJobV2 withEndTime(OffsetDateTime endTime) { - super.withEndTime(endTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureIaaSvmJobV2 withActivityId(String activityId) { - super.withActivityId(activityId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (errorDetails() != null) { - errorDetails().forEach(e -> e.validate()); - } - if (extendedInfo() != null) { - extendedInfo().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmProtectedItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmProtectedItem.java index 462956583e75..f51fea9da9d0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmProtectedItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmProtectedItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -496,34 +496,18 @@ public AzureIaaSvmProtectedItem withPolicyName(String policyName) { * {@inheritDoc} */ @Override - public AzureIaaSvmProtectedItem withSoftDeleteRetentionPeriod(Integer softDeleteRetentionPeriod) { - super.withSoftDeleteRetentionPeriod(softDeleteRetentionPeriod); + public AzureIaaSvmProtectedItem withSoftDeleteRetentionPeriodInDays(Integer softDeleteRetentionPeriodInDays) { + super.withSoftDeleteRetentionPeriodInDays(softDeleteRetentionPeriodInDays); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - if (healthDetails() != null) { - healthDetails().forEach(e -> e.validate()); - } - if (kpisHealths() != null) { - kpisHealths().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (extendedInfo() != null) { - extendedInfo().validate(); - } - if (extendedProperties() != null) { - extendedProperties().validate(); - } + public AzureIaaSvmProtectedItem withSourceSideScanInfo(SourceSideScanInfo sourceSideScanInfo) { + super.withSourceSideScanInfo(sourceSideScanInfo); + return this; } /** @@ -551,7 +535,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchiveEnabled", isArchiveEnabled()); jsonWriter.writeStringField("policyName", policyName()); - jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriod()); + jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriodInDays()); + jsonWriter.writeJsonField("sourceSideScanInfo", sourceSideScanInfo()); jsonWriter.writeStringField("protectedItemType", this.protectedItemType); jsonWriter.writeStringField("protectionStatus", this.protectionStatus); jsonWriter.writeStringField("protectionState", @@ -588,10 +573,10 @@ public static AzureIaaSvmProtectedItem fromJson(JsonReader jsonReader) throws IO } } // Use the discriminator value to determine which subtype should be deserialized. - if ("Microsoft.ClassicCompute/virtualMachines".equals(discriminatorValue)) { - return AzureIaaSClassicComputeVMProtectedItem.fromJson(readerToUse.reset()); - } else if ("Microsoft.Compute/virtualMachines".equals(discriminatorValue)) { + if ("Microsoft.Compute/virtualMachines".equals(discriminatorValue)) { return AzureIaaSComputeVMProtectedItem.fromJson(readerToUse.reset()); + } else if ("Microsoft.ClassicCompute/virtualMachines".equals(discriminatorValue)) { + return AzureIaaSClassicComputeVMProtectedItem.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } @@ -649,9 +634,11 @@ static AzureIaaSvmProtectedItem fromJsonKnownDiscriminator(JsonReader jsonReader deserializedAzureIaaSvmProtectedItem.withPolicyName(reader.getString()); } else if ("softDeleteRetentionPeriodInDays".equals(fieldName)) { deserializedAzureIaaSvmProtectedItem - .withSoftDeleteRetentionPeriod(reader.getNullable(JsonReader::getInt)); + .withSoftDeleteRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); } else if ("vaultId".equals(fieldName)) { deserializedAzureIaaSvmProtectedItem.withVaultId(reader.getString()); + } else if ("sourceSideScanInfo".equals(fieldName)) { + deserializedAzureIaaSvmProtectedItem.withSourceSideScanInfo(SourceSideScanInfo.fromJson(reader)); } else if ("protectedItemType".equals(fieldName)) { deserializedAzureIaaSvmProtectedItem.protectedItemType = reader.getString(); } else if ("friendlyName".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmProtectedItemExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmProtectedItemExtendedInfo.java index 712a7985af73..2ca2aa4cfa0d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmProtectedItemExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmProtectedItemExtendedInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -183,14 +183,6 @@ public AzureIaaSvmProtectedItemExtendedInfo withPolicyInconsistent(Boolean polic return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmProtectionPolicy.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmProtectionPolicy.java index 50cd11dcebf1..76e1cf5e6b9e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmProtectionPolicy.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmProtectionPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -265,31 +265,6 @@ public AzureIaaSvmProtectionPolicy withResourceGuardOperationRequests(List { - if (e != null) { - e.validate(); - } - }); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureRecoveryServiceVaultProtectionIntent.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureRecoveryServiceVaultProtectionIntent.java index c81f15c90c5f..60c56bd22144 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureRecoveryServiceVaultProtectionIntent.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureRecoveryServiceVaultProtectionIntent.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -82,15 +82,6 @@ public AzureRecoveryServiceVaultProtectionIntent withProtectionState(ProtectionS return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureResourceProtectionIntent.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureResourceProtectionIntent.java index 1a3edffbcb13..6959d646b6fc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureResourceProtectionIntent.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureResourceProtectionIntent.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -106,15 +106,6 @@ public AzureResourceProtectionIntent withProtectionState(ProtectionStatus protec return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlContainer.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlContainer.java index 3543457f5d26..b8214ab0b022 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlContainer.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -89,15 +89,6 @@ public AzureSqlContainer withProtectableObjectType(String protectableObjectType) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlProtectedItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlProtectedItem.java index 1a8d3a9699b1..2dc122a2fb2c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlProtectedItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlProtectedItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -247,21 +247,18 @@ public AzureSqlProtectedItem withPolicyName(String policyName) { * {@inheritDoc} */ @Override - public AzureSqlProtectedItem withSoftDeleteRetentionPeriod(Integer softDeleteRetentionPeriod) { - super.withSoftDeleteRetentionPeriod(softDeleteRetentionPeriod); + public AzureSqlProtectedItem withSoftDeleteRetentionPeriodInDays(Integer softDeleteRetentionPeriodInDays) { + super.withSoftDeleteRetentionPeriodInDays(softDeleteRetentionPeriodInDays); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - if (extendedInfo() != null) { - extendedInfo().validate(); - } + public AzureSqlProtectedItem withSourceSideScanInfo(SourceSideScanInfo sourceSideScanInfo) { + super.withSourceSideScanInfo(sourceSideScanInfo); + return this; } /** @@ -289,7 +286,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchiveEnabled", isArchiveEnabled()); jsonWriter.writeStringField("policyName", policyName()); - jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriod()); + jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriodInDays()); + jsonWriter.writeJsonField("sourceSideScanInfo", sourceSideScanInfo()); jsonWriter.writeStringField("protectedItemType", this.protectedItemType); jsonWriter.writeStringField("protectedItemDataId", this.protectedItemDataId); jsonWriter.writeStringField("protectionState", @@ -354,9 +352,11 @@ public static AzureSqlProtectedItem fromJson(JsonReader jsonReader) throws IOExc deserializedAzureSqlProtectedItem.withPolicyName(reader.getString()); } else if ("softDeleteRetentionPeriodInDays".equals(fieldName)) { deserializedAzureSqlProtectedItem - .withSoftDeleteRetentionPeriod(reader.getNullable(JsonReader::getInt)); + .withSoftDeleteRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); } else if ("vaultId".equals(fieldName)) { deserializedAzureSqlProtectedItem.withVaultId(reader.getString()); + } else if ("sourceSideScanInfo".equals(fieldName)) { + deserializedAzureSqlProtectedItem.withSourceSideScanInfo(SourceSideScanInfo.fromJson(reader)); } else if ("protectedItemType".equals(fieldName)) { deserializedAzureSqlProtectedItem.protectedItemType = reader.getString(); } else if ("protectedItemDataId".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlProtectedItemExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlProtectedItemExtendedInfo.java index 3d33d5eac575..30acb9a6f5c6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlProtectedItemExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlProtectedItemExtendedInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -100,14 +100,6 @@ public AzureSqlProtectedItemExtendedInfo withPolicyState(String policyState) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlProtectionPolicy.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlProtectionPolicy.java index 387c16c77a65..409ba660901f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlProtectionPolicy.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlProtectionPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -82,18 +82,6 @@ public AzureSqlProtectionPolicy withResourceGuardOperationRequests(List return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (retentionPolicy() != null) { - retentionPolicy().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlagWorkloadContainerProtectionContainer.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlagWorkloadContainerProtectionContainer.java index 00f3db3e5311..33de7fd57c6b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlagWorkloadContainerProtectionContainer.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlagWorkloadContainerProtectionContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -139,18 +139,6 @@ public AzureSqlagWorkloadContainerProtectionContainer withProtectableObjectType( return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (extendedInfo() != null) { - extendedInfo().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageContainer.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageContainer.java index f8f87063f957..61ee5f04e42a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageContainer.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -241,15 +241,6 @@ public AzureStorageContainer withProtectableObjectType(String protectableObjectT return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageErrorInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageErrorInfo.java index bbd3746eef0d..b12975ff29ab 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageErrorInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageErrorInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Azure storage specific error information. */ -@Fluent +@Immutable public final class AzureStorageErrorInfo implements JsonSerializable { /* * Error code. @@ -35,7 +35,7 @@ public final class AzureStorageErrorInfo implements JsonSerializable recommendations() { return this.recommendations; } - /** - * Set the recommendations property: List of localized recommendations for above error code. - * - * @param recommendations the recommendations value to set. - * @return the AzureStorageErrorInfo object itself. - */ - public AzureStorageErrorInfo withRecommendations(List recommendations) { - this.recommendations = recommendations; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageJob.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageJob.java index 40b4cc632e0e..4a5fa1e76040 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageJob.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageJob.java @@ -1,24 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.Duration; -import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.List; /** * Azure storage specific job. */ -@Fluent +@Immutable public final class AzureStorageJob extends Job { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -64,7 +63,7 @@ public final class AzureStorageJob extends Job { /** * Creates an instance of AzureStorageJob class. */ - public AzureStorageJob() { + private AzureStorageJob() { } /** @@ -87,17 +86,6 @@ public Duration duration() { return this.duration; } - /** - * Set the duration property: Time elapsed during the execution of this job. - * - * @param duration the duration value to set. - * @return the AzureStorageJob object itself. - */ - public AzureStorageJob withDuration(Duration duration) { - this.duration = duration; - return this; - } - /** * Get the actionsInfo property: Gets or sets the state/actions applicable on this job like cancel/retry. * @@ -107,17 +95,6 @@ public List actionsInfo() { return this.actionsInfo; } - /** - * Set the actionsInfo property: Gets or sets the state/actions applicable on this job like cancel/retry. - * - * @param actionsInfo the actionsInfo value to set. - * @return the AzureStorageJob object itself. - */ - public AzureStorageJob withActionsInfo(List actionsInfo) { - this.actionsInfo = actionsInfo; - return this; - } - /** * Get the errorDetails property: Error details on execution of this job. * @@ -127,17 +104,6 @@ public List errorDetails() { return this.errorDetails; } - /** - * Set the errorDetails property: Error details on execution of this job. - * - * @param errorDetails the errorDetails value to set. - * @return the AzureStorageJob object itself. - */ - public AzureStorageJob withErrorDetails(List errorDetails) { - this.errorDetails = errorDetails; - return this; - } - /** * Get the storageAccountName property: Specifies friendly name of the storage account. * @@ -147,17 +113,6 @@ public String storageAccountName() { return this.storageAccountName; } - /** - * Set the storageAccountName property: Specifies friendly name of the storage account. - * - * @param storageAccountName the storageAccountName value to set. - * @return the AzureStorageJob object itself. - */ - public AzureStorageJob withStorageAccountName(String storageAccountName) { - this.storageAccountName = storageAccountName; - return this; - } - /** * Get the storageAccountVersion property: Specifies whether the Storage account is a Classic or an Azure Resource * Manager Storage account. @@ -168,18 +123,6 @@ public String storageAccountVersion() { return this.storageAccountVersion; } - /** - * Set the storageAccountVersion property: Specifies whether the Storage account is a Classic or an Azure Resource - * Manager Storage account. - * - * @param storageAccountVersion the storageAccountVersion value to set. - * @return the AzureStorageJob object itself. - */ - public AzureStorageJob withStorageAccountVersion(String storageAccountVersion) { - this.storageAccountVersion = storageAccountVersion; - return this; - } - /** * Get the extendedInfo property: Additional information about the job. * @@ -189,17 +132,6 @@ public AzureStorageJobExtendedInfo extendedInfo() { return this.extendedInfo; } - /** - * Set the extendedInfo property: Additional information about the job. - * - * @param extendedInfo the extendedInfo value to set. - * @return the AzureStorageJob object itself. - */ - public AzureStorageJob withExtendedInfo(AzureStorageJobExtendedInfo extendedInfo) { - this.extendedInfo = extendedInfo; - return this; - } - /** * Get the isUserTriggered property: Indicated that whether the job is adhoc(true) or scheduled(false). * @@ -209,95 +141,6 @@ public Boolean isUserTriggered() { return this.isUserTriggered; } - /** - * Set the isUserTriggered property: Indicated that whether the job is adhoc(true) or scheduled(false). - * - * @param isUserTriggered the isUserTriggered value to set. - * @return the AzureStorageJob object itself. - */ - public AzureStorageJob withIsUserTriggered(Boolean isUserTriggered) { - this.isUserTriggered = isUserTriggered; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureStorageJob withEntityFriendlyName(String entityFriendlyName) { - super.withEntityFriendlyName(entityFriendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureStorageJob withBackupManagementType(BackupManagementType backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureStorageJob withOperation(String operation) { - super.withOperation(operation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureStorageJob withStatus(String status) { - super.withStatus(status); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureStorageJob withStartTime(OffsetDateTime startTime) { - super.withStartTime(startTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureStorageJob withEndTime(OffsetDateTime endTime) { - super.withEndTime(endTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureStorageJob withActivityId(String activityId) { - super.withActivityId(activityId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (errorDetails() != null) { - errorDetails().forEach(e -> e.validate()); - } - if (extendedInfo() != null) { - extendedInfo().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageJobExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageJobExtendedInfo.java index 0b2224c3495f..10a63226b851 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageJobExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageJobExtendedInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * Azure Storage workload-specific additional information for job. */ -@Fluent +@Immutable public final class AzureStorageJobExtendedInfo implements JsonSerializable { /* * List of tasks for this job @@ -36,7 +36,7 @@ public final class AzureStorageJobExtendedInfo implements JsonSerializable tasksList() { return this.tasksList; } - /** - * Set the tasksList property: List of tasks for this job. - * - * @param tasksList the tasksList value to set. - * @return the AzureStorageJobExtendedInfo object itself. - */ - public AzureStorageJobExtendedInfo withTasksList(List tasksList) { - this.tasksList = tasksList; - return this; - } - /** * Get the propertyBag property: Job properties. * @@ -68,17 +57,6 @@ public Map propertyBag() { return this.propertyBag; } - /** - * Set the propertyBag property: Job properties. - * - * @param propertyBag the propertyBag value to set. - * @return the AzureStorageJobExtendedInfo object itself. - */ - public AzureStorageJobExtendedInfo withPropertyBag(Map propertyBag) { - this.propertyBag = propertyBag; - return this; - } - /** * Get the dynamicErrorMessage property: Non localized error message on job execution. * @@ -88,28 +66,6 @@ public String dynamicErrorMessage() { return this.dynamicErrorMessage; } - /** - * Set the dynamicErrorMessage property: Non localized error message on job execution. - * - * @param dynamicErrorMessage the dynamicErrorMessage value to set. - * @return the AzureStorageJobExtendedInfo object itself. - */ - public AzureStorageJobExtendedInfo withDynamicErrorMessage(String dynamicErrorMessage) { - this.dynamicErrorMessage = dynamicErrorMessage; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (tasksList() != null) { - tasksList().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageJobTaskDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageJobTaskDetails.java index 9681a95a2740..989f8e3e27e7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageJobTaskDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageJobTaskDetails.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Azure storage workload specific job task details. */ -@Fluent +@Immutable public final class AzureStorageJobTaskDetails implements JsonSerializable { /* * The task display name. @@ -29,7 +29,7 @@ public final class AzureStorageJobTaskDetails implements JsonSerializable { - if (e != null) { - e.validate(); - } - }); - } - if (nodesList() != null) { - nodesList().forEach(e -> e.validate()); - } + public AzureVmWorkloadProtectedItem withSourceSideScanInfo(SourceSideScanInfo sourceSideScanInfo) { + super.withSourceSideScanInfo(sourceSideScanInfo); + return this; } /** @@ -580,7 +564,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchiveEnabled", isArchiveEnabled()); jsonWriter.writeStringField("policyName", policyName()); - jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriod()); + jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriodInDays()); + jsonWriter.writeJsonField("sourceSideScanInfo", sourceSideScanInfo()); jsonWriter.writeStringField("protectedItemType", this.protectedItemType); jsonWriter.writeStringField("serverName", this.serverName); jsonWriter.writeStringField("parentName", this.parentName); @@ -633,6 +618,8 @@ public static AzureVmWorkloadProtectedItem fromJson(JsonReader jsonReader) throw return AzureVmWorkloadSapHanaDBInstanceProtectedItem.fromJson(readerToUse.reset()); } else if ("AzureVmWorkloadSQLDatabase".equals(discriminatorValue)) { return AzureVmWorkloadSqlDatabaseProtectedItem.fromJson(readerToUse.reset()); + } else if ("AzureVmWorkloadSQLInstance".equals(discriminatorValue)) { + return AzureVmWorkloadSQLInstanceProtectedItem.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } @@ -691,9 +678,12 @@ static AzureVmWorkloadProtectedItem fromJsonKnownDiscriminator(JsonReader jsonRe deserializedAzureVmWorkloadProtectedItem.withPolicyName(reader.getString()); } else if ("softDeleteRetentionPeriodInDays".equals(fieldName)) { deserializedAzureVmWorkloadProtectedItem - .withSoftDeleteRetentionPeriod(reader.getNullable(JsonReader::getInt)); + .withSoftDeleteRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); } else if ("vaultId".equals(fieldName)) { deserializedAzureVmWorkloadProtectedItem.withVaultId(reader.getString()); + } else if ("sourceSideScanInfo".equals(fieldName)) { + deserializedAzureVmWorkloadProtectedItem + .withSourceSideScanInfo(SourceSideScanInfo.fromJson(reader)); } else if ("protectedItemType".equals(fieldName)) { deserializedAzureVmWorkloadProtectedItem.protectedItemType = reader.getString(); } else if ("friendlyName".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadProtectedItemExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadProtectedItemExtendedInfo.java index 7185f0bcbb4c..3b9615acd9db 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadProtectedItemExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadProtectedItemExtendedInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -208,14 +208,6 @@ public AzureVmWorkloadProtectedItemExtendedInfo withRecoveryModel(String recover return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadProtectionPolicy.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadProtectionPolicy.java index 61eada12878b..5fb7abc7a954 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadProtectionPolicy.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadProtectionPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -27,6 +27,11 @@ public final class AzureVmWorkloadProtectionPolicy extends ProtectionPolicy { */ private WorkloadType workLoadType; + /* + * Type of the protection policy + */ + private VMWorkloadPolicyType vmWorkloadPolicyType; + /* * Common settings for the backup management */ @@ -79,6 +84,26 @@ public AzureVmWorkloadProtectionPolicy withWorkLoadType(WorkloadType workLoadTyp return this; } + /** + * Get the vmWorkloadPolicyType property: Type of the protection policy. + * + * @return the vmWorkloadPolicyType value. + */ + public VMWorkloadPolicyType vmWorkloadPolicyType() { + return this.vmWorkloadPolicyType; + } + + /** + * Set the vmWorkloadPolicyType property: Type of the protection policy. + * + * @param vmWorkloadPolicyType the vmWorkloadPolicyType value to set. + * @return the AzureVmWorkloadProtectionPolicy object itself. + */ + public AzureVmWorkloadProtectionPolicy withVmWorkloadPolicyType(VMWorkloadPolicyType vmWorkloadPolicyType) { + this.vmWorkloadPolicyType = vmWorkloadPolicyType; + return this; + } + /** * Get the settings property: Common settings for the backup management. * @@ -158,21 +183,6 @@ public AzureVmWorkloadProtectionPolicy withProtectedItemsCount(Integer protected return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (settings() != null) { - settings().validate(); - } - if (subProtectionPolicy() != null) { - subProtectionPolicy().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -184,6 +194,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("backupManagementType", this.backupManagementType); jsonWriter.writeStringField("workLoadType", this.workLoadType == null ? null : this.workLoadType.toString()); + jsonWriter.writeStringField("vmWorkloadPolicyType", + this.vmWorkloadPolicyType == null ? null : this.vmWorkloadPolicyType.toString()); jsonWriter.writeJsonField("settings", this.settings); jsonWriter.writeArrayField("subProtectionPolicy", this.subProtectionPolicy, (writer, element) -> writer.writeJson(element)); @@ -219,6 +231,9 @@ public static AzureVmWorkloadProtectionPolicy fromJson(JsonReader jsonReader) th } else if ("workLoadType".equals(fieldName)) { deserializedAzureVmWorkloadProtectionPolicy.workLoadType = WorkloadType.fromString(reader.getString()); + } else if ("vmWorkloadPolicyType".equals(fieldName)) { + deserializedAzureVmWorkloadProtectionPolicy.vmWorkloadPolicyType + = VMWorkloadPolicyType.fromString(reader.getString()); } else if ("settings".equals(fieldName)) { deserializedAzureVmWorkloadProtectionPolicy.settings = Settings.fromJson(reader); } else if ("subProtectionPolicy".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSAPHanaScaleoutProtectableItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSAPHanaScaleoutProtectableItem.java new file mode 100644 index 000000000000..acceae81ffde --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSAPHanaScaleoutProtectableItem.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Azure VM workload-specific protectable item representing HANA scale out. + */ +@Immutable +public final class AzureVmWorkloadSAPHanaScaleoutProtectableItem extends AzureVmWorkloadProtectableItem { + /* + * Type of the backup item. + */ + private String protectableItemType = "HanaScaleoutContainer"; + + /** + * Creates an instance of AzureVmWorkloadSAPHanaScaleoutProtectableItem class. + */ + private AzureVmWorkloadSAPHanaScaleoutProtectableItem() { + } + + /** + * Get the protectableItemType property: Type of the backup item. + * + * @return the protectableItemType value. + */ + @Override + public String protectableItemType() { + return this.protectableItemType; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("backupManagementType", backupManagementType()); + jsonWriter.writeStringField("workloadType", workloadType()); + jsonWriter.writeStringField("friendlyName", friendlyName()); + jsonWriter.writeStringField("protectionState", protectionState() == null ? null : protectionState().toString()); + jsonWriter.writeStringField("parentName", parentName()); + jsonWriter.writeStringField("parentUniqueName", parentUniqueName()); + jsonWriter.writeStringField("serverName", serverName()); + jsonWriter.writeBooleanField("isAutoProtectable", isAutoProtectable()); + jsonWriter.writeBooleanField("isAutoProtected", isAutoProtected()); + jsonWriter.writeNumberField("subinquireditemcount", subinquireditemcount()); + jsonWriter.writeNumberField("subprotectableitemcount", subprotectableitemcount()); + jsonWriter.writeJsonField("prebackupvalidation", prebackupvalidation()); + jsonWriter.writeBooleanField("isProtectable", isProtectable()); + jsonWriter.writeStringField("protectableItemType", this.protectableItemType); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureVmWorkloadSAPHanaScaleoutProtectableItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureVmWorkloadSAPHanaScaleoutProtectableItem 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 AzureVmWorkloadSAPHanaScaleoutProtectableItem. + */ + public static AzureVmWorkloadSAPHanaScaleoutProtectableItem fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureVmWorkloadSAPHanaScaleoutProtectableItem deserializedAzureVmWorkloadSAPHanaScaleoutProtectableItem + = new AzureVmWorkloadSAPHanaScaleoutProtectableItem(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("backupManagementType".equals(fieldName)) { + deserializedAzureVmWorkloadSAPHanaScaleoutProtectableItem + .withBackupManagementType(reader.getString()); + } else if ("workloadType".equals(fieldName)) { + deserializedAzureVmWorkloadSAPHanaScaleoutProtectableItem.withWorkloadType(reader.getString()); + } else if ("friendlyName".equals(fieldName)) { + deserializedAzureVmWorkloadSAPHanaScaleoutProtectableItem.withFriendlyName(reader.getString()); + } else if ("protectionState".equals(fieldName)) { + deserializedAzureVmWorkloadSAPHanaScaleoutProtectableItem + .withProtectionState(ProtectionStatus.fromString(reader.getString())); + } else if ("parentName".equals(fieldName)) { + deserializedAzureVmWorkloadSAPHanaScaleoutProtectableItem.withParentName(reader.getString()); + } else if ("parentUniqueName".equals(fieldName)) { + deserializedAzureVmWorkloadSAPHanaScaleoutProtectableItem.withParentUniqueName(reader.getString()); + } else if ("serverName".equals(fieldName)) { + deserializedAzureVmWorkloadSAPHanaScaleoutProtectableItem.withServerName(reader.getString()); + } else if ("isAutoProtectable".equals(fieldName)) { + deserializedAzureVmWorkloadSAPHanaScaleoutProtectableItem + .withIsAutoProtectable(reader.getNullable(JsonReader::getBoolean)); + } else if ("isAutoProtected".equals(fieldName)) { + deserializedAzureVmWorkloadSAPHanaScaleoutProtectableItem + .withIsAutoProtected(reader.getNullable(JsonReader::getBoolean)); + } else if ("subinquireditemcount".equals(fieldName)) { + deserializedAzureVmWorkloadSAPHanaScaleoutProtectableItem + .withSubinquireditemcount(reader.getNullable(JsonReader::getInt)); + } else if ("subprotectableitemcount".equals(fieldName)) { + deserializedAzureVmWorkloadSAPHanaScaleoutProtectableItem + .withSubprotectableitemcount(reader.getNullable(JsonReader::getInt)); + } else if ("prebackupvalidation".equals(fieldName)) { + deserializedAzureVmWorkloadSAPHanaScaleoutProtectableItem + .withPrebackupvalidation(PreBackupValidation.fromJson(reader)); + } else if ("isProtectable".equals(fieldName)) { + deserializedAzureVmWorkloadSAPHanaScaleoutProtectableItem + .withIsProtectable(reader.getNullable(JsonReader::getBoolean)); + } else if ("protectableItemType".equals(fieldName)) { + deserializedAzureVmWorkloadSAPHanaScaleoutProtectableItem.protectableItemType = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAzureVmWorkloadSAPHanaScaleoutProtectableItem; + }); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSQLInstanceProtectedItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSQLInstanceProtectedItem.java new file mode 100644 index 000000000000..d15976d2c168 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSQLInstanceProtectedItem.java @@ -0,0 +1,525 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; +import java.util.Map; + +/** + * Azure VM workload-specific protected item representing SQL Instance. + */ +@Fluent +public final class AzureVmWorkloadSQLInstanceProtectedItem extends AzureVmWorkloadProtectedItem { + /* + * backup item type. + */ + private String protectedItemType = "AzureVmWorkloadSQLInstance"; + + /* + * Name of Child Dbs protected under this parent. + */ + private List childDBNames; + + /* + * The state of instance protection. + */ + private InstanceProtectionReadiness instanceProtectionReadiness; + + /** + * Creates an instance of AzureVmWorkloadSQLInstanceProtectedItem class. + */ + public AzureVmWorkloadSQLInstanceProtectedItem() { + } + + /** + * Get the protectedItemType property: backup item type. + * + * @return the protectedItemType value. + */ + @Override + public String protectedItemType() { + return this.protectedItemType; + } + + /** + * Get the childDBNames property: Name of Child Dbs protected under this parent. + * + * @return the childDBNames value. + */ + public List childDBNames() { + return this.childDBNames; + } + + /** + * Set the childDBNames property: Name of Child Dbs protected under this parent. + * + * @param childDBNames the childDBNames value to set. + * @return the AzureVmWorkloadSQLInstanceProtectedItem object itself. + */ + public AzureVmWorkloadSQLInstanceProtectedItem withChildDBNames(List childDBNames) { + this.childDBNames = childDBNames; + return this; + } + + /** + * Get the instanceProtectionReadiness property: The state of instance protection. + * + * @return the instanceProtectionReadiness value. + */ + public InstanceProtectionReadiness instanceProtectionReadiness() { + return this.instanceProtectionReadiness; + } + + /** + * Set the instanceProtectionReadiness property: The state of instance protection. + * + * @param instanceProtectionReadiness the instanceProtectionReadiness value to set. + * @return the AzureVmWorkloadSQLInstanceProtectedItem object itself. + */ + public AzureVmWorkloadSQLInstanceProtectedItem + withInstanceProtectionReadiness(InstanceProtectionReadiness instanceProtectionReadiness) { + this.instanceProtectionReadiness = instanceProtectionReadiness; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withServerName(String serverName) { + super.withServerName(serverName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withParentName(String parentName) { + super.withParentName(parentName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withParentType(String parentType) { + super.withParentType(parentType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withProtectionState(ProtectionState protectionState) { + super.withProtectionState(protectionState); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withLastBackupStatus(LastBackupStatus lastBackupStatus) { + super.withLastBackupStatus(lastBackupStatus); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withLastBackupTime(OffsetDateTime lastBackupTime) { + super.withLastBackupTime(lastBackupTime); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withLastBackupErrorDetail(ErrorDetail lastBackupErrorDetail) { + super.withLastBackupErrorDetail(lastBackupErrorDetail); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withProtectedItemDataSourceId(String protectedItemDataSourceId) { + super.withProtectedItemDataSourceId(protectedItemDataSourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem + withProtectedItemHealthStatus(ProtectedItemHealthStatus protectedItemHealthStatus) { + super.withProtectedItemHealthStatus(protectedItemHealthStatus); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem + withExtendedInfo(AzureVmWorkloadProtectedItemExtendedInfo extendedInfo) { + super.withExtendedInfo(extendedInfo); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withKpisHealths(Map kpisHealths) { + super.withKpisHealths(kpisHealths); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withNodesList(List nodesList) { + super.withNodesList(nodesList); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withContainerName(String containerName) { + super.withContainerName(containerName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withSourceResourceId(String sourceResourceId) { + super.withSourceResourceId(sourceResourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withPolicyId(String policyId) { + super.withPolicyId(policyId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withLastRecoveryPoint(OffsetDateTime lastRecoveryPoint) { + super.withLastRecoveryPoint(lastRecoveryPoint); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withBackupSetName(String backupSetName) { + super.withBackupSetName(backupSetName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withCreateMode(CreateMode createMode) { + super.withCreateMode(createMode); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withDeferredDeleteTimeInUtc(OffsetDateTime deferredDeleteTimeInUtc) { + super.withDeferredDeleteTimeInUtc(deferredDeleteTimeInUtc); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem + withIsScheduledForDeferredDelete(Boolean isScheduledForDeferredDelete) { + super.withIsScheduledForDeferredDelete(isScheduledForDeferredDelete); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withDeferredDeleteTimeRemaining(String deferredDeleteTimeRemaining) { + super.withDeferredDeleteTimeRemaining(deferredDeleteTimeRemaining); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem + withIsDeferredDeleteScheduleUpcoming(Boolean isDeferredDeleteScheduleUpcoming) { + super.withIsDeferredDeleteScheduleUpcoming(isDeferredDeleteScheduleUpcoming); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withIsRehydrate(Boolean isRehydrate) { + super.withIsRehydrate(isRehydrate); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem + withResourceGuardOperationRequests(List resourceGuardOperationRequests) { + super.withResourceGuardOperationRequests(resourceGuardOperationRequests); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withIsArchiveEnabled(Boolean isArchiveEnabled) { + super.withIsArchiveEnabled(isArchiveEnabled); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withPolicyName(String policyName) { + super.withPolicyName(policyName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem + withSoftDeleteRetentionPeriodInDays(Integer softDeleteRetentionPeriodInDays) { + super.withSoftDeleteRetentionPeriodInDays(softDeleteRetentionPeriodInDays); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureVmWorkloadSQLInstanceProtectedItem withSourceSideScanInfo(SourceSideScanInfo sourceSideScanInfo) { + super.withSourceSideScanInfo(sourceSideScanInfo); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("containerName", containerName()); + jsonWriter.writeStringField("sourceResourceId", sourceResourceId()); + jsonWriter.writeStringField("policyId", policyId()); + jsonWriter.writeStringField("lastRecoveryPoint", + lastRecoveryPoint() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(lastRecoveryPoint())); + jsonWriter.writeStringField("backupSetName", backupSetName()); + jsonWriter.writeStringField("createMode", createMode() == null ? null : createMode().toString()); + jsonWriter.writeStringField("deferredDeleteTimeInUTC", + deferredDeleteTimeInUtc() == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(deferredDeleteTimeInUtc())); + jsonWriter.writeBooleanField("isScheduledForDeferredDelete", isScheduledForDeferredDelete()); + jsonWriter.writeStringField("deferredDeleteTimeRemaining", deferredDeleteTimeRemaining()); + jsonWriter.writeBooleanField("isDeferredDeleteScheduleUpcoming", isDeferredDeleteScheduleUpcoming()); + jsonWriter.writeBooleanField("isRehydrate", isRehydrate()); + jsonWriter.writeArrayField("resourceGuardOperationRequests", resourceGuardOperationRequests(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("isArchiveEnabled", isArchiveEnabled()); + jsonWriter.writeStringField("policyName", policyName()); + jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriodInDays()); + jsonWriter.writeJsonField("sourceSideScanInfo", sourceSideScanInfo()); + jsonWriter.writeStringField("serverName", serverName()); + jsonWriter.writeStringField("parentName", parentName()); + jsonWriter.writeStringField("parentType", parentType()); + jsonWriter.writeStringField("protectionState", protectionState() == null ? null : protectionState().toString()); + jsonWriter.writeStringField("lastBackupStatus", + lastBackupStatus() == null ? null : lastBackupStatus().toString()); + jsonWriter.writeStringField("lastBackupTime", + lastBackupTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(lastBackupTime())); + jsonWriter.writeJsonField("lastBackupErrorDetail", lastBackupErrorDetail()); + jsonWriter.writeStringField("protectedItemDataSourceId", protectedItemDataSourceId()); + jsonWriter.writeStringField("protectedItemHealthStatus", + protectedItemHealthStatus() == null ? null : protectedItemHealthStatus().toString()); + jsonWriter.writeJsonField("extendedInfo", extendedInfo()); + jsonWriter.writeMapField("kpisHealths", kpisHealths(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("nodesList", nodesList(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("protectedItemType", this.protectedItemType); + jsonWriter.writeArrayField("childDBNames", this.childDBNames, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("instanceProtectionReadiness", + this.instanceProtectionReadiness == null ? null : this.instanceProtectionReadiness.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureVmWorkloadSQLInstanceProtectedItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureVmWorkloadSQLInstanceProtectedItem 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 AzureVmWorkloadSQLInstanceProtectedItem. + */ + public static AzureVmWorkloadSQLInstanceProtectedItem fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureVmWorkloadSQLInstanceProtectedItem deserializedAzureVmWorkloadSQLInstanceProtectedItem + = new AzureVmWorkloadSQLInstanceProtectedItem(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("backupManagementType".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withBackupManagementType(BackupManagementType.fromString(reader.getString())); + } else if ("workloadType".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withWorkloadType(DataSourceType.fromString(reader.getString())); + } else if ("containerName".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem.withContainerName(reader.getString()); + } else if ("sourceResourceId".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem.withSourceResourceId(reader.getString()); + } else if ("policyId".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem.withPolicyId(reader.getString()); + } else if ("lastRecoveryPoint".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem.withLastRecoveryPoint(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("backupSetName".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem.withBackupSetName(reader.getString()); + } else if ("createMode".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withCreateMode(CreateMode.fromString(reader.getString())); + } else if ("deferredDeleteTimeInUTC".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem.withDeferredDeleteTimeInUtc(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("isScheduledForDeferredDelete".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withIsScheduledForDeferredDelete(reader.getNullable(JsonReader::getBoolean)); + } else if ("deferredDeleteTimeRemaining".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withDeferredDeleteTimeRemaining(reader.getString()); + } else if ("isDeferredDeleteScheduleUpcoming".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withIsDeferredDeleteScheduleUpcoming(reader.getNullable(JsonReader::getBoolean)); + } else if ("isRehydrate".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withIsRehydrate(reader.getNullable(JsonReader::getBoolean)); + } else if ("resourceGuardOperationRequests".equals(fieldName)) { + List resourceGuardOperationRequests = reader.readArray(reader1 -> reader1.getString()); + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withResourceGuardOperationRequests(resourceGuardOperationRequests); + } else if ("isArchiveEnabled".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withIsArchiveEnabled(reader.getNullable(JsonReader::getBoolean)); + } else if ("policyName".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem.withPolicyName(reader.getString()); + } else if ("softDeleteRetentionPeriodInDays".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withSoftDeleteRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); + } else if ("vaultId".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem.withVaultId(reader.getString()); + } else if ("sourceSideScanInfo".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withSourceSideScanInfo(SourceSideScanInfo.fromJson(reader)); + } else if ("friendlyName".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem.withFriendlyName(reader.getString()); + } else if ("serverName".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem.withServerName(reader.getString()); + } else if ("parentName".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem.withParentName(reader.getString()); + } else if ("parentType".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem.withParentType(reader.getString()); + } else if ("protectionStatus".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem.withProtectionStatus(reader.getString()); + } else if ("protectionState".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withProtectionState(ProtectionState.fromString(reader.getString())); + } else if ("lastBackupStatus".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withLastBackupStatus(LastBackupStatus.fromString(reader.getString())); + } else if ("lastBackupTime".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem.withLastBackupTime(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("lastBackupErrorDetail".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withLastBackupErrorDetail(ErrorDetail.fromJson(reader)); + } else if ("protectedItemDataSourceId".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withProtectedItemDataSourceId(reader.getString()); + } else if ("protectedItemHealthStatus".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withProtectedItemHealthStatus(ProtectedItemHealthStatus.fromString(reader.getString())); + } else if ("extendedInfo".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem + .withExtendedInfo(AzureVmWorkloadProtectedItemExtendedInfo.fromJson(reader)); + } else if ("kpisHealths".equals(fieldName)) { + Map kpisHealths + = reader.readMap(reader1 -> KpiResourceHealthDetails.fromJson(reader1)); + deserializedAzureVmWorkloadSQLInstanceProtectedItem.withKpisHealths(kpisHealths); + } else if ("nodesList".equals(fieldName)) { + List nodesList + = reader.readArray(reader1 -> DistributedNodesInfo.fromJson(reader1)); + deserializedAzureVmWorkloadSQLInstanceProtectedItem.withNodesList(nodesList); + } else if ("protectedItemType".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem.protectedItemType = reader.getString(); + } else if ("childDBNames".equals(fieldName)) { + List childDBNames = reader.readArray(reader1 -> reader1.getString()); + deserializedAzureVmWorkloadSQLInstanceProtectedItem.childDBNames = childDBNames; + } else if ("instanceProtectionReadiness".equals(fieldName)) { + deserializedAzureVmWorkloadSQLInstanceProtectedItem.instanceProtectionReadiness + = InstanceProtectionReadiness.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedAzureVmWorkloadSQLInstanceProtectedItem; + }); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseDatabaseProtectableItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseDatabaseProtectableItem.java index d7a7149c5f6e..804f17636b8e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseDatabaseProtectableItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseDatabaseProtectableItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Azure VM workload-specific protectable item representing SAP ASE Database. */ -@Fluent +@Immutable public final class AzureVmWorkloadSapAseDatabaseProtectableItem extends AzureVmWorkloadProtectableItem { /* * Type of the backup item. @@ -23,7 +23,7 @@ public final class AzureVmWorkloadSapAseDatabaseProtectableItem extends AzureVmW /** * Creates an instance of AzureVmWorkloadSapAseDatabaseProtectableItem class. */ - public AzureVmWorkloadSapAseDatabaseProtectableItem() { + private AzureVmWorkloadSapAseDatabaseProtectableItem() { } /** @@ -36,136 +36,6 @@ public String protectableItemType() { return this.protectableItemType; } - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseProtectableItem withParentName(String parentName) { - super.withParentName(parentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseProtectableItem withParentUniqueName(String parentUniqueName) { - super.withParentUniqueName(parentUniqueName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseProtectableItem withServerName(String serverName) { - super.withServerName(serverName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseProtectableItem withIsAutoProtectable(Boolean isAutoProtectable) { - super.withIsAutoProtectable(isAutoProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseProtectableItem withIsAutoProtected(Boolean isAutoProtected) { - super.withIsAutoProtected(isAutoProtected); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseProtectableItem withSubinquireditemcount(Integer subinquireditemcount) { - super.withSubinquireditemcount(subinquireditemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseProtectableItem withSubprotectableitemcount(Integer subprotectableitemcount) { - super.withSubprotectableitemcount(subprotectableitemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseProtectableItem - withPrebackupvalidation(PreBackupValidation prebackupvalidation) { - super.withPrebackupvalidation(prebackupvalidation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseProtectableItem withIsProtectable(Boolean isProtectable) { - super.withIsProtectable(isProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseProtectableItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseProtectableItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseProtectableItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseProtectableItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (prebackupvalidation() != null) { - prebackupvalidation().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseDatabaseProtectedItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseDatabaseProtectedItem.java index 92a0997d0cd7..dc9b6f53e401 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseDatabaseProtectedItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseDatabaseProtectedItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -287,34 +287,19 @@ public AzureVmWorkloadSapAseDatabaseProtectedItem withPolicyName(String policyNa * {@inheritDoc} */ @Override - public AzureVmWorkloadSapAseDatabaseProtectedItem withSoftDeleteRetentionPeriod(Integer softDeleteRetentionPeriod) { - super.withSoftDeleteRetentionPeriod(softDeleteRetentionPeriod); + public AzureVmWorkloadSapAseDatabaseProtectedItem + withSoftDeleteRetentionPeriodInDays(Integer softDeleteRetentionPeriodInDays) { + super.withSoftDeleteRetentionPeriodInDays(softDeleteRetentionPeriodInDays); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - if (lastBackupErrorDetail() != null) { - lastBackupErrorDetail().validate(); - } - if (extendedInfo() != null) { - extendedInfo().validate(); - } - if (kpisHealths() != null) { - kpisHealths().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (nodesList() != null) { - nodesList().forEach(e -> e.validate()); - } + public AzureVmWorkloadSapAseDatabaseProtectedItem withSourceSideScanInfo(SourceSideScanInfo sourceSideScanInfo) { + super.withSourceSideScanInfo(sourceSideScanInfo); + return this; } /** @@ -342,7 +327,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchiveEnabled", isArchiveEnabled()); jsonWriter.writeStringField("policyName", policyName()); - jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriod()); + jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriodInDays()); + jsonWriter.writeJsonField("sourceSideScanInfo", sourceSideScanInfo()); jsonWriter.writeStringField("serverName", serverName()); jsonWriter.writeStringField("parentName", parentName()); jsonWriter.writeStringField("parentType", parentType()); @@ -424,9 +410,12 @@ public static AzureVmWorkloadSapAseDatabaseProtectedItem fromJson(JsonReader jso deserializedAzureVmWorkloadSapAseDatabaseProtectedItem.withPolicyName(reader.getString()); } else if ("softDeleteRetentionPeriodInDays".equals(fieldName)) { deserializedAzureVmWorkloadSapAseDatabaseProtectedItem - .withSoftDeleteRetentionPeriod(reader.getNullable(JsonReader::getInt)); + .withSoftDeleteRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); } else if ("vaultId".equals(fieldName)) { deserializedAzureVmWorkloadSapAseDatabaseProtectedItem.withVaultId(reader.getString()); + } else if ("sourceSideScanInfo".equals(fieldName)) { + deserializedAzureVmWorkloadSapAseDatabaseProtectedItem + .withSourceSideScanInfo(SourceSideScanInfo.fromJson(reader)); } else if ("friendlyName".equals(fieldName)) { deserializedAzureVmWorkloadSapAseDatabaseProtectedItem.withFriendlyName(reader.getString()); } else if ("serverName".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseDatabaseWorkloadItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseDatabaseWorkloadItem.java index 9a470e56c0b4..61a8bd5d4cc6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseDatabaseWorkloadItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseDatabaseWorkloadItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Azure VM workload-specific workload item representing SAP ASE Database. */ -@Fluent +@Immutable public final class AzureVmWorkloadSapAseDatabaseWorkloadItem extends AzureVmWorkloadItem { /* * Type of the backup item. @@ -23,7 +23,7 @@ public final class AzureVmWorkloadSapAseDatabaseWorkloadItem extends AzureVmWork /** * Creates an instance of AzureVmWorkloadSapAseDatabaseWorkloadItem class. */ - public AzureVmWorkloadSapAseDatabaseWorkloadItem() { + private AzureVmWorkloadSapAseDatabaseWorkloadItem() { } /** @@ -36,96 +36,6 @@ public String workloadItemType() { return this.workloadItemType; } - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseWorkloadItem withParentName(String parentName) { - super.withParentName(parentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseWorkloadItem withServerName(String serverName) { - super.withServerName(serverName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseWorkloadItem withIsAutoProtectable(Boolean isAutoProtectable) { - super.withIsAutoProtectable(isAutoProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseWorkloadItem withSubinquireditemcount(Integer subinquireditemcount) { - super.withSubinquireditemcount(subinquireditemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseWorkloadItem withSubWorkloadItemCount(Integer subWorkloadItemCount) { - super.withSubWorkloadItemCount(subWorkloadItemCount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseWorkloadItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseWorkloadItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseWorkloadItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseDatabaseWorkloadItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseSystemProtectableItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseSystemProtectableItem.java index ed583dd40f4a..bbd5c09a3809 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseSystemProtectableItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseSystemProtectableItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Azure VM workload-specific protectable item representing SAP ASE System. */ -@Fluent +@Immutable public final class AzureVmWorkloadSapAseSystemProtectableItem extends AzureVmWorkloadProtectableItem { /* * Type of the backup item. @@ -23,7 +23,7 @@ public final class AzureVmWorkloadSapAseSystemProtectableItem extends AzureVmWor /** * Creates an instance of AzureVmWorkloadSapAseSystemProtectableItem class. */ - public AzureVmWorkloadSapAseSystemProtectableItem() { + private AzureVmWorkloadSapAseSystemProtectableItem() { } /** @@ -36,135 +36,6 @@ public String protectableItemType() { return this.protectableItemType; } - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemProtectableItem withParentName(String parentName) { - super.withParentName(parentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemProtectableItem withParentUniqueName(String parentUniqueName) { - super.withParentUniqueName(parentUniqueName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemProtectableItem withServerName(String serverName) { - super.withServerName(serverName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemProtectableItem withIsAutoProtectable(Boolean isAutoProtectable) { - super.withIsAutoProtectable(isAutoProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemProtectableItem withIsAutoProtected(Boolean isAutoProtected) { - super.withIsAutoProtected(isAutoProtected); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemProtectableItem withSubinquireditemcount(Integer subinquireditemcount) { - super.withSubinquireditemcount(subinquireditemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemProtectableItem withSubprotectableitemcount(Integer subprotectableitemcount) { - super.withSubprotectableitemcount(subprotectableitemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemProtectableItem withPrebackupvalidation(PreBackupValidation prebackupvalidation) { - super.withPrebackupvalidation(prebackupvalidation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemProtectableItem withIsProtectable(Boolean isProtectable) { - super.withIsProtectable(isProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemProtectableItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemProtectableItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemProtectableItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemProtectableItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (prebackupvalidation() != null) { - prebackupvalidation().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseSystemWorkloadItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseSystemWorkloadItem.java index 4d40d011022d..90f184e38f74 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseSystemWorkloadItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseSystemWorkloadItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Azure VM workload-specific workload item representing SAP ASE System. */ -@Fluent +@Immutable public final class AzureVmWorkloadSapAseSystemWorkloadItem extends AzureVmWorkloadItem { /* * Type of the backup item. @@ -23,7 +23,7 @@ public final class AzureVmWorkloadSapAseSystemWorkloadItem extends AzureVmWorklo /** * Creates an instance of AzureVmWorkloadSapAseSystemWorkloadItem class. */ - public AzureVmWorkloadSapAseSystemWorkloadItem() { + private AzureVmWorkloadSapAseSystemWorkloadItem() { } /** @@ -36,96 +36,6 @@ public String workloadItemType() { return this.workloadItemType; } - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemWorkloadItem withParentName(String parentName) { - super.withParentName(parentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemWorkloadItem withServerName(String serverName) { - super.withServerName(serverName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemWorkloadItem withIsAutoProtectable(Boolean isAutoProtectable) { - super.withIsAutoProtectable(isAutoProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemWorkloadItem withSubinquireditemcount(Integer subinquireditemcount) { - super.withSubinquireditemcount(subinquireditemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemWorkloadItem withSubWorkloadItemCount(Integer subWorkloadItemCount) { - super.withSubWorkloadItemCount(subWorkloadItemCount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemWorkloadItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemWorkloadItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemWorkloadItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapAseSystemWorkloadItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDBInstance.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDBInstance.java index 08f754d86884..5a4cd752a8fd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDBInstance.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDBInstance.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Azure VM workload-specific protectable item representing SAP HANA Dbinstance. */ -@Fluent +@Immutable public final class AzureVmWorkloadSapHanaDBInstance extends AzureVmWorkloadProtectableItem { /* * Type of the backup item. @@ -23,7 +23,7 @@ public final class AzureVmWorkloadSapHanaDBInstance extends AzureVmWorkloadProte /** * Creates an instance of AzureVmWorkloadSapHanaDBInstance class. */ - public AzureVmWorkloadSapHanaDBInstance() { + private AzureVmWorkloadSapHanaDBInstance() { } /** @@ -36,135 +36,6 @@ public String protectableItemType() { return this.protectableItemType; } - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDBInstance withParentName(String parentName) { - super.withParentName(parentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDBInstance withParentUniqueName(String parentUniqueName) { - super.withParentUniqueName(parentUniqueName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDBInstance withServerName(String serverName) { - super.withServerName(serverName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDBInstance withIsAutoProtectable(Boolean isAutoProtectable) { - super.withIsAutoProtectable(isAutoProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDBInstance withIsAutoProtected(Boolean isAutoProtected) { - super.withIsAutoProtected(isAutoProtected); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDBInstance withSubinquireditemcount(Integer subinquireditemcount) { - super.withSubinquireditemcount(subinquireditemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDBInstance withSubprotectableitemcount(Integer subprotectableitemcount) { - super.withSubprotectableitemcount(subprotectableitemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDBInstance withPrebackupvalidation(PreBackupValidation prebackupvalidation) { - super.withPrebackupvalidation(prebackupvalidation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDBInstance withIsProtectable(Boolean isProtectable) { - super.withIsProtectable(isProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDBInstance withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDBInstance withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDBInstance withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDBInstance withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (prebackupvalidation() != null) { - prebackupvalidation().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDBInstanceProtectedItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDBInstanceProtectedItem.java index 6acd0f260adb..07115a373a9d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDBInstanceProtectedItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDBInstanceProtectedItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -289,34 +289,18 @@ public AzureVmWorkloadSapHanaDBInstanceProtectedItem withPolicyName(String polic */ @Override public AzureVmWorkloadSapHanaDBInstanceProtectedItem - withSoftDeleteRetentionPeriod(Integer softDeleteRetentionPeriod) { - super.withSoftDeleteRetentionPeriod(softDeleteRetentionPeriod); + withSoftDeleteRetentionPeriodInDays(Integer softDeleteRetentionPeriodInDays) { + super.withSoftDeleteRetentionPeriodInDays(softDeleteRetentionPeriodInDays); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - if (lastBackupErrorDetail() != null) { - lastBackupErrorDetail().validate(); - } - if (extendedInfo() != null) { - extendedInfo().validate(); - } - if (kpisHealths() != null) { - kpisHealths().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (nodesList() != null) { - nodesList().forEach(e -> e.validate()); - } + public AzureVmWorkloadSapHanaDBInstanceProtectedItem withSourceSideScanInfo(SourceSideScanInfo sourceSideScanInfo) { + super.withSourceSideScanInfo(sourceSideScanInfo); + return this; } /** @@ -344,7 +328,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchiveEnabled", isArchiveEnabled()); jsonWriter.writeStringField("policyName", policyName()); - jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriod()); + jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriodInDays()); + jsonWriter.writeJsonField("sourceSideScanInfo", sourceSideScanInfo()); jsonWriter.writeStringField("serverName", serverName()); jsonWriter.writeStringField("parentName", parentName()); jsonWriter.writeStringField("parentType", parentType()); @@ -426,9 +411,12 @@ public static AzureVmWorkloadSapHanaDBInstanceProtectedItem fromJson(JsonReader deserializedAzureVmWorkloadSapHanaDBInstanceProtectedItem.withPolicyName(reader.getString()); } else if ("softDeleteRetentionPeriodInDays".equals(fieldName)) { deserializedAzureVmWorkloadSapHanaDBInstanceProtectedItem - .withSoftDeleteRetentionPeriod(reader.getNullable(JsonReader::getInt)); + .withSoftDeleteRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); } else if ("vaultId".equals(fieldName)) { deserializedAzureVmWorkloadSapHanaDBInstanceProtectedItem.withVaultId(reader.getString()); + } else if ("sourceSideScanInfo".equals(fieldName)) { + deserializedAzureVmWorkloadSapHanaDBInstanceProtectedItem + .withSourceSideScanInfo(SourceSideScanInfo.fromJson(reader)); } else if ("friendlyName".equals(fieldName)) { deserializedAzureVmWorkloadSapHanaDBInstanceProtectedItem.withFriendlyName(reader.getString()); } else if ("serverName".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDatabaseProtectableItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDatabaseProtectableItem.java index 5721ed70b901..cf8664717a1b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDatabaseProtectableItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDatabaseProtectableItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Azure VM workload-specific protectable item representing SAP HANA Database. */ -@Fluent +@Immutable public final class AzureVmWorkloadSapHanaDatabaseProtectableItem extends AzureVmWorkloadProtectableItem { /* * Type of the backup item. @@ -23,7 +23,7 @@ public final class AzureVmWorkloadSapHanaDatabaseProtectableItem extends AzureVm /** * Creates an instance of AzureVmWorkloadSapHanaDatabaseProtectableItem class. */ - public AzureVmWorkloadSapHanaDatabaseProtectableItem() { + private AzureVmWorkloadSapHanaDatabaseProtectableItem() { } /** @@ -36,136 +36,6 @@ public String protectableItemType() { return this.protectableItemType; } - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseProtectableItem withParentName(String parentName) { - super.withParentName(parentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseProtectableItem withParentUniqueName(String parentUniqueName) { - super.withParentUniqueName(parentUniqueName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseProtectableItem withServerName(String serverName) { - super.withServerName(serverName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseProtectableItem withIsAutoProtectable(Boolean isAutoProtectable) { - super.withIsAutoProtectable(isAutoProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseProtectableItem withIsAutoProtected(Boolean isAutoProtected) { - super.withIsAutoProtected(isAutoProtected); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseProtectableItem withSubinquireditemcount(Integer subinquireditemcount) { - super.withSubinquireditemcount(subinquireditemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseProtectableItem withSubprotectableitemcount(Integer subprotectableitemcount) { - super.withSubprotectableitemcount(subprotectableitemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseProtectableItem - withPrebackupvalidation(PreBackupValidation prebackupvalidation) { - super.withPrebackupvalidation(prebackupvalidation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseProtectableItem withIsProtectable(Boolean isProtectable) { - super.withIsProtectable(isProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseProtectableItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseProtectableItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseProtectableItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseProtectableItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (prebackupvalidation() != null) { - prebackupvalidation().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDatabaseProtectedItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDatabaseProtectedItem.java index c5ac014111e0..9b351215daac 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDatabaseProtectedItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDatabaseProtectedItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -288,34 +288,18 @@ public AzureVmWorkloadSapHanaDatabaseProtectedItem withPolicyName(String policyN */ @Override public AzureVmWorkloadSapHanaDatabaseProtectedItem - withSoftDeleteRetentionPeriod(Integer softDeleteRetentionPeriod) { - super.withSoftDeleteRetentionPeriod(softDeleteRetentionPeriod); + withSoftDeleteRetentionPeriodInDays(Integer softDeleteRetentionPeriodInDays) { + super.withSoftDeleteRetentionPeriodInDays(softDeleteRetentionPeriodInDays); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - if (lastBackupErrorDetail() != null) { - lastBackupErrorDetail().validate(); - } - if (extendedInfo() != null) { - extendedInfo().validate(); - } - if (kpisHealths() != null) { - kpisHealths().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (nodesList() != null) { - nodesList().forEach(e -> e.validate()); - } + public AzureVmWorkloadSapHanaDatabaseProtectedItem withSourceSideScanInfo(SourceSideScanInfo sourceSideScanInfo) { + super.withSourceSideScanInfo(sourceSideScanInfo); + return this; } /** @@ -343,7 +327,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchiveEnabled", isArchiveEnabled()); jsonWriter.writeStringField("policyName", policyName()); - jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriod()); + jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriodInDays()); + jsonWriter.writeJsonField("sourceSideScanInfo", sourceSideScanInfo()); jsonWriter.writeStringField("serverName", serverName()); jsonWriter.writeStringField("parentName", parentName()); jsonWriter.writeStringField("parentType", parentType()); @@ -425,9 +410,12 @@ public static AzureVmWorkloadSapHanaDatabaseProtectedItem fromJson(JsonReader js deserializedAzureVmWorkloadSapHanaDatabaseProtectedItem.withPolicyName(reader.getString()); } else if ("softDeleteRetentionPeriodInDays".equals(fieldName)) { deserializedAzureVmWorkloadSapHanaDatabaseProtectedItem - .withSoftDeleteRetentionPeriod(reader.getNullable(JsonReader::getInt)); + .withSoftDeleteRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); } else if ("vaultId".equals(fieldName)) { deserializedAzureVmWorkloadSapHanaDatabaseProtectedItem.withVaultId(reader.getString()); + } else if ("sourceSideScanInfo".equals(fieldName)) { + deserializedAzureVmWorkloadSapHanaDatabaseProtectedItem + .withSourceSideScanInfo(SourceSideScanInfo.fromJson(reader)); } else if ("friendlyName".equals(fieldName)) { deserializedAzureVmWorkloadSapHanaDatabaseProtectedItem.withFriendlyName(reader.getString()); } else if ("serverName".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDatabaseWorkloadItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDatabaseWorkloadItem.java index f100eab1ce0c..19dc0a570f1e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDatabaseWorkloadItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDatabaseWorkloadItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Azure VM workload-specific workload item representing SAP HANA Database. */ -@Fluent +@Immutable public final class AzureVmWorkloadSapHanaDatabaseWorkloadItem extends AzureVmWorkloadItem { /* * Type of the backup item. @@ -23,7 +23,7 @@ public final class AzureVmWorkloadSapHanaDatabaseWorkloadItem extends AzureVmWor /** * Creates an instance of AzureVmWorkloadSapHanaDatabaseWorkloadItem class. */ - public AzureVmWorkloadSapHanaDatabaseWorkloadItem() { + private AzureVmWorkloadSapHanaDatabaseWorkloadItem() { } /** @@ -36,96 +36,6 @@ public String workloadItemType() { return this.workloadItemType; } - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseWorkloadItem withParentName(String parentName) { - super.withParentName(parentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseWorkloadItem withServerName(String serverName) { - super.withServerName(serverName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseWorkloadItem withIsAutoProtectable(Boolean isAutoProtectable) { - super.withIsAutoProtectable(isAutoProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseWorkloadItem withSubinquireditemcount(Integer subinquireditemcount) { - super.withSubinquireditemcount(subinquireditemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseWorkloadItem withSubWorkloadItemCount(Integer subWorkloadItemCount) { - super.withSubWorkloadItemCount(subWorkloadItemCount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseWorkloadItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseWorkloadItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseWorkloadItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaDatabaseWorkloadItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaHsr.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaHsr.java index a0f3b27654fd..5961374d5bff 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaHsr.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaHsr.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Azure VM workload-specific protectable item representing HANA HSR. */ -@Fluent +@Immutable public final class AzureVmWorkloadSapHanaHsr extends AzureVmWorkloadProtectableItem { /* * Type of the backup item. @@ -23,7 +23,7 @@ public final class AzureVmWorkloadSapHanaHsr extends AzureVmWorkloadProtectableI /** * Creates an instance of AzureVmWorkloadSapHanaHsr class. */ - public AzureVmWorkloadSapHanaHsr() { + private AzureVmWorkloadSapHanaHsr() { } /** @@ -36,135 +36,6 @@ public String protectableItemType() { return this.protectableItemType; } - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaHsr withParentName(String parentName) { - super.withParentName(parentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaHsr withParentUniqueName(String parentUniqueName) { - super.withParentUniqueName(parentUniqueName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaHsr withServerName(String serverName) { - super.withServerName(serverName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaHsr withIsAutoProtectable(Boolean isAutoProtectable) { - super.withIsAutoProtectable(isAutoProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaHsr withIsAutoProtected(Boolean isAutoProtected) { - super.withIsAutoProtected(isAutoProtected); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaHsr withSubinquireditemcount(Integer subinquireditemcount) { - super.withSubinquireditemcount(subinquireditemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaHsr withSubprotectableitemcount(Integer subprotectableitemcount) { - super.withSubprotectableitemcount(subprotectableitemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaHsr withPrebackupvalidation(PreBackupValidation prebackupvalidation) { - super.withPrebackupvalidation(prebackupvalidation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaHsr withIsProtectable(Boolean isProtectable) { - super.withIsProtectable(isProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaHsr withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaHsr withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaHsr withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaHsr withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (prebackupvalidation() != null) { - prebackupvalidation().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaSystemProtectableItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaSystemProtectableItem.java index f854590061a7..0cdba4a0d199 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaSystemProtectableItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaSystemProtectableItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Azure VM workload-specific protectable item representing SAP HANA System. */ -@Fluent +@Immutable public final class AzureVmWorkloadSapHanaSystemProtectableItem extends AzureVmWorkloadProtectableItem { /* * Type of the backup item. @@ -23,7 +23,7 @@ public final class AzureVmWorkloadSapHanaSystemProtectableItem extends AzureVmWo /** * Creates an instance of AzureVmWorkloadSapHanaSystemProtectableItem class. */ - public AzureVmWorkloadSapHanaSystemProtectableItem() { + private AzureVmWorkloadSapHanaSystemProtectableItem() { } /** @@ -36,136 +36,6 @@ public String protectableItemType() { return this.protectableItemType; } - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemProtectableItem withParentName(String parentName) { - super.withParentName(parentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemProtectableItem withParentUniqueName(String parentUniqueName) { - super.withParentUniqueName(parentUniqueName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemProtectableItem withServerName(String serverName) { - super.withServerName(serverName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemProtectableItem withIsAutoProtectable(Boolean isAutoProtectable) { - super.withIsAutoProtectable(isAutoProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemProtectableItem withIsAutoProtected(Boolean isAutoProtected) { - super.withIsAutoProtected(isAutoProtected); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemProtectableItem withSubinquireditemcount(Integer subinquireditemcount) { - super.withSubinquireditemcount(subinquireditemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemProtectableItem withSubprotectableitemcount(Integer subprotectableitemcount) { - super.withSubprotectableitemcount(subprotectableitemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemProtectableItem - withPrebackupvalidation(PreBackupValidation prebackupvalidation) { - super.withPrebackupvalidation(prebackupvalidation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemProtectableItem withIsProtectable(Boolean isProtectable) { - super.withIsProtectable(isProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemProtectableItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemProtectableItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemProtectableItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemProtectableItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (prebackupvalidation() != null) { - prebackupvalidation().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaSystemWorkloadItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaSystemWorkloadItem.java index 3a865af5f3c4..5a5f641e9ea4 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaSystemWorkloadItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaSystemWorkloadItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Azure VM workload-specific workload item representing SAP HANA System. */ -@Fluent +@Immutable public final class AzureVmWorkloadSapHanaSystemWorkloadItem extends AzureVmWorkloadItem { /* * Type of the backup item. @@ -23,7 +23,7 @@ public final class AzureVmWorkloadSapHanaSystemWorkloadItem extends AzureVmWorkl /** * Creates an instance of AzureVmWorkloadSapHanaSystemWorkloadItem class. */ - public AzureVmWorkloadSapHanaSystemWorkloadItem() { + private AzureVmWorkloadSapHanaSystemWorkloadItem() { } /** @@ -36,96 +36,6 @@ public String workloadItemType() { return this.workloadItemType; } - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemWorkloadItem withParentName(String parentName) { - super.withParentName(parentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemWorkloadItem withServerName(String serverName) { - super.withServerName(serverName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemWorkloadItem withIsAutoProtectable(Boolean isAutoProtectable) { - super.withIsAutoProtectable(isAutoProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemWorkloadItem withSubinquireditemcount(Integer subinquireditemcount) { - super.withSubinquireditemcount(subinquireditemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemWorkloadItem withSubWorkloadItemCount(Integer subWorkloadItemCount) { - super.withSubWorkloadItemCount(subWorkloadItemCount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemWorkloadItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemWorkloadItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemWorkloadItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSapHanaSystemWorkloadItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlAvailabilityGroupProtectableItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlAvailabilityGroupProtectableItem.java index ef16689362e0..9908ae2af55d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlAvailabilityGroupProtectableItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlAvailabilityGroupProtectableItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -14,7 +14,7 @@ /** * Azure VM workload-specific protectable item representing SQL Availability Group. */ -@Fluent +@Immutable public final class AzureVmWorkloadSqlAvailabilityGroupProtectableItem extends AzureVmWorkloadProtectableItem { /* * Type of the backup item. @@ -29,7 +29,7 @@ public final class AzureVmWorkloadSqlAvailabilityGroupProtectableItem extends Az /** * Creates an instance of AzureVmWorkloadSqlAvailabilityGroupProtectableItem class. */ - public AzureVmWorkloadSqlAvailabilityGroupProtectableItem() { + private AzureVmWorkloadSqlAvailabilityGroupProtectableItem() { } /** @@ -51,151 +51,6 @@ public List nodesList() { return this.nodesList; } - /** - * Set the nodesList property: List of the nodes in case of distributed container. - * - * @param nodesList the nodesList value to set. - * @return the AzureVmWorkloadSqlAvailabilityGroupProtectableItem object itself. - */ - public AzureVmWorkloadSqlAvailabilityGroupProtectableItem withNodesList(List nodesList) { - this.nodesList = nodesList; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlAvailabilityGroupProtectableItem withParentName(String parentName) { - super.withParentName(parentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlAvailabilityGroupProtectableItem withParentUniqueName(String parentUniqueName) { - super.withParentUniqueName(parentUniqueName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlAvailabilityGroupProtectableItem withServerName(String serverName) { - super.withServerName(serverName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlAvailabilityGroupProtectableItem withIsAutoProtectable(Boolean isAutoProtectable) { - super.withIsAutoProtectable(isAutoProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlAvailabilityGroupProtectableItem withIsAutoProtected(Boolean isAutoProtected) { - super.withIsAutoProtected(isAutoProtected); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlAvailabilityGroupProtectableItem withSubinquireditemcount(Integer subinquireditemcount) { - super.withSubinquireditemcount(subinquireditemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlAvailabilityGroupProtectableItem - withSubprotectableitemcount(Integer subprotectableitemcount) { - super.withSubprotectableitemcount(subprotectableitemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlAvailabilityGroupProtectableItem - withPrebackupvalidation(PreBackupValidation prebackupvalidation) { - super.withPrebackupvalidation(prebackupvalidation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlAvailabilityGroupProtectableItem withIsProtectable(Boolean isProtectable) { - super.withIsProtectable(isProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlAvailabilityGroupProtectableItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlAvailabilityGroupProtectableItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlAvailabilityGroupProtectableItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlAvailabilityGroupProtectableItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (nodesList() != null) { - nodesList().forEach(e -> e.validate()); - } - if (prebackupvalidation() != null) { - prebackupvalidation().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlDatabaseProtectableItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlDatabaseProtectableItem.java index f4237ab80705..ede63831386d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlDatabaseProtectableItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlDatabaseProtectableItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Azure VM workload-specific protectable item representing SQL Database. */ -@Fluent +@Immutable public final class AzureVmWorkloadSqlDatabaseProtectableItem extends AzureVmWorkloadProtectableItem { /* * Type of the backup item. @@ -23,7 +23,7 @@ public final class AzureVmWorkloadSqlDatabaseProtectableItem extends AzureVmWork /** * Creates an instance of AzureVmWorkloadSqlDatabaseProtectableItem class. */ - public AzureVmWorkloadSqlDatabaseProtectableItem() { + private AzureVmWorkloadSqlDatabaseProtectableItem() { } /** @@ -36,135 +36,6 @@ public String protectableItemType() { return this.protectableItemType; } - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseProtectableItem withParentName(String parentName) { - super.withParentName(parentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseProtectableItem withParentUniqueName(String parentUniqueName) { - super.withParentUniqueName(parentUniqueName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseProtectableItem withServerName(String serverName) { - super.withServerName(serverName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseProtectableItem withIsAutoProtectable(Boolean isAutoProtectable) { - super.withIsAutoProtectable(isAutoProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseProtectableItem withIsAutoProtected(Boolean isAutoProtected) { - super.withIsAutoProtected(isAutoProtected); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseProtectableItem withSubinquireditemcount(Integer subinquireditemcount) { - super.withSubinquireditemcount(subinquireditemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseProtectableItem withSubprotectableitemcount(Integer subprotectableitemcount) { - super.withSubprotectableitemcount(subprotectableitemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseProtectableItem withPrebackupvalidation(PreBackupValidation prebackupvalidation) { - super.withPrebackupvalidation(prebackupvalidation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseProtectableItem withIsProtectable(Boolean isProtectable) { - super.withIsProtectable(isProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseProtectableItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseProtectableItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseProtectableItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseProtectableItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (prebackupvalidation() != null) { - prebackupvalidation().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlDatabaseProtectedItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlDatabaseProtectedItem.java index 78ba440953ea..e804f7c52d54 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlDatabaseProtectedItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlDatabaseProtectedItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -25,6 +25,16 @@ public final class AzureVmWorkloadSqlDatabaseProtectedItem extends AzureVmWorklo */ private String protectedItemType = "AzureVmWorkloadSQLDatabase"; + /* + * Parent Protected item in case protected as part of a parent. + */ + private String parentProtectedItem; + + /* + * Protection type in case protected as part of a parent. + */ + private ProtectionLevel protectionLevel; + /** * Creates an instance of AzureVmWorkloadSqlDatabaseProtectedItem class. */ @@ -41,6 +51,46 @@ public String protectedItemType() { return this.protectedItemType; } + /** + * Get the parentProtectedItem property: Parent Protected item in case protected as part of a parent. + * + * @return the parentProtectedItem value. + */ + public String parentProtectedItem() { + return this.parentProtectedItem; + } + + /** + * Set the parentProtectedItem property: Parent Protected item in case protected as part of a parent. + * + * @param parentProtectedItem the parentProtectedItem value to set. + * @return the AzureVmWorkloadSqlDatabaseProtectedItem object itself. + */ + public AzureVmWorkloadSqlDatabaseProtectedItem withParentProtectedItem(String parentProtectedItem) { + this.parentProtectedItem = parentProtectedItem; + return this; + } + + /** + * Get the protectionLevel property: Protection type in case protected as part of a parent. + * + * @return the protectionLevel value. + */ + public ProtectionLevel protectionLevel() { + return this.protectionLevel; + } + + /** + * Set the protectionLevel property: Protection type in case protected as part of a parent. + * + * @param protectionLevel the protectionLevel value to set. + * @return the AzureVmWorkloadSqlDatabaseProtectedItem object itself. + */ + public AzureVmWorkloadSqlDatabaseProtectedItem withProtectionLevel(ProtectionLevel protectionLevel) { + this.protectionLevel = protectionLevel; + return this; + } + /** * {@inheritDoc} */ @@ -284,34 +334,19 @@ public AzureVmWorkloadSqlDatabaseProtectedItem withPolicyName(String policyName) * {@inheritDoc} */ @Override - public AzureVmWorkloadSqlDatabaseProtectedItem withSoftDeleteRetentionPeriod(Integer softDeleteRetentionPeriod) { - super.withSoftDeleteRetentionPeriod(softDeleteRetentionPeriod); + public AzureVmWorkloadSqlDatabaseProtectedItem + withSoftDeleteRetentionPeriodInDays(Integer softDeleteRetentionPeriodInDays) { + super.withSoftDeleteRetentionPeriodInDays(softDeleteRetentionPeriodInDays); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - if (lastBackupErrorDetail() != null) { - lastBackupErrorDetail().validate(); - } - if (extendedInfo() != null) { - extendedInfo().validate(); - } - if (kpisHealths() != null) { - kpisHealths().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (nodesList() != null) { - nodesList().forEach(e -> e.validate()); - } + public AzureVmWorkloadSqlDatabaseProtectedItem withSourceSideScanInfo(SourceSideScanInfo sourceSideScanInfo) { + super.withSourceSideScanInfo(sourceSideScanInfo); + return this; } /** @@ -339,7 +374,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchiveEnabled", isArchiveEnabled()); jsonWriter.writeStringField("policyName", policyName()); - jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriod()); + jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriodInDays()); + jsonWriter.writeJsonField("sourceSideScanInfo", sourceSideScanInfo()); jsonWriter.writeStringField("serverName", serverName()); jsonWriter.writeStringField("parentName", parentName()); jsonWriter.writeStringField("parentType", parentType()); @@ -356,6 +392,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeMapField("kpisHealths", kpisHealths(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("nodesList", nodesList(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("protectedItemType", this.protectedItemType); + jsonWriter.writeStringField("parentProtectedItem", this.parentProtectedItem); + jsonWriter.writeStringField("protectionLevel", + this.protectionLevel == null ? null : this.protectionLevel.toString()); return jsonWriter.writeEndObject(); } @@ -421,9 +460,12 @@ public static AzureVmWorkloadSqlDatabaseProtectedItem fromJson(JsonReader jsonRe deserializedAzureVmWorkloadSqlDatabaseProtectedItem.withPolicyName(reader.getString()); } else if ("softDeleteRetentionPeriodInDays".equals(fieldName)) { deserializedAzureVmWorkloadSqlDatabaseProtectedItem - .withSoftDeleteRetentionPeriod(reader.getNullable(JsonReader::getInt)); + .withSoftDeleteRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); } else if ("vaultId".equals(fieldName)) { deserializedAzureVmWorkloadSqlDatabaseProtectedItem.withVaultId(reader.getString()); + } else if ("sourceSideScanInfo".equals(fieldName)) { + deserializedAzureVmWorkloadSqlDatabaseProtectedItem + .withSourceSideScanInfo(SourceSideScanInfo.fromJson(reader)); } else if ("friendlyName".equals(fieldName)) { deserializedAzureVmWorkloadSqlDatabaseProtectedItem.withFriendlyName(reader.getString()); } else if ("serverName".equals(fieldName)) { @@ -465,6 +507,11 @@ public static AzureVmWorkloadSqlDatabaseProtectedItem fromJson(JsonReader jsonRe deserializedAzureVmWorkloadSqlDatabaseProtectedItem.withNodesList(nodesList); } else if ("protectedItemType".equals(fieldName)) { deserializedAzureVmWorkloadSqlDatabaseProtectedItem.protectedItemType = reader.getString(); + } else if ("parentProtectedItem".equals(fieldName)) { + deserializedAzureVmWorkloadSqlDatabaseProtectedItem.parentProtectedItem = reader.getString(); + } else if ("protectionLevel".equals(fieldName)) { + deserializedAzureVmWorkloadSqlDatabaseProtectedItem.protectionLevel + = ProtectionLevel.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlDatabaseWorkloadItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlDatabaseWorkloadItem.java index 617341dd404d..38b2409b1e17 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlDatabaseWorkloadItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlDatabaseWorkloadItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Azure VM workload-specific workload item representing SQL Database. */ -@Fluent +@Immutable public final class AzureVmWorkloadSqlDatabaseWorkloadItem extends AzureVmWorkloadItem { /* * Type of the backup item. @@ -23,7 +23,7 @@ public final class AzureVmWorkloadSqlDatabaseWorkloadItem extends AzureVmWorkloa /** * Creates an instance of AzureVmWorkloadSqlDatabaseWorkloadItem class. */ - public AzureVmWorkloadSqlDatabaseWorkloadItem() { + private AzureVmWorkloadSqlDatabaseWorkloadItem() { } /** @@ -36,96 +36,6 @@ public String workloadItemType() { return this.workloadItemType; } - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseWorkloadItem withParentName(String parentName) { - super.withParentName(parentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseWorkloadItem withServerName(String serverName) { - super.withServerName(serverName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseWorkloadItem withIsAutoProtectable(Boolean isAutoProtectable) { - super.withIsAutoProtectable(isAutoProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseWorkloadItem withSubinquireditemcount(Integer subinquireditemcount) { - super.withSubinquireditemcount(subinquireditemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseWorkloadItem withSubWorkloadItemCount(Integer subWorkloadItemCount) { - super.withSubWorkloadItemCount(subWorkloadItemCount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseWorkloadItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseWorkloadItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseWorkloadItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlDatabaseWorkloadItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlInstanceProtectableItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlInstanceProtectableItem.java index 1399bd295469..ebde9670d096 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlInstanceProtectableItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlInstanceProtectableItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Azure VM workload-specific protectable item representing SQL Instance. */ -@Fluent +@Immutable public final class AzureVmWorkloadSqlInstanceProtectableItem extends AzureVmWorkloadProtectableItem { /* * Type of the backup item. @@ -23,7 +23,7 @@ public final class AzureVmWorkloadSqlInstanceProtectableItem extends AzureVmWork /** * Creates an instance of AzureVmWorkloadSqlInstanceProtectableItem class. */ - public AzureVmWorkloadSqlInstanceProtectableItem() { + private AzureVmWorkloadSqlInstanceProtectableItem() { } /** @@ -36,135 +36,6 @@ public String protectableItemType() { return this.protectableItemType; } - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceProtectableItem withParentName(String parentName) { - super.withParentName(parentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceProtectableItem withParentUniqueName(String parentUniqueName) { - super.withParentUniqueName(parentUniqueName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceProtectableItem withServerName(String serverName) { - super.withServerName(serverName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceProtectableItem withIsAutoProtectable(Boolean isAutoProtectable) { - super.withIsAutoProtectable(isAutoProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceProtectableItem withIsAutoProtected(Boolean isAutoProtected) { - super.withIsAutoProtected(isAutoProtected); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceProtectableItem withSubinquireditemcount(Integer subinquireditemcount) { - super.withSubinquireditemcount(subinquireditemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceProtectableItem withSubprotectableitemcount(Integer subprotectableitemcount) { - super.withSubprotectableitemcount(subprotectableitemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceProtectableItem withPrebackupvalidation(PreBackupValidation prebackupvalidation) { - super.withPrebackupvalidation(prebackupvalidation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceProtectableItem withIsProtectable(Boolean isProtectable) { - super.withIsProtectable(isProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceProtectableItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceProtectableItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceProtectableItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceProtectableItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (prebackupvalidation() != null) { - prebackupvalidation().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlInstanceWorkloadItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlInstanceWorkloadItem.java index 088b78e69f0c..706f7b612ac3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlInstanceWorkloadItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlInstanceWorkloadItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -14,7 +14,7 @@ /** * Azure VM workload-specific workload item representing SQL Instance. */ -@Fluent +@Immutable public final class AzureVmWorkloadSqlInstanceWorkloadItem extends AzureVmWorkloadItem { /* * Type of the backup item. @@ -29,7 +29,7 @@ public final class AzureVmWorkloadSqlInstanceWorkloadItem extends AzureVmWorkloa /** * Creates an instance of AzureVmWorkloadSqlInstanceWorkloadItem class. */ - public AzureVmWorkloadSqlInstanceWorkloadItem() { + private AzureVmWorkloadSqlInstanceWorkloadItem() { } /** @@ -51,110 +51,6 @@ public List dataDirectoryPaths() { return this.dataDirectoryPaths; } - /** - * Set the dataDirectoryPaths property: Data Directory Paths for default directories. - * - * @param dataDirectoryPaths the dataDirectoryPaths value to set. - * @return the AzureVmWorkloadSqlInstanceWorkloadItem object itself. - */ - public AzureVmWorkloadSqlInstanceWorkloadItem withDataDirectoryPaths(List dataDirectoryPaths) { - this.dataDirectoryPaths = dataDirectoryPaths; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceWorkloadItem withParentName(String parentName) { - super.withParentName(parentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceWorkloadItem withServerName(String serverName) { - super.withServerName(serverName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceWorkloadItem withIsAutoProtectable(Boolean isAutoProtectable) { - super.withIsAutoProtectable(isAutoProtectable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceWorkloadItem withSubinquireditemcount(Integer subinquireditemcount) { - super.withSubinquireditemcount(subinquireditemcount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceWorkloadItem withSubWorkloadItemCount(Integer subWorkloadItemCount) { - super.withSubWorkloadItemCount(subWorkloadItemCount); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceWorkloadItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceWorkloadItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceWorkloadItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureVmWorkloadSqlInstanceWorkloadItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (dataDirectoryPaths() != null) { - dataDirectoryPaths().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadAutoProtectionIntent.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadAutoProtectionIntent.java index 53496d694e22..312f441f7857 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadAutoProtectionIntent.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadAutoProtectionIntent.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -82,15 +82,6 @@ public AzureWorkloadAutoProtectionIntent withProtectionState(ProtectionStatus pr return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadBackupRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadBackupRequest.java index d253c2d52453..ba9d4e38b737 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadBackupRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadBackupRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -116,15 +116,6 @@ public AzureWorkloadBackupRequest withRecoveryPointExpiryTimeInUtc(OffsetDateTim return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadContainer.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadContainer.java index 1f9cd31628da..0f8cb771fa9f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadContainer.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -217,18 +217,6 @@ public AzureWorkloadContainer withProtectableObjectType(String protectableObject return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (extendedInfo() != null) { - extendedInfo().validate(); - } - } - /** * {@inheritDoc} */ @@ -275,10 +263,10 @@ public static AzureWorkloadContainer fromJson(JsonReader jsonReader) throws IOEx } } // Use the discriminator value to determine which subtype should be deserialized. - if ("SQLAGWorkLoadContainer".equals(discriminatorValue)) { - return AzureSqlagWorkloadContainerProtectionContainer.fromJson(readerToUse.reset()); - } else if ("VMAppContainer".equals(discriminatorValue)) { + if ("VMAppContainer".equals(discriminatorValue)) { return AzureVMAppContainerProtectionContainer.fromJson(readerToUse.reset()); + } else if ("SQLAGWorkLoadContainer".equals(discriminatorValue)) { + return AzureSqlagWorkloadContainerProtectionContainer.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadContainerAutoProtectionIntent.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadContainerAutoProtectionIntent.java index 8be60e4f008d..7886ed2c0874 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadContainerAutoProtectionIntent.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadContainerAutoProtectionIntent.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -83,15 +83,6 @@ public AzureWorkloadContainerAutoProtectionIntent withProtectionState(Protection return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadContainerExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadContainerExtendedInfo.java index d46e065719fe..5636e2d1a1f0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadContainerExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadContainerExtendedInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -100,20 +100,6 @@ public AzureWorkloadContainerExtendedInfo withNodesList(List e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadErrorInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadErrorInfo.java index 16ca4c815469..f3699bbb39e6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadErrorInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadErrorInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Azure storage specific error information. */ -@Fluent +@Immutable public final class AzureWorkloadErrorInfo implements JsonSerializable { /* * Error code. @@ -45,7 +45,7 @@ public final class AzureWorkloadErrorInfo implements JsonSerializable recommendations() { return this.recommendations; } - /** - * Set the recommendations property: List of localized recommendations for above error code. - * - * @param recommendations the recommendations value to set. - * @return the AzureWorkloadErrorInfo object itself. - */ - public AzureWorkloadErrorInfo withRecommendations(List recommendations) { - this.recommendations = recommendations; - return this; - } - /** * Get the additionalDetails property: Additional details for above error code. * @@ -137,25 +93,6 @@ public String additionalDetails() { return this.additionalDetails; } - /** - * Set the additionalDetails property: Additional details for above error code. - * - * @param additionalDetails the additionalDetails value to set. - * @return the AzureWorkloadErrorInfo object itself. - */ - public AzureWorkloadErrorInfo withAdditionalDetails(String additionalDetails) { - this.additionalDetails = additionalDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadJob.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadJob.java index 21140457b39e..b26472678809 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadJob.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadJob.java @@ -1,24 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.Duration; -import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.List; /** * Azure storage specific job. */ -@Fluent +@Immutable public final class AzureWorkloadJob extends Job { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -54,7 +53,7 @@ public final class AzureWorkloadJob extends Job { /** * Creates an instance of AzureWorkloadJob class. */ - public AzureWorkloadJob() { + private AzureWorkloadJob() { } /** @@ -77,17 +76,6 @@ public String workloadType() { return this.workloadType; } - /** - * Set the workloadType property: Workload type of the job. - * - * @param workloadType the workloadType value to set. - * @return the AzureWorkloadJob object itself. - */ - public AzureWorkloadJob withWorkloadType(String workloadType) { - this.workloadType = workloadType; - return this; - } - /** * Get the duration property: Time elapsed during the execution of this job. * @@ -97,17 +85,6 @@ public Duration duration() { return this.duration; } - /** - * Set the duration property: Time elapsed during the execution of this job. - * - * @param duration the duration value to set. - * @return the AzureWorkloadJob object itself. - */ - public AzureWorkloadJob withDuration(Duration duration) { - this.duration = duration; - return this; - } - /** * Get the actionsInfo property: Gets or sets the state/actions applicable on this job like cancel/retry. * @@ -117,17 +94,6 @@ public List actionsInfo() { return this.actionsInfo; } - /** - * Set the actionsInfo property: Gets or sets the state/actions applicable on this job like cancel/retry. - * - * @param actionsInfo the actionsInfo value to set. - * @return the AzureWorkloadJob object itself. - */ - public AzureWorkloadJob withActionsInfo(List actionsInfo) { - this.actionsInfo = actionsInfo; - return this; - } - /** * Get the errorDetails property: Error details on execution of this job. * @@ -137,17 +103,6 @@ public List errorDetails() { return this.errorDetails; } - /** - * Set the errorDetails property: Error details on execution of this job. - * - * @param errorDetails the errorDetails value to set. - * @return the AzureWorkloadJob object itself. - */ - public AzureWorkloadJob withErrorDetails(List errorDetails) { - this.errorDetails = errorDetails; - return this; - } - /** * Get the extendedInfo property: Additional information about the job. * @@ -157,95 +112,6 @@ public AzureWorkloadJobExtendedInfo extendedInfo() { return this.extendedInfo; } - /** - * Set the extendedInfo property: Additional information about the job. - * - * @param extendedInfo the extendedInfo value to set. - * @return the AzureWorkloadJob object itself. - */ - public AzureWorkloadJob withExtendedInfo(AzureWorkloadJobExtendedInfo extendedInfo) { - this.extendedInfo = extendedInfo; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadJob withEntityFriendlyName(String entityFriendlyName) { - super.withEntityFriendlyName(entityFriendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadJob withBackupManagementType(BackupManagementType backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadJob withOperation(String operation) { - super.withOperation(operation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadJob withStatus(String status) { - super.withStatus(status); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadJob withStartTime(OffsetDateTime startTime) { - super.withStartTime(startTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadJob withEndTime(OffsetDateTime endTime) { - super.withEndTime(endTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadJob withActivityId(String activityId) { - super.withActivityId(activityId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (errorDetails() != null) { - errorDetails().forEach(e -> e.validate()); - } - if (extendedInfo() != null) { - extendedInfo().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadJobExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadJobExtendedInfo.java index 0a4fec23f04b..d2b876579f02 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadJobExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadJobExtendedInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * Azure VM workload-specific additional information for job. */ -@Fluent +@Immutable public final class AzureWorkloadJobExtendedInfo implements JsonSerializable { /* * List of tasks for this job @@ -36,7 +36,7 @@ public final class AzureWorkloadJobExtendedInfo implements JsonSerializable tasksList() { return this.tasksList; } - /** - * Set the tasksList property: List of tasks for this job. - * - * @param tasksList the tasksList value to set. - * @return the AzureWorkloadJobExtendedInfo object itself. - */ - public AzureWorkloadJobExtendedInfo withTasksList(List tasksList) { - this.tasksList = tasksList; - return this; - } - /** * Get the propertyBag property: Job properties. * @@ -68,17 +57,6 @@ public Map propertyBag() { return this.propertyBag; } - /** - * Set the propertyBag property: Job properties. - * - * @param propertyBag the propertyBag value to set. - * @return the AzureWorkloadJobExtendedInfo object itself. - */ - public AzureWorkloadJobExtendedInfo withPropertyBag(Map propertyBag) { - this.propertyBag = propertyBag; - return this; - } - /** * Get the dynamicErrorMessage property: Non localized error message on job execution. * @@ -88,28 +66,6 @@ public String dynamicErrorMessage() { return this.dynamicErrorMessage; } - /** - * Set the dynamicErrorMessage property: Non localized error message on job execution. - * - * @param dynamicErrorMessage the dynamicErrorMessage value to set. - * @return the AzureWorkloadJobExtendedInfo object itself. - */ - public AzureWorkloadJobExtendedInfo withDynamicErrorMessage(String dynamicErrorMessage) { - this.dynamicErrorMessage = dynamicErrorMessage; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (tasksList() != null) { - tasksList().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadJobTaskDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadJobTaskDetails.java index e83ba3c514d5..483bbdc982c0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadJobTaskDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadJobTaskDetails.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Azure VM workload specific job task details. */ -@Fluent +@Immutable public final class AzureWorkloadJobTaskDetails implements JsonSerializable { /* * The task display name. @@ -29,7 +29,7 @@ public final class AzureWorkloadJobTaskDetails implements JsonSerializable timeRanges() { * @param timeRanges the timeRanges value to set. * @return the AzureWorkloadPointInTimeRecoveryPoint object itself. */ - public AzureWorkloadPointInTimeRecoveryPoint withTimeRanges(List timeRanges) { + AzureWorkloadPointInTimeRecoveryPoint withTimeRanges(List timeRanges) { this.timeRanges = timeRanges; return this; } - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadPointInTimeRecoveryPoint withRecoveryPointTimeInUtc(OffsetDateTime recoveryPointTimeInUtc) { - super.withRecoveryPointTimeInUtc(recoveryPointTimeInUtc); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadPointInTimeRecoveryPoint withType(RestorePointType type) { - super.withType(type); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadPointInTimeRecoveryPoint - withRecoveryPointTierDetails(List recoveryPointTierDetails) { - super.withRecoveryPointTierDetails(recoveryPointTierDetails); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadPointInTimeRecoveryPoint - withRecoveryPointMoveReadinessInfo(Map recoveryPointMoveReadinessInfo) { - super.withRecoveryPointMoveReadinessInfo(recoveryPointMoveReadinessInfo); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadPointInTimeRecoveryPoint - withRecoveryPointProperties(RecoveryPointProperties recoveryPointProperties) { - super.withRecoveryPointProperties(recoveryPointProperties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (timeRanges() != null) { - timeRanges().forEach(e -> e.validate()); - } - if (recoveryPointTierDetails() != null) { - recoveryPointTierDetails().forEach(e -> e.validate()); - } - if (recoveryPointMoveReadinessInfo() != null) { - recoveryPointMoveReadinessInfo().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (recoveryPointProperties() != null) { - recoveryPointProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("threatStatus", threatStatus() == null ? null : threatStatus().toString()); + jsonWriter.writeArrayField("threatInfo", threatInfo(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("recoveryPointTimeInUTC", recoveryPointTimeInUtc() == null ? null @@ -205,7 +133,13 @@ static AzureWorkloadPointInTimeRecoveryPoint fromJsonKnownDiscriminator(JsonRead String fieldName = reader.getFieldName(); reader.nextToken(); - if ("recoveryPointTimeInUTC".equals(fieldName)) { + if ("threatStatus".equals(fieldName)) { + deserializedAzureWorkloadPointInTimeRecoveryPoint + .withThreatStatus(ThreatStatus.fromString(reader.getString())); + } else if ("threatInfo".equals(fieldName)) { + List threatInfo = reader.readArray(reader1 -> ThreatInfo.fromJson(reader1)); + deserializedAzureWorkloadPointInTimeRecoveryPoint.withThreatInfo(threatInfo); + } else if ("recoveryPointTimeInUTC".equals(fieldName)) { deserializedAzureWorkloadPointInTimeRecoveryPoint.withRecoveryPointTimeInUtc(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("type".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadPointInTimeRestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadPointInTimeRestoreRequest.java index 16d452b8ca5b..4afeb025fdb5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadPointInTimeRestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadPointInTimeRestoreRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -161,24 +161,6 @@ public AzureWorkloadPointInTimeRestoreRequest withTargetVirtualMachineId(String return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (targetInfo() != null) { - targetInfo().validate(); - } - if (userAssignedManagedIdentityDetails() != null) { - userAssignedManagedIdentityDetails().validate(); - } - if (snapshotRestoreParameters() != null) { - snapshotRestoreParameters().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRecoveryPoint.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRecoveryPoint.java index 5797cb1cad64..f81e9aefd35e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRecoveryPoint.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRecoveryPoint.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; @@ -18,7 +18,7 @@ /** * Workload specific recovery point, specifically encapsulates full/diff recovery point. */ -@Fluent +@Immutable public class AzureWorkloadRecoveryPoint extends RecoveryPoint { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -54,7 +54,7 @@ public class AzureWorkloadRecoveryPoint extends RecoveryPoint { /** * Creates an instance of AzureWorkloadRecoveryPoint class. */ - public AzureWorkloadRecoveryPoint() { + protected AzureWorkloadRecoveryPoint() { } /** @@ -83,7 +83,7 @@ public OffsetDateTime recoveryPointTimeInUtc() { * @param recoveryPointTimeInUtc the recoveryPointTimeInUtc value to set. * @return the AzureWorkloadRecoveryPoint object itself. */ - public AzureWorkloadRecoveryPoint withRecoveryPointTimeInUtc(OffsetDateTime recoveryPointTimeInUtc) { + AzureWorkloadRecoveryPoint withRecoveryPointTimeInUtc(OffsetDateTime recoveryPointTimeInUtc) { this.recoveryPointTimeInUtc = recoveryPointTimeInUtc; return this; } @@ -103,7 +103,7 @@ public RestorePointType type() { * @param type the type value to set. * @return the AzureWorkloadRecoveryPoint object itself. */ - public AzureWorkloadRecoveryPoint withType(RestorePointType type) { + AzureWorkloadRecoveryPoint withType(RestorePointType type) { this.type = type; return this; } @@ -123,7 +123,7 @@ public List recoveryPointTierDetails() { * @param recoveryPointTierDetails the recoveryPointTierDetails value to set. * @return the AzureWorkloadRecoveryPoint object itself. */ - public AzureWorkloadRecoveryPoint + AzureWorkloadRecoveryPoint withRecoveryPointTierDetails(List recoveryPointTierDetails) { this.recoveryPointTierDetails = recoveryPointTierDetails; return this; @@ -144,7 +144,7 @@ public Map recoveryPointMoveReadinessInf * @param recoveryPointMoveReadinessInfo the recoveryPointMoveReadinessInfo value to set. * @return the AzureWorkloadRecoveryPoint object itself. */ - public AzureWorkloadRecoveryPoint + AzureWorkloadRecoveryPoint withRecoveryPointMoveReadinessInfo(Map recoveryPointMoveReadinessInfo) { this.recoveryPointMoveReadinessInfo = recoveryPointMoveReadinessInfo; return this; @@ -165,39 +165,19 @@ public RecoveryPointProperties recoveryPointProperties() { * @param recoveryPointProperties the recoveryPointProperties value to set. * @return the AzureWorkloadRecoveryPoint object itself. */ - public AzureWorkloadRecoveryPoint withRecoveryPointProperties(RecoveryPointProperties recoveryPointProperties) { + AzureWorkloadRecoveryPoint withRecoveryPointProperties(RecoveryPointProperties recoveryPointProperties) { this.recoveryPointProperties = recoveryPointProperties; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointTierDetails() != null) { - recoveryPointTierDetails().forEach(e -> e.validate()); - } - if (recoveryPointMoveReadinessInfo() != null) { - recoveryPointMoveReadinessInfo().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (recoveryPointProperties() != null) { - recoveryPointProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("threatStatus", threatStatus() == null ? null : threatStatus().toString()); + jsonWriter.writeArrayField("threatInfo", threatInfo(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("objectType", this.objectType); jsonWriter.writeStringField("recoveryPointTimeInUTC", this.recoveryPointTimeInUtc == null @@ -236,13 +216,7 @@ public static AzureWorkloadRecoveryPoint fromJson(JsonReader jsonReader) throws } } // Use the discriminator value to determine which subtype should be deserialized. - if ("AzureWorkloadPointInTimeRecoveryPoint".equals(discriminatorValue)) { - return AzureWorkloadPointInTimeRecoveryPoint.fromJsonKnownDiscriminator(readerToUse.reset()); - } else if ("AzureWorkloadSAPHanaPointInTimeRecoveryPoint".equals(discriminatorValue)) { - return AzureWorkloadSapHanaPointInTimeRecoveryPoint.fromJson(readerToUse.reset()); - } else if ("AzureWorkloadSAPAsePointInTimeRecoveryPoint".equals(discriminatorValue)) { - return AzureWorkloadSapAsePointInTimeRecoveryPoint.fromJson(readerToUse.reset()); - } else if ("AzureWorkloadSAPHanaRecoveryPoint".equals(discriminatorValue)) { + if ("AzureWorkloadSAPHanaRecoveryPoint".equals(discriminatorValue)) { return AzureWorkloadSapHanaRecoveryPoint.fromJson(readerToUse.reset()); } else if ("AzureWorkloadSAPAseRecoveryPoint".equals(discriminatorValue)) { return AzureWorkloadSapAseRecoveryPoint.fromJson(readerToUse.reset()); @@ -250,6 +224,12 @@ public static AzureWorkloadRecoveryPoint fromJson(JsonReader jsonReader) throws return AzureWorkloadSqlRecoveryPoint.fromJsonKnownDiscriminator(readerToUse.reset()); } else if ("AzureWorkloadSQLPointInTimeRecoveryPoint".equals(discriminatorValue)) { return AzureWorkloadSqlPointInTimeRecoveryPoint.fromJson(readerToUse.reset()); + } else if ("AzureWorkloadPointInTimeRecoveryPoint".equals(discriminatorValue)) { + return AzureWorkloadPointInTimeRecoveryPoint.fromJsonKnownDiscriminator(readerToUse.reset()); + } else if ("AzureWorkloadSAPHanaPointInTimeRecoveryPoint".equals(discriminatorValue)) { + return AzureWorkloadSapHanaPointInTimeRecoveryPoint.fromJson(readerToUse.reset()); + } else if ("AzureWorkloadSAPAsePointInTimeRecoveryPoint".equals(discriminatorValue)) { + return AzureWorkloadSapAsePointInTimeRecoveryPoint.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } @@ -264,7 +244,13 @@ static AzureWorkloadRecoveryPoint fromJsonKnownDiscriminator(JsonReader jsonRead String fieldName = reader.getFieldName(); reader.nextToken(); - if ("objectType".equals(fieldName)) { + if ("threatStatus".equals(fieldName)) { + deserializedAzureWorkloadRecoveryPoint + .withThreatStatus(ThreatStatus.fromString(reader.getString())); + } else if ("threatInfo".equals(fieldName)) { + List threatInfo = reader.readArray(reader1 -> ThreatInfo.fromJson(reader1)); + deserializedAzureWorkloadRecoveryPoint.withThreatInfo(threatInfo); + } else if ("objectType".equals(fieldName)) { deserializedAzureWorkloadRecoveryPoint.objectType = reader.getString(); } else if ("recoveryPointTimeInUTC".equals(fieldName)) { deserializedAzureWorkloadRecoveryPoint.recoveryPointTimeInUtc = reader diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRestoreRequest.java index 915e668f2c0c..bcde1223aae8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRestoreRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -287,24 +287,6 @@ public AzureWorkloadRestoreRequest withResourceGuardOperationRequests(List timeRanges) { - super.withTimeRanges(timeRanges); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapAsePointInTimeRecoveryPoint - withRecoveryPointTimeInUtc(OffsetDateTime recoveryPointTimeInUtc) { - super.withRecoveryPointTimeInUtc(recoveryPointTimeInUtc); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapAsePointInTimeRecoveryPoint withType(RestorePointType type) { - super.withType(type); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapAsePointInTimeRecoveryPoint - withRecoveryPointTierDetails(List recoveryPointTierDetails) { - super.withRecoveryPointTierDetails(recoveryPointTierDetails); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapAsePointInTimeRecoveryPoint - withRecoveryPointMoveReadinessInfo(Map recoveryPointMoveReadinessInfo) { - super.withRecoveryPointMoveReadinessInfo(recoveryPointMoveReadinessInfo); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapAsePointInTimeRecoveryPoint - withRecoveryPointProperties(RecoveryPointProperties recoveryPointProperties) { - super.withRecoveryPointProperties(recoveryPointProperties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointTierDetails() != null) { - recoveryPointTierDetails().forEach(e -> e.validate()); - } - if (recoveryPointMoveReadinessInfo() != null) { - recoveryPointMoveReadinessInfo().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (recoveryPointProperties() != null) { - recoveryPointProperties().validate(); - } - if (timeRanges() != null) { - timeRanges().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("threatStatus", threatStatus() == null ? null : threatStatus().toString()); + jsonWriter.writeArrayField("threatInfo", threatInfo(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("recoveryPointTimeInUTC", recoveryPointTimeInUtc() == null ? null @@ -163,7 +81,13 @@ public static AzureWorkloadSapAsePointInTimeRecoveryPoint fromJson(JsonReader js String fieldName = reader.getFieldName(); reader.nextToken(); - if ("recoveryPointTimeInUTC".equals(fieldName)) { + if ("threatStatus".equals(fieldName)) { + deserializedAzureWorkloadSapAsePointInTimeRecoveryPoint + .withThreatStatus(ThreatStatus.fromString(reader.getString())); + } else if ("threatInfo".equals(fieldName)) { + List threatInfo = reader.readArray(reader1 -> ThreatInfo.fromJson(reader1)); + deserializedAzureWorkloadSapAsePointInTimeRecoveryPoint.withThreatInfo(threatInfo); + } else if ("recoveryPointTimeInUTC".equals(fieldName)) { deserializedAzureWorkloadSapAsePointInTimeRecoveryPoint.withRecoveryPointTimeInUtc(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("type".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapAsePointInTimeRestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapAsePointInTimeRestoreRequest.java index 8c744ca14c68..acc2ee3cf647 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapAsePointInTimeRestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapAsePointInTimeRestoreRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -161,24 +161,6 @@ public AzureWorkloadSapAsePointInTimeRestoreRequest withTargetVirtualMachineId(S return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (targetInfo() != null) { - targetInfo().validate(); - } - if (userAssignedManagedIdentityDetails() != null) { - userAssignedManagedIdentityDetails().validate(); - } - if (snapshotRestoreParameters() != null) { - snapshotRestoreParameters().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapAseRecoveryPoint.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapAseRecoveryPoint.java index 169622864d26..ebe47f261ae1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapAseRecoveryPoint.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapAseRecoveryPoint.java @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Map; @@ -18,7 +17,7 @@ /** * SAPAse specific recoverypoint, specifically encapsulates full/diff recoverypoints. */ -@Fluent +@Immutable public final class AzureWorkloadSapAseRecoveryPoint extends AzureWorkloadRecoveryPoint { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -29,7 +28,7 @@ public final class AzureWorkloadSapAseRecoveryPoint extends AzureWorkloadRecover /** * Creates an instance of AzureWorkloadSapAseRecoveryPoint class. */ - public AzureWorkloadSapAseRecoveryPoint() { + private AzureWorkloadSapAseRecoveryPoint() { } /** @@ -43,82 +42,14 @@ public String objectType() { return this.objectType; } - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapAseRecoveryPoint withRecoveryPointTimeInUtc(OffsetDateTime recoveryPointTimeInUtc) { - super.withRecoveryPointTimeInUtc(recoveryPointTimeInUtc); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapAseRecoveryPoint withType(RestorePointType type) { - super.withType(type); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapAseRecoveryPoint - withRecoveryPointTierDetails(List recoveryPointTierDetails) { - super.withRecoveryPointTierDetails(recoveryPointTierDetails); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapAseRecoveryPoint - withRecoveryPointMoveReadinessInfo(Map recoveryPointMoveReadinessInfo) { - super.withRecoveryPointMoveReadinessInfo(recoveryPointMoveReadinessInfo); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapAseRecoveryPoint - withRecoveryPointProperties(RecoveryPointProperties recoveryPointProperties) { - super.withRecoveryPointProperties(recoveryPointProperties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointTierDetails() != null) { - recoveryPointTierDetails().forEach(e -> e.validate()); - } - if (recoveryPointMoveReadinessInfo() != null) { - recoveryPointMoveReadinessInfo().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (recoveryPointProperties() != null) { - recoveryPointProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("threatStatus", threatStatus() == null ? null : threatStatus().toString()); + jsonWriter.writeArrayField("threatInfo", threatInfo(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("recoveryPointTimeInUTC", recoveryPointTimeInUtc() == null ? null @@ -149,7 +80,13 @@ public static AzureWorkloadSapAseRecoveryPoint fromJson(JsonReader jsonReader) t String fieldName = reader.getFieldName(); reader.nextToken(); - if ("recoveryPointTimeInUTC".equals(fieldName)) { + if ("threatStatus".equals(fieldName)) { + deserializedAzureWorkloadSapAseRecoveryPoint + .withThreatStatus(ThreatStatus.fromString(reader.getString())); + } else if ("threatInfo".equals(fieldName)) { + List threatInfo = reader.readArray(reader1 -> ThreatInfo.fromJson(reader1)); + deserializedAzureWorkloadSapAseRecoveryPoint.withThreatInfo(threatInfo); + } else if ("recoveryPointTimeInUTC".equals(fieldName)) { deserializedAzureWorkloadSapAseRecoveryPoint.withRecoveryPointTimeInUtc(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("type".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapAseRestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapAseRestoreRequest.java index 8c6fcf059d45..f82d7d706864 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapAseRestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapAseRestoreRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -133,24 +133,6 @@ public AzureWorkloadSapAseRestoreRequest withTargetVirtualMachineId(String targe return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (targetInfo() != null) { - targetInfo().validate(); - } - if (userAssignedManagedIdentityDetails() != null) { - userAssignedManagedIdentityDetails().validate(); - } - if (snapshotRestoreParameters() != null) { - snapshotRestoreParameters().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRecoveryPoint.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRecoveryPoint.java index cc973b1344cd..9ec6e6a06cf0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRecoveryPoint.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRecoveryPoint.java @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Map; @@ -18,7 +17,7 @@ /** * Recovery point specific to PointInTime in SAPHana. */ -@Fluent +@Immutable public final class AzureWorkloadSapHanaPointInTimeRecoveryPoint extends AzureWorkloadPointInTimeRecoveryPoint { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -29,7 +28,7 @@ public final class AzureWorkloadSapHanaPointInTimeRecoveryPoint extends AzureWor /** * Creates an instance of AzureWorkloadSapHanaPointInTimeRecoveryPoint class. */ - public AzureWorkloadSapHanaPointInTimeRecoveryPoint() { + private AzureWorkloadSapHanaPointInTimeRecoveryPoint() { } /** @@ -43,95 +42,14 @@ public String objectType() { return this.objectType; } - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapHanaPointInTimeRecoveryPoint withTimeRanges(List timeRanges) { - super.withTimeRanges(timeRanges); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapHanaPointInTimeRecoveryPoint - withRecoveryPointTimeInUtc(OffsetDateTime recoveryPointTimeInUtc) { - super.withRecoveryPointTimeInUtc(recoveryPointTimeInUtc); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapHanaPointInTimeRecoveryPoint withType(RestorePointType type) { - super.withType(type); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapHanaPointInTimeRecoveryPoint - withRecoveryPointTierDetails(List recoveryPointTierDetails) { - super.withRecoveryPointTierDetails(recoveryPointTierDetails); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapHanaPointInTimeRecoveryPoint - withRecoveryPointMoveReadinessInfo(Map recoveryPointMoveReadinessInfo) { - super.withRecoveryPointMoveReadinessInfo(recoveryPointMoveReadinessInfo); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapHanaPointInTimeRecoveryPoint - withRecoveryPointProperties(RecoveryPointProperties recoveryPointProperties) { - super.withRecoveryPointProperties(recoveryPointProperties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointTierDetails() != null) { - recoveryPointTierDetails().forEach(e -> e.validate()); - } - if (recoveryPointMoveReadinessInfo() != null) { - recoveryPointMoveReadinessInfo().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (recoveryPointProperties() != null) { - recoveryPointProperties().validate(); - } - if (timeRanges() != null) { - timeRanges().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("threatStatus", threatStatus() == null ? null : threatStatus().toString()); + jsonWriter.writeArrayField("threatInfo", threatInfo(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("recoveryPointTimeInUTC", recoveryPointTimeInUtc() == null ? null @@ -163,7 +81,13 @@ public static AzureWorkloadSapHanaPointInTimeRecoveryPoint fromJson(JsonReader j String fieldName = reader.getFieldName(); reader.nextToken(); - if ("recoveryPointTimeInUTC".equals(fieldName)) { + if ("threatStatus".equals(fieldName)) { + deserializedAzureWorkloadSapHanaPointInTimeRecoveryPoint + .withThreatStatus(ThreatStatus.fromString(reader.getString())); + } else if ("threatInfo".equals(fieldName)) { + List threatInfo = reader.readArray(reader1 -> ThreatInfo.fromJson(reader1)); + deserializedAzureWorkloadSapHanaPointInTimeRecoveryPoint.withThreatInfo(threatInfo); + } else if ("recoveryPointTimeInUTC".equals(fieldName)) { deserializedAzureWorkloadSapHanaPointInTimeRecoveryPoint.withRecoveryPointTimeInUtc(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("type".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreRequest.java index bbb834d39685..5e49814513a3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -161,24 +161,6 @@ public AzureWorkloadSapHanaPointInTimeRestoreRequest withTargetVirtualMachineId( return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (targetInfo() != null) { - targetInfo().validate(); - } - if (userAssignedManagedIdentityDetails() != null) { - userAssignedManagedIdentityDetails().validate(); - } - if (snapshotRestoreParameters() != null) { - snapshotRestoreParameters().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.java index f54e57523e12..839faaf051e9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -174,27 +174,6 @@ public AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest withRecoveryMo return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointRehydrationInfo() != null) { - recoveryPointRehydrationInfo().validate(); - } - if (targetInfo() != null) { - targetInfo().validate(); - } - if (userAssignedManagedIdentityDetails() != null) { - userAssignedManagedIdentityDetails().validate(); - } - if (snapshotRestoreParameters() != null) { - snapshotRestoreParameters().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRecoveryPoint.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRecoveryPoint.java index 7fb99de5749d..09458f1bca18 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRecoveryPoint.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRecoveryPoint.java @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Map; @@ -18,7 +17,7 @@ /** * SAPHana specific recoverypoint, specifically encapsulates full/diff recoverypoints. */ -@Fluent +@Immutable public final class AzureWorkloadSapHanaRecoveryPoint extends AzureWorkloadRecoveryPoint { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -29,7 +28,7 @@ public final class AzureWorkloadSapHanaRecoveryPoint extends AzureWorkloadRecove /** * Creates an instance of AzureWorkloadSapHanaRecoveryPoint class. */ - public AzureWorkloadSapHanaRecoveryPoint() { + private AzureWorkloadSapHanaRecoveryPoint() { } /** @@ -43,82 +42,14 @@ public String objectType() { return this.objectType; } - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapHanaRecoveryPoint withRecoveryPointTimeInUtc(OffsetDateTime recoveryPointTimeInUtc) { - super.withRecoveryPointTimeInUtc(recoveryPointTimeInUtc); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapHanaRecoveryPoint withType(RestorePointType type) { - super.withType(type); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapHanaRecoveryPoint - withRecoveryPointTierDetails(List recoveryPointTierDetails) { - super.withRecoveryPointTierDetails(recoveryPointTierDetails); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapHanaRecoveryPoint - withRecoveryPointMoveReadinessInfo(Map recoveryPointMoveReadinessInfo) { - super.withRecoveryPointMoveReadinessInfo(recoveryPointMoveReadinessInfo); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSapHanaRecoveryPoint - withRecoveryPointProperties(RecoveryPointProperties recoveryPointProperties) { - super.withRecoveryPointProperties(recoveryPointProperties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointTierDetails() != null) { - recoveryPointTierDetails().forEach(e -> e.validate()); - } - if (recoveryPointMoveReadinessInfo() != null) { - recoveryPointMoveReadinessInfo().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (recoveryPointProperties() != null) { - recoveryPointProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("threatStatus", threatStatus() == null ? null : threatStatus().toString()); + jsonWriter.writeArrayField("threatInfo", threatInfo(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("recoveryPointTimeInUTC", recoveryPointTimeInUtc() == null ? null @@ -149,7 +80,13 @@ public static AzureWorkloadSapHanaRecoveryPoint fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("recoveryPointTimeInUTC".equals(fieldName)) { + if ("threatStatus".equals(fieldName)) { + deserializedAzureWorkloadSapHanaRecoveryPoint + .withThreatStatus(ThreatStatus.fromString(reader.getString())); + } else if ("threatInfo".equals(fieldName)) { + List threatInfo = reader.readArray(reader1 -> ThreatInfo.fromJson(reader1)); + deserializedAzureWorkloadSapHanaRecoveryPoint.withThreatInfo(threatInfo); + } else if ("recoveryPointTimeInUTC".equals(fieldName)) { deserializedAzureWorkloadSapHanaRecoveryPoint.withRecoveryPointTimeInUtc(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("type".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreRequest.java index b661ae1acda2..a35dc020201b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -133,24 +133,6 @@ public AzureWorkloadSapHanaRestoreRequest withTargetVirtualMachineId(String targ return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (targetInfo() != null) { - targetInfo().validate(); - } - if (userAssignedManagedIdentityDetails() != null) { - userAssignedManagedIdentityDetails().validate(); - } - if (snapshotRestoreParameters() != null) { - snapshotRestoreParameters().validate(); - } - } - /** * {@inheritDoc} */ @@ -196,13 +178,13 @@ public static AzureWorkloadSapHanaRestoreRequest fromJson(JsonReader jsonReader) } } // Use the discriminator value to determine which subtype should be deserialized. - if ("AzureWorkloadSAPHanaPointInTimeRestoreRequest".equals(discriminatorValue)) { + if ("AzureWorkloadSAPHanaRestoreWithRehydrateRequest".equals(discriminatorValue)) { + return AzureWorkloadSapHanaRestoreWithRehydrateRequest.fromJson(readerToUse.reset()); + } else if ("AzureWorkloadSAPHanaPointInTimeRestoreRequest".equals(discriminatorValue)) { return AzureWorkloadSapHanaPointInTimeRestoreRequest .fromJsonKnownDiscriminator(readerToUse.reset()); } else if ("AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest".equals(discriminatorValue)) { return AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.fromJson(readerToUse.reset()); - } else if ("AzureWorkloadSAPHanaRestoreWithRehydrateRequest".equals(discriminatorValue)) { - return AzureWorkloadSapHanaRestoreWithRehydrateRequest.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreWithRehydrateRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreWithRehydrateRequest.java index aeef41d52198..4f3c8f261c6a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreWithRehydrateRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreWithRehydrateRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -159,27 +159,6 @@ public AzureWorkloadSapHanaRestoreWithRehydrateRequest withTargetVirtualMachineI return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointRehydrationInfo() != null) { - recoveryPointRehydrationInfo().validate(); - } - if (targetInfo() != null) { - targetInfo().validate(); - } - if (userAssignedManagedIdentityDetails() != null) { - userAssignedManagedIdentityDetails().validate(); - } - if (snapshotRestoreParameters() != null) { - snapshotRestoreParameters().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlAutoProtectionIntent.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlAutoProtectionIntent.java index c5824d966dbf..b7757d5e5f6b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlAutoProtectionIntent.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlAutoProtectionIntent.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -107,15 +107,6 @@ public AzureWorkloadSqlAutoProtectionIntent withProtectionState(ProtectionStatus return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRecoveryPoint.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRecoveryPoint.java index 101e6ebbd379..b18a4bdf409a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRecoveryPoint.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRecoveryPoint.java @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Map; @@ -18,7 +17,7 @@ /** * Recovery point specific to PointInTime. */ -@Fluent +@Immutable public final class AzureWorkloadSqlPointInTimeRecoveryPoint extends AzureWorkloadSqlRecoveryPoint { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -34,7 +33,7 @@ public final class AzureWorkloadSqlPointInTimeRecoveryPoint extends AzureWorkloa /** * Creates an instance of AzureWorkloadSqlPointInTimeRecoveryPoint class. */ - public AzureWorkloadSqlPointInTimeRecoveryPoint() { + private AzureWorkloadSqlPointInTimeRecoveryPoint() { } /** @@ -57,109 +56,14 @@ public List timeRanges() { return this.timeRanges; } - /** - * Set the timeRanges property: List of log ranges. - * - * @param timeRanges the timeRanges value to set. - * @return the AzureWorkloadSqlPointInTimeRecoveryPoint object itself. - */ - public AzureWorkloadSqlPointInTimeRecoveryPoint withTimeRanges(List timeRanges) { - this.timeRanges = timeRanges; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSqlPointInTimeRecoveryPoint - withExtendedInfo(AzureWorkloadSqlRecoveryPointExtendedInfo extendedInfo) { - super.withExtendedInfo(extendedInfo); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSqlPointInTimeRecoveryPoint withRecoveryPointTimeInUtc(OffsetDateTime recoveryPointTimeInUtc) { - super.withRecoveryPointTimeInUtc(recoveryPointTimeInUtc); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSqlPointInTimeRecoveryPoint withType(RestorePointType type) { - super.withType(type); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSqlPointInTimeRecoveryPoint - withRecoveryPointTierDetails(List recoveryPointTierDetails) { - super.withRecoveryPointTierDetails(recoveryPointTierDetails); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSqlPointInTimeRecoveryPoint - withRecoveryPointMoveReadinessInfo(Map recoveryPointMoveReadinessInfo) { - super.withRecoveryPointMoveReadinessInfo(recoveryPointMoveReadinessInfo); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSqlPointInTimeRecoveryPoint - withRecoveryPointProperties(RecoveryPointProperties recoveryPointProperties) { - super.withRecoveryPointProperties(recoveryPointProperties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (timeRanges() != null) { - timeRanges().forEach(e -> e.validate()); - } - if (recoveryPointTierDetails() != null) { - recoveryPointTierDetails().forEach(e -> e.validate()); - } - if (recoveryPointMoveReadinessInfo() != null) { - recoveryPointMoveReadinessInfo().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (recoveryPointProperties() != null) { - recoveryPointProperties().validate(); - } - if (extendedInfo() != null) { - extendedInfo().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("threatStatus", threatStatus() == null ? null : threatStatus().toString()); + jsonWriter.writeArrayField("threatInfo", threatInfo(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("recoveryPointTimeInUTC", recoveryPointTimeInUtc() == null ? null @@ -192,7 +96,13 @@ public static AzureWorkloadSqlPointInTimeRecoveryPoint fromJson(JsonReader jsonR String fieldName = reader.getFieldName(); reader.nextToken(); - if ("recoveryPointTimeInUTC".equals(fieldName)) { + if ("threatStatus".equals(fieldName)) { + deserializedAzureWorkloadSqlPointInTimeRecoveryPoint + .withThreatStatus(ThreatStatus.fromString(reader.getString())); + } else if ("threatInfo".equals(fieldName)) { + List threatInfo = reader.readArray(reader1 -> ThreatInfo.fromJson(reader1)); + deserializedAzureWorkloadSqlPointInTimeRecoveryPoint.withThreatInfo(threatInfo); + } else if ("recoveryPointTimeInUTC".equals(fieldName)) { deserializedAzureWorkloadSqlPointInTimeRecoveryPoint.withRecoveryPointTimeInUtc(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("type".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreRequest.java index 7c5a6745fa60..096d51236979 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -190,27 +190,6 @@ public AzureWorkloadSqlPointInTimeRestoreRequest withTargetVirtualMachineId(Stri return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (targetInfo() != null) { - targetInfo().validate(); - } - if (userAssignedManagedIdentityDetails() != null) { - userAssignedManagedIdentityDetails().validate(); - } - if (snapshotRestoreParameters() != null) { - snapshotRestoreParameters().validate(); - } - if (alternateDirectoryPaths() != null) { - alternateDirectoryPaths().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.java index 805fba2277e4..560469279de2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -203,30 +203,6 @@ public AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest withRecoveryMode(R return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointRehydrationInfo() != null) { - recoveryPointRehydrationInfo().validate(); - } - if (targetInfo() != null) { - targetInfo().validate(); - } - if (userAssignedManagedIdentityDetails() != null) { - userAssignedManagedIdentityDetails().validate(); - } - if (snapshotRestoreParameters() != null) { - snapshotRestoreParameters().validate(); - } - if (alternateDirectoryPaths() != null) { - alternateDirectoryPaths().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRecoveryPoint.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRecoveryPoint.java index cfbf313e88e8..41bb96362b43 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRecoveryPoint.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRecoveryPoint.java @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Map; @@ -18,7 +17,7 @@ /** * SQL specific recoverypoint, specifically encapsulates full/diff recoverypoint along with extended info. */ -@Fluent +@Immutable public class AzureWorkloadSqlRecoveryPoint extends AzureWorkloadRecoveryPoint { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -36,7 +35,7 @@ public class AzureWorkloadSqlRecoveryPoint extends AzureWorkloadRecoveryPoint { /** * Creates an instance of AzureWorkloadSqlRecoveryPoint class. */ - public AzureWorkloadSqlRecoveryPoint() { + protected AzureWorkloadSqlRecoveryPoint() { } /** @@ -71,89 +70,19 @@ public AzureWorkloadSqlRecoveryPointExtendedInfo extendedInfo() { * @param extendedInfo the extendedInfo value to set. * @return the AzureWorkloadSqlRecoveryPoint object itself. */ - public AzureWorkloadSqlRecoveryPoint withExtendedInfo(AzureWorkloadSqlRecoveryPointExtendedInfo extendedInfo) { + AzureWorkloadSqlRecoveryPoint withExtendedInfo(AzureWorkloadSqlRecoveryPointExtendedInfo extendedInfo) { this.extendedInfo = extendedInfo; return this; } - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSqlRecoveryPoint withRecoveryPointTimeInUtc(OffsetDateTime recoveryPointTimeInUtc) { - super.withRecoveryPointTimeInUtc(recoveryPointTimeInUtc); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSqlRecoveryPoint withType(RestorePointType type) { - super.withType(type); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSqlRecoveryPoint - withRecoveryPointTierDetails(List recoveryPointTierDetails) { - super.withRecoveryPointTierDetails(recoveryPointTierDetails); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSqlRecoveryPoint - withRecoveryPointMoveReadinessInfo(Map recoveryPointMoveReadinessInfo) { - super.withRecoveryPointMoveReadinessInfo(recoveryPointMoveReadinessInfo); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AzureWorkloadSqlRecoveryPoint withRecoveryPointProperties(RecoveryPointProperties recoveryPointProperties) { - super.withRecoveryPointProperties(recoveryPointProperties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (extendedInfo() != null) { - extendedInfo().validate(); - } - if (recoveryPointTierDetails() != null) { - recoveryPointTierDetails().forEach(e -> e.validate()); - } - if (recoveryPointMoveReadinessInfo() != null) { - recoveryPointMoveReadinessInfo().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (recoveryPointProperties() != null) { - recoveryPointProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("threatStatus", threatStatus() == null ? null : threatStatus().toString()); + jsonWriter.writeArrayField("threatInfo", threatInfo(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("recoveryPointTimeInUTC", recoveryPointTimeInUtc() == null ? null @@ -210,7 +139,13 @@ static AzureWorkloadSqlRecoveryPoint fromJsonKnownDiscriminator(JsonReader jsonR String fieldName = reader.getFieldName(); reader.nextToken(); - if ("recoveryPointTimeInUTC".equals(fieldName)) { + if ("threatStatus".equals(fieldName)) { + deserializedAzureWorkloadSqlRecoveryPoint + .withThreatStatus(ThreatStatus.fromString(reader.getString())); + } else if ("threatInfo".equals(fieldName)) { + List threatInfo = reader.readArray(reader1 -> ThreatInfo.fromJson(reader1)); + deserializedAzureWorkloadSqlRecoveryPoint.withThreatInfo(threatInfo); + } else if ("recoveryPointTimeInUTC".equals(fieldName)) { deserializedAzureWorkloadSqlRecoveryPoint.withRecoveryPointTimeInUtc(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("type".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRecoveryPointExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRecoveryPointExtendedInfo.java index 27b42402629e..8ae1ec730bb6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRecoveryPointExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRecoveryPointExtendedInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -18,7 +18,7 @@ /** * Extended info class details. */ -@Fluent +@Immutable public final class AzureWorkloadSqlRecoveryPointExtendedInfo implements JsonSerializable { /* @@ -31,10 +31,15 @@ public final class AzureWorkloadSqlRecoveryPointExtendedInfo */ private List dataDirectoryPaths; + /* + * List of databases included in recovery point. + */ + private List includedDatabases; + /** * Creates an instance of AzureWorkloadSqlRecoveryPointExtendedInfo class. */ - public AzureWorkloadSqlRecoveryPointExtendedInfo() { + private AzureWorkloadSqlRecoveryPointExtendedInfo() { } /** @@ -46,17 +51,6 @@ public OffsetDateTime dataDirectoryTimeInUtc() { return this.dataDirectoryTimeInUtc; } - /** - * Set the dataDirectoryTimeInUtc property: UTC time at which data directory info was captured. - * - * @param dataDirectoryTimeInUtc the dataDirectoryTimeInUtc value to set. - * @return the AzureWorkloadSqlRecoveryPointExtendedInfo object itself. - */ - public AzureWorkloadSqlRecoveryPointExtendedInfo withDataDirectoryTimeInUtc(OffsetDateTime dataDirectoryTimeInUtc) { - this.dataDirectoryTimeInUtc = dataDirectoryTimeInUtc; - return this; - } - /** * Get the dataDirectoryPaths property: List of data directory paths during restore operation. * @@ -67,25 +61,12 @@ public List dataDirectoryPaths() { } /** - * Set the dataDirectoryPaths property: List of data directory paths during restore operation. + * Get the includedDatabases property: List of databases included in recovery point. * - * @param dataDirectoryPaths the dataDirectoryPaths value to set. - * @return the AzureWorkloadSqlRecoveryPointExtendedInfo object itself. + * @return the includedDatabases value. */ - public AzureWorkloadSqlRecoveryPointExtendedInfo withDataDirectoryPaths(List dataDirectoryPaths) { - this.dataDirectoryPaths = dataDirectoryPaths; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataDirectoryPaths() != null) { - dataDirectoryPaths().forEach(e -> e.validate()); - } + public List includedDatabases() { + return this.includedDatabases; } /** @@ -100,6 +81,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.dataDirectoryTimeInUtc)); jsonWriter.writeArrayField("dataDirectoryPaths", this.dataDirectoryPaths, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("includedDatabases", this.includedDatabases, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -126,6 +109,9 @@ public static AzureWorkloadSqlRecoveryPointExtendedInfo fromJson(JsonReader json List dataDirectoryPaths = reader.readArray(reader1 -> SqlDataDirectory.fromJson(reader1)); deserializedAzureWorkloadSqlRecoveryPointExtendedInfo.dataDirectoryPaths = dataDirectoryPaths; + } else if ("includedDatabases".equals(fieldName)) { + List includedDatabases = reader.readArray(reader1 -> DatabaseInRP.fromJson(reader1)); + deserializedAzureWorkloadSqlRecoveryPointExtendedInfo.includedDatabases = includedDatabases; } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreRequest.java index 3c339e85f749..1173f4998816 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -214,27 +214,6 @@ public AzureWorkloadSqlRestoreRequest withTargetVirtualMachineId(String targetVi return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (alternateDirectoryPaths() != null) { - alternateDirectoryPaths().forEach(e -> e.validate()); - } - if (targetInfo() != null) { - targetInfo().validate(); - } - if (userAssignedManagedIdentityDetails() != null) { - userAssignedManagedIdentityDetails().validate(); - } - if (snapshotRestoreParameters() != null) { - snapshotRestoreParameters().validate(); - } - } - /** * {@inheritDoc} */ @@ -284,12 +263,12 @@ public static AzureWorkloadSqlRestoreRequest fromJson(JsonReader jsonReader) thr } } // Use the discriminator value to determine which subtype should be deserialized. - if ("AzureWorkloadSQLPointInTimeRestoreRequest".equals(discriminatorValue)) { + if ("AzureWorkloadSQLRestoreWithRehydrateRequest".equals(discriminatorValue)) { + return AzureWorkloadSqlRestoreWithRehydrateRequest.fromJson(readerToUse.reset()); + } else if ("AzureWorkloadSQLPointInTimeRestoreRequest".equals(discriminatorValue)) { return AzureWorkloadSqlPointInTimeRestoreRequest.fromJsonKnownDiscriminator(readerToUse.reset()); } else if ("AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest".equals(discriminatorValue)) { return AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.fromJson(readerToUse.reset()); - } else if ("AzureWorkloadSQLRestoreWithRehydrateRequest".equals(discriminatorValue)) { - return AzureWorkloadSqlRestoreWithRehydrateRequest.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreWithRehydrateRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreWithRehydrateRequest.java index defde9a45be2..0807a2ee28b7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreWithRehydrateRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreWithRehydrateRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -188,30 +188,6 @@ public AzureWorkloadSqlRestoreWithRehydrateRequest withTargetVirtualMachineId(St return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointRehydrationInfo() != null) { - recoveryPointRehydrationInfo().validate(); - } - if (targetInfo() != null) { - targetInfo().validate(); - } - if (userAssignedManagedIdentityDetails() != null) { - userAssignedManagedIdentityDetails().validate(); - } - if (snapshotRestoreParameters() != null) { - snapshotRestoreParameters().validate(); - } - if (alternateDirectoryPaths() != null) { - alternateDirectoryPaths().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineBase.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineBase.java index 7bd5c0dda292..f87fca89bf71 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineBase.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineBase.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The base backup engine class. All workload specific backup engines derive from this class. */ -@Fluent +@Immutable public class BackupEngineBase implements JsonSerializable { /* * Type of the backup engine. @@ -84,7 +84,7 @@ public class BackupEngineBase implements JsonSerializable { /** * Creates an instance of BackupEngineBase class. */ - public BackupEngineBase() { + protected BackupEngineBase() { } /** @@ -111,7 +111,7 @@ public String friendlyName() { * @param friendlyName the friendlyName value to set. * @return the BackupEngineBase object itself. */ - public BackupEngineBase withFriendlyName(String friendlyName) { + BackupEngineBase withFriendlyName(String friendlyName) { this.friendlyName = friendlyName; return this; } @@ -131,7 +131,7 @@ public BackupManagementType backupManagementType() { * @param backupManagementType the backupManagementType value to set. * @return the BackupEngineBase object itself. */ - public BackupEngineBase withBackupManagementType(BackupManagementType backupManagementType) { + BackupEngineBase withBackupManagementType(BackupManagementType backupManagementType) { this.backupManagementType = backupManagementType; return this; } @@ -151,7 +151,7 @@ public String registrationStatus() { * @param registrationStatus the registrationStatus value to set. * @return the BackupEngineBase object itself. */ - public BackupEngineBase withRegistrationStatus(String registrationStatus) { + BackupEngineBase withRegistrationStatus(String registrationStatus) { this.registrationStatus = registrationStatus; return this; } @@ -173,7 +173,7 @@ public String backupEngineState() { * @param backupEngineState the backupEngineState value to set. * @return the BackupEngineBase object itself. */ - public BackupEngineBase withBackupEngineState(String backupEngineState) { + BackupEngineBase withBackupEngineState(String backupEngineState) { this.backupEngineState = backupEngineState; return this; } @@ -193,7 +193,7 @@ public String healthStatus() { * @param healthStatus the healthStatus value to set. * @return the BackupEngineBase object itself. */ - public BackupEngineBase withHealthStatus(String healthStatus) { + BackupEngineBase withHealthStatus(String healthStatus) { this.healthStatus = healthStatus; return this; } @@ -213,7 +213,7 @@ public Boolean canReRegister() { * @param canReRegister the canReRegister value to set. * @return the BackupEngineBase object itself. */ - public BackupEngineBase withCanReRegister(Boolean canReRegister) { + BackupEngineBase withCanReRegister(Boolean canReRegister) { this.canReRegister = canReRegister; return this; } @@ -233,7 +233,7 @@ public String backupEngineId() { * @param backupEngineId the backupEngineId value to set. * @return the BackupEngineBase object itself. */ - public BackupEngineBase withBackupEngineId(String backupEngineId) { + BackupEngineBase withBackupEngineId(String backupEngineId) { this.backupEngineId = backupEngineId; return this; } @@ -253,7 +253,7 @@ public String dpmVersion() { * @param dpmVersion the dpmVersion value to set. * @return the BackupEngineBase object itself. */ - public BackupEngineBase withDpmVersion(String dpmVersion) { + BackupEngineBase withDpmVersion(String dpmVersion) { this.dpmVersion = dpmVersion; return this; } @@ -273,7 +273,7 @@ public String azureBackupAgentVersion() { * @param azureBackupAgentVersion the azureBackupAgentVersion value to set. * @return the BackupEngineBase object itself. */ - public BackupEngineBase withAzureBackupAgentVersion(String azureBackupAgentVersion) { + BackupEngineBase withAzureBackupAgentVersion(String azureBackupAgentVersion) { this.azureBackupAgentVersion = azureBackupAgentVersion; return this; } @@ -293,7 +293,7 @@ public Boolean isAzureBackupAgentUpgradeAvailable() { * @param isAzureBackupAgentUpgradeAvailable the isAzureBackupAgentUpgradeAvailable value to set. * @return the BackupEngineBase object itself. */ - public BackupEngineBase withIsAzureBackupAgentUpgradeAvailable(Boolean isAzureBackupAgentUpgradeAvailable) { + BackupEngineBase withIsAzureBackupAgentUpgradeAvailable(Boolean isAzureBackupAgentUpgradeAvailable) { this.isAzureBackupAgentUpgradeAvailable = isAzureBackupAgentUpgradeAvailable; return this; } @@ -313,7 +313,7 @@ public Boolean isDpmUpgradeAvailable() { * @param isDpmUpgradeAvailable the isDpmUpgradeAvailable value to set. * @return the BackupEngineBase object itself. */ - public BackupEngineBase withIsDpmUpgradeAvailable(Boolean isDpmUpgradeAvailable) { + BackupEngineBase withIsDpmUpgradeAvailable(Boolean isDpmUpgradeAvailable) { this.isDpmUpgradeAvailable = isDpmUpgradeAvailable; return this; } @@ -333,22 +333,11 @@ public BackupEngineExtendedInfo extendedInfo() { * @param extendedInfo the extendedInfo value to set. * @return the BackupEngineBase object itself. */ - public BackupEngineBase withExtendedInfo(BackupEngineExtendedInfo extendedInfo) { + BackupEngineBase withExtendedInfo(BackupEngineExtendedInfo extendedInfo) { this.extendedInfo = extendedInfo; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extendedInfo() != null) { - extendedInfo().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineBaseResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineBaseResource.java index 257fa4522e27..ee5afe58dd87 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineBaseResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineBaseResource.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupEngineBaseResourceInner; import java.util.Map; @@ -33,11 +34,11 @@ public interface BackupEngineBaseResource { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the properties property: BackupEngineBaseResource properties. * - * @return the location value. + * @return the properties value. */ - String location(); + BackupEngineBase properties(); /** * Gets the tags property: Resource tags. @@ -47,11 +48,11 @@ public interface BackupEngineBaseResource { Map tags(); /** - * Gets the properties property: BackupEngineBaseResource properties. + * Gets the location property: The geo-location where the resource lives. * - * @return the properties value. + * @return the location value. */ - BackupEngineBase properties(); + String location(); /** * Gets the etag property: Optional ETag. @@ -60,6 +61,13 @@ public interface BackupEngineBaseResource { */ String etag(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupEngineBaseResourceInner * object. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineExtendedInfo.java index 4d4774ba26ea..728c12108d2d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineExtendedInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * Additional information on backup engine. */ -@Fluent +@Immutable public final class BackupEngineExtendedInfo implements JsonSerializable { /* * Database name of backup engine. @@ -62,7 +62,7 @@ public final class BackupEngineExtendedInfo implements JsonSerializable list(String vaultName, String resourceGroupName); + Response getWithResponse(String vaultName, String resourceGroupName, + String backupEngineName, String filter, String skipToken, Context context); /** - * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. + * Returns backup management server registered to Recovery Services Vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param filter OData filter options. - * @param skipToken skipToken Filter. - * @param context The context to associate with this operation. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param backupEngineName Name of the backup management server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of BackupEngineBase resources as paginated response with {@link PagedIterable}. + * @return the base backup engine class. */ - PagedIterable list(String vaultName, String resourceGroupName, String filter, - String skipToken, Context context); + BackupEngineBaseResource get(String vaultName, String resourceGroupName, String backupEngineName); /** - * Returns backup management server registered to Recovery Services Vault. + * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param backupEngineName Name of the backup management server. - * @param filter OData filter options. - * @param skipToken skipToken Filter. - * @param context The context to associate with this operation. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the base backup engine class along with {@link Response}. + * @return list of BackupEngineBase resources as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String vaultName, String resourceGroupName, - String backupEngineName, String filter, String skipToken, Context context); + PagedIterable list(String vaultName, String resourceGroupName); /** - * Returns backup management server registered to Recovery Services Vault. + * Backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param backupEngineName Name of the backup management server. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter options. + * @param skipToken skipToken Filter. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the base backup engine class. + * @return list of BackupEngineBase resources as paginated response with {@link PagedIterable}. */ - BackupEngineBaseResource get(String vaultName, String resourceGroupName, String backupEngineName); + PagedIterable list(String vaultName, String resourceGroupName, String filter, + String skipToken, Context context); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupItemType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupItemType.java index f475a486ea9b..57e21825e2e2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupItemType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupItemType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupJobs.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupJobs.java index 3ef0ed539652..951ff2131b49 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupJobs.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupJobs.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -14,8 +14,8 @@ public interface BackupJobs { /** * Provides a pageable list of jobs. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -26,8 +26,8 @@ public interface BackupJobs { /** * Provides a pageable list of jobs. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupManagementType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupManagementType.java index abdc199c1241..6e2ff63383b7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupManagementType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupManagementType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupManagementUsage.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupManagementUsage.java index 9d7141f4380e..6c921626e11f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupManagementUsage.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupManagementUsage.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupOperationResults.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupOperationResults.java index 0d9c1989ae82..cae3cb1a90bf 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupOperationResults.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupOperationResults.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -19,7 +19,7 @@ public interface BackupOperationResults { * part of the Location header of the operation response. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -37,7 +37,7 @@ public interface BackupOperationResults { * part of the Location header of the operation response. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupOperationStatuses.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupOperationStatuses.java index 4d4c0aae9cb0..d893305a0ffb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupOperationStatuses.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupOperationStatuses.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -17,7 +17,7 @@ public interface BackupOperationStatuses { * create jobs. This method returns the list of jobs when the operation is complete. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -34,7 +34,7 @@ Response getWithResponse(String vaultName, String resourceGroup * create jobs. This method returns the list of jobs when the operation is complete. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupPolicies.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupPolicies.java index 09b924eaed52..0c8052bdb9e5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupPolicies.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupPolicies.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,8 +15,8 @@ public interface BackupPolicies { * Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch * scoped results. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -28,8 +28,8 @@ public interface BackupPolicies { * Lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch * scoped results. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectableItems.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectableItems.java index 9ef05d8c23f6..84e3f90029a6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectableItems.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectableItems.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -16,7 +16,7 @@ public interface BackupProtectableItems { * pagination parameters. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -29,7 +29,7 @@ public interface BackupProtectableItems { * pagination parameters. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectedItems.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectedItems.java index 65719c97057e..cf66e6f172c8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectedItems.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectedItems.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,7 +15,7 @@ public interface BackupProtectedItems { * Provides a pageable list of all items that are backed up within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -27,7 +27,7 @@ public interface BackupProtectedItems { * Provides a pageable list of all items that are backed up within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectionContainers.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectionContainers.java index 813e33d0837b..ffe3cf241e25 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectionContainers.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectionContainers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,7 +15,7 @@ public interface BackupProtectionContainers { * Lists the containers registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -27,7 +27,7 @@ public interface BackupProtectionContainers { * Lists the containers registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectionIntents.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectionIntents.java index 0a7a5a693c36..6b9e8e4a31b0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectionIntents.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectionIntents.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,7 +15,7 @@ public interface BackupProtectionIntents { * Provides a pageable list of all intents that are present within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -27,7 +27,7 @@ public interface BackupProtectionIntents { * Provides a pageable list of all intents that are present within a vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupRequest.java index 0e4ffe3a6dd2..7a7d27cc854a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -38,14 +38,6 @@ public String objectType() { return this.objectType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupRequestResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupRequestResource.java index 36d86e0dd7f1..7627d631f9cf 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupRequestResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupRequestResource.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -16,16 +17,31 @@ * Base class for backup request. Workload-specific backup requests are derived from this class. */ @Fluent -public final class BackupRequestResource extends Resource { +public final class BackupRequestResource extends ProxyResource { + /* + * Resource location. + */ + private String location; + + /* + * Resource tags. + */ + private Map tags; + + /* + * Optional ETag. + */ + private String eTag; + /* * BackupRequestResource properties */ private BackupRequest properties; /* - * Optional ETag. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private String etag; + private SystemData systemData; /* * The type of the resource. @@ -48,6 +64,66 @@ public final class BackupRequestResource extends Resource { public BackupRequestResource() { } + /** + * Get the location property: Resource location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Resource location. + * + * @param location the location value to set. + * @return the BackupRequestResource object itself. + */ + public BackupRequestResource withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the BackupRequestResource object itself. + */ + public BackupRequestResource withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the eTag property: Optional ETag. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the eTag property: Optional ETag. + * + * @param eTag the eTag value to set. + * @return the BackupRequestResource object itself. + */ + public BackupRequestResource withETag(String eTag) { + this.eTag = eTag; + return this; + } + /** * Get the properties property: BackupRequestResource properties. * @@ -69,23 +145,12 @@ public BackupRequestResource withProperties(BackupRequest properties) { } /** - * Get the etag property: Optional ETag. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag property: Optional ETag. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param etag the etag value to set. - * @return the BackupRequestResource object itself. + * @return the systemData value. */ - public BackupRequestResource withEtag(String etag) { - this.etag = etag; - return this; + public SystemData systemData() { + return this.systemData; } /** @@ -118,45 +183,16 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public BackupRequestResource withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BackupRequestResource withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("eTag", this.eTag); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -183,14 +219,16 @@ public static BackupRequestResource fromJson(JsonReader jsonReader) throws IOExc } else if ("type".equals(fieldName)) { deserializedBackupRequestResource.type = reader.getString(); } else if ("location".equals(fieldName)) { - deserializedBackupRequestResource.withLocation(reader.getString()); + deserializedBackupRequestResource.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBackupRequestResource.withTags(tags); + deserializedBackupRequestResource.tags = tags; + } else if ("eTag".equals(fieldName)) { + deserializedBackupRequestResource.eTag = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedBackupRequestResource.properties = BackupRequest.fromJson(reader); - } else if ("eTag".equals(fieldName)) { - deserializedBackupRequestResource.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedBackupRequestResource.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceConfig.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceConfig.java index 63c832799fe1..39d39618a3ba 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceConfig.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceConfig.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -174,14 +174,6 @@ public BackupResourceConfig withXcoolState(XcoolState xcoolState) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceConfigResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceConfigResource.java index 2b17b5a59379..9c3ce93958ca 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceConfigResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceConfigResource.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceConfigResourceInner; import java.util.Map; @@ -33,11 +34,11 @@ public interface BackupResourceConfigResource { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the properties property: BackupResourceConfigResource properties. * - * @return the location value. + * @return the properties value. */ - String location(); + BackupResourceConfig properties(); /** * Gets the tags property: Resource tags. @@ -47,11 +48,11 @@ public interface BackupResourceConfigResource { Map tags(); /** - * Gets the properties property: BackupResourceConfigResource properties. + * Gets the location property: The geo-location where the resource lives. * - * @return the properties value. + * @return the location value. */ - BackupResourceConfig properties(); + String location(); /** * Gets the etag property: Optional ETag. @@ -60,6 +61,13 @@ public interface BackupResourceConfigResource { */ String etag(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceConfigResourceInner * object. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfig.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfig.java index bbd0f2d75318..348dfee5c634 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfig.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfig.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -148,14 +148,6 @@ public InfrastructureEncryptionState infrastructureEncryptionState() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigExtended.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigExtended.java index 16c96413dc2a..f5fc6cc0f524 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigExtended.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigExtended.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * The BackupResourceEncryptionConfigExtended model. */ -@Fluent +@Immutable public final class BackupResourceEncryptionConfigExtended extends BackupResourceEncryptionConfig { /* * User Assigned Identity Id @@ -28,7 +28,7 @@ public final class BackupResourceEncryptionConfigExtended extends BackupResource /** * Creates an instance of BackupResourceEncryptionConfigExtended class. */ - public BackupResourceEncryptionConfigExtended() { + private BackupResourceEncryptionConfigExtended() { } /** @@ -40,17 +40,6 @@ public String userAssignedIdentity() { return this.userAssignedIdentity; } - /** - * Set the userAssignedIdentity property: User Assigned Identity Id. - * - * @param userAssignedIdentity the userAssignedIdentity value to set. - * @return the BackupResourceEncryptionConfigExtended object itself. - */ - public BackupResourceEncryptionConfigExtended withUserAssignedIdentity(String userAssignedIdentity) { - this.userAssignedIdentity = userAssignedIdentity; - return this; - } - /** * Get the useSystemAssignedIdentity property: bool to indicate whether to use system Assigned Identity or not. * @@ -60,72 +49,6 @@ public Boolean useSystemAssignedIdentity() { return this.useSystemAssignedIdentity; } - /** - * Set the useSystemAssignedIdentity property: bool to indicate whether to use system Assigned Identity or not. - * - * @param useSystemAssignedIdentity the useSystemAssignedIdentity value to set. - * @return the BackupResourceEncryptionConfigExtended object itself. - */ - public BackupResourceEncryptionConfigExtended withUseSystemAssignedIdentity(Boolean useSystemAssignedIdentity) { - this.useSystemAssignedIdentity = useSystemAssignedIdentity; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BackupResourceEncryptionConfigExtended withEncryptionAtRestType(EncryptionAtRestType encryptionAtRestType) { - super.withEncryptionAtRestType(encryptionAtRestType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BackupResourceEncryptionConfigExtended withKeyUri(String keyUri) { - super.withKeyUri(keyUri); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BackupResourceEncryptionConfigExtended withSubscriptionId(String subscriptionId) { - super.withSubscriptionId(subscriptionId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BackupResourceEncryptionConfigExtended withLastUpdateStatus(LastUpdateStatus lastUpdateStatus) { - super.withLastUpdateStatus(lastUpdateStatus); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BackupResourceEncryptionConfigExtended - withInfrastructureEncryptionState(InfrastructureEncryptionState infrastructureEncryptionState) { - super.withInfrastructureEncryptionState(infrastructureEncryptionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigExtendedResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigExtendedResource.java index f6a565629262..d37747427b1b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigExtendedResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigExtendedResource.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigExtendedResourceInner; import java.util.Map; @@ -33,11 +34,11 @@ public interface BackupResourceEncryptionConfigExtendedResource { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the properties property: BackupResourceEncryptionConfigExtendedResource properties. * - * @return the location value. + * @return the properties value. */ - String location(); + BackupResourceEncryptionConfigExtended properties(); /** * Gets the tags property: Resource tags. @@ -47,11 +48,11 @@ public interface BackupResourceEncryptionConfigExtendedResource { Map tags(); /** - * Gets the properties property: BackupResourceEncryptionConfigExtendedResource properties. + * Gets the location property: The geo-location where the resource lives. * - * @return the properties value. + * @return the location value. */ - BackupResourceEncryptionConfigExtended properties(); + String location(); /** * Gets the etag property: Optional ETag. @@ -60,6 +61,13 @@ public interface BackupResourceEncryptionConfigExtendedResource { */ String etag(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner * com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigExtendedResourceInner diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigResource.java index f9482cd014b2..62c264842f66 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigResource.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -16,17 +17,32 @@ * The BackupResourceEncryptionConfigResource model. */ @Fluent -public final class BackupResourceEncryptionConfigResource extends Resource { +public final class BackupResourceEncryptionConfigResource extends ProxyResource { /* * BackupResourceEncryptionConfigResource properties */ private BackupResourceEncryptionConfig properties; + /* + * Resource tags. + */ + private Map tags; + + /* + * The geo-location where the resource lives + */ + private String location; + /* * Optional ETag. */ private String etag; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -68,6 +84,46 @@ public BackupResourceEncryptionConfigResource withProperties(BackupResourceEncry return this; } + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the BackupResourceEncryptionConfigResource object itself. + */ + public BackupResourceEncryptionConfigResource withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the BackupResourceEncryptionConfigResource object itself. + */ + public BackupResourceEncryptionConfigResource withLocation(String location) { + this.location = location; + return this; + } + /** * Get the etag property: Optional ETag. * @@ -88,6 +144,15 @@ public BackupResourceEncryptionConfigResource withEtag(String etag) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -118,44 +183,15 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public BackupResourceEncryptionConfigResource withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BackupResourceEncryptionConfigResource withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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.writeJsonField("properties", this.properties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("location", this.location); jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -183,16 +219,18 @@ public static BackupResourceEncryptionConfigResource fromJson(JsonReader jsonRea deserializedBackupResourceEncryptionConfigResource.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedBackupResourceEncryptionConfigResource.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedBackupResourceEncryptionConfigResource.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBackupResourceEncryptionConfigResource.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedBackupResourceEncryptionConfigResource.properties = BackupResourceEncryptionConfig.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedBackupResourceEncryptionConfigResource.tags = tags; + } else if ("location".equals(fieldName)) { + deserializedBackupResourceEncryptionConfigResource.location = reader.getString(); } else if ("eTag".equals(fieldName)) { deserializedBackupResourceEncryptionConfigResource.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedBackupResourceEncryptionConfigResource.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigs.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigs.java index 6fe567234f09..e77041a4fadc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigs.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigs.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -14,8 +14,8 @@ public interface BackupResourceEncryptionConfigs { /** * Fetches Vault Encryption config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -28,8 +28,8 @@ Response getWithResponse(String /** * Fetches Vault Encryption config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -40,8 +40,8 @@ Response getWithResponse(String /** * Updates Vault encryption config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault encryption input config request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -55,8 +55,8 @@ Response updateWithResponse(String vaultName, String resourceGroupName, /** * Updates Vault encryption config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault encryption input config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceStorageConfigsNonCrrs.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceStorageConfigsNonCrrs.java index 92b6b16bb35d..f3b348228d5d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceStorageConfigsNonCrrs.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceStorageConfigsNonCrrs.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,8 +15,8 @@ public interface BackupResourceStorageConfigsNonCrrs { /** * Fetches resource storage config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -28,8 +28,8 @@ public interface BackupResourceStorageConfigsNonCrrs { /** * Fetches resource storage config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -40,8 +40,8 @@ public interface BackupResourceStorageConfigsNonCrrs { /** * Updates vault storage model type. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault storage config request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -55,8 +55,8 @@ Response updateWithResponse(String vaultName, Stri /** * Updates vault storage model type. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault storage config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -69,8 +69,8 @@ BackupResourceConfigResource update(String vaultName, String resourceGroupName, /** * Updates vault storage model type. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault storage config request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -84,8 +84,8 @@ Response patchWithResponse(String vaultName, String resourceGroupName, /** * Updates vault storage model type. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters Vault storage config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceVaultConfig.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceVaultConfig.java index 727148a4325e..c339cfe858ad 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceVaultConfig.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceVaultConfig.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -227,14 +227,6 @@ public BackupResourceVaultConfig withIsSoftDeleteFeatureStateEditable(Boolean is return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceVaultConfigResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceVaultConfigResource.java index cbce885a7e78..86433b678ddf 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceVaultConfigResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceVaultConfigResource.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceVaultConfigResourceInner; import java.util.Map; @@ -33,11 +34,11 @@ public interface BackupResourceVaultConfigResource { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the properties property: BackupResourceVaultConfigResource properties. * - * @return the location value. + * @return the properties value. */ - String location(); + BackupResourceVaultConfig properties(); /** * Gets the tags property: Resource tags. @@ -47,11 +48,11 @@ public interface BackupResourceVaultConfigResource { Map tags(); /** - * Gets the properties property: BackupResourceVaultConfigResource properties. + * Gets the location property: The geo-location where the resource lives. * - * @return the properties value. + * @return the location value. */ - BackupResourceVaultConfig properties(); + String location(); /** * Gets the etag property: Optional ETag. @@ -60,6 +61,13 @@ public interface BackupResourceVaultConfigResource { */ String etag(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner * com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceVaultConfigResourceInner object. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceVaultConfigs.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceVaultConfigs.java index 46707f64bc3a..ec72ae44ce14 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceVaultConfigs.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceVaultConfigs.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,8 +15,8 @@ public interface BackupResourceVaultConfigs { /** * Fetches resource vault config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -29,8 +29,8 @@ Response getWithResponse(String vaultName, St /** * Fetches resource vault config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -41,8 +41,8 @@ Response getWithResponse(String vaultName, St /** * Updates vault security config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource config request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -50,28 +50,28 @@ Response getWithResponse(String vaultName, St * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return backup resource vault config details along with {@link Response}. */ - Response updateWithResponse(String vaultName, String resourceGroupName, + Response putWithResponse(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters, Context context); /** * Updates vault security config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return backup resource vault config details. */ - BackupResourceVaultConfigResource update(String vaultName, String resourceGroupName, + BackupResourceVaultConfigResource put(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters); /** * Updates vault security config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource config request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,20 +79,20 @@ BackupResourceVaultConfigResource update(String vaultName, String resourceGroupN * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return backup resource vault config details along with {@link Response}. */ - Response putWithResponse(String vaultName, String resourceGroupName, + Response updateWithResponse(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters, Context context); /** * Updates vault security config. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource config request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return backup resource vault config details. */ - BackupResourceVaultConfigResource put(String vaultName, String resourceGroupName, + BackupResourceVaultConfigResource update(String vaultName, String resourceGroupName, BackupResourceVaultConfigResourceInner parameters); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupStatus.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupStatus.java index 57f8c3a4a019..9fdff7dbabf8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupStatus.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupStatusRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupStatusRequest.java index 027351989e69..e72001bf78ea 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupStatusRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupStatusRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -97,14 +97,6 @@ public BackupStatusRequest withPoLogicalName(String poLogicalName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupStatusResponse.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupStatusResponse.java index b6fb64e3f13f..4e36b7b99cc5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupStatusResponse.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupStatusResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupType.java index 93ea86f5364f..4b2b2312d9b6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupUsageSummaries.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupUsageSummaries.java index a3aa1fd4d4cc..cec0e622513c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupUsageSummaries.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupUsageSummaries.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,7 +15,7 @@ public interface BackupUsageSummaries { * Fetches the backup management usage summaries of the vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -27,7 +27,7 @@ public interface BackupUsageSummaries { * Fetches the backup management usage summaries of the vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupWorkloadItems.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupWorkloadItems.java index c0e721b2a063..c270c13193e5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupWorkloadItems.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupWorkloadItems.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -16,10 +16,10 @@ public interface BackupWorkloadItems { * pagination * parameters. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -33,10 +33,10 @@ PagedIterable list(String vaultName, String resourceGroupN * pagination * parameters. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Name of the container. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param filter OData filter options. * @param skipToken skipToken Filter. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Backups.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Backups.java index c9be5f1e3f48..1c66bc1ba282 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Backups.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Backups.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,11 +15,11 @@ public interface Backups { * Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the * operation, call GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item for which backup needs to be triggered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters resource backup request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -34,11 +34,11 @@ Response triggerWithResponse(String vaultName, String resourceGroupName, S * Triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the * operation, call GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item for which backup needs to be triggered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters resource backup request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BekDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BekDetails.java index d34bf52aa44c..83fd58d9b116 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BekDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BekDetails.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * BEK is bitlocker encryption key. */ -@Fluent +@Immutable public final class BekDetails implements JsonSerializable { /* * Secret is BEK. @@ -34,7 +34,7 @@ public final class BekDetails implements JsonSerializable { /** * Creates an instance of BekDetails class. */ - public BekDetails() { + private BekDetails() { } /** @@ -46,17 +46,6 @@ public String secretUrl() { return this.secretUrl; } - /** - * Set the secretUrl property: Secret is BEK. - * - * @param secretUrl the secretUrl value to set. - * @return the BekDetails object itself. - */ - public BekDetails withSecretUrl(String secretUrl) { - this.secretUrl = secretUrl; - return this; - } - /** * Get the secretVaultId property: ID of the Key Vault where this Secret is stored. * @@ -66,17 +55,6 @@ public String secretVaultId() { return this.secretVaultId; } - /** - * Set the secretVaultId property: ID of the Key Vault where this Secret is stored. - * - * @param secretVaultId the secretVaultId value to set. - * @return the BekDetails object itself. - */ - public BekDetails withSecretVaultId(String secretVaultId) { - this.secretVaultId = secretVaultId; - return this; - } - /** * Get the secretData property: BEK data. * @@ -86,25 +64,6 @@ public String secretData() { return this.secretData; } - /** - * Set the secretData property: BEK data. - * - * @param secretData the secretData value to set. - * @return the BekDetails object itself. - */ - public BekDetails withSecretData(String secretData) { - this.secretData = secretData; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BmsPrepareDataMoveOperationResults.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BmsPrepareDataMoveOperationResults.java index e0bb037735b7..ae06b41401b6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BmsPrepareDataMoveOperationResults.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BmsPrepareDataMoveOperationResults.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -12,11 +12,11 @@ */ public interface BmsPrepareDataMoveOperationResults { /** - * Fetches Operation Result for Prepare Data Move. + * Fetches operation status for data move operation on vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the BackupResourceConfigResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -27,11 +27,11 @@ Response getWithResponse(String vault String operationId, Context context); /** - * Fetches Operation Result for Prepare Data Move. + * Fetches operation status for data move operation on vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the BackupResourceConfigResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryDisplay.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryDisplay.java index 06d9d30cfc69..f6e000e76f89 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryDisplay.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryDisplay.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Localized display information of an operation. */ -@Fluent +@Immutable public final class ClientDiscoveryDisplay implements JsonSerializable { /* * Name of the provider for display purposes @@ -39,7 +39,7 @@ public final class ClientDiscoveryDisplay implements JsonSerializable { /* * Name for shoebox log specification. @@ -34,7 +34,7 @@ public final class ClientDiscoveryForLogSpecification implements JsonSerializabl /** * Creates an instance of ClientDiscoveryForLogSpecification class. */ - public ClientDiscoveryForLogSpecification() { + private ClientDiscoveryForLogSpecification() { } /** @@ -46,17 +46,6 @@ public String name() { return this.name; } - /** - * Set the name property: Name for shoebox log specification. - * - * @param name the name value to set. - * @return the ClientDiscoveryForLogSpecification object itself. - */ - public ClientDiscoveryForLogSpecification withName(String name) { - this.name = name; - return this; - } - /** * Get the displayName property: Localized display name. * @@ -66,17 +55,6 @@ public String displayName() { return this.displayName; } - /** - * Set the displayName property: Localized display name. - * - * @param displayName the displayName value to set. - * @return the ClientDiscoveryForLogSpecification object itself. - */ - public ClientDiscoveryForLogSpecification withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - /** * Get the blobDuration property: blob duration of shoebox log specification. * @@ -86,25 +64,6 @@ public String blobDuration() { return this.blobDuration; } - /** - * Set the blobDuration property: blob duration of shoebox log specification. - * - * @param blobDuration the blobDuration value to set. - * @return the ClientDiscoveryForLogSpecification object itself. - */ - public ClientDiscoveryForLogSpecification withBlobDuration(String blobDuration) { - this.blobDuration = blobDuration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryForProperties.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryForProperties.java index b52bedfac12e..89ffbc971302 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryForProperties.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryForProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Class to represent shoebox properties in json client discovery. */ -@Fluent +@Immutable public final class ClientDiscoveryForProperties implements JsonSerializable { /* * Operation properties. @@ -24,7 +24,7 @@ public final class ClientDiscoveryForProperties implements JsonSerializable { /* @@ -26,7 +26,7 @@ public final class ClientDiscoveryForServiceSpecification /** * Creates an instance of ClientDiscoveryForServiceSpecification class. */ - public ClientDiscoveryForServiceSpecification() { + private ClientDiscoveryForServiceSpecification() { } /** @@ -38,29 +38,6 @@ public List logSpecifications() { return this.logSpecifications; } - /** - * Set the logSpecifications property: List of log specifications of this operation. - * - * @param logSpecifications the logSpecifications value to set. - * @return the ClientDiscoveryForServiceSpecification object itself. - */ - public ClientDiscoveryForServiceSpecification - withLogSpecifications(List logSpecifications) { - this.logSpecifications = logSpecifications; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logSpecifications() != null) { - logSpecifications().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryValueForSingleApi.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryValueForSingleApi.java index bc82e65192e7..b43d8125b065 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryValueForSingleApi.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryValueForSingleApi.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientScriptForConnect.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientScriptForConnect.java index c5adaa4222aa..34b6c4e8a8d7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientScriptForConnect.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientScriptForConnect.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Client script details for file / folder restore. */ -@Fluent +@Immutable public final class ClientScriptForConnect implements JsonSerializable { /* * File content of the client script for file / folder restore. @@ -45,7 +45,7 @@ public final class ClientScriptForConnect implements JsonSerializable daysOfTheMonth) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (daysOfTheMonth() != null) { - daysOfTheMonth().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DailyRetentionSchedule.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DailyRetentionSchedule.java index fae8de9c63a8..79dea7e60796 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DailyRetentionSchedule.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DailyRetentionSchedule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -76,17 +76,6 @@ public DailyRetentionSchedule withRetentionDuration(RetentionDuration retentionD return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (retentionDuration() != null) { - retentionDuration().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DailySchedule.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DailySchedule.java index a4084a3e4b1f..140c68f1603c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DailySchedule.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DailySchedule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -51,14 +51,6 @@ public DailySchedule withScheduleRunTimes(List scheduleRunTimes) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DataMoveLevel.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DataMoveLevel.java index 0c0386134ef9..25c60aa2d149 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DataMoveLevel.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DataMoveLevel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DataSourceType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DataSourceType.java index 4896a9acbf53..7e205170f505 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DataSourceType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DataSourceType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DatabaseInRP.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DatabaseInRP.java new file mode 100644 index 000000000000..45bdac255da8 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DatabaseInRP.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.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 java.io.IOException; + +/** + * Database included in RP. + */ +@Immutable +public final class DatabaseInRP implements JsonSerializable { + /* + * Datasource Id for the database. + */ + private String datasourceId; + + /* + * Datasource name for the database. + */ + private String datasourceName; + + /** + * Creates an instance of DatabaseInRP class. + */ + private DatabaseInRP() { + } + + /** + * Get the datasourceId property: Datasource Id for the database. + * + * @return the datasourceId value. + */ + public String datasourceId() { + return this.datasourceId; + } + + /** + * Get the datasourceName property: Datasource name for the database. + * + * @return the datasourceName value. + */ + public String datasourceName() { + return this.datasourceName; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("datasourceId", this.datasourceId); + jsonWriter.writeStringField("datasourceName", this.datasourceName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatabaseInRP from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatabaseInRP 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 DatabaseInRP. + */ + public static DatabaseInRP fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatabaseInRP deserializedDatabaseInRP = new DatabaseInRP(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("datasourceId".equals(fieldName)) { + deserializedDatabaseInRP.datasourceId = reader.getString(); + } else if ("datasourceName".equals(fieldName)) { + deserializedDatabaseInRP.datasourceName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatabaseInRP; + }); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Day.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Day.java index 77e241573ec1..4d0cb75b98b5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Day.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Day.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -72,14 +72,6 @@ public Day withIsLast(Boolean isLast) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DayOfWeek.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DayOfWeek.java index 67ef6b2cf93f..9b950a438c66 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DayOfWeek.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DayOfWeek.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DedupState.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DedupState.java index 1102a69cb0f3..9673b77a615e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DedupState.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DedupState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DeletedProtectionContainers.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DeletedProtectionContainers.java index 67bbf92e8b10..151f79a86870 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DeletedProtectionContainers.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DeletedProtectionContainers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -14,7 +14,7 @@ public interface DeletedProtectionContainers { /** * Lists the soft deleted containers registered to Recovery Services Vault. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -26,7 +26,7 @@ public interface DeletedProtectionContainers { /** * Lists the soft deleted containers registered to Recovery Services Vault. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param filter OData filter options. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DiskExclusionProperties.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DiskExclusionProperties.java index 87db1719d885..4db8692fa4db 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DiskExclusionProperties.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DiskExclusionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -73,14 +73,6 @@ public DiskExclusionProperties withIsInclusionList(Boolean isInclusionList) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DiskInformation.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DiskInformation.java index b6e32fc311de..3715a00c3159 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DiskInformation.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DiskInformation.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Disk information. */ -@Fluent +@Immutable public final class DiskInformation implements JsonSerializable { /* * The lun property. @@ -29,7 +29,7 @@ public final class DiskInformation implements JsonSerializable /** * Creates an instance of DiskInformation class. */ - public DiskInformation() { + private DiskInformation() { } /** @@ -41,17 +41,6 @@ public Integer lun() { return this.lun; } - /** - * Set the lun property: The lun property. - * - * @param lun the lun value to set. - * @return the DiskInformation object itself. - */ - public DiskInformation withLun(Integer lun) { - this.lun = lun; - return this; - } - /** * Get the name property: The name property. * @@ -61,25 +50,6 @@ public String name() { return this.name; } - /** - * Set the name property: The name property. - * - * @param name the name value to set. - * @return the DiskInformation object itself. - */ - public DiskInformation withName(String name) { - this.name = name; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DistributedNodesInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DistributedNodesInfo.java index 7593e202c599..f6fa008d4918 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DistributedNodesInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DistributedNodesInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -125,17 +125,6 @@ public DistributedNodesInfo withSourceResourceId(String sourceResourceId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (errorDetail() != null) { - errorDetail().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmBackupEngine.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmBackupEngine.java index b36548d6cb7b..9534ec46b3cb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmBackupEngine.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmBackupEngine.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Data Protection Manager (DPM) specific backup engine. */ -@Fluent +@Immutable public final class DpmBackupEngine extends BackupEngineBase { /* * Type of the backup engine. @@ -23,7 +23,7 @@ public final class DpmBackupEngine extends BackupEngineBase { /** * Creates an instance of DpmBackupEngine class. */ - public DpmBackupEngine() { + private DpmBackupEngine() { } /** @@ -36,126 +36,6 @@ public BackupEngineType backupEngineType() { return this.backupEngineType; } - /** - * {@inheritDoc} - */ - @Override - public DpmBackupEngine withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmBackupEngine withBackupManagementType(BackupManagementType backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmBackupEngine withRegistrationStatus(String registrationStatus) { - super.withRegistrationStatus(registrationStatus); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmBackupEngine withBackupEngineState(String backupEngineState) { - super.withBackupEngineState(backupEngineState); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmBackupEngine withHealthStatus(String healthStatus) { - super.withHealthStatus(healthStatus); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmBackupEngine withCanReRegister(Boolean canReRegister) { - super.withCanReRegister(canReRegister); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmBackupEngine withBackupEngineId(String backupEngineId) { - super.withBackupEngineId(backupEngineId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmBackupEngine withDpmVersion(String dpmVersion) { - super.withDpmVersion(dpmVersion); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmBackupEngine withAzureBackupAgentVersion(String azureBackupAgentVersion) { - super.withAzureBackupAgentVersion(azureBackupAgentVersion); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmBackupEngine withIsAzureBackupAgentUpgradeAvailable(Boolean isAzureBackupAgentUpgradeAvailable) { - super.withIsAzureBackupAgentUpgradeAvailable(isAzureBackupAgentUpgradeAvailable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmBackupEngine withIsDpmUpgradeAvailable(Boolean isDpmUpgradeAvailable) { - super.withIsDpmUpgradeAvailable(isDpmUpgradeAvailable); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmBackupEngine withExtendedInfo(BackupEngineExtendedInfo extendedInfo) { - super.withExtendedInfo(extendedInfo); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (extendedInfo() != null) { - extendedInfo().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmContainer.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmContainer.java index 78ea389356df..5fc05a304245 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmContainer.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -290,18 +290,6 @@ public DpmContainer withProtectableObjectType(String protectableObjectType) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (extendedInfo() != null) { - extendedInfo().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmContainerExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmContainerExtendedInfo.java index 08447674eb63..f79cf242b7fc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmContainerExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmContainerExtendedInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -50,14 +50,6 @@ public DpmContainerExtendedInfo withLastRefreshedAt(OffsetDateTime lastRefreshed return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmErrorInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmErrorInfo.java index a8a7a99f89f2..989699665198 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmErrorInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmErrorInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * DPM workload-specific error information. */ -@Fluent +@Immutable public final class DpmErrorInfo implements JsonSerializable { /* * Localized error string. @@ -30,7 +30,7 @@ public final class DpmErrorInfo implements JsonSerializable { /** * Creates an instance of DpmErrorInfo class. */ - public DpmErrorInfo() { + private DpmErrorInfo() { } /** @@ -42,17 +42,6 @@ public String errorString() { return this.errorString; } - /** - * Set the errorString property: Localized error string. - * - * @param errorString the errorString value to set. - * @return the DpmErrorInfo object itself. - */ - public DpmErrorInfo withErrorString(String errorString) { - this.errorString = errorString; - return this; - } - /** * Get the recommendations property: List of localized recommendations for above error code. * @@ -62,25 +51,6 @@ public List recommendations() { return this.recommendations; } - /** - * Set the recommendations property: List of localized recommendations for above error code. - * - * @param recommendations the recommendations value to set. - * @return the DpmErrorInfo object itself. - */ - public DpmErrorInfo withRecommendations(List recommendations) { - this.recommendations = recommendations; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmJob.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmJob.java index 3ed8cc6a2e7b..263cbdd21474 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmJob.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmJob.java @@ -1,24 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.Duration; -import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.List; /** * DPM workload-specific job object. */ -@Fluent +@Immutable public final class DpmJob extends Job { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -69,7 +68,7 @@ public final class DpmJob extends Job { /** * Creates an instance of DpmJob class. */ - public DpmJob() { + private DpmJob() { } /** @@ -92,17 +91,6 @@ public Duration duration() { return this.duration; } - /** - * Set the duration property: Time elapsed for job. - * - * @param duration the duration value to set. - * @return the DpmJob object itself. - */ - public DpmJob withDuration(Duration duration) { - this.duration = duration; - return this; - } - /** * Get the dpmServerName property: DPM server name managing the backup item or backup job. * @@ -112,17 +100,6 @@ public String dpmServerName() { return this.dpmServerName; } - /** - * Set the dpmServerName property: DPM server name managing the backup item or backup job. - * - * @param dpmServerName the dpmServerName value to set. - * @return the DpmJob object itself. - */ - public DpmJob withDpmServerName(String dpmServerName) { - this.dpmServerName = dpmServerName; - return this; - } - /** * Get the containerName property: Name of cluster/server protecting current backup item, if any. * @@ -132,17 +109,6 @@ public String containerName() { return this.containerName; } - /** - * Set the containerName property: Name of cluster/server protecting current backup item, if any. - * - * @param containerName the containerName value to set. - * @return the DpmJob object itself. - */ - public DpmJob withContainerName(String containerName) { - this.containerName = containerName; - return this; - } - /** * Get the containerType property: Type of container. * @@ -152,17 +118,6 @@ public String containerType() { return this.containerType; } - /** - * Set the containerType property: Type of container. - * - * @param containerType the containerType value to set. - * @return the DpmJob object itself. - */ - public DpmJob withContainerType(String containerType) { - this.containerType = containerType; - return this; - } - /** * Get the workloadType property: Type of backup item. * @@ -172,17 +127,6 @@ public String workloadType() { return this.workloadType; } - /** - * Set the workloadType property: Type of backup item. - * - * @param workloadType the workloadType value to set. - * @return the DpmJob object itself. - */ - public DpmJob withWorkloadType(String workloadType) { - this.workloadType = workloadType; - return this; - } - /** * Get the actionsInfo property: The state/actions applicable on this job like cancel/retry. * @@ -192,17 +136,6 @@ public List actionsInfo() { return this.actionsInfo; } - /** - * Set the actionsInfo property: The state/actions applicable on this job like cancel/retry. - * - * @param actionsInfo the actionsInfo value to set. - * @return the DpmJob object itself. - */ - public DpmJob withActionsInfo(List actionsInfo) { - this.actionsInfo = actionsInfo; - return this; - } - /** * Get the errorDetails property: The errors. * @@ -212,17 +145,6 @@ public List errorDetails() { return this.errorDetails; } - /** - * Set the errorDetails property: The errors. - * - * @param errorDetails the errorDetails value to set. - * @return the DpmJob object itself. - */ - public DpmJob withErrorDetails(List errorDetails) { - this.errorDetails = errorDetails; - return this; - } - /** * Get the extendedInfo property: Additional information for this job. * @@ -232,95 +154,6 @@ public DpmJobExtendedInfo extendedInfo() { return this.extendedInfo; } - /** - * Set the extendedInfo property: Additional information for this job. - * - * @param extendedInfo the extendedInfo value to set. - * @return the DpmJob object itself. - */ - public DpmJob withExtendedInfo(DpmJobExtendedInfo extendedInfo) { - this.extendedInfo = extendedInfo; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmJob withEntityFriendlyName(String entityFriendlyName) { - super.withEntityFriendlyName(entityFriendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmJob withBackupManagementType(BackupManagementType backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmJob withOperation(String operation) { - super.withOperation(operation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmJob withStatus(String status) { - super.withStatus(status); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmJob withStartTime(OffsetDateTime startTime) { - super.withStartTime(startTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmJob withEndTime(OffsetDateTime endTime) { - super.withEndTime(endTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public DpmJob withActivityId(String activityId) { - super.withActivityId(activityId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (errorDetails() != null) { - errorDetails().forEach(e -> e.validate()); - } - if (extendedInfo() != null) { - extendedInfo().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmJobExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmJobExtendedInfo.java index 401fbba27a96..8169e6d783f3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmJobExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmJobExtendedInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * Additional information on the DPM workload-specific job. */ -@Fluent +@Immutable public final class DpmJobExtendedInfo implements JsonSerializable { /* * List of tasks associated with this job. @@ -36,7 +36,7 @@ public final class DpmJobExtendedInfo implements JsonSerializable tasksList() { return this.tasksList; } - /** - * Set the tasksList property: List of tasks associated with this job. - * - * @param tasksList the tasksList value to set. - * @return the DpmJobExtendedInfo object itself. - */ - public DpmJobExtendedInfo withTasksList(List tasksList) { - this.tasksList = tasksList; - return this; - } - /** * Get the propertyBag property: The job properties. * @@ -68,17 +57,6 @@ public Map propertyBag() { return this.propertyBag; } - /** - * Set the propertyBag property: The job properties. - * - * @param propertyBag the propertyBag value to set. - * @return the DpmJobExtendedInfo object itself. - */ - public DpmJobExtendedInfo withPropertyBag(Map propertyBag) { - this.propertyBag = propertyBag; - return this; - } - /** * Get the dynamicErrorMessage property: Non localized error message on job execution. * @@ -88,28 +66,6 @@ public String dynamicErrorMessage() { return this.dynamicErrorMessage; } - /** - * Set the dynamicErrorMessage property: Non localized error message on job execution. - * - * @param dynamicErrorMessage the dynamicErrorMessage value to set. - * @return the DpmJobExtendedInfo object itself. - */ - public DpmJobExtendedInfo withDynamicErrorMessage(String dynamicErrorMessage) { - this.dynamicErrorMessage = dynamicErrorMessage; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (tasksList() != null) { - tasksList().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmJobTaskDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmJobTaskDetails.java index fd04ea8bc8c9..a9e5b7a42f83 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmJobTaskDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmJobTaskDetails.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -18,7 +18,7 @@ /** * DPM workload-specific job task details. */ -@Fluent +@Immutable public final class DpmJobTaskDetails implements JsonSerializable { /* * The task display name. @@ -48,7 +48,7 @@ public final class DpmJobTaskDetails implements JsonSerializable writer.writeString(element)); jsonWriter.writeBooleanField("isArchiveEnabled", isArchiveEnabled()); jsonWriter.writeStringField("policyName", policyName()); - jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriod()); + jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriodInDays()); + jsonWriter.writeJsonField("sourceSideScanInfo", sourceSideScanInfo()); jsonWriter.writeStringField("protectedItemType", this.protectedItemType); jsonWriter.writeStringField("friendlyName", this.friendlyName); jsonWriter.writeStringField("backupEngineName", this.backupEngineName); @@ -376,9 +374,12 @@ public static DpmProtectedItem fromJson(JsonReader jsonReader) throws IOExceptio } else if ("policyName".equals(fieldName)) { deserializedDpmProtectedItem.withPolicyName(reader.getString()); } else if ("softDeleteRetentionPeriodInDays".equals(fieldName)) { - deserializedDpmProtectedItem.withSoftDeleteRetentionPeriod(reader.getNullable(JsonReader::getInt)); + deserializedDpmProtectedItem + .withSoftDeleteRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); } else if ("vaultId".equals(fieldName)) { deserializedDpmProtectedItem.withVaultId(reader.getString()); + } else if ("sourceSideScanInfo".equals(fieldName)) { + deserializedDpmProtectedItem.withSourceSideScanInfo(SourceSideScanInfo.fromJson(reader)); } else if ("protectedItemType".equals(fieldName)) { deserializedDpmProtectedItem.protectedItemType = reader.getString(); } else if ("friendlyName".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmProtectedItemExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmProtectedItemExtendedInfo.java index 3dc14dae9f37..50c23ea5a300 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmProtectedItemExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmProtectedItemExtendedInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -376,14 +376,6 @@ public DpmProtectedItemExtendedInfo withTotalDiskStorageSizeInBytes(String total return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/EncryptionAtRestType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/EncryptionAtRestType.java index 3e0ca802bb60..0ee9cee51e5e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/EncryptionAtRestType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/EncryptionAtRestType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/EncryptionDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/EncryptionDetails.java index 4ad1eb666b39..c271f538a45d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/EncryptionDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/EncryptionDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -149,14 +149,6 @@ public EncryptionDetails withSecretKeyVaultId(String secretKeyVaultId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/EnhancedSecurityState.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/EnhancedSecurityState.java index 0fc9cc16f2fa..53ad7f73efcb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/EnhancedSecurityState.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/EnhancedSecurityState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ErrorDetail.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ErrorDetail.java index 1048cb899fe8..9d0e07e7ed6b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ErrorDetail.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ErrorDetail.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -65,14 +65,6 @@ public List recommendations() { return this.recommendations; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExportJobsOperationResultInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExportJobsOperationResultInfo.java index e869f9b2a844..204dee6f654b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExportJobsOperationResultInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExportJobsOperationResultInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * This class is used to send blob details after exporting jobs. */ -@Fluent +@Immutable public final class ExportJobsOperationResultInfo extends OperationResultInfoBase { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -44,7 +44,7 @@ public final class ExportJobsOperationResultInfo extends OperationResultInfoBase /** * Creates an instance of ExportJobsOperationResultInfo class. */ - public ExportJobsOperationResultInfo() { + private ExportJobsOperationResultInfo() { } /** @@ -67,17 +67,6 @@ public String blobUrl() { return this.blobUrl; } - /** - * Set the blobUrl property: URL of the blob into which the serialized string of list of jobs is exported. - * - * @param blobUrl the blobUrl value to set. - * @return the ExportJobsOperationResultInfo object itself. - */ - public ExportJobsOperationResultInfo withBlobUrl(String blobUrl) { - this.blobUrl = blobUrl; - return this; - } - /** * Get the blobSasKey property: SAS key to access the blob. It expires in 15 mins. * @@ -87,17 +76,6 @@ public String blobSasKey() { return this.blobSasKey; } - /** - * Set the blobSasKey property: SAS key to access the blob. It expires in 15 mins. - * - * @param blobSasKey the blobSasKey value to set. - * @return the ExportJobsOperationResultInfo object itself. - */ - public ExportJobsOperationResultInfo withBlobSasKey(String blobSasKey) { - this.blobSasKey = blobSasKey; - return this; - } - /** * Get the excelFileBlobUrl property: URL of the blob into which the ExcelFile is uploaded. * @@ -107,17 +85,6 @@ public String excelFileBlobUrl() { return this.excelFileBlobUrl; } - /** - * Set the excelFileBlobUrl property: URL of the blob into which the ExcelFile is uploaded. - * - * @param excelFileBlobUrl the excelFileBlobUrl value to set. - * @return the ExportJobsOperationResultInfo object itself. - */ - public ExportJobsOperationResultInfo withExcelFileBlobUrl(String excelFileBlobUrl) { - this.excelFileBlobUrl = excelFileBlobUrl; - return this; - } - /** * Get the excelFileBlobSasKey property: SAS key to access the blob. It expires in 15 mins. * @@ -127,26 +94,6 @@ public String excelFileBlobSasKey() { return this.excelFileBlobSasKey; } - /** - * Set the excelFileBlobSasKey property: SAS key to access the blob. It expires in 15 mins. - * - * @param excelFileBlobSasKey the excelFileBlobSasKey value to set. - * @return the ExportJobsOperationResultInfo object itself. - */ - public ExportJobsOperationResultInfo withExcelFileBlobSasKey(String excelFileBlobSasKey) { - this.excelFileBlobSasKey = excelFileBlobSasKey; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExportJobsOperationResults.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExportJobsOperationResults.java index a975352af410..f03a714c8973 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExportJobsOperationResults.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExportJobsOperationResults.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -16,9 +16,9 @@ public interface ExportJobsOperationResults { * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId OperationID which represents the export job. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the JobResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -33,9 +33,9 @@ Response getWithResponse(String vaultName, Stri * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized * format. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId OperationID which represents the export job. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the JobResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExtendedLocation.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExtendedLocation.java index 64c8de01d8e5..20fa26553a10 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExtendedLocation.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExtendedLocation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -72,14 +72,6 @@ public ExtendedLocation withType(String type) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExtendedProperties.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExtendedProperties.java index 0a8c1f81640a..5b3f62801f07 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExtendedProperties.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExtendedProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -72,17 +72,6 @@ public ExtendedProperties withLinuxVmApplicationName(String linuxVmApplicationNa return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (diskExclusionProperties() != null) { - diskExclusionProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FabricName.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FabricName.java index ece5642c4e85..27312fb41daf 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FabricName.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FabricName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FeatureSupportRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FeatureSupportRequest.java index 0f084851f392..8988e8cae4da 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FeatureSupportRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FeatureSupportRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -36,14 +36,6 @@ public String featureType() { return this.featureType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FeatureSupports.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FeatureSupports.java index 5f572fa8760f..8b88cf42bbf3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FeatureSupports.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FeatureSupports.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostInfoForRehydrationRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostInfoForRehydrationRequest.java index 2871e986b387..b326933413bb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostInfoForRehydrationRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostInfoForRehydrationRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -157,47 +156,6 @@ public FetchTieringCostInfoForRehydrationRequest withTargetTierType(RecoveryPoin return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (containerName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property containerName in model FetchTieringCostInfoForRehydrationRequest")); - } - if (protectedItemName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property protectedItemName in model FetchTieringCostInfoForRehydrationRequest")); - } - if (recoveryPointId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property recoveryPointId in model FetchTieringCostInfoForRehydrationRequest")); - } - if (rehydrationPriority() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property rehydrationPriority in model FetchTieringCostInfoForRehydrationRequest")); - } - if (sourceTierType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property sourceTierType in model FetchTieringCostInfoForRehydrationRequest")); - } - if (targetTierType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetTierType in model FetchTieringCostInfoForRehydrationRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FetchTieringCostInfoForRehydrationRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostInfoRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostInfoRequest.java index b7bb5b37bd40..3c5437595b20 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostInfoRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostInfoRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -90,26 +89,6 @@ public FetchTieringCostInfoRequest withTargetTierType(RecoveryPointTierType targ return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceTierType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property sourceTierType in model FetchTieringCostInfoRequest")); - } - if (targetTierType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetTierType in model FetchTieringCostInfoRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FetchTieringCostInfoRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostSavingsInfoForPolicyRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostSavingsInfoForPolicyRequest.java index b09be6a6f781..ef5da5e33dbb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostSavingsInfoForPolicyRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostSavingsInfoForPolicyRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -82,32 +81,6 @@ public FetchTieringCostSavingsInfoForPolicyRequest withTargetTierType(RecoveryPo return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (policyName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property policyName in model FetchTieringCostSavingsInfoForPolicyRequest")); - } - if (sourceTierType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property sourceTierType in model FetchTieringCostSavingsInfoForPolicyRequest")); - } - if (targetTierType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetTierType in model FetchTieringCostSavingsInfoForPolicyRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FetchTieringCostSavingsInfoForPolicyRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostSavingsInfoForProtectedItemRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostSavingsInfoForProtectedItemRequest.java index ca5f1078554c..dd323f99ac4d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostSavingsInfoForProtectedItemRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostSavingsInfoForProtectedItemRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -107,38 +106,6 @@ public FetchTieringCostSavingsInfoForProtectedItemRequest withTargetTierType(Rec return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (containerName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property containerName in model FetchTieringCostSavingsInfoForProtectedItemRequest")); - } - if (protectedItemName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property protectedItemName in model FetchTieringCostSavingsInfoForProtectedItemRequest")); - } - if (sourceTierType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property sourceTierType in model FetchTieringCostSavingsInfoForProtectedItemRequest")); - } - if (targetTierType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetTierType in model FetchTieringCostSavingsInfoForProtectedItemRequest")); - } - } - - private static final ClientLogger LOGGER - = new ClientLogger(FetchTieringCostSavingsInfoForProtectedItemRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostSavingsInfoForVaultRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostSavingsInfoForVaultRequest.java index 54a7125a7a44..f928078252e0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostSavingsInfoForVaultRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostSavingsInfoForVaultRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -57,27 +56,6 @@ public FetchTieringCostSavingsInfoForVaultRequest withTargetTierType(RecoveryPoi return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (sourceTierType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property sourceTierType in model FetchTieringCostSavingsInfoForVaultRequest")); - } - if (targetTierType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property targetTierType in model FetchTieringCostSavingsInfoForVaultRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FetchTieringCostSavingsInfoForVaultRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCosts.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCosts.java index 86280d88a019..4cc6dd1ff15d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCosts.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCosts.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,7 +15,7 @@ public interface FetchTieringCosts { * Status of the operation can be fetched using GetTieringCostOperationStatus API and result using * GetTieringCostOperationResult API. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param parameters Fetch Tiering Cost Request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,7 +30,7 @@ public interface FetchTieringCosts { * Status of the operation can be fetched using GetTieringCostOperationStatus API and result using * GetTieringCostOperationResult API. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param parameters Fetch Tiering Cost Request. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericContainer.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericContainer.java index b7ec52296c6d..f56d042f2826 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericContainer.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -139,18 +139,6 @@ public GenericContainer withProtectableObjectType(String protectableObjectType) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (extendedInformation() != null) { - extendedInformation().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericContainerExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericContainerExtendedInfo.java index 6e54533419bc..eb324fedec4a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericContainerExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericContainerExtendedInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -98,17 +98,6 @@ public GenericContainerExtendedInfo withServiceEndpoints(Map ser return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (containerIdentityInfo() != null) { - containerIdentityInfo().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericProtectedItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericProtectedItem.java index af4318fbc498..352a3c8cceb7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericProtectedItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericProtectedItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -323,18 +323,18 @@ public GenericProtectedItem withPolicyName(String policyName) { * {@inheritDoc} */ @Override - public GenericProtectedItem withSoftDeleteRetentionPeriod(Integer softDeleteRetentionPeriod) { - super.withSoftDeleteRetentionPeriod(softDeleteRetentionPeriod); + public GenericProtectedItem withSoftDeleteRetentionPeriodInDays(Integer softDeleteRetentionPeriodInDays) { + super.withSoftDeleteRetentionPeriodInDays(softDeleteRetentionPeriodInDays); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { + public GenericProtectedItem withSourceSideScanInfo(SourceSideScanInfo sourceSideScanInfo) { + super.withSourceSideScanInfo(sourceSideScanInfo); + return this; } /** @@ -362,7 +362,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchiveEnabled", isArchiveEnabled()); jsonWriter.writeStringField("policyName", policyName()); - jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriod()); + jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriodInDays()); + jsonWriter.writeJsonField("sourceSideScanInfo", sourceSideScanInfo()); jsonWriter.writeStringField("protectedItemType", this.protectedItemType); jsonWriter.writeStringField("friendlyName", this.friendlyName); jsonWriter.writeStringField("policyState", this.policyState); @@ -430,9 +431,11 @@ public static GenericProtectedItem fromJson(JsonReader jsonReader) throws IOExce deserializedGenericProtectedItem.withPolicyName(reader.getString()); } else if ("softDeleteRetentionPeriodInDays".equals(fieldName)) { deserializedGenericProtectedItem - .withSoftDeleteRetentionPeriod(reader.getNullable(JsonReader::getInt)); + .withSoftDeleteRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); } else if ("vaultId".equals(fieldName)) { deserializedGenericProtectedItem.withVaultId(reader.getString()); + } else if ("sourceSideScanInfo".equals(fieldName)) { + deserializedGenericProtectedItem.withSourceSideScanInfo(SourceSideScanInfo.fromJson(reader)); } else if ("protectedItemType".equals(fieldName)) { deserializedGenericProtectedItem.protectedItemType = reader.getString(); } else if ("friendlyName".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericProtectionPolicy.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericProtectionPolicy.java index c357921631d7..2260fd1c9514 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericProtectionPolicy.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericProtectionPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -132,18 +132,6 @@ public GenericProtectionPolicy withResourceGuardOperationRequests(List r return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (subProtectionPolicy() != null) { - subProtectionPolicy().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericRecoveryPoint.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericRecoveryPoint.java index e0b221d98964..a23d0cbdc6b6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericRecoveryPoint.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericRecoveryPoint.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; @@ -12,11 +12,12 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +import java.util.List; /** * Generic backup copy. */ -@Fluent +@Immutable public final class GenericRecoveryPoint extends RecoveryPoint { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -52,7 +53,7 @@ public final class GenericRecoveryPoint extends RecoveryPoint { /** * Creates an instance of GenericRecoveryPoint class. */ - public GenericRecoveryPoint() { + private GenericRecoveryPoint() { } /** @@ -75,17 +76,6 @@ public String friendlyName() { return this.friendlyName; } - /** - * Set the friendlyName property: Friendly name of the backup copy. - * - * @param friendlyName the friendlyName value to set. - * @return the GenericRecoveryPoint object itself. - */ - public GenericRecoveryPoint withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; - return this; - } - /** * Get the recoveryPointType property: Type of the backup copy. * @@ -95,17 +85,6 @@ public String recoveryPointType() { return this.recoveryPointType; } - /** - * Set the recoveryPointType property: Type of the backup copy. - * - * @param recoveryPointType the recoveryPointType value to set. - * @return the GenericRecoveryPoint object itself. - */ - public GenericRecoveryPoint withRecoveryPointType(String recoveryPointType) { - this.recoveryPointType = recoveryPointType; - return this; - } - /** * Get the recoveryPointTime property: Time at which this backup copy was created. * @@ -115,17 +94,6 @@ public OffsetDateTime recoveryPointTime() { return this.recoveryPointTime; } - /** - * Set the recoveryPointTime property: Time at which this backup copy was created. - * - * @param recoveryPointTime the recoveryPointTime value to set. - * @return the GenericRecoveryPoint object itself. - */ - public GenericRecoveryPoint withRecoveryPointTime(OffsetDateTime recoveryPointTime) { - this.recoveryPointTime = recoveryPointTime; - return this; - } - /** * Get the recoveryPointAdditionalInfo property: Additional information associated with this backup copy. * @@ -135,17 +103,6 @@ public String recoveryPointAdditionalInfo() { return this.recoveryPointAdditionalInfo; } - /** - * Set the recoveryPointAdditionalInfo property: Additional information associated with this backup copy. - * - * @param recoveryPointAdditionalInfo the recoveryPointAdditionalInfo value to set. - * @return the GenericRecoveryPoint object itself. - */ - public GenericRecoveryPoint withRecoveryPointAdditionalInfo(String recoveryPointAdditionalInfo) { - this.recoveryPointAdditionalInfo = recoveryPointAdditionalInfo; - return this; - } - /** * Get the recoveryPointProperties property: Properties of Recovery Point. * @@ -155,35 +112,14 @@ public RecoveryPointProperties recoveryPointProperties() { return this.recoveryPointProperties; } - /** - * Set the recoveryPointProperties property: Properties of Recovery Point. - * - * @param recoveryPointProperties the recoveryPointProperties value to set. - * @return the GenericRecoveryPoint object itself. - */ - public GenericRecoveryPoint withRecoveryPointProperties(RecoveryPointProperties recoveryPointProperties) { - this.recoveryPointProperties = recoveryPointProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointProperties() != null) { - recoveryPointProperties().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("threatStatus", threatStatus() == null ? null : threatStatus().toString()); + jsonWriter.writeArrayField("threatInfo", threatInfo(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("objectType", this.objectType); jsonWriter.writeStringField("friendlyName", this.friendlyName); jsonWriter.writeStringField("recoveryPointType", this.recoveryPointType); @@ -211,7 +147,12 @@ public static GenericRecoveryPoint fromJson(JsonReader jsonReader) throws IOExce String fieldName = reader.getFieldName(); reader.nextToken(); - if ("objectType".equals(fieldName)) { + if ("threatStatus".equals(fieldName)) { + deserializedGenericRecoveryPoint.withThreatStatus(ThreatStatus.fromString(reader.getString())); + } else if ("threatInfo".equals(fieldName)) { + List threatInfo = reader.readArray(reader1 -> ThreatInfo.fromJson(reader1)); + deserializedGenericRecoveryPoint.withThreatInfo(threatInfo); + } else if ("objectType".equals(fieldName)) { deserializedGenericRecoveryPoint.objectType = reader.getString(); } else if ("friendlyName".equals(fieldName)) { deserializedGenericRecoveryPoint.friendlyName = reader.getString(); diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GetTieringCostOperationResults.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GetTieringCostOperationResults.java index 2d4328706da5..59c3e59e5aaa 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GetTieringCostOperationResults.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GetTieringCostOperationResults.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -14,7 +14,7 @@ public interface GetTieringCostOperationResults { /** * Gets the result of async operation for tiering cost. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -29,7 +29,7 @@ Response getWithResponse(String resourceGroupName, String vault /** * Gets the result of async operation for tiering cost. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/HealthStatus.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/HealthStatus.java index 167edf764650..7df349ed0447 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/HealthStatus.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/HealthStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/HourlySchedule.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/HourlySchedule.java index b343b231a780..218ad0084760 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/HourlySchedule.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/HourlySchedule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -103,14 +103,6 @@ public HourlySchedule withScheduleWindowDuration(Integer scheduleWindowDuration) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/HttpStatusCode.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/HttpStatusCode.java index 18aadb46c26f..d2b317f7a9d7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/HttpStatusCode.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/HttpStatusCode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaaSvmContainer.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaaSvmContainer.java index 5ade93838c55..cc1d91f249d5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaaSvmContainer.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaaSvmContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -168,15 +168,6 @@ public IaaSvmContainer withProtectableObjectType(String protectableObjectType) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ @@ -220,10 +211,10 @@ public static IaaSvmContainer fromJson(JsonReader jsonReader) throws IOException } } // Use the discriminator value to determine which subtype should be deserialized. - if ("Microsoft.ClassicCompute/virtualMachines".equals(discriminatorValue)) { - return AzureIaaSClassicComputeVMContainer.fromJson(readerToUse.reset()); - } else if ("Microsoft.Compute/virtualMachines".equals(discriminatorValue)) { + if ("Microsoft.Compute/virtualMachines".equals(discriminatorValue)) { return AzureIaaSComputeVMContainer.fromJson(readerToUse.reset()); + } else if ("Microsoft.ClassicCompute/virtualMachines".equals(discriminatorValue)) { + return AzureIaaSClassicComputeVMContainer.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMBackupRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMBackupRequest.java index 61070517d5e2..cab052906248 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMBackupRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMBackupRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -66,15 +66,6 @@ public IaasVMBackupRequest withRecoveryPointExpiryTimeInUtc(OffsetDateTime recov return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMRecoveryPoint.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMRecoveryPoint.java index 89c70583dba8..c9fbfd7eb0db 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMRecoveryPoint.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMRecoveryPoint.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; @@ -18,7 +18,7 @@ /** * IaaS VM workload specific backup copy. */ -@Fluent +@Immutable public final class IaasVMRecoveryPoint extends RecoveryPoint { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -125,7 +125,7 @@ public final class IaasVMRecoveryPoint extends RecoveryPoint { /** * Creates an instance of IaasVMRecoveryPoint class. */ - public IaasVMRecoveryPoint() { + private IaasVMRecoveryPoint() { } /** @@ -148,17 +148,6 @@ public String recoveryPointType() { return this.recoveryPointType; } - /** - * Set the recoveryPointType property: Type of the backup copy. - * - * @param recoveryPointType the recoveryPointType value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint withRecoveryPointType(String recoveryPointType) { - this.recoveryPointType = recoveryPointType; - return this; - } - /** * Get the recoveryPointTime property: Time at which this backup copy was created. * @@ -168,17 +157,6 @@ public OffsetDateTime recoveryPointTime() { return this.recoveryPointTime; } - /** - * Set the recoveryPointTime property: Time at which this backup copy was created. - * - * @param recoveryPointTime the recoveryPointTime value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint withRecoveryPointTime(OffsetDateTime recoveryPointTime) { - this.recoveryPointTime = recoveryPointTime; - return this; - } - /** * Get the recoveryPointAdditionalInfo property: Additional information associated with this backup copy. * @@ -188,17 +166,6 @@ public String recoveryPointAdditionalInfo() { return this.recoveryPointAdditionalInfo; } - /** - * Set the recoveryPointAdditionalInfo property: Additional information associated with this backup copy. - * - * @param recoveryPointAdditionalInfo the recoveryPointAdditionalInfo value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint withRecoveryPointAdditionalInfo(String recoveryPointAdditionalInfo) { - this.recoveryPointAdditionalInfo = recoveryPointAdditionalInfo; - return this; - } - /** * Get the sourceVMStorageType property: Storage type of the VM whose backup copy is created. * @@ -208,17 +175,6 @@ public String sourceVMStorageType() { return this.sourceVMStorageType; } - /** - * Set the sourceVMStorageType property: Storage type of the VM whose backup copy is created. - * - * @param sourceVMStorageType the sourceVMStorageType value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint withSourceVMStorageType(String sourceVMStorageType) { - this.sourceVMStorageType = sourceVMStorageType; - return this; - } - /** * Get the isSourceVMEncrypted property: Identifies whether the VM was encrypted when the backup copy is created. * @@ -228,17 +184,6 @@ public Boolean isSourceVMEncrypted() { return this.isSourceVMEncrypted; } - /** - * Set the isSourceVMEncrypted property: Identifies whether the VM was encrypted when the backup copy is created. - * - * @param isSourceVMEncrypted the isSourceVMEncrypted value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint withIsSourceVMEncrypted(Boolean isSourceVMEncrypted) { - this.isSourceVMEncrypted = isSourceVMEncrypted; - return this; - } - /** * Get the keyAndSecret property: Required details for recovering an encrypted VM. Applicable only when * IsSourceVMEncrypted is true. @@ -249,18 +194,6 @@ public KeyAndSecretDetails keyAndSecret() { return this.keyAndSecret; } - /** - * Set the keyAndSecret property: Required details for recovering an encrypted VM. Applicable only when - * IsSourceVMEncrypted is true. - * - * @param keyAndSecret the keyAndSecret value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint withKeyAndSecret(KeyAndSecretDetails keyAndSecret) { - this.keyAndSecret = keyAndSecret; - return this; - } - /** * Get the isInstantIlrSessionActive property: Is the session to recover items from this backup copy still active. * @@ -270,17 +203,6 @@ public Boolean isInstantIlrSessionActive() { return this.isInstantIlrSessionActive; } - /** - * Set the isInstantIlrSessionActive property: Is the session to recover items from this backup copy still active. - * - * @param isInstantIlrSessionActive the isInstantIlrSessionActive value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint withIsInstantIlrSessionActive(Boolean isInstantIlrSessionActive) { - this.isInstantIlrSessionActive = isInstantIlrSessionActive; - return this; - } - /** * Get the recoveryPointTierDetails property: Recovery point tier information. * @@ -290,18 +212,6 @@ public List recoveryPointTierDetails() { return this.recoveryPointTierDetails; } - /** - * Set the recoveryPointTierDetails property: Recovery point tier information. - * - * @param recoveryPointTierDetails the recoveryPointTierDetails value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint - withRecoveryPointTierDetails(List recoveryPointTierDetails) { - this.recoveryPointTierDetails = recoveryPointTierDetails; - return this; - } - /** * Get the isManagedVirtualMachine property: Whether VM is with Managed Disks. * @@ -311,17 +221,6 @@ public Boolean isManagedVirtualMachine() { return this.isManagedVirtualMachine; } - /** - * Set the isManagedVirtualMachine property: Whether VM is with Managed Disks. - * - * @param isManagedVirtualMachine the isManagedVirtualMachine value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint withIsManagedVirtualMachine(Boolean isManagedVirtualMachine) { - this.isManagedVirtualMachine = isManagedVirtualMachine; - return this; - } - /** * Get the virtualMachineSize property: Virtual Machine Size. * @@ -331,17 +230,6 @@ public String virtualMachineSize() { return this.virtualMachineSize; } - /** - * Set the virtualMachineSize property: Virtual Machine Size. - * - * @param virtualMachineSize the virtualMachineSize value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint withVirtualMachineSize(String virtualMachineSize) { - this.virtualMachineSize = virtualMachineSize; - return this; - } - /** * Get the originalStorageAccountOption property: Original Storage Account Option. * @@ -351,17 +239,6 @@ public Boolean originalStorageAccountOption() { return this.originalStorageAccountOption; } - /** - * Set the originalStorageAccountOption property: Original Storage Account Option. - * - * @param originalStorageAccountOption the originalStorageAccountOption value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint withOriginalStorageAccountOption(Boolean originalStorageAccountOption) { - this.originalStorageAccountOption = originalStorageAccountOption; - return this; - } - /** * Get the osType property: OS type. * @@ -371,17 +248,6 @@ public String osType() { return this.osType; } - /** - * Set the osType property: OS type. - * - * @param osType the osType value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint withOsType(String osType) { - this.osType = osType; - return this; - } - /** * Get the recoveryPointDiskConfiguration property: Disk configuration. * @@ -391,18 +257,6 @@ public RecoveryPointDiskConfiguration recoveryPointDiskConfiguration() { return this.recoveryPointDiskConfiguration; } - /** - * Set the recoveryPointDiskConfiguration property: Disk configuration. - * - * @param recoveryPointDiskConfiguration the recoveryPointDiskConfiguration value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint - withRecoveryPointDiskConfiguration(RecoveryPointDiskConfiguration recoveryPointDiskConfiguration) { - this.recoveryPointDiskConfiguration = recoveryPointDiskConfiguration; - return this; - } - /** * Get the zones property: Identifies the zone of the VM at the time of backup. Applicable only for zone-pinned Vms. * @@ -412,17 +266,6 @@ public List zones() { return this.zones; } - /** - * Set the zones property: Identifies the zone of the VM at the time of backup. Applicable only for zone-pinned Vms. - * - * @param zones the zones value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint withZones(List zones) { - this.zones = zones; - return this; - } - /** * Get the recoveryPointMoveReadinessInfo property: Eligibility of RP to be moved to another tier. * @@ -432,18 +275,6 @@ public Map recoveryPointMoveReadinessInf return this.recoveryPointMoveReadinessInfo; } - /** - * Set the recoveryPointMoveReadinessInfo property: Eligibility of RP to be moved to another tier. - * - * @param recoveryPointMoveReadinessInfo the recoveryPointMoveReadinessInfo value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint - withRecoveryPointMoveReadinessInfo(Map recoveryPointMoveReadinessInfo) { - this.recoveryPointMoveReadinessInfo = recoveryPointMoveReadinessInfo; - return this; - } - /** * Get the securityType property: Security Type of the Disk. * @@ -453,17 +284,6 @@ public String securityType() { return this.securityType; } - /** - * Set the securityType property: Security Type of the Disk. - * - * @param securityType the securityType value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint withSecurityType(String securityType) { - this.securityType = securityType; - return this; - } - /** * Get the recoveryPointProperties property: Properties of Recovery Point. * @@ -473,17 +293,6 @@ public RecoveryPointProperties recoveryPointProperties() { return this.recoveryPointProperties; } - /** - * Set the recoveryPointProperties property: Properties of Recovery Point. - * - * @param recoveryPointProperties the recoveryPointProperties value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint withRecoveryPointProperties(RecoveryPointProperties recoveryPointProperties) { - this.recoveryPointProperties = recoveryPointProperties; - return this; - } - /** * Get the isPrivateAccessEnabledOnAnyDisk property: This flag denotes if any of the disks in the VM are using * Private access network setting. @@ -494,18 +303,6 @@ public Boolean isPrivateAccessEnabledOnAnyDisk() { return this.isPrivateAccessEnabledOnAnyDisk; } - /** - * Set the isPrivateAccessEnabledOnAnyDisk property: This flag denotes if any of the disks in the VM are using - * Private access network setting. - * - * @param isPrivateAccessEnabledOnAnyDisk the isPrivateAccessEnabledOnAnyDisk value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint withIsPrivateAccessEnabledOnAnyDisk(Boolean isPrivateAccessEnabledOnAnyDisk) { - this.isPrivateAccessEnabledOnAnyDisk = isPrivateAccessEnabledOnAnyDisk; - return this; - } - /** * Get the extendedLocation property: Extended location of the VM recovery point, * should be null if VM is in public cloud. @@ -516,55 +313,14 @@ public ExtendedLocation extendedLocation() { return this.extendedLocation; } - /** - * Set the extendedLocation property: Extended location of the VM recovery point, - * should be null if VM is in public cloud. - * - * @param extendedLocation the extendedLocation value to set. - * @return the IaasVMRecoveryPoint object itself. - */ - public IaasVMRecoveryPoint withExtendedLocation(ExtendedLocation extendedLocation) { - this.extendedLocation = extendedLocation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (keyAndSecret() != null) { - keyAndSecret().validate(); - } - if (recoveryPointTierDetails() != null) { - recoveryPointTierDetails().forEach(e -> e.validate()); - } - if (recoveryPointDiskConfiguration() != null) { - recoveryPointDiskConfiguration().validate(); - } - if (recoveryPointMoveReadinessInfo() != null) { - recoveryPointMoveReadinessInfo().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (recoveryPointProperties() != null) { - recoveryPointProperties().validate(); - } - if (extendedLocation() != null) { - extendedLocation().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("threatStatus", threatStatus() == null ? null : threatStatus().toString()); + jsonWriter.writeArrayField("threatInfo", threatInfo(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("objectType", this.objectType); jsonWriter.writeStringField("recoveryPointType", this.recoveryPointType); jsonWriter.writeStringField("recoveryPointTime", @@ -608,7 +364,12 @@ public static IaasVMRecoveryPoint fromJson(JsonReader jsonReader) throws IOExcep String fieldName = reader.getFieldName(); reader.nextToken(); - if ("objectType".equals(fieldName)) { + if ("threatStatus".equals(fieldName)) { + deserializedIaasVMRecoveryPoint.withThreatStatus(ThreatStatus.fromString(reader.getString())); + } else if ("threatInfo".equals(fieldName)) { + List threatInfo = reader.readArray(reader1 -> ThreatInfo.fromJson(reader1)); + deserializedIaasVMRecoveryPoint.withThreatInfo(threatInfo); + } else if ("objectType".equals(fieldName)) { deserializedIaasVMRecoveryPoint.objectType = reader.getString(); } else if ("recoveryPointType".equals(fieldName)) { deserializedIaasVMRecoveryPoint.recoveryPointType = reader.getString(); diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMRestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMRestoreRequest.java index a60634f201b7..a1a6c7093b45 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMRestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMRestoreRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -674,33 +674,6 @@ public IaasVMRestoreRequest withResourceGuardOperationRequests(List reso return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (encryptionDetails() != null) { - encryptionDetails().validate(); - } - if (identityInfo() != null) { - identityInfo().validate(); - } - if (identityBasedRestoreDetails() != null) { - identityBasedRestoreDetails().validate(); - } - if (extendedLocation() != null) { - extendedLocation().validate(); - } - if (securedVMDetails() != null) { - securedVMDetails().validate(); - } - if (targetDiskNetworkAccessSettings() != null) { - targetDiskNetworkAccessSettings().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMRestoreWithRehydrationRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMRestoreWithRehydrationRequest.java index 9023f01b5e3a..4f419f730b26 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMRestoreWithRehydrationRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMRestoreWithRehydrationRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -284,36 +284,6 @@ public IaasVMRestoreWithRehydrationRequest withSecuredVMDetails(SecuredVMDetails return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryPointRehydrationInfo() != null) { - recoveryPointRehydrationInfo().validate(); - } - if (encryptionDetails() != null) { - encryptionDetails().validate(); - } - if (identityInfo() != null) { - identityInfo().validate(); - } - if (identityBasedRestoreDetails() != null) { - identityBasedRestoreDetails().validate(); - } - if (extendedLocation() != null) { - extendedLocation().validate(); - } - if (securedVMDetails() != null) { - securedVMDetails().validate(); - } - if (targetDiskNetworkAccessSettings() != null) { - targetDiskNetworkAccessSettings().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMSnapshotConsistencyType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMSnapshotConsistencyType.java index 3548fea49e80..a332fa1d0ce1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMSnapshotConsistencyType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMSnapshotConsistencyType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaaSvmProtectableItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVmProtectableItem.java similarity index 68% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaaSvmProtectableItem.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVmProtectableItem.java index dbad01fc1d8b..ed4fa63ff6a1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaaSvmProtectableItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVmProtectableItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,8 +13,8 @@ /** * IaaS VM workload-specific backup item. */ -@Fluent -public class IaaSvmProtectableItem extends WorkloadProtectableItem { +@Immutable +public class IaasVmProtectableItem extends WorkloadProtectableItem { /* * Type of the backup item. */ @@ -36,9 +36,9 @@ public class IaaSvmProtectableItem extends WorkloadProtectableItem { private String resourceGroup; /** - * Creates an instance of IaaSvmProtectableItem class. + * Creates an instance of IaasVmProtectableItem class. */ - public IaaSvmProtectableItem() { + protected IaasVmProtectableItem() { } /** @@ -64,9 +64,9 @@ public String virtualMachineId() { * Set the virtualMachineId property: Fully qualified ARM ID of the virtual machine. * * @param virtualMachineId the virtualMachineId value to set. - * @return the IaaSvmProtectableItem object itself. + * @return the IaasVmProtectableItem object itself. */ - public IaaSvmProtectableItem withVirtualMachineId(String virtualMachineId) { + IaasVmProtectableItem withVirtualMachineId(String virtualMachineId) { this.virtualMachineId = virtualMachineId; return this; } @@ -86,9 +86,9 @@ public String virtualMachineVersion() { * Manager VM. * * @param virtualMachineVersion the virtualMachineVersion value to set. - * @return the IaaSvmProtectableItem object itself. + * @return the IaasVmProtectableItem object itself. */ - public IaaSvmProtectableItem withVirtualMachineVersion(String virtualMachineVersion) { + IaasVmProtectableItem withVirtualMachineVersion(String virtualMachineVersion) { this.virtualMachineVersion = virtualMachineVersion; return this; } @@ -106,58 +106,13 @@ public String resourceGroup() { * Set the resourceGroup property: Resource group name of Recovery Services Vault. * * @param resourceGroup the resourceGroup value to set. - * @return the IaaSvmProtectableItem object itself. + * @return the IaasVmProtectableItem object itself. */ - public IaaSvmProtectableItem withResourceGroup(String resourceGroup) { + IaasVmProtectableItem withResourceGroup(String resourceGroup) { this.resourceGroup = resourceGroup; return this; } - /** - * {@inheritDoc} - */ - @Override - public IaaSvmProtectableItem withBackupManagementType(String backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public IaaSvmProtectableItem withWorkloadType(String workloadType) { - super.withWorkloadType(workloadType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public IaaSvmProtectableItem withFriendlyName(String friendlyName) { - super.withFriendlyName(friendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public IaaSvmProtectableItem withProtectionState(ProtectionStatus protectionState) { - super.withProtectionState(protectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ @@ -176,14 +131,14 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of IaaSvmProtectableItem from the JsonReader. + * Reads an instance of IaasVmProtectableItem from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of IaaSvmProtectableItem if the JsonReader was pointing to an instance of it, or null if it + * @return An instance of IaasVmProtectableItem 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 IaaSvmProtectableItem. + * @throws IOException If an error occurs while reading the IaasVmProtectableItem. */ - public static IaaSvmProtectableItem fromJson(JsonReader jsonReader) throws IOException { + public static IaasVmProtectableItem fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { String discriminatorValue = null; try (JsonReader readerToUse = reader.bufferObject()) { @@ -199,10 +154,10 @@ public static IaaSvmProtectableItem fromJson(JsonReader jsonReader) throws IOExc } } // Use the discriminator value to determine which subtype should be deserialized. - if ("Microsoft.ClassicCompute/virtualMachines".equals(discriminatorValue)) { - return AzureIaaSClassicComputeVMProtectableItem.fromJson(readerToUse.reset()); - } else if ("Microsoft.Compute/virtualMachines".equals(discriminatorValue)) { + if ("Microsoft.Compute/virtualMachines".equals(discriminatorValue)) { return AzureIaaSComputeVMProtectableItem.fromJson(readerToUse.reset()); + } else if ("Microsoft.ClassicCompute/virtualMachines".equals(discriminatorValue)) { + return AzureIaaSClassicComputeVMProtectableItem.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } @@ -210,36 +165,36 @@ public static IaaSvmProtectableItem fromJson(JsonReader jsonReader) throws IOExc }); } - static IaaSvmProtectableItem fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + static IaasVmProtectableItem fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - IaaSvmProtectableItem deserializedIaaSvmProtectableItem = new IaaSvmProtectableItem(); + IaasVmProtectableItem deserializedIaasVmProtectableItem = new IaasVmProtectableItem(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("backupManagementType".equals(fieldName)) { - deserializedIaaSvmProtectableItem.withBackupManagementType(reader.getString()); + deserializedIaasVmProtectableItem.withBackupManagementType(reader.getString()); } else if ("workloadType".equals(fieldName)) { - deserializedIaaSvmProtectableItem.withWorkloadType(reader.getString()); + deserializedIaasVmProtectableItem.withWorkloadType(reader.getString()); } else if ("friendlyName".equals(fieldName)) { - deserializedIaaSvmProtectableItem.withFriendlyName(reader.getString()); + deserializedIaasVmProtectableItem.withFriendlyName(reader.getString()); } else if ("protectionState".equals(fieldName)) { - deserializedIaaSvmProtectableItem + deserializedIaasVmProtectableItem .withProtectionState(ProtectionStatus.fromString(reader.getString())); } else if ("protectableItemType".equals(fieldName)) { - deserializedIaaSvmProtectableItem.protectableItemType = reader.getString(); + deserializedIaasVmProtectableItem.protectableItemType = reader.getString(); } else if ("virtualMachineId".equals(fieldName)) { - deserializedIaaSvmProtectableItem.virtualMachineId = reader.getString(); + deserializedIaasVmProtectableItem.virtualMachineId = reader.getString(); } else if ("virtualMachineVersion".equals(fieldName)) { - deserializedIaaSvmProtectableItem.virtualMachineVersion = reader.getString(); + deserializedIaasVmProtectableItem.virtualMachineVersion = reader.getString(); } else if ("resourceGroup".equals(fieldName)) { - deserializedIaaSvmProtectableItem.resourceGroup = reader.getString(); + deserializedIaasVmProtectableItem.resourceGroup = reader.getString(); } else { reader.skipChildren(); } } - return deserializedIaaSvmProtectableItem; + return deserializedIaasVmProtectableItem; }); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVmilrRegistrationRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVmilrRegistrationRequest.java index 909dd624a6ed..6c24d3272bfd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVmilrRegistrationRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVmilrRegistrationRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -140,15 +140,6 @@ public IaasVmilrRegistrationRequest withRenewExistingRegistration(Boolean renewE return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasvmPolicyType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasvmPolicyType.java index 465cdd0236e9..b85be2f529d5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasvmPolicyType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasvmPolicyType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IdentityBasedRestoreDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IdentityBasedRestoreDetails.java index e33551fc9a29..f8e8446d872a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IdentityBasedRestoreDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IdentityBasedRestoreDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -72,14 +72,6 @@ public IdentityBasedRestoreDetails withTargetStorageAccountId(String targetStora return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IdentityInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IdentityInfo.java index 11d77dde0851..c351f0ef4410 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IdentityInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IdentityInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -77,14 +77,6 @@ public IdentityInfo withManagedIdentityResourceId(String managedIdentityResource return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IlrRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IlrRequest.java index f14a78781712..e5f7e36ffc28 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IlrRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IlrRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -38,14 +38,6 @@ public String objectType() { return this.objectType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IlrRequestResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IlrRequestResource.java index 64f077178a8f..877516d79e5a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IlrRequestResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IlrRequestResource.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -16,16 +17,31 @@ * Parameters to Provision ILR API. */ @Fluent -public final class IlrRequestResource extends Resource { +public final class IlrRequestResource extends ProxyResource { + /* + * Resource location. + */ + private String location; + + /* + * Resource tags. + */ + private Map tags; + + /* + * Optional ETag. + */ + private String eTag; + /* * ILRRequestResource properties */ private IlrRequest properties; /* - * Optional ETag. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private String etag; + private SystemData systemData; /* * The type of the resource. @@ -48,6 +64,66 @@ public final class IlrRequestResource extends Resource { public IlrRequestResource() { } + /** + * Get the location property: Resource location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Resource location. + * + * @param location the location value to set. + * @return the IlrRequestResource object itself. + */ + public IlrRequestResource withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the IlrRequestResource object itself. + */ + public IlrRequestResource withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the eTag property: Optional ETag. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the eTag property: Optional ETag. + * + * @param eTag the eTag value to set. + * @return the IlrRequestResource object itself. + */ + public IlrRequestResource withETag(String eTag) { + this.eTag = eTag; + return this; + } + /** * Get the properties property: ILRRequestResource properties. * @@ -69,23 +145,12 @@ public IlrRequestResource withProperties(IlrRequest properties) { } /** - * Get the etag property: Optional ETag. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag property: Optional ETag. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param etag the etag value to set. - * @return the IlrRequestResource object itself. + * @return the systemData value. */ - public IlrRequestResource withEtag(String etag) { - this.etag = etag; - return this; + public SystemData systemData() { + return this.systemData; } /** @@ -118,45 +183,16 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public IlrRequestResource withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public IlrRequestResource withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("eTag", this.eTag); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -183,14 +219,16 @@ public static IlrRequestResource fromJson(JsonReader jsonReader) throws IOExcept } else if ("type".equals(fieldName)) { deserializedIlrRequestResource.type = reader.getString(); } else if ("location".equals(fieldName)) { - deserializedIlrRequestResource.withLocation(reader.getString()); + deserializedIlrRequestResource.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedIlrRequestResource.withTags(tags); + deserializedIlrRequestResource.tags = tags; + } else if ("eTag".equals(fieldName)) { + deserializedIlrRequestResource.eTag = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedIlrRequestResource.properties = IlrRequest.fromJson(reader); - } else if ("eTag".equals(fieldName)) { - deserializedIlrRequestResource.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedIlrRequestResource.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InfrastructureEncryptionState.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InfrastructureEncryptionState.java index 3b426bdfb590..2ee2d039fb8f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InfrastructureEncryptionState.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InfrastructureEncryptionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InquiryInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InquiryInfo.java index 1ba0c91ff882..4e21511c6bd1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InquiryInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InquiryInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -104,20 +104,6 @@ public InquiryInfo withInquiryDetails(List inquiryDetail return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (errorDetail() != null) { - errorDetail().validate(); - } - if (inquiryDetails() != null) { - inquiryDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InquiryStatus.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InquiryStatus.java index 00e5f6eeda33..7f1f8e4f9873 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InquiryStatus.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InquiryStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InquiryValidation.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InquiryValidation.java index 9e25d80b0c22..d660b3697d02 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InquiryValidation.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InquiryValidation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -100,17 +100,6 @@ public Object protectableItemCount() { return this.protectableItemCount; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (errorDetail() != null) { - errorDetail().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InstanceProtectionReadiness.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InstanceProtectionReadiness.java new file mode 100644 index 000000000000..aa821fb9d0ca --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InstanceProtectionReadiness.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The state of instance protection. + */ +public final class InstanceProtectionReadiness extends ExpandableStringEnum { + /** + * Static value Unknown for InstanceProtectionReadiness. + */ + public static final InstanceProtectionReadiness UNKNOWN = fromString("Unknown"); + + /** + * Static value Ready for InstanceProtectionReadiness. + */ + public static final InstanceProtectionReadiness READY = fromString("Ready"); + + /** + * Static value ScheduleDisabled for InstanceProtectionReadiness. + */ + public static final InstanceProtectionReadiness SCHEDULE_DISABLED = fromString("ScheduleDisabled"); + + /** + * Static value PartialProtection for InstanceProtectionReadiness. + */ + public static final InstanceProtectionReadiness PARTIAL_PROTECTION = fromString("PartialProtection"); + + /** + * Static value ProtectionError for InstanceProtectionReadiness. + */ + public static final InstanceProtectionReadiness PROTECTION_ERROR = fromString("ProtectionError"); + + /** + * Creates a new instance of InstanceProtectionReadiness value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InstanceProtectionReadiness() { + } + + /** + * Creates or finds a InstanceProtectionReadiness from its string representation. + * + * @param name a name to look for. + * @return the corresponding InstanceProtectionReadiness. + */ + public static InstanceProtectionReadiness fromString(String name) { + return fromString(name, InstanceProtectionReadiness.class); + } + + /** + * Gets known InstanceProtectionReadiness values. + * + * @return known InstanceProtectionReadiness values. + */ + public static Collection values() { + return values(InstanceProtectionReadiness.class); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InstantItemRecoveryTarget.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InstantItemRecoveryTarget.java index c9b1da888121..9e79d00d9d34 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InstantItemRecoveryTarget.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InstantItemRecoveryTarget.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Target details for file / folder restore. */ -@Fluent +@Immutable public final class InstantItemRecoveryTarget implements JsonSerializable { /* * List of client scripts. @@ -25,7 +25,7 @@ public final class InstantItemRecoveryTarget implements JsonSerializable clientScripts() { return this.clientScripts; } - /** - * Set the clientScripts property: List of client scripts. - * - * @param clientScripts the clientScripts value to set. - * @return the InstantItemRecoveryTarget object itself. - */ - public InstantItemRecoveryTarget withClientScripts(List clientScripts) { - this.clientScripts = clientScripts; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (clientScripts() != null) { - clientScripts().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InstantRPAdditionalDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InstantRPAdditionalDetails.java index e4642187bb5c..067afcdd53f2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InstantRPAdditionalDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InstantRPAdditionalDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -72,14 +72,6 @@ public InstantRPAdditionalDetails withAzureBackupRGNameSuffix(String azureBackup return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ItemLevelRecoveryConnections.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ItemLevelRecoveryConnections.java index f1a788806c6a..4349fc2dd96a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ItemLevelRecoveryConnections.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ItemLevelRecoveryConnections.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -17,13 +17,12 @@ public interface ItemLevelRecoveryConnections { * of * provisioning, call GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be provisioned - * for this backed up data. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource ILR request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -41,13 +40,12 @@ Response provisionWithResponse(String vaultName, String resourceGroupName, * of * provisioning, call GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be provisioned - * for this backed up data. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource ILR request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -60,13 +58,12 @@ void provision(String vaultName, String resourceGroupName, String fabricName, St * Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer * displaying all recoverable files and folders. This is an asynchronous operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be revoked for - * this backed up data. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -80,13 +77,12 @@ Response revokeWithResponse(String vaultName, String resourceGroupName, St * Revokes an iSCSI connection which can be used to download a script. Executing this script opens a file explorer * displaying all recoverable files and folders. This is an asynchronous operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item name whose files/folders are to be restored. - * @param recoveryPointId Recovery point ID which represents backed up data. iSCSI connection will be revoked for - * this backed up data. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Job.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Job.java index 93bba7c6fd14..5e82a6e45c92 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Job.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Job.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * Defines workload agnostic properties for a job. */ -@Fluent +@Immutable public class Job implements JsonSerializable { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -63,7 +63,7 @@ public class Job implements JsonSerializable { /** * Creates an instance of Job class. */ - public Job() { + protected Job() { } /** @@ -91,7 +91,7 @@ public String entityFriendlyName() { * @param entityFriendlyName the entityFriendlyName value to set. * @return the Job object itself. */ - public Job withEntityFriendlyName(String entityFriendlyName) { + Job withEntityFriendlyName(String entityFriendlyName) { this.entityFriendlyName = entityFriendlyName; return this; } @@ -111,7 +111,7 @@ public BackupManagementType backupManagementType() { * @param backupManagementType the backupManagementType value to set. * @return the Job object itself. */ - public Job withBackupManagementType(BackupManagementType backupManagementType) { + Job withBackupManagementType(BackupManagementType backupManagementType) { this.backupManagementType = backupManagementType; return this; } @@ -131,7 +131,7 @@ public String operation() { * @param operation the operation value to set. * @return the Job object itself. */ - public Job withOperation(String operation) { + Job withOperation(String operation) { this.operation = operation; return this; } @@ -151,7 +151,7 @@ public String status() { * @param status the status value to set. * @return the Job object itself. */ - public Job withStatus(String status) { + Job withStatus(String status) { this.status = status; return this; } @@ -171,7 +171,7 @@ public OffsetDateTime startTime() { * @param startTime the startTime value to set. * @return the Job object itself. */ - public Job withStartTime(OffsetDateTime startTime) { + Job withStartTime(OffsetDateTime startTime) { this.startTime = startTime; return this; } @@ -191,7 +191,7 @@ public OffsetDateTime endTime() { * @param endTime the endTime value to set. * @return the Job object itself. */ - public Job withEndTime(OffsetDateTime endTime) { + Job withEndTime(OffsetDateTime endTime) { this.endTime = endTime; return this; } @@ -211,19 +211,11 @@ public String activityId() { * @param activityId the activityId value to set. * @return the Job object itself. */ - public Job withActivityId(String activityId) { + Job withActivityId(String activityId) { this.activityId = activityId; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobCancellations.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobCancellations.java index 2b0443bdeec0..ad4f2901454c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobCancellations.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobCancellations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,9 +15,9 @@ public interface JobCancellations { * Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call * GetCancelOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Name of the job to cancel. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the job whose details are to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -30,9 +30,9 @@ public interface JobCancellations { * Cancels a job. This is an asynchronous operation. To know the status of the cancellation, call * GetCancelOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Name of the job to cancel. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the job whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobDetails.java index 1dc10c3a6597..0a7441fbfd81 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -14,8 +14,8 @@ public interface JobDetails { /** * Gets extended information associated with the job. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Name of the job whose details are to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -28,8 +28,8 @@ public interface JobDetails { /** * Gets extended information associated with the job. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Name of the job whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobOperationResults.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobOperationResults.java index c023dfc95374..9c8cf811ab5c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobOperationResults.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobOperationResults.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -14,10 +14,10 @@ public interface JobOperationResults { /** * Fetches the result of any operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job name whose operation result has to be fetched. - * @param operationId OperationID which represents the operation whose result has to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the JobResource. + * @param operationId The name of the JobResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -30,10 +30,10 @@ Response getWithResponse(String vaultName, String resourceGroupName, Strin /** * Fetches the result of any operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param jobName Job name whose operation result has to be fetched. - * @param operationId OperationID which represents the operation whose result has to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the JobResource. + * @param operationId The name of the JobResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobResource.java index 7039dcead851..197fbef7aa01 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobResource.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.JobResourceInner; import java.util.Map; @@ -33,11 +34,11 @@ public interface JobResource { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the properties property: JobResource properties. * - * @return the location value. + * @return the properties value. */ - String location(); + Job properties(); /** * Gets the tags property: Resource tags. @@ -47,11 +48,11 @@ public interface JobResource { Map tags(); /** - * Gets the properties property: JobResource properties. + * Gets the location property: The geo-location where the resource lives. * - * @return the properties value. + * @return the location value. */ - Job properties(); + String location(); /** * Gets the etag property: Optional ETag. @@ -60,6 +61,13 @@ public interface JobResource { */ String etag(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.recoveryservicesbackup.fluent.models.JobResourceInner object. * diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobSupportedAction.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobSupportedAction.java index 430d21db5505..7e1aca0eaebd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobSupportedAction.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobSupportedAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Jobs.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Jobs.java index 88c00103572c..84899bde5488 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Jobs.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Jobs.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,7 +15,7 @@ public interface Jobs { * Triggers export of jobs specified by filters and returns an OperationID to track. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -29,7 +29,7 @@ public interface Jobs { * Triggers export of jobs specified by filters and returns an OperationID to track. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/KekDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/KekDetails.java index d2806ea016f5..d40ec4fb2da8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/KekDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/KekDetails.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * KEK is encryption key for BEK. */ -@Fluent +@Immutable public final class KekDetails implements JsonSerializable { /* * Key is KEK. @@ -34,7 +34,7 @@ public final class KekDetails implements JsonSerializable { /** * Creates an instance of KekDetails class. */ - public KekDetails() { + private KekDetails() { } /** @@ -46,17 +46,6 @@ public String keyUrl() { return this.keyUrl; } - /** - * Set the keyUrl property: Key is KEK. - * - * @param keyUrl the keyUrl value to set. - * @return the KekDetails object itself. - */ - public KekDetails withKeyUrl(String keyUrl) { - this.keyUrl = keyUrl; - return this; - } - /** * Get the keyVaultId property: Key Vault ID where this Key is stored. * @@ -66,17 +55,6 @@ public String keyVaultId() { return this.keyVaultId; } - /** - * Set the keyVaultId property: Key Vault ID where this Key is stored. - * - * @param keyVaultId the keyVaultId value to set. - * @return the KekDetails object itself. - */ - public KekDetails withKeyVaultId(String keyVaultId) { - this.keyVaultId = keyVaultId; - return this; - } - /** * Get the keyBackupData property: KEK data. * @@ -86,25 +64,6 @@ public String keyBackupData() { return this.keyBackupData; } - /** - * Set the keyBackupData property: KEK data. - * - * @param keyBackupData the keyBackupData value to set. - * @return the KekDetails object itself. - */ - public KekDetails withKeyBackupData(String keyBackupData) { - this.keyBackupData = keyBackupData; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/KeyAndSecretDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/KeyAndSecretDetails.java index 629c2e8346a8..067505682b1d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/KeyAndSecretDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/KeyAndSecretDetails.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,7 +20,7 @@ * 3. EncryptionMechanism * BEK and KEK can potentially have different vault ids. */ -@Fluent +@Immutable public final class KeyAndSecretDetails implements JsonSerializable { /* * KEK is encryption key for BEK. @@ -40,7 +40,7 @@ public final class KeyAndSecretDetails implements JsonSerializable e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LastBackupStatus.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LastBackupStatus.java index fe0a35e11c95..b7c3e1de38c5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LastBackupStatus.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LastBackupStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LastUpdateStatus.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LastUpdateStatus.java index d359a574a6a0..f1295d57aded 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LastUpdateStatus.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LastUpdateStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ListRecoveryPointsRecommendedForMoveRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ListRecoveryPointsRecommendedForMoveRequest.java index 73e697ab265f..b5dc42e7a515 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ListRecoveryPointsRecommendedForMoveRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ListRecoveryPointsRecommendedForMoveRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -74,14 +74,6 @@ public ListRecoveryPointsRecommendedForMoveRequest withExcludedRPList(List e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabContainerExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabContainerExtendedInfo.java index 2123fa54770c..303b366ec2e8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabContainerExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabContainerExtendedInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -151,14 +151,6 @@ public MabContainerExtendedInfo withLastBackupStatus(String lastBackupStatus) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabContainerHealthDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabContainerHealthDetails.java index 61afec198d4c..6b903a909724 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabContainerHealthDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabContainerHealthDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -123,14 +123,6 @@ public MabContainerHealthDetails withRecommendations(List recommendation return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabErrorInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabErrorInfo.java index ef626d204c05..d9eef78675a6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabErrorInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabErrorInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -30,7 +30,7 @@ public final class MabErrorInfo implements JsonSerializable { /** * Creates an instance of MabErrorInfo class. */ - public MabErrorInfo() { + private MabErrorInfo() { } /** @@ -51,14 +51,6 @@ public List recommendations() { return this.recommendations; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabFileFolderProtectedItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabFileFolderProtectedItem.java index a676ba42f1cd..89282b50d884 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabFileFolderProtectedItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabFileFolderProtectedItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -345,21 +345,18 @@ public MabFileFolderProtectedItem withPolicyName(String policyName) { * {@inheritDoc} */ @Override - public MabFileFolderProtectedItem withSoftDeleteRetentionPeriod(Integer softDeleteRetentionPeriod) { - super.withSoftDeleteRetentionPeriod(softDeleteRetentionPeriod); + public MabFileFolderProtectedItem withSoftDeleteRetentionPeriodInDays(Integer softDeleteRetentionPeriodInDays) { + super.withSoftDeleteRetentionPeriodInDays(softDeleteRetentionPeriodInDays); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - if (extendedInfo() != null) { - extendedInfo().validate(); - } + public MabFileFolderProtectedItem withSourceSideScanInfo(SourceSideScanInfo sourceSideScanInfo) { + super.withSourceSideScanInfo(sourceSideScanInfo); + return this; } /** @@ -387,7 +384,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchiveEnabled", isArchiveEnabled()); jsonWriter.writeStringField("policyName", policyName()); - jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriod()); + jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", softDeleteRetentionPeriodInDays()); + jsonWriter.writeJsonField("sourceSideScanInfo", sourceSideScanInfo()); jsonWriter.writeStringField("protectedItemType", this.protectedItemType); jsonWriter.writeStringField("friendlyName", this.friendlyName); jsonWriter.writeStringField("computerName", this.computerName); @@ -458,9 +456,11 @@ public static MabFileFolderProtectedItem fromJson(JsonReader jsonReader) throws deserializedMabFileFolderProtectedItem.withPolicyName(reader.getString()); } else if ("softDeleteRetentionPeriodInDays".equals(fieldName)) { deserializedMabFileFolderProtectedItem - .withSoftDeleteRetentionPeriod(reader.getNullable(JsonReader::getInt)); + .withSoftDeleteRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); } else if ("vaultId".equals(fieldName)) { deserializedMabFileFolderProtectedItem.withVaultId(reader.getString()); + } else if ("sourceSideScanInfo".equals(fieldName)) { + deserializedMabFileFolderProtectedItem.withSourceSideScanInfo(SourceSideScanInfo.fromJson(reader)); } else if ("protectedItemType".equals(fieldName)) { deserializedMabFileFolderProtectedItem.protectedItemType = reader.getString(); } else if ("friendlyName".equals(fieldName)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabFileFolderProtectedItemExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabFileFolderProtectedItemExtendedInfo.java index c34fca85577f..97a3fddf3232 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabFileFolderProtectedItemExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabFileFolderProtectedItemExtendedInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -101,14 +101,6 @@ public MabFileFolderProtectedItemExtendedInfo withRecoveryPointCount(Integer rec return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabJob.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabJob.java index 36589e931910..4bfeed7cabe2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabJob.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabJob.java @@ -1,24 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.Duration; -import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.List; /** * MAB workload-specific job. */ -@Fluent +@Immutable public final class MabJob extends Job { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -64,7 +63,7 @@ public final class MabJob extends Job { /** * Creates an instance of MabJob class. */ - public MabJob() { + private MabJob() { } /** @@ -87,17 +86,6 @@ public Duration duration() { return this.duration; } - /** - * Set the duration property: Time taken by job to run. - * - * @param duration the duration value to set. - * @return the MabJob object itself. - */ - public MabJob withDuration(Duration duration) { - this.duration = duration; - return this; - } - /** * Get the actionsInfo property: The state/actions applicable on jobs like cancel/retry. * @@ -107,17 +95,6 @@ public List actionsInfo() { return this.actionsInfo; } - /** - * Set the actionsInfo property: The state/actions applicable on jobs like cancel/retry. - * - * @param actionsInfo the actionsInfo value to set. - * @return the MabJob object itself. - */ - public MabJob withActionsInfo(List actionsInfo) { - this.actionsInfo = actionsInfo; - return this; - } - /** * Get the mabServerName property: Name of server protecting the DS. * @@ -127,17 +104,6 @@ public String mabServerName() { return this.mabServerName; } - /** - * Set the mabServerName property: Name of server protecting the DS. - * - * @param mabServerName the mabServerName value to set. - * @return the MabJob object itself. - */ - public MabJob withMabServerName(String mabServerName) { - this.mabServerName = mabServerName; - return this; - } - /** * Get the mabServerType property: Server type of MAB container. * @@ -147,17 +113,6 @@ public MabServerType mabServerType() { return this.mabServerType; } - /** - * Set the mabServerType property: Server type of MAB container. - * - * @param mabServerType the mabServerType value to set. - * @return the MabJob object itself. - */ - public MabJob withMabServerType(MabServerType mabServerType) { - this.mabServerType = mabServerType; - return this; - } - /** * Get the workloadType property: Workload type of backup item. * @@ -167,17 +122,6 @@ public WorkloadType workloadType() { return this.workloadType; } - /** - * Set the workloadType property: Workload type of backup item. - * - * @param workloadType the workloadType value to set. - * @return the MabJob object itself. - */ - public MabJob withWorkloadType(WorkloadType workloadType) { - this.workloadType = workloadType; - return this; - } - /** * Get the errorDetails property: The errors. * @@ -187,17 +131,6 @@ public List errorDetails() { return this.errorDetails; } - /** - * Set the errorDetails property: The errors. - * - * @param errorDetails the errorDetails value to set. - * @return the MabJob object itself. - */ - public MabJob withErrorDetails(List errorDetails) { - this.errorDetails = errorDetails; - return this; - } - /** * Get the extendedInfo property: Additional information on the job. * @@ -207,95 +140,6 @@ public MabJobExtendedInfo extendedInfo() { return this.extendedInfo; } - /** - * Set the extendedInfo property: Additional information on the job. - * - * @param extendedInfo the extendedInfo value to set. - * @return the MabJob object itself. - */ - public MabJob withExtendedInfo(MabJobExtendedInfo extendedInfo) { - this.extendedInfo = extendedInfo; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MabJob withEntityFriendlyName(String entityFriendlyName) { - super.withEntityFriendlyName(entityFriendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MabJob withBackupManagementType(BackupManagementType backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MabJob withOperation(String operation) { - super.withOperation(operation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MabJob withStatus(String status) { - super.withStatus(status); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MabJob withStartTime(OffsetDateTime startTime) { - super.withStartTime(startTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MabJob withEndTime(OffsetDateTime endTime) { - super.withEndTime(endTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public MabJob withActivityId(String activityId) { - super.withActivityId(activityId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (errorDetails() != null) { - errorDetails().forEach(e -> e.validate()); - } - if (extendedInfo() != null) { - extendedInfo().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabJobExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabJobExtendedInfo.java index 8a0c3b7b3a68..6621a23893b8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabJobExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabJobExtendedInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * Additional information for the MAB workload-specific job. */ -@Fluent +@Immutable public final class MabJobExtendedInfo implements JsonSerializable { /* * List of tasks for this job. @@ -36,7 +36,7 @@ public final class MabJobExtendedInfo implements JsonSerializable tasksList() { return this.tasksList; } - /** - * Set the tasksList property: List of tasks for this job. - * - * @param tasksList the tasksList value to set. - * @return the MabJobExtendedInfo object itself. - */ - public MabJobExtendedInfo withTasksList(List tasksList) { - this.tasksList = tasksList; - return this; - } - /** * Get the propertyBag property: The job properties. * @@ -68,17 +57,6 @@ public Map propertyBag() { return this.propertyBag; } - /** - * Set the propertyBag property: The job properties. - * - * @param propertyBag the propertyBag value to set. - * @return the MabJobExtendedInfo object itself. - */ - public MabJobExtendedInfo withPropertyBag(Map propertyBag) { - this.propertyBag = propertyBag; - return this; - } - /** * Get the dynamicErrorMessage property: Non localized error message specific to this job. * @@ -88,28 +66,6 @@ public String dynamicErrorMessage() { return this.dynamicErrorMessage; } - /** - * Set the dynamicErrorMessage property: Non localized error message specific to this job. - * - * @param dynamicErrorMessage the dynamicErrorMessage value to set. - * @return the MabJobExtendedInfo object itself. - */ - public MabJobExtendedInfo withDynamicErrorMessage(String dynamicErrorMessage) { - this.dynamicErrorMessage = dynamicErrorMessage; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (tasksList() != null) { - tasksList().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabJobTaskDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabJobTaskDetails.java index ed7eeac3ded2..e5553ca84911 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabJobTaskDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabJobTaskDetails.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -18,7 +18,7 @@ /** * MAB workload-specific job task details. */ -@Fluent +@Immutable public final class MabJobTaskDetails implements JsonSerializable { /* * The task display name. @@ -48,7 +48,7 @@ public final class MabJobTaskDetails implements JsonSerializable resou return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (schedulePolicy() != null) { - schedulePolicy().validate(); - } - if (retentionPolicy() != null) { - retentionPolicy().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabServerType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabServerType.java index a4355bf9cbec..8d9bf8bf64e9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabServerType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabServerType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MonthOfYear.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MonthOfYear.java index 77559f93249d..5d2a02adee53 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MonthOfYear.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MonthOfYear.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MonthlyRetentionSchedule.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MonthlyRetentionSchedule.java index deffb9620f2a..726020728cef 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MonthlyRetentionSchedule.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MonthlyRetentionSchedule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -152,23 +152,6 @@ public MonthlyRetentionSchedule withRetentionDuration(RetentionDuration retentio return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (retentionScheduleDaily() != null) { - retentionScheduleDaily().validate(); - } - if (retentionScheduleWeekly() != null) { - retentionScheduleWeekly().validate(); - } - if (retentionDuration() != null) { - retentionDuration().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MoveRPAcrossTiersRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MoveRPAcrossTiersRequest.java index 0b308fe5646b..231ebc3a8039 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MoveRPAcrossTiersRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MoveRPAcrossTiersRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -97,14 +97,6 @@ public MoveRPAcrossTiersRequest withTargetTierType(RecoveryPointTierType targetT return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/NameInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/NameInfo.java index 805b4a1eb5a8..1048289ec65e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/NameInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/NameInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The name of usage. */ -@Fluent +@Immutable public final class NameInfo implements JsonSerializable { /* * Value of usage. @@ -29,7 +29,7 @@ public final class NameInfo implements JsonSerializable { /** * Creates an instance of NameInfo class. */ - public NameInfo() { + private NameInfo() { } /** @@ -41,17 +41,6 @@ public String value() { return this.value; } - /** - * Set the value property: Value of usage. - * - * @param value the value value to set. - * @return the NameInfo object itself. - */ - public NameInfo withValue(String value) { - this.value = value; - return this; - } - /** * Get the localizedValue property: Localized value of usage. * @@ -61,25 +50,6 @@ public String localizedValue() { return this.localizedValue; } - /** - * Set the localizedValue property: Localized value of usage. - * - * @param localizedValue the localizedValue value to set. - * @return the NameInfo object itself. - */ - public NameInfo withLocalizedValue(String localizedValue) { - this.localizedValue = localizedValue; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OkResponse.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OkResponse.java new file mode 100644 index 000000000000..648b1045f8e6 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OkResponse.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.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 java.io.IOException; + +/** + * The request has succeeded. + */ +@Immutable +public final class OkResponse implements JsonSerializable { + /** + * Creates an instance of OkResponse class. + */ + private OkResponse() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OkResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OkResponse 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 OkResponse. + */ + public static OkResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OkResponse deserializedOkResponse = new OkResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + reader.skipChildren(); + } + + return deserializedOkResponse; + }); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationOperations.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationOperations.java index e4d8173d2794..a80e2807ac2b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationOperations.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationOperations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,7 +15,7 @@ public interface OperationOperations { * Validate operation for specified backed up item. This is a synchronous operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,7 +30,7 @@ Response validateWithResponse(String vaultName, Stri * Validate operation for specified backed up item. This is a synchronous operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationResultInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationResultInfo.java index b8e87ea32eee..8ba580c064d9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationResultInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationResultInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -14,7 +14,7 @@ /** * Operation result info. */ -@Fluent +@Immutable public final class OperationResultInfo extends OperationResultInfoBase { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -30,7 +30,7 @@ public final class OperationResultInfo extends OperationResultInfoBase { /** * Creates an instance of OperationResultInfo class. */ - public OperationResultInfo() { + private OperationResultInfo() { } /** @@ -53,26 +53,6 @@ public List jobList() { return this.jobList; } - /** - * Set the jobList property: List of jobs created by this operation. - * - * @param jobList the jobList value to set. - * @return the OperationResultInfo object itself. - */ - public OperationResultInfo withJobList(List jobList) { - this.jobList = jobList; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationResultInfoBase.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationResultInfoBase.java index 3cab1a5d7493..b0bf29ea9391 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationResultInfoBase.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationResultInfoBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -25,7 +25,7 @@ public class OperationResultInfoBase implements JsonSerializable { /* * Error code of the operation failure. @@ -29,7 +29,7 @@ public final class OperationStatusError implements JsonSerializable jobIds() { return this.jobIds; } - /** - * Set the jobIds property: IDs of the jobs created for the protected item. - * - * @param jobIds the jobIds value to set. - * @return the OperationStatusJobsExtendedInfo object itself. - */ - public OperationStatusJobsExtendedInfo withJobIds(List jobIds) { - this.jobIds = jobIds; - return this; - } - /** * Get the failedJobsError property: Stores all the failed jobs along with the corresponding error codes. * @@ -79,26 +68,6 @@ public Map failedJobsError() { return this.failedJobsError; } - /** - * Set the failedJobsError property: Stores all the failed jobs along with the corresponding error codes. - * - * @param failedJobsError the failedJobsError value to set. - * @return the OperationStatusJobsExtendedInfo object itself. - */ - public OperationStatusJobsExtendedInfo withFailedJobsError(Map failedJobsError) { - this.failedJobsError = failedJobsError; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusProvisionIlrExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusProvisionIlrExtendedInfo.java index d5a4ff8bac59..30e38ce091c7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusProvisionIlrExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusProvisionIlrExtendedInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Operation status extended info for ILR provision action. */ -@Fluent +@Immutable public final class OperationStatusProvisionIlrExtendedInfo extends OperationStatusExtendedInfo { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -29,7 +29,7 @@ public final class OperationStatusProvisionIlrExtendedInfo extends OperationStat /** * Creates an instance of OperationStatusProvisionIlrExtendedInfo class. */ - public OperationStatusProvisionIlrExtendedInfo() { + private OperationStatusProvisionIlrExtendedInfo() { } /** @@ -52,29 +52,6 @@ public InstantItemRecoveryTarget recoveryTarget() { return this.recoveryTarget; } - /** - * Set the recoveryTarget property: Target details for file / folder restore. - * - * @param recoveryTarget the recoveryTarget value to set. - * @return the OperationStatusProvisionIlrExtendedInfo object itself. - */ - public OperationStatusProvisionIlrExtendedInfo withRecoveryTarget(InstantItemRecoveryTarget recoveryTarget) { - this.recoveryTarget = recoveryTarget; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (recoveryTarget() != null) { - recoveryTarget().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusValidateOperationExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusValidateOperationExtendedInfo.java index 6cb38a174eaa..5ec921598044 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusValidateOperationExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusValidateOperationExtendedInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Operation status extended info for ValidateOperation action. */ -@Fluent +@Immutable public final class OperationStatusValidateOperationExtendedInfo extends OperationStatusExtendedInfo { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -29,7 +29,7 @@ public final class OperationStatusValidateOperationExtendedInfo extends Operatio /** * Creates an instance of OperationStatusValidateOperationExtendedInfo class. */ - public OperationStatusValidateOperationExtendedInfo() { + private OperationStatusValidateOperationExtendedInfo() { } /** @@ -52,30 +52,6 @@ public ValidateOperationResponse validateOperationResponse() { return this.validateOperationResponse; } - /** - * Set the validateOperationResponse property: Gets the validation operation response. - * - * @param validateOperationResponse the validateOperationResponse value to set. - * @return the OperationStatusValidateOperationExtendedInfo object itself. - */ - public OperationStatusValidateOperationExtendedInfo - withValidateOperationResponse(ValidateOperationResponse validateOperationResponse) { - this.validateOperationResponse = validateOperationResponse; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (validateOperationResponse() != null) { - validateOperationResponse().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusValues.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusValues.java index f9d9bcac91f1..e3f225cbadfd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusValues.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusValues.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationType.java index da3dab958833..208c9c6b8967 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationWorkerResponse.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationWorkerResponse.java index 04ab94b7fde5..edfd99dcbca7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationWorkerResponse.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationWorkerResponse.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * This is the base class for operation result responses. */ -@Fluent +@Immutable public class OperationWorkerResponse implements JsonSerializable { /* * HTTP Status Code of the operation. @@ -31,7 +31,7 @@ public class OperationWorkerResponse implements JsonSerializable> headers() { * @param headers the headers value to set. * @return the OperationWorkerResponse object itself. */ - public OperationWorkerResponse withHeaders(Map> headers) { + OperationWorkerResponse withHeaders(Map> headers) { this.headers = headers; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Operations.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Operations.java index 71f140bb5e12..0ea505dfe640 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Operations.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Operations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -12,7 +12,7 @@ */ public interface Operations { /** - * Returns the list of available operations. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -22,7 +22,7 @@ public interface Operations { PagedIterable list(); /** - * Returns the list of available operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OverwriteOptions.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OverwriteOptions.java index b11ba9d98088..d0925f87b516 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OverwriteOptions.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OverwriteOptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PatchRecoveryPointInput.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PatchRecoveryPointInput.java new file mode 100644 index 000000000000..e356ad41c610 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PatchRecoveryPointInput.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.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 java.io.IOException; + +/** + * Recovery Point Contract for Update Recovery Point API. + */ +@Fluent +public final class PatchRecoveryPointInput implements JsonSerializable { + /* + * Properties of Recovery Point + */ + private PatchRecoveryPointPropertiesInput recoveryPointProperties; + + /** + * Creates an instance of PatchRecoveryPointInput class. + */ + public PatchRecoveryPointInput() { + } + + /** + * Get the recoveryPointProperties property: Properties of Recovery Point. + * + * @return the recoveryPointProperties value. + */ + public PatchRecoveryPointPropertiesInput recoveryPointProperties() { + return this.recoveryPointProperties; + } + + /** + * Set the recoveryPointProperties property: Properties of Recovery Point. + * + * @param recoveryPointProperties the recoveryPointProperties value to set. + * @return the PatchRecoveryPointInput object itself. + */ + public PatchRecoveryPointInput + withRecoveryPointProperties(PatchRecoveryPointPropertiesInput recoveryPointProperties) { + this.recoveryPointProperties = recoveryPointProperties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("recoveryPointProperties", this.recoveryPointProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PatchRecoveryPointInput from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PatchRecoveryPointInput 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 PatchRecoveryPointInput. + */ + public static PatchRecoveryPointInput fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PatchRecoveryPointInput deserializedPatchRecoveryPointInput = new PatchRecoveryPointInput(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("recoveryPointProperties".equals(fieldName)) { + deserializedPatchRecoveryPointInput.recoveryPointProperties + = PatchRecoveryPointPropertiesInput.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPatchRecoveryPointInput; + }); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PatchRecoveryPointPropertiesInput.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PatchRecoveryPointPropertiesInput.java new file mode 100644 index 000000000000..6af4b9a44890 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PatchRecoveryPointPropertiesInput.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.models; + +import com.azure.core.annotation.Fluent; +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 java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Recovery Point Properties Contract for Update Recovery Point API. + */ +@Fluent +public final class PatchRecoveryPointPropertiesInput implements JsonSerializable { + /* + * Expiry time of Recovery Point in UTC. + */ + private OffsetDateTime expiryTime; + + /** + * Creates an instance of PatchRecoveryPointPropertiesInput class. + */ + public PatchRecoveryPointPropertiesInput() { + } + + /** + * Get the expiryTime property: Expiry time of Recovery Point in UTC. + * + * @return the expiryTime value. + */ + public OffsetDateTime expiryTime() { + return this.expiryTime; + } + + /** + * Set the expiryTime property: Expiry time of Recovery Point in UTC. + * + * @param expiryTime the expiryTime value to set. + * @return the PatchRecoveryPointPropertiesInput object itself. + */ + public PatchRecoveryPointPropertiesInput withExpiryTime(OffsetDateTime expiryTime) { + this.expiryTime = expiryTime; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("expiryTime", + this.expiryTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiryTime)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PatchRecoveryPointPropertiesInput from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PatchRecoveryPointPropertiesInput 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 PatchRecoveryPointPropertiesInput. + */ + public static PatchRecoveryPointPropertiesInput fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PatchRecoveryPointPropertiesInput deserializedPatchRecoveryPointPropertiesInput + = new PatchRecoveryPointPropertiesInput(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("expiryTime".equals(fieldName)) { + deserializedPatchRecoveryPointPropertiesInput.expiryTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedPatchRecoveryPointPropertiesInput; + }); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PointInTimeRange.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PointInTimeRange.java index b2ba4471b97f..568568813345 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PointInTimeRange.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PointInTimeRange.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * Provides details for log ranges. */ -@Fluent +@Immutable public final class PointInTimeRange implements JsonSerializable { /* * Start time of the time range for log recovery. @@ -32,7 +32,7 @@ public final class PointInTimeRange implements JsonSerializable { /* * Status of protectable item, i.e. InProgress,Succeeded,Failed @@ -34,7 +34,7 @@ public final class PreBackupValidation implements JsonSerializable sourceVaultProperties() { return this.sourceVaultProperties; } - /** - * Set the sourceVaultProperties property: Source Vault Properties. - * - * @param sourceVaultProperties the sourceVaultProperties value to set. - * @return the PrepareDataMoveResponse object itself. - */ - public PrepareDataMoveResponse withSourceVaultProperties(Map sourceVaultProperties) { - this.sourceVaultProperties = sourceVaultProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpoint.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpoint.java index a91ce2f11263..4b5898084bd8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpoint.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -47,14 +47,6 @@ public PrivateEndpoint withId(String id) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnection.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnection.java index 3bdbd9101a54..2752d61f23a9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnection.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnection.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -124,20 +124,6 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() != null) { - privateLinkServiceConnectionState().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnectionResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnectionResource.java index 059d533866f0..3f605cf3a353 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnectionResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnectionResource.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.PrivateEndpointConnectionResourceInner; import java.util.Map; @@ -35,11 +36,11 @@ public interface PrivateEndpointConnectionResource { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the properties property: PrivateEndpointConnectionResource properties. * - * @return the location value. + * @return the properties value. */ - String location(); + PrivateEndpointConnection properties(); /** * Gets the tags property: Resource tags. @@ -49,11 +50,11 @@ public interface PrivateEndpointConnectionResource { Map tags(); /** - * Gets the properties property: PrivateEndpointConnectionResource properties. + * Gets the location property: The geo-location where the resource lives. * - * @return the properties value. + * @return the location value. */ - PrivateEndpointConnection properties(); + String location(); /** * Gets the etag property: Optional ETag. @@ -62,6 +63,13 @@ public interface PrivateEndpointConnectionResource { */ String etag(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the region of the resource. * @@ -94,8 +102,8 @@ public interface PrivateEndpointConnectionResource { /** * The entirety of the PrivateEndpointConnectionResource definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** @@ -105,28 +113,7 @@ interface DefinitionStages { /** * The first stage of the PrivateEndpointConnectionResource definition. */ - interface Blank extends WithLocation { - } - - /** - * The stage of the PrivateEndpointConnectionResource definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); + interface Blank extends WithParentResource { } /** @@ -136,8 +123,8 @@ interface WithParentResource { /** * Specifies vaultName, resourceGroupName. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingVault(String vaultName, String resourceGroupName); @@ -147,8 +134,8 @@ interface WithParentResource { * The stage of the PrivateEndpointConnectionResource definition which contains all the minimum required * properties for the resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithEtag { + interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, + DefinitionStages.WithProperties, DefinitionStages.WithEtag { /** * Executes the create request. * @@ -165,6 +152,27 @@ interface WithCreate PrivateEndpointConnectionResource create(Context context); } + /** + * The stage of the PrivateEndpointConnectionResource definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithCreate withRegion(String location); + } + /** * The stage of the PrivateEndpointConnectionResource definition allowing to specify tags. */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnectionStatus.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnectionStatus.java index 3112a097b82c..56b1c7159f0d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnectionStatus.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnectionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnections.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnections.java index a407e620d24e..5125bf2e54bd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnections.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnections.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -14,8 +14,8 @@ public interface PrivateEndpointConnections { /** * Get Private Endpoint Connection. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -29,8 +29,8 @@ Response getWithResponse(String vaultName, St /** * Get Private Endpoint Connection. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -43,8 +43,8 @@ PrivateEndpointConnectionResource get(String vaultName, String resourceGroupName /** * Delete Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -55,8 +55,8 @@ PrivateEndpointConnectionResource get(String vaultName, String resourceGroupName /** * Delete Private Endpoint requests. This call is made by Backup Admin. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpoints.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpoints.java index a68335bccbc3..1a7803df7d5f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpoints.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpoints.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -14,10 +14,10 @@ public interface PrivateEndpoints { /** * Gets the operation status for a private endpoint connection. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param operationId Operation id. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateEndpointConnectionName The name of the PrivateEndpointConnectionResource. + * @param operationId The name of the PrivateEndpointConnectionResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -30,10 +30,10 @@ Response getOperationStatusWithResponse(String vaultName, Strin /** * Gets the operation status for a private endpoint connection. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param privateEndpointConnectionName The name of the private endpoint connection. - * @param operationId Operation id. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateEndpointConnectionName The name of the PrivateEndpointConnectionResource. + * @param operationId The name of the PrivateEndpointConnectionResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateLinkServiceConnectionState.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateLinkServiceConnectionState.java index fee9386686aa..8c75219ed8e6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateLinkServiceConnectionState.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateLinkServiceConnectionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -97,14 +97,6 @@ public PrivateLinkServiceConnectionState withActionRequired(String actionRequire return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainer.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainer.java index 019213440a8a..4e7faf4345b0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainer.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainer.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Protectable Container Class. */ -@Fluent +@Immutable public class ProtectableContainer implements JsonSerializable { /* * Type of the container. The value of this property for @@ -46,7 +46,7 @@ public class ProtectableContainer implements JsonSerializable tags(); + /** + * Gets the eTag property: Optional ETag. + * + * @return the eTag value. + */ + String eTag(); + /** * Gets the properties property: ProtectableContainerResource properties. * @@ -54,11 +62,11 @@ public interface ProtectableContainerResource { ProtectableContainer properties(); /** - * Gets the etag property: Optional ETag. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the etag value. + * @return the systemData value. */ - String etag(); + SystemData systemData(); /** * Gets the inner com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectableContainerResourceInner diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainerType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainerType.java index 5c65412f40f2..a43d620946f0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainerType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainerType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainers.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainers.java index d4ee65641f8c..3ba9d8754088 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainers.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,7 +15,7 @@ public interface ProtectableContainers { * Lists the containers that can be registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName The fabricName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -28,7 +28,7 @@ public interface ProtectableContainers { * Lists the containers that can be registered to Recovery Services Vault. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName The fabricName parameter. * @param filter OData filter options. * @param context The context to associate with this operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItem.java index d9e87ec289ef..f470c9a8cce1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItem.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -108,13 +108,18 @@ public class ProtectedItem implements JsonSerializable { /* * Soft delete retention period in days */ - private Integer softDeleteRetentionPeriod; + private Integer softDeleteRetentionPeriodInDays; /* * ID of the vault which protects this item */ private String vaultId; + /* + * Source side threat information + */ + private SourceSideScanInfo sourceSideScanInfo; + /** * Creates an instance of ProtectedItem class. */ @@ -461,22 +466,22 @@ public ProtectedItem withPolicyName(String policyName) { } /** - * Get the softDeleteRetentionPeriod property: Soft delete retention period in days. + * Get the softDeleteRetentionPeriodInDays property: Soft delete retention period in days. * - * @return the softDeleteRetentionPeriod value. + * @return the softDeleteRetentionPeriodInDays value. */ - public Integer softDeleteRetentionPeriod() { - return this.softDeleteRetentionPeriod; + public Integer softDeleteRetentionPeriodInDays() { + return this.softDeleteRetentionPeriodInDays; } /** - * Set the softDeleteRetentionPeriod property: Soft delete retention period in days. + * Set the softDeleteRetentionPeriodInDays property: Soft delete retention period in days. * - * @param softDeleteRetentionPeriod the softDeleteRetentionPeriod value to set. + * @param softDeleteRetentionPeriodInDays the softDeleteRetentionPeriodInDays value to set. * @return the ProtectedItem object itself. */ - public ProtectedItem withSoftDeleteRetentionPeriod(Integer softDeleteRetentionPeriod) { - this.softDeleteRetentionPeriod = softDeleteRetentionPeriod; + public ProtectedItem withSoftDeleteRetentionPeriodInDays(Integer softDeleteRetentionPeriodInDays) { + this.softDeleteRetentionPeriodInDays = softDeleteRetentionPeriodInDays; return this; } @@ -501,11 +506,23 @@ ProtectedItem withVaultId(String vaultId) { } /** - * Validates the instance. + * Get the sourceSideScanInfo property: Source side threat information. + * + * @return the sourceSideScanInfo value. + */ + public SourceSideScanInfo sourceSideScanInfo() { + return this.sourceSideScanInfo; + } + + /** + * Set the sourceSideScanInfo property: Source side threat information. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param sourceSideScanInfo the sourceSideScanInfo value to set. + * @return the ProtectedItem object itself. */ - public void validate() { + public ProtectedItem withSourceSideScanInfo(SourceSideScanInfo sourceSideScanInfo) { + this.sourceSideScanInfo = sourceSideScanInfo; + return this; } /** @@ -536,7 +553,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchiveEnabled", this.isArchiveEnabled); jsonWriter.writeStringField("policyName", this.policyName); - jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", this.softDeleteRetentionPeriod); + jsonWriter.writeNumberField("softDeleteRetentionPeriodInDays", this.softDeleteRetentionPeriodInDays); + jsonWriter.writeJsonField("sourceSideScanInfo", this.sourceSideScanInfo); return jsonWriter.writeEndObject(); } @@ -568,10 +586,10 @@ public static ProtectedItem fromJson(JsonReader jsonReader) throws IOException { return AzureFileshareProtectedItem.fromJson(readerToUse.reset()); } else if ("AzureIaaSVMProtectedItem".equals(discriminatorValue)) { return AzureIaaSvmProtectedItem.fromJsonKnownDiscriminator(readerToUse.reset()); - } else if ("Microsoft.ClassicCompute/virtualMachines".equals(discriminatorValue)) { - return AzureIaaSClassicComputeVMProtectedItem.fromJson(readerToUse.reset()); } else if ("Microsoft.Compute/virtualMachines".equals(discriminatorValue)) { return AzureIaaSComputeVMProtectedItem.fromJson(readerToUse.reset()); + } else if ("Microsoft.ClassicCompute/virtualMachines".equals(discriminatorValue)) { + return AzureIaaSClassicComputeVMProtectedItem.fromJson(readerToUse.reset()); } else if ("Microsoft.Sql/servers/databases".equals(discriminatorValue)) { return AzureSqlProtectedItem.fromJson(readerToUse.reset()); } else if ("AzureVmWorkloadProtectedItem".equals(discriminatorValue)) { @@ -584,6 +602,8 @@ public static ProtectedItem fromJson(JsonReader jsonReader) throws IOException { return AzureVmWorkloadSapHanaDBInstanceProtectedItem.fromJson(readerToUse.reset()); } else if ("AzureVmWorkloadSQLDatabase".equals(discriminatorValue)) { return AzureVmWorkloadSqlDatabaseProtectedItem.fromJson(readerToUse.reset()); + } else if ("AzureVmWorkloadSQLInstance".equals(discriminatorValue)) { + return AzureVmWorkloadSQLInstanceProtectedItem.fromJson(readerToUse.reset()); } else if ("DPMProtectedItem".equals(discriminatorValue)) { return DpmProtectedItem.fromJson(readerToUse.reset()); } else if ("GenericProtectedItem".equals(discriminatorValue)) { @@ -644,9 +664,11 @@ static ProtectedItem fromJsonKnownDiscriminator(JsonReader jsonReader) throws IO } else if ("policyName".equals(fieldName)) { deserializedProtectedItem.policyName = reader.getString(); } else if ("softDeleteRetentionPeriodInDays".equals(fieldName)) { - deserializedProtectedItem.softDeleteRetentionPeriod = reader.getNullable(JsonReader::getInt); + deserializedProtectedItem.softDeleteRetentionPeriodInDays = reader.getNullable(JsonReader::getInt); } else if ("vaultId".equals(fieldName)) { deserializedProtectedItem.vaultId = reader.getString(); + } else if ("sourceSideScanInfo".equals(fieldName)) { + deserializedProtectedItem.sourceSideScanInfo = SourceSideScanInfo.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemHealthStatus.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemHealthStatus.java index f595ef0ff161..efe151820ef8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemHealthStatus.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemHealthStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemOperationResults.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemOperationResults.java index e38f4060d207..b946541e97b1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemOperationResults.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemOperationResults.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -14,12 +14,12 @@ public interface ProtectedItemOperationResults { /** * Fetches the result of any operation on the backup item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param protectedItemName The name of the ProtectedItemResource. + * @param operationId The name of the ProtectedItemResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,12 +32,12 @@ Response getWithResponse(String vaultName, String resourc /** * Fetches the result of any operation on the backup item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param protectedItemName The name of the ProtectedItemResource. + * @param operationId The name of the ProtectedItemResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemOperationStatuses.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemOperationStatuses.java index de5c6e55e91e..067222e37c94 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemOperationStatuses.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemOperationStatuses.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -17,12 +17,12 @@ public interface ProtectedItemOperationStatuses { * operations * create jobs. This method returns the list of jobs associated with the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID represents the operation whose status needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param protectedItemName The name of the ProtectedItemResource. + * @param operationId The name of the ProtectedItemResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,12 +38,12 @@ Response getWithResponse(String vaultName, String resourceGroup * operations * create jobs. This method returns the list of jobs associated with the operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. - * @param protectedItemName Backup item name whose details are to be fetched. - * @param operationId OperationID represents the operation whose status needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param protectedItemName The name of the ProtectedItemResource. + * @param operationId The name of the ProtectedItemResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemResource.java index b7b1d287bb1f..bb6d77343172 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemResource.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectedItemResourceInner; import java.util.Map; @@ -35,11 +36,11 @@ public interface ProtectedItemResource { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the properties property: ProtectedItemResource properties. * - * @return the location value. + * @return the properties value. */ - String location(); + ProtectedItem properties(); /** * Gets the tags property: Resource tags. @@ -49,11 +50,11 @@ public interface ProtectedItemResource { Map tags(); /** - * Gets the properties property: ProtectedItemResource properties. + * Gets the location property: The geo-location where the resource lives. * - * @return the properties value. + * @return the location value. */ - ProtectedItem properties(); + String location(); /** * Gets the etag property: Optional ETag. @@ -62,6 +63,13 @@ public interface ProtectedItemResource { */ String etag(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the region of the resource. * @@ -93,8 +101,8 @@ public interface ProtectedItemResource { /** * The entirety of the ProtectedItemResource definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** @@ -104,28 +112,7 @@ interface DefinitionStages { /** * The first stage of the ProtectedItemResource definition. */ - interface Blank extends WithLocation { - } - - /** - * The stage of the ProtectedItemResource definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); + interface Blank extends WithParentResource { } /** @@ -135,10 +122,10 @@ interface WithParentResource { /** * Specifies vaultName, resourceGroupName, fabricName, containerName. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. - * @param containerName Container name associated with the backup item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @return the next definition stage. */ WithCreate withExistingProtectionContainer(String vaultName, String resourceGroupName, String fabricName, @@ -149,8 +136,8 @@ WithCreate withExistingProtectionContainer(String vaultName, String resourceGrou * The stage of the ProtectedItemResource definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithEtag { + interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, + DefinitionStages.WithProperties, DefinitionStages.WithEtag { /** * Executes the create request. * @@ -167,6 +154,27 @@ interface WithCreate ProtectedItemResource create(Context context); } + /** + * The stage of the ProtectedItemResource definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithCreate withRegion(String location); + } + /** * The stage of the ProtectedItemResource definition allowing to specify tags. */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemState.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemState.java index 7b4fa49a2a85..0dbbd72cf270 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemState.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItems.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItems.java index 13df4e5efa33..5539e2a0af82 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItems.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItems.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -16,10 +16,10 @@ public interface ProtectedItems { * operation, * call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param protectedItemName Backed up item name whose details are to be fetched. * @param filter OData filter options. * @param context The context to associate with this operation. @@ -36,10 +36,10 @@ Response getWithResponse(String vaultName, String resourc * operation, * call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param protectedItemName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -54,11 +54,11 @@ ProtectedItemResource get(String vaultName, String resourceGroupName, String fab * the * request, call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -73,11 +73,11 @@ Response deleteWithResponse(String vaultName, String resourceGroupName, St * the * request, call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainer.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainer.java index cc7336712b95..991ef271c1e6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainer.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -169,14 +169,6 @@ public ProtectionContainer withProtectableObjectType(String protectableObjectTyp return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -223,16 +215,16 @@ public static ProtectionContainer fromJson(JsonReader jsonReader) throws IOExcep return AzureBackupServerContainer.fromJson(readerToUse.reset()); } else if ("IaasVMContainer".equals(discriminatorValue)) { return IaaSvmContainer.fromJsonKnownDiscriminator(readerToUse.reset()); - } else if ("Microsoft.ClassicCompute/virtualMachines".equals(discriminatorValue)) { - return AzureIaaSClassicComputeVMContainer.fromJson(readerToUse.reset()); } else if ("Microsoft.Compute/virtualMachines".equals(discriminatorValue)) { return AzureIaaSComputeVMContainer.fromJson(readerToUse.reset()); + } else if ("Microsoft.ClassicCompute/virtualMachines".equals(discriminatorValue)) { + return AzureIaaSClassicComputeVMContainer.fromJson(readerToUse.reset()); } else if ("AzureWorkloadContainer".equals(discriminatorValue)) { return AzureWorkloadContainer.fromJsonKnownDiscriminator(readerToUse.reset()); - } else if ("SQLAGWorkLoadContainer".equals(discriminatorValue)) { - return AzureSqlagWorkloadContainerProtectionContainer.fromJson(readerToUse.reset()); } else if ("VMAppContainer".equals(discriminatorValue)) { return AzureVMAppContainerProtectionContainer.fromJson(readerToUse.reset()); + } else if ("SQLAGWorkLoadContainer".equals(discriminatorValue)) { + return AzureSqlagWorkloadContainerProtectionContainer.fromJson(readerToUse.reset()); } else if ("AzureSqlContainer".equals(discriminatorValue)) { return AzureSqlContainer.fromJson(readerToUse.reset()); } else if ("StorageContainer".equals(discriminatorValue)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerOperationResults.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerOperationResults.java index eb4d203b4479..c2a996f67867 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerOperationResults.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerOperationResults.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -14,11 +14,11 @@ public interface ProtectionContainerOperationResults { /** * Fetches the result of any operation on the container. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Container name whose information should be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param operationId The name of the ProtectionContainerResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -31,11 +31,11 @@ Response getWithResponse(String vaultName, String r /** * Fetches the result of any operation on the container. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. - * @param containerName Container name whose information should be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName backupFabrics. + * @param containerName The name of the ProtectionContainerResource. + * @param operationId The name of the ProtectionContainerResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerRefreshOperationResults.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerRefreshOperationResults.java index ba43da428c9c..0181c6298920 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerRefreshOperationResults.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerRefreshOperationResults.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,7 +15,7 @@ public interface ProtectionContainerRefreshOperationResults { * Provides the result of the refresh operation triggered by the BeginRefresh operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName Fabric name associated with the container. * @param operationId Operation ID associated with the operation whose result needs to be fetched. * @param context The context to associate with this operation. @@ -31,7 +31,7 @@ Response getWithResponse(String vaultName, String resourceGroupName, Strin * Provides the result of the refresh operation triggered by the BeginRefresh operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName Fabric name associated with the container. * @param operationId Operation ID associated with the operation whose result needs to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerResource.java index 8f7f4c99523f..863beff98e74 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerResource.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.http.rest.Response; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionContainerResourceInner; import java.util.Map; @@ -36,11 +37,11 @@ public interface ProtectionContainerResource { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the properties property: ProtectionContainerResource properties. * - * @return the location value. + * @return the properties value. */ - String location(); + ProtectionContainer properties(); /** * Gets the tags property: Resource tags. @@ -50,11 +51,11 @@ public interface ProtectionContainerResource { Map tags(); /** - * Gets the properties property: ProtectionContainerResource properties. + * Gets the location property: The geo-location where the resource lives. * - * @return the properties value. + * @return the location value. */ - ProtectionContainer properties(); + String location(); /** * Gets the etag property: Optional ETag. @@ -63,6 +64,13 @@ public interface ProtectionContainerResource { */ String etag(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the region of the resource. * @@ -95,8 +103,8 @@ public interface ProtectionContainerResource { /** * The entirety of the ProtectionContainerResource definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** @@ -106,28 +114,7 @@ interface DefinitionStages { /** * The first stage of the ProtectionContainerResource definition. */ - interface Blank extends WithLocation { - } - - /** - * The stage of the ProtectionContainerResource definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); + interface Blank extends WithParentResource { } /** @@ -137,9 +124,9 @@ interface WithParentResource { /** * Specifies vaultName, resourceGroupName, fabricName. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the container. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @return the next definition stage. */ WithCreate withExistingBackupFabric(String vaultName, String resourceGroupName, String fabricName); @@ -149,8 +136,8 @@ interface WithParentResource { * The stage of the ProtectionContainerResource definition which contains all the minimum required properties * for the resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithEtag { + interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, + DefinitionStages.WithProperties, DefinitionStages.WithEtag { /** * Executes the create request. * @@ -167,6 +154,27 @@ interface WithCreate ProtectionContainerResource create(Context context); } + /** + * The stage of the ProtectionContainerResource definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithCreate withRegion(String location); + } + /** * The stage of the ProtectionContainerResource definition allowing to specify tags. */ @@ -294,8 +302,6 @@ interface WithEtag { ProtectionContainerResource refresh(Context context); /** - * Inquires all the protectable items under the given container. - * * This is an async operation and the results should be tracked using location header or Azure-async-url. * * @param filter OData filter options. @@ -308,8 +314,6 @@ interface WithEtag { Response inquireWithResponse(String filter, Context context); /** - * Inquires all the protectable items under the given container. - * * This is an async operation and the results should be tracked using location header or Azure-async-url. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainers.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainers.java index dc707abf0ede..54a3294c94e4 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainers.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -14,9 +14,9 @@ public interface ProtectionContainers { /** * Gets details of the specific container registered to your Recovery Services Vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @param containerName Name of the container whose details need to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,9 +30,9 @@ Response getWithResponse(String vaultName, String r /** * Gets details of the specific container registered to your Recovery Services Vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -47,10 +47,10 @@ ProtectionContainerResource get(String vaultName, String resourceGroupName, Stri * determine * whether the backend service has finished processing the request, call Get Container Operation Result API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. - * @param containerName Name of the container which needs to be unregistered from the Recovery Services Vault. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -65,10 +65,10 @@ Response unregisterWithResponse(String vaultName, String resourceGroupName * determine * whether the backend service has finished processing the request, call Get Container Operation Result API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Name of the fabric where the container belongs. - * @param containerName Name of the container which needs to be unregistered from the Recovery Services Vault. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -76,14 +76,12 @@ Response unregisterWithResponse(String vaultName, String resourceGroupName void unregister(String vaultName, String resourceGroupName, String fabricName, String containerName); /** - * Inquires all the protectable items under the given container. - * * This is an async operation and the results should be tracked using location header or Azure-async-url. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric Name associated with the container. - * @param containerName Name of the container in which inquiry needs to be triggered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -95,14 +93,12 @@ Response inquireWithResponse(String vaultName, String resourceGroupName, S String containerName, String filter, Context context); /** - * Inquires all the protectable items under the given container. - * * This is an async operation and the results should be tracked using location header or Azure-async-url. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric Name associated with the container. - * @param containerName Name of the container in which inquiry needs to be triggered. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -114,7 +110,7 @@ Response inquireWithResponse(String vaultName, String resourceGroupName, S * asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName Fabric name associated the container. * @param filter OData filter options. * @param context The context to associate with this operation. @@ -131,7 +127,7 @@ Response refreshWithResponse(String vaultName, String resourceGroupName, S * asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param fabricName Fabric name associated the container. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntent.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntent.java index 1f72fbf31722..8aa75882bbea 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntent.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntent.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -161,14 +161,6 @@ public ProtectionIntent withProtectionState(ProtectionStatus protectionState) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntentItemType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntentItemType.java index 8eca48368539..2a6e89086b64 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntentItemType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntentItemType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntentResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntentResource.java index 35517c4ffcd1..f955595c72d0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntentResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntentResource.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionIntentResourceInner; import java.util.Map; @@ -35,11 +36,11 @@ public interface ProtectionIntentResource { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the properties property: ProtectionIntentResource properties. * - * @return the location value. + * @return the properties value. */ - String location(); + ProtectionIntent properties(); /** * Gets the tags property: Resource tags. @@ -49,11 +50,11 @@ public interface ProtectionIntentResource { Map tags(); /** - * Gets the properties property: ProtectionIntentResource properties. + * Gets the location property: The geo-location where the resource lives. * - * @return the properties value. + * @return the location value. */ - ProtectionIntent properties(); + String location(); /** * Gets the etag property: Optional ETag. @@ -62,6 +63,13 @@ public interface ProtectionIntentResource { */ String etag(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the region of the resource. * @@ -94,8 +102,8 @@ public interface ProtectionIntentResource { /** * The entirety of the ProtectionIntentResource definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** @@ -105,28 +113,7 @@ interface DefinitionStages { /** * The first stage of the ProtectionIntentResource definition. */ - interface Blank extends WithLocation { - } - - /** - * The stage of the ProtectionIntentResource definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); + interface Blank extends WithParentResource { } /** @@ -136,9 +123,9 @@ interface WithParentResource { /** * Specifies vaultName, resourceGroupName, fabricName. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backup item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @return the next definition stage. */ WithCreate withExistingBackupFabric(String vaultName, String resourceGroupName, String fabricName); @@ -148,8 +135,8 @@ interface WithParentResource { * The stage of the ProtectionIntentResource definition which contains all the minimum required properties for * the resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithEtag { + interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, + DefinitionStages.WithProperties, DefinitionStages.WithEtag { /** * Executes the create request. * @@ -166,6 +153,27 @@ interface WithCreate ProtectionIntentResource create(Context context); } + /** + * The stage of the ProtectionIntentResource definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithCreate withRegion(String location); + } + /** * The stage of the ProtectionIntentResource definition allowing to specify tags. */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntents.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntents.java index 7012d0c8cf70..f65e632f3b7b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntents.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntents.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -11,46 +11,14 @@ * Resource collection API of ProtectionIntents. */ public interface ProtectionIntents { - /** - * It will validate followings - * 1. Vault capacity - * 2. VM is already protected - * 3. Any VM related configuration passed in properties. - * - * @param azureRegion Azure region to hit Api. - * @param parameters Enable backup validation request on Virtual Machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response contract for enable backup validation request along with {@link Response}. - */ - Response validateWithResponse(String azureRegion, - PreValidateEnableBackupRequest parameters, Context context); - - /** - * It will validate followings - * 1. Vault capacity - * 2. VM is already protected - * 3. Any VM related configuration passed in properties. - * - * @param azureRegion Azure region to hit Api. - * @param parameters Enable backup validation request on Virtual Machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response contract for enable backup validation request. - */ - PreValidateEnableBackupResponse validate(String azureRegion, PreValidateEnableBackupRequest parameters); - /** * Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of * the operation, * call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @param intentObjectName Backed up item name whose details are to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,9 +34,9 @@ Response getWithResponse(String vaultName, String reso * the operation, * call the GetItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. * @param intentObjectName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -81,10 +49,10 @@ ProtectionIntentResource get(String vaultName, String resourceGroupName, String /** * Used to remove intent from an item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the intent. - * @param intentObjectName Intent to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param intentObjectName Backed up item name whose details are to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -97,16 +65,48 @@ Response deleteWithResponse(String vaultName, String resourceGroupName, St /** * Used to remove intent from an item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the intent. - * @param intentObjectName Intent to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param intentObjectName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String vaultName, String resourceGroupName, String fabricName, String intentObjectName); + /** + * It will validate followings + * 1. Vault capacity + * 2. VM is already protected + * 3. Any VM related configuration passed in properties. + * + * @param azureRegion Azure region to hit Api. + * @param parameters Enable backup validation request on Virtual Machine. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response contract for enable backup validation request along with {@link Response}. + */ + Response validateWithResponse(String azureRegion, + PreValidateEnableBackupRequest parameters, Context context); + + /** + * It will validate followings + * 1. Vault capacity + * 2. VM is already protected + * 3. Any VM related configuration passed in properties. + * + * @param azureRegion Azure region to hit Api. + * @param parameters Enable backup validation request on Virtual Machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response contract for enable backup validation request. + */ + PreValidateEnableBackupResponse validate(String azureRegion, PreValidateEnableBackupRequest parameters); + /** * Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of * the operation, diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionLevel.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionLevel.java new file mode 100644 index 000000000000..4cf97e7f8ff5 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionLevel.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Protection type in case protected as part of a parent. + */ +public final class ProtectionLevel extends ExpandableStringEnum { + /** + * Static value Database for ProtectionLevel. + */ + public static final ProtectionLevel DATABASE = fromString("Database"); + + /** + * Static value DatabaseUnderInstance for ProtectionLevel. + */ + public static final ProtectionLevel DATABASE_UNDER_INSTANCE = fromString("DatabaseUnderInstance"); + + /** + * Creates a new instance of ProtectionLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProtectionLevel() { + } + + /** + * Creates or finds a ProtectionLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProtectionLevel. + */ + public static ProtectionLevel fromString(String name) { + return fromString(name, ProtectionLevel.class); + } + + /** + * Gets known ProtectionLevel values. + * + * @return known ProtectionLevel values. + */ + public static Collection values() { + return values(ProtectionLevel.class); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicies.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicies.java index c0d2db295faa..dcab1da26e54 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicies.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicies.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,8 +15,8 @@ public interface ProtectionPolicies { * Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous * operation. Status of the operation can be fetched using GetPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName Backup policy information to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -31,8 +31,8 @@ Response getWithResponse(String vaultName, String reso * Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous * operation. Status of the operation can be fetched using GetPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param policyName Backup policy information to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -46,9 +46,9 @@ Response getWithResponse(String vaultName, String reso * the * operation can be fetched using GetProtectionPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -60,9 +60,9 @@ Response getWithResponse(String vaultName, String reso * the * operation can be fetched using GetProtectionPolicyOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy to be deleted. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName Backup policy information to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicy.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicy.java index 6964bf54410b..cba356eeb3a0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicy.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -89,14 +89,6 @@ public ProtectionPolicy withResourceGuardOperationRequests(List resource return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyOperationResults.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyOperationResults.java index 0dc037ffe6ec..e8b40c23dd14 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyOperationResults.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyOperationResults.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -14,10 +14,10 @@ public interface ProtectionPolicyOperationResults { /** * Provides the result of an operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's result needs to be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the ProtectionPolicyResource. + * @param operationId The name of the ProtectionPolicyResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -30,10 +30,10 @@ Response getWithResponse(String vaultName, String reso /** * Provides the result of an operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's result needs to be fetched. - * @param operationId Operation ID which represents the operation whose result needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the ProtectionPolicyResource. + * @param operationId The name of the ProtectionPolicyResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyOperationStatuses.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyOperationStatuses.java index bc7b543a1b44..dfa1c8c3dfbd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyOperationStatuses.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyOperationStatuses.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -17,10 +17,10 @@ public interface ProtectionPolicyOperationStatuses { * operations * create jobs. This method returns the list of jobs associated with operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's status needs to be fetched. - * @param operationId Operation ID which represents an operation whose status needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the ProtectionPolicyResource. + * @param operationId The name of the ProtectionPolicyResource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,10 +36,10 @@ Response getWithResponse(String vaultName, String resourceGroup * operations * create jobs. This method returns the list of jobs associated with operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param policyName Backup policy name whose operation's status needs to be fetched. - * @param operationId Operation ID which represents an operation whose status needs to be fetched. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param policyName The name of the ProtectionPolicyResource. + * @param operationId The name of the ProtectionPolicyResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyResource.java index a0cc6360407b..708d1c5231ee 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyResource.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionPolicyResourceInner; import java.util.Map; @@ -35,11 +36,11 @@ public interface ProtectionPolicyResource { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the properties property: ProtectionPolicyResource properties. * - * @return the location value. + * @return the properties value. */ - String location(); + ProtectionPolicy properties(); /** * Gets the tags property: Resource tags. @@ -49,11 +50,11 @@ public interface ProtectionPolicyResource { Map tags(); /** - * Gets the properties property: ProtectionPolicyResource properties. + * Gets the location property: The geo-location where the resource lives. * - * @return the properties value. + * @return the location value. */ - ProtectionPolicy properties(); + String location(); /** * Gets the etag property: Optional ETag. @@ -62,6 +63,13 @@ public interface ProtectionPolicyResource { */ String etag(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the region of the resource. * @@ -94,8 +102,8 @@ public interface ProtectionPolicyResource { /** * The entirety of the ProtectionPolicyResource definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** @@ -105,28 +113,7 @@ interface DefinitionStages { /** * The first stage of the ProtectionPolicyResource definition. */ - interface Blank extends WithLocation { - } - - /** - * The stage of the ProtectionPolicyResource definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); + interface Blank extends WithParentResource { } /** @@ -136,8 +123,8 @@ interface WithParentResource { /** * Specifies vaultName, resourceGroupName. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingVault(String vaultName, String resourceGroupName); @@ -147,8 +134,8 @@ interface WithParentResource { * The stage of the ProtectionPolicyResource definition which contains all the minimum required properties for * the resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithEtag { + interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, + DefinitionStages.WithProperties, DefinitionStages.WithEtag { /** * Executes the create request. * @@ -165,6 +152,27 @@ interface WithCreate ProtectionPolicyResource create(Context context); } + /** + * The stage of the ProtectionPolicyResource definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithCreate withRegion(String location); + } + /** * The stage of the ProtectionPolicyResource definition allowing to specify tags. */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionState.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionState.java index 5de6a9996c53..57a0b943a069 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionState.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionStatus.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionStatus.java index f292c0523664..9d2b65ff8cca 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionStatus.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProvisioningState.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProvisioningState.java index 13915b38c12a..6e947c53eee1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProvisioningState.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryMode.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryMode.java index 804c6dfc00c2..cd6307d66cda 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryMode.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPoint.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPoint.java index c28ad671fdf1..91d72bef61e2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPoint.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * Base class for backup copies. Workload-specific backup copies are derived from this class. @@ -22,10 +23,20 @@ public class RecoveryPoint implements JsonSerializable { */ private String objectType = "RecoveryPoint"; + /* + * Threat status of the recovery point + */ + private ThreatStatus threatStatus; + + /* + * Recovery point threat information. + */ + private List threatInfo; + /** * Creates an instance of RecoveryPoint class. */ - public RecoveryPoint() { + protected RecoveryPoint() { } /** @@ -39,11 +50,43 @@ public String objectType() { } /** - * Validates the instance. + * Get the threatStatus property: Threat status of the recovery point. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the threatStatus value. */ - public void validate() { + public ThreatStatus threatStatus() { + return this.threatStatus; + } + + /** + * Set the threatStatus property: Threat status of the recovery point. + * + * @param threatStatus the threatStatus value to set. + * @return the RecoveryPoint object itself. + */ + RecoveryPoint withThreatStatus(ThreatStatus threatStatus) { + this.threatStatus = threatStatus; + return this; + } + + /** + * Get the threatInfo property: Recovery point threat information. + * + * @return the threatInfo value. + */ + public List threatInfo() { + return this.threatInfo; + } + + /** + * Set the threatInfo property: Recovery point threat information. + * + * @param threatInfo the threatInfo value to set. + * @return the RecoveryPoint object itself. + */ + RecoveryPoint withThreatInfo(List threatInfo) { + this.threatInfo = threatInfo; + return this; } /** @@ -53,6 +96,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("objectType", this.objectType); + jsonWriter.writeStringField("threatStatus", this.threatStatus == null ? null : this.threatStatus.toString()); + jsonWriter.writeArrayField("threatInfo", this.threatInfo, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -84,12 +129,6 @@ public static RecoveryPoint fromJson(JsonReader jsonReader) throws IOException { return AzureFileShareRecoveryPoint.fromJson(readerToUse.reset()); } else if ("AzureWorkloadRecoveryPoint".equals(discriminatorValue)) { return AzureWorkloadRecoveryPoint.fromJsonKnownDiscriminator(readerToUse.reset()); - } else if ("AzureWorkloadPointInTimeRecoveryPoint".equals(discriminatorValue)) { - return AzureWorkloadPointInTimeRecoveryPoint.fromJsonKnownDiscriminator(readerToUse.reset()); - } else if ("AzureWorkloadSAPHanaPointInTimeRecoveryPoint".equals(discriminatorValue)) { - return AzureWorkloadSapHanaPointInTimeRecoveryPoint.fromJson(readerToUse.reset()); - } else if ("AzureWorkloadSAPAsePointInTimeRecoveryPoint".equals(discriminatorValue)) { - return AzureWorkloadSapAsePointInTimeRecoveryPoint.fromJson(readerToUse.reset()); } else if ("AzureWorkloadSAPHanaRecoveryPoint".equals(discriminatorValue)) { return AzureWorkloadSapHanaRecoveryPoint.fromJson(readerToUse.reset()); } else if ("AzureWorkloadSAPAseRecoveryPoint".equals(discriminatorValue)) { @@ -98,6 +137,12 @@ public static RecoveryPoint fromJson(JsonReader jsonReader) throws IOException { return AzureWorkloadSqlRecoveryPoint.fromJsonKnownDiscriminator(readerToUse.reset()); } else if ("AzureWorkloadSQLPointInTimeRecoveryPoint".equals(discriminatorValue)) { return AzureWorkloadSqlPointInTimeRecoveryPoint.fromJson(readerToUse.reset()); + } else if ("AzureWorkloadPointInTimeRecoveryPoint".equals(discriminatorValue)) { + return AzureWorkloadPointInTimeRecoveryPoint.fromJsonKnownDiscriminator(readerToUse.reset()); + } else if ("AzureWorkloadSAPHanaPointInTimeRecoveryPoint".equals(discriminatorValue)) { + return AzureWorkloadSapHanaPointInTimeRecoveryPoint.fromJson(readerToUse.reset()); + } else if ("AzureWorkloadSAPAsePointInTimeRecoveryPoint".equals(discriminatorValue)) { + return AzureWorkloadSapAsePointInTimeRecoveryPoint.fromJson(readerToUse.reset()); } else if ("GenericRecoveryPoint".equals(discriminatorValue)) { return GenericRecoveryPoint.fromJson(readerToUse.reset()); } else if ("IaasVMRecoveryPoint".equals(discriminatorValue)) { @@ -118,6 +163,11 @@ static RecoveryPoint fromJsonKnownDiscriminator(JsonReader jsonReader) throws IO if ("objectType".equals(fieldName)) { deserializedRecoveryPoint.objectType = reader.getString(); + } else if ("threatStatus".equals(fieldName)) { + deserializedRecoveryPoint.threatStatus = ThreatStatus.fromString(reader.getString()); + } else if ("threatInfo".equals(fieldName)) { + List threatInfo = reader.readArray(reader1 -> ThreatInfo.fromJson(reader1)); + deserializedRecoveryPoint.threatInfo = threatInfo; } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointDiskConfiguration.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointDiskConfiguration.java index caddfde11ede..63429cea0e5f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointDiskConfiguration.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointDiskConfiguration.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Disk configuration. */ -@Fluent +@Immutable public final class RecoveryPointDiskConfiguration implements JsonSerializable { /* * Number of disks included in backup @@ -40,7 +40,7 @@ public final class RecoveryPointDiskConfiguration implements JsonSerializable includedDiskList() { return this.includedDiskList; } - /** - * Set the includedDiskList property: Information of disks included in backup. - * - * @param includedDiskList the includedDiskList value to set. - * @return the RecoveryPointDiskConfiguration object itself. - */ - public RecoveryPointDiskConfiguration withIncludedDiskList(List includedDiskList) { - this.includedDiskList = includedDiskList; - return this; - } - /** * Get the excludedDiskList property: Information of disks excluded from backup. * @@ -112,31 +79,6 @@ public List excludedDiskList() { return this.excludedDiskList; } - /** - * Set the excludedDiskList property: Information of disks excluded from backup. - * - * @param excludedDiskList the excludedDiskList value to set. - * @return the RecoveryPointDiskConfiguration object itself. - */ - public RecoveryPointDiskConfiguration withExcludedDiskList(List excludedDiskList) { - this.excludedDiskList = excludedDiskList; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (includedDiskList() != null) { - includedDiskList().forEach(e -> e.validate()); - } - if (excludedDiskList() != null) { - excludedDiskList().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointMoveReadinessInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointMoveReadinessInfo.java index 6a34c5d5ff0d..d7dc3f23341d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointMoveReadinessInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointMoveReadinessInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The RecoveryPointMoveReadinessInfo model. */ -@Fluent +@Immutable public final class RecoveryPointMoveReadinessInfo implements JsonSerializable { /* * The isReadyForMove property. @@ -29,7 +29,7 @@ public final class RecoveryPointMoveReadinessInfo implements JsonSerializable { /* * Expiry time of Recovery Point in UTC. @@ -34,7 +34,7 @@ public final class RecoveryPointProperties implements JsonSerializable tags(); /** - * Gets the properties property: RecoveryPointResource properties. + * Gets the location property: The geo-location where the resource lives. * - * @return the properties value. + * @return the location value. */ - RecoveryPoint properties(); + String location(); /** * Gets the etag property: Optional ETag. @@ -60,6 +61,13 @@ public interface RecoveryPointResource { */ String etag(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.recoveryservicesbackup.fluent.models.RecoveryPointResourceInner object. * diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierInformation.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierInformation.java index cefb731db33a..56dd39e9b6c3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierInformation.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierInformation.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Recovery point tier information. */ -@Fluent +@Immutable public class RecoveryPointTierInformation implements JsonSerializable { /* * Recovery point tier type. @@ -35,7 +35,7 @@ public class RecoveryPointTierInformation implements JsonSerializable extendedInfo() { * @param extendedInfo the extendedInfo value to set. * @return the RecoveryPointTierInformation object itself. */ - public RecoveryPointTierInformation withExtendedInfo(Map extendedInfo) { + RecoveryPointTierInformation withExtendedInfo(Map extendedInfo) { this.extendedInfo = extendedInfo; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierInformationV2.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierInformationV2.java index d80f9e112bb4..0a522f634905 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierInformationV2.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierInformationV2.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -14,48 +14,57 @@ /** * RecoveryPoint Tier Information V2. */ -@Fluent +@Immutable public final class RecoveryPointTierInformationV2 extends RecoveryPointTierInformation { - /** - * Creates an instance of RecoveryPointTierInformationV2 class. + /* + * Recovery point tier type. */ - public RecoveryPointTierInformationV2() { - } + private RecoveryPointTierType type; + + /* + * Recovery point tier status. + */ + private RecoveryPointTierStatus status; + + /* + * Recovery point tier status. + */ + private Map extendedInfo; /** - * {@inheritDoc} + * Creates an instance of RecoveryPointTierInformationV2 class. */ - @Override - public RecoveryPointTierInformationV2 withType(RecoveryPointTierType type) { - super.withType(type); - return this; + private RecoveryPointTierInformationV2() { } /** - * {@inheritDoc} + * Get the type property: Recovery point tier type. + * + * @return the type value. */ @Override - public RecoveryPointTierInformationV2 withStatus(RecoveryPointTierStatus status) { - super.withStatus(status); - return this; + public RecoveryPointTierType type() { + return this.type; } /** - * {@inheritDoc} + * Get the status property: Recovery point tier status. + * + * @return the status value. */ @Override - public RecoveryPointTierInformationV2 withExtendedInfo(Map extendedInfo) { - super.withExtendedInfo(extendedInfo); - return this; + public RecoveryPointTierStatus status() { + return this.status; } /** - * Validates the instance. + * Get the extendedInfo property: Recovery point tier status. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the extendedInfo value. */ @Override - public void validate() { + public Map extendedInfo() { + return this.extendedInfo; } /** @@ -64,9 +73,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", type() == null ? null : type().toString()); - jsonWriter.writeStringField("status", status() == null ? null : status().toString()); jsonWriter.writeMapField("extendedInfo", extendedInfo(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); return jsonWriter.writeEndObject(); } @@ -86,15 +95,15 @@ public static RecoveryPointTierInformationV2 fromJson(JsonReader jsonReader) thr String fieldName = reader.getFieldName(); reader.nextToken(); - if ("type".equals(fieldName)) { - deserializedRecoveryPointTierInformationV2 - .withType(RecoveryPointTierType.fromString(reader.getString())); - } else if ("status".equals(fieldName)) { - deserializedRecoveryPointTierInformationV2 - .withStatus(RecoveryPointTierStatus.fromString(reader.getString())); - } else if ("extendedInfo".equals(fieldName)) { + if ("extendedInfo".equals(fieldName)) { Map extendedInfo = reader.readMap(reader1 -> reader1.getString()); - deserializedRecoveryPointTierInformationV2.withExtendedInfo(extendedInfo); + deserializedRecoveryPointTierInformationV2.extendedInfo = extendedInfo; + } else if ("type".equals(fieldName)) { + deserializedRecoveryPointTierInformationV2.type + = RecoveryPointTierType.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedRecoveryPointTierInformationV2.status + = RecoveryPointTierStatus.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierStatus.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierStatus.java index 4b65796db8d0..5eb3c87cef81 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierStatus.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierStatus.java @@ -1,71 +1,66 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + /** * Recovery point tier status. */ -public enum RecoveryPointTierStatus { +public final class RecoveryPointTierStatus extends ExpandableStringEnum { /** - * Enum value Invalid. + * Static value Invalid for RecoveryPointTierStatus. */ - INVALID("Invalid"), + public static final RecoveryPointTierStatus INVALID = fromString("Invalid"); /** - * Enum value Valid. + * Static value Valid for RecoveryPointTierStatus. */ - VALID("Valid"), + public static final RecoveryPointTierStatus VALID = fromString("Valid"); /** - * Enum value Disabled. + * Static value Disabled for RecoveryPointTierStatus. */ - DISABLED("Disabled"), + public static final RecoveryPointTierStatus DISABLED = fromString("Disabled"); /** - * Enum value Deleted. + * Static value Deleted for RecoveryPointTierStatus. */ - DELETED("Deleted"), + public static final RecoveryPointTierStatus DELETED = fromString("Deleted"); /** - * Enum value Rehydrated. + * Static value Rehydrated for RecoveryPointTierStatus. */ - REHYDRATED("Rehydrated"); + public static final RecoveryPointTierStatus REHYDRATED = fromString("Rehydrated"); /** - * The actual serialized value for a RecoveryPointTierStatus instance. + * Creates a new instance of RecoveryPointTierStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. */ - private final String value; - - RecoveryPointTierStatus(String value) { - this.value = value; + @Deprecated + public RecoveryPointTierStatus() { } /** - * Parses a serialized value to a RecoveryPointTierStatus instance. + * Creates or finds a RecoveryPointTierStatus from its string representation. * - * @param value the serialized value to parse. - * @return the parsed RecoveryPointTierStatus object, or null if unable to parse. + * @param name a name to look for. + * @return the corresponding RecoveryPointTierStatus. */ - public static RecoveryPointTierStatus fromString(String value) { - if (value == null) { - return null; - } - RecoveryPointTierStatus[] items = RecoveryPointTierStatus.values(); - for (RecoveryPointTierStatus item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static RecoveryPointTierStatus fromString(String name) { + return fromString(name, RecoveryPointTierStatus.class); } /** - * {@inheritDoc} + * Gets known RecoveryPointTierStatus values. + * + * @return known RecoveryPointTierStatus values. */ - @Override - public String toString() { - return this.value; + public static Collection values() { + return values(RecoveryPointTierStatus.class); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierType.java index 5c38ce9f7c44..1eace244fafb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPoints.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPoints.java index 7632ac56f3b7..352b9304a644 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPoints.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPoints.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -12,14 +12,53 @@ * Resource collection API of RecoveryPoints. */ public interface RecoveryPoints { + /** + * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous + * operation. + * To know the status of the operation, call the GetProtectedItemOperationResult API. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return base class for backup copies along with {@link Response}. + */ + Response getWithResponse(String vaultName, String resourceGroupName, String fabricName, + String containerName, String protectedItemName, String recoveryPointId, Context context); + + /** + * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous + * operation. + * To know the status of the operation, call the GetProtectedItemOperationResult API. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return base class for backup copies. + */ + RecoveryPointResource get(String vaultName, String resourceGroupName, String fabricName, String containerName, + String protectedItemName, String recoveryPointId); + /** * Lists the backup copies for the backed up item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item whose backup copies are to be fetched. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -31,11 +70,11 @@ PagedIterable list(String vaultName, String resourceGroup /** * Lists the backup copies for the backed up item. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up item. - * @param containerName Container name associated with the backed up item. - * @param protectedItemName Backed up item whose backup copies are to be fetched. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param filter OData filter options. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,41 +86,40 @@ PagedIterable list(String vaultName, String resourceGroup String containerName, String protectedItemName, String filter, Context context); /** - * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous - * operation. - * To know the status of the operation, call the GetProtectedItemOperationResult API. + * UpdateRecoveryPoint to update recovery point for given RecoveryPointID. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with backed up item. - * @param containerName Container name associated with backed up item. - * @param protectedItemName Backed up item name whose backup data needs to be fetched. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the VaultResource. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. + * @param parameters Request body for operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base class for backup copies along with {@link Response}. */ - Response getWithResponse(String vaultName, String resourceGroupName, String fabricName, - String containerName, String protectedItemName, String recoveryPointId, Context context); + Response updateWithResponse(String resourceGroupName, String vaultName, String fabricName, + String containerName, String protectedItemName, String recoveryPointId, UpdateRecoveryPointRequest parameters, + Context context); /** - * Provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous - * operation. - * To know the status of the operation, call the GetProtectedItemOperationResult API. + * UpdateRecoveryPoint to update recovery point for given RecoveryPointID. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with backed up item. - * @param containerName Container name associated with backed up item. - * @param protectedItemName Backed up item name whose backup data needs to be fetched. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the VaultResource. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. + * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return base class for backup copies. */ - RecoveryPointResource get(String vaultName, String resourceGroupName, String fabricName, String containerName, - String protectedItemName, String recoveryPointId); + RecoveryPointResource update(String resourceGroupName, String vaultName, String fabricName, String containerName, + String protectedItemName, String recoveryPointId, UpdateRecoveryPointRequest parameters); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointsRecommendedForMoves.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointsRecommendedForMoves.java index 9b2f39a08446..89cd1a1a39d5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointsRecommendedForMoves.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointsRecommendedForMoves.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -14,11 +14,11 @@ public interface RecoveryPointsRecommendedForMoves { /** * Lists the recovery points recommended for move to another tier. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters List Recovery points Recommended for Move Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -31,11 +31,11 @@ PagedIterable list(String vaultName, String resourceGroup /** * Lists the recovery points recommended for move to another tier. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. * @param parameters List Recovery points Recommended for Move Request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryType.java index 4f5a2a9aa5bc..e02b18ba4e76 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RehydrationPriority.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RehydrationPriority.java index 7d5450d1c5db..e07ffa8e4165 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RehydrationPriority.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RehydrationPriority.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardOperationDetail.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardOperationDetail.java index af7cf150bde9..03d18fad4cdd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardOperationDetail.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardOperationDetail.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -72,14 +72,6 @@ public ResourceGuardOperationDetail withDefaultResourceRequest(String defaultRes return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxies.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxies.java deleted file mode 100644 index 4143c9197eb7..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxies.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of ResourceGuardProxies. - */ -public interface ResourceGuardProxies { - /** - * List the ResourceGuardProxies under vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. - */ - PagedIterable get(String vaultName, String resourceGroupName); - - /** - * List the ResourceGuardProxies under vault. - * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. - */ - PagedIterable get(String vaultName, String resourceGroupName, Context context); -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyBase.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyBase.java index 7a05fd9a2e20..e5e98dc9f82f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyBase.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyBase.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -125,24 +124,6 @@ public ResourceGuardProxyBase withDescription(String description) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (resourceGuardResourceId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property resourceGuardResourceId in model ResourceGuardProxyBase")); - } - if (resourceGuardOperationDetails() != null) { - resourceGuardOperationDetails().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ResourceGuardProxyBase.class); - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyBaseResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyBaseResource.java index 9a0b067a2bd6..7d9cdcf4716d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyBaseResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyBaseResource.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.http.rest.Response; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ResourceGuardProxyBaseResourceInner; import java.util.Map; @@ -36,11 +37,11 @@ public interface ResourceGuardProxyBaseResource { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the properties property: ResourceGuardProxyBaseResource properties. * - * @return the location value. + * @return the properties value. */ - String location(); + ResourceGuardProxyBase properties(); /** * Gets the tags property: Resource tags. @@ -50,11 +51,11 @@ public interface ResourceGuardProxyBaseResource { Map tags(); /** - * Gets the properties property: ResourceGuardProxyBaseResource properties. + * Gets the location property: The geo-location where the resource lives. * - * @return the properties value. + * @return the location value. */ - ResourceGuardProxyBase properties(); + String location(); /** * Gets the etag property: Optional ETag. @@ -63,6 +64,13 @@ public interface ResourceGuardProxyBaseResource { */ String etag(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the region of the resource. * @@ -95,8 +103,8 @@ public interface ResourceGuardProxyBaseResource { /** * The entirety of the ResourceGuardProxyBaseResource definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** @@ -106,28 +114,7 @@ interface DefinitionStages { /** * The first stage of the ResourceGuardProxyBaseResource definition. */ - interface Blank extends WithLocation { - } - - /** - * The stage of the ResourceGuardProxyBaseResource definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); + interface Blank extends WithParentResource { } /** @@ -137,8 +124,8 @@ interface WithParentResource { /** * Specifies vaultName, resourceGroupName. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingVault(String vaultName, String resourceGroupName); @@ -148,8 +135,8 @@ interface WithParentResource { * The stage of the ResourceGuardProxyBaseResource definition which contains all the minimum required properties * for the resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithEtag { + interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, + DefinitionStages.WithProperties, DefinitionStages.WithEtag { /** * Executes the create request. * @@ -166,6 +153,27 @@ interface WithCreate ResourceGuardProxyBaseResource create(Context context); } + /** + * The stage of the ResourceGuardProxyBaseResource definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithCreate withRegion(String location); + } + /** * The stage of the ResourceGuardProxyBaseResource definition allowing to specify tags. */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyOperations.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyOperations.java index f800769c88dd..c4b53d2f02bb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyOperations.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyOperations.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; @@ -14,8 +15,8 @@ public interface ResourceGuardProxyOperations { /** * Returns ResourceGuardProxy under vault and with the name referenced in request. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -29,8 +30,8 @@ Response getWithResponse(String vaultName, Strin /** * Returns ResourceGuardProxy under vault and with the name referenced in request. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -42,8 +43,8 @@ Response getWithResponse(String vaultName, Strin /** * Delete ResourceGuardProxy under vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,8 +58,8 @@ Response deleteWithResponse(String vaultName, String resourceGroupName, St /** * Delete ResourceGuardProxy under vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -69,8 +70,8 @@ Response deleteWithResponse(String vaultName, String resourceGroupName, St /** * Secures delete ResourceGuardProxy operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param parameters Request body for operation. * @param context The context to associate with this operation. @@ -85,8 +86,8 @@ Response unlockDeleteWithResponse(String vaultName, String /** * Secures delete ResourceGuardProxy operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceGuardProxyName The resourceGuardProxyName parameter. * @param parameters Request body for operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -97,6 +98,31 @@ Response unlockDeleteWithResponse(String vaultName, String UnlockDeleteResponse unlockDelete(String vaultName, String resourceGroupName, String resourceGuardProxyName, UnlockDeleteRequest parameters); + /** + * List the ResourceGuardProxies under vault. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String vaultName, String resourceGroupName); + + /** + * List the ResourceGuardProxies under vault. + * + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String vaultName, String resourceGroupName, Context context); + /** * Returns ResourceGuardProxy under vault and with the name referenced in request. * diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceHealthDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceHealthDetails.java index 688e9e18f208..64e78a9f88ad 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceHealthDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceHealthDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -123,14 +123,6 @@ ResourceHealthDetails withRecommendations(List recommendations) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceHealthStatus.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceHealthStatus.java index 9b61343a654f..8f0f25baefdb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceHealthStatus.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceHealthStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceList.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceList.java index b40a5c57e6b2..26c15952adea 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceList.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Base for all lists of resources. */ -@Fluent +@Immutable public class ResourceList implements JsonSerializable { /* * The URI to fetch the next page of resources, with each API call returning up to 200 resources per page. Use @@ -25,7 +25,7 @@ public class ResourceList implements JsonSerializable { /** * Creates an instance of ResourceList class. */ - public ResourceList() { + protected ResourceList() { } /** @@ -45,19 +45,11 @@ public String nextLink() { * @param nextLink the nextLink value to set. * @return the ResourceList object itself. */ - public ResourceList withNextLink(String nextLink) { + ResourceList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceProviders.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceProviders.java index 583bdeb76e1c..cac8ce762f50 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceProviders.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceProviders.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -12,94 +12,98 @@ */ public interface ResourceProviders { /** - * Fetches operation status for data move operation on vault. + * Prepares source vault for Data Move operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. - * @param context The context to associate with this operation. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Prepare data move request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status along with {@link Response}. + * @return the response. */ - Response getOperationStatusWithResponse(String vaultName, String resourceGroupName, - String operationId, Context context); + OkResponse bmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters); /** - * Fetches operation status for data move operation on vault. + * Prepares source vault for Data Move operation. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param operationId The operationId parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Prepare data move request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation status. + * @return the response. */ - OperationStatus getOperationStatus(String vaultName, String resourceGroupName, String operationId); + OkResponse bmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters, + Context context); /** - * Prepares source vault for Data Move operation. + * Triggers Data Move Operation on target vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters Prepare data move request. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Trigger data move request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void bmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters); + OkResponse bmsTriggerDataMove(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters); /** - * Prepares source vault for Data Move operation. + * Triggers Data Move Operation on target vault. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters Prepare data move request. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param parameters Trigger data move request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void bmsPrepareDataMove(String vaultName, String resourceGroupName, PrepareDataMoveRequest parameters, + OkResponse bmsTriggerDataMove(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters, Context context); /** - * Triggers Data Move Operation on target vault. + * Fetches Operation Result for Prepare Data Move. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters Trigger data move request. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the BackupResourceConfigResource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status along with {@link Response}. */ - void bmsTriggerDataMove(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters); + Response getOperationStatusWithResponse(String vaultName, String resourceGroupName, + String operationId, Context context); /** - * Triggers Data Move Operation on target vault. + * Fetches Operation Result for Prepare Data Move. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters Trigger data move request. - * @param context The context to associate with this operation. + * @param vaultName vaults. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param operationId The name of the BackupResourceConfigResource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. */ - void bmsTriggerDataMove(String vaultName, String resourceGroupName, TriggerDataMoveRequest parameters, - Context context); + OperationStatus getOperationStatus(String vaultName, String resourceGroupName, String operationId); /** * Move recovery point from one datastore to another store. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. - * @param recoveryPointId The recoveryPointId parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters Move Resource Across Tiers Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -111,12 +115,12 @@ void moveRecoveryPoint(String vaultName, String resourceGroupName, String fabric /** * Move recovery point from one datastore to another store. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName The fabricName parameter. - * @param containerName The containerName parameter. - * @param protectedItemName The protectedItemName parameter. - * @param recoveryPointId The recoveryPointId parameter. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters Move Resource Across Tiers Request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreFileSpecs.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreFileSpecs.java index 627c8e513d33..db4984bd2a38 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreFileSpecs.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreFileSpecs.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -97,14 +97,6 @@ public RestoreFileSpecs withTargetFolderPath(String targetFolderPath) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestorePointType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestorePointType.java index 8a78314a4492..65e57518618d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestorePointType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestorePointType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequest.java index 7463a6ecdd1a..ff454a99b499 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -66,14 +66,6 @@ public RestoreRequest withResourceGuardOperationRequests(List resourceGu return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -114,29 +106,29 @@ public static RestoreRequest fromJson(JsonReader jsonReader) throws IOException return AzureFileShareRestoreRequest.fromJson(readerToUse.reset()); } else if ("AzureWorkloadRestoreRequest".equals(discriminatorValue)) { return AzureWorkloadRestoreRequest.fromJsonKnownDiscriminator(readerToUse.reset()); - } else if ("AzureWorkloadPointInTimeRestoreRequest".equals(discriminatorValue)) { - return AzureWorkloadPointInTimeRestoreRequest.fromJson(readerToUse.reset()); } else if ("AzureWorkloadSAPHanaRestoreRequest".equals(discriminatorValue)) { return AzureWorkloadSapHanaRestoreRequest.fromJsonKnownDiscriminator(readerToUse.reset()); + } else if ("AzureWorkloadSAPHanaRestoreWithRehydrateRequest".equals(discriminatorValue)) { + return AzureWorkloadSapHanaRestoreWithRehydrateRequest.fromJson(readerToUse.reset()); } else if ("AzureWorkloadSAPHanaPointInTimeRestoreRequest".equals(discriminatorValue)) { return AzureWorkloadSapHanaPointInTimeRestoreRequest .fromJsonKnownDiscriminator(readerToUse.reset()); } else if ("AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest".equals(discriminatorValue)) { return AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.fromJson(readerToUse.reset()); - } else if ("AzureWorkloadSAPHanaRestoreWithRehydrateRequest".equals(discriminatorValue)) { - return AzureWorkloadSapHanaRestoreWithRehydrateRequest.fromJson(readerToUse.reset()); } else if ("AzureWorkloadSAPAseRestoreRequest".equals(discriminatorValue)) { return AzureWorkloadSapAseRestoreRequest.fromJsonKnownDiscriminator(readerToUse.reset()); } else if ("AzureWorkloadSAPAsePointInTimeRestoreRequest".equals(discriminatorValue)) { return AzureWorkloadSapAsePointInTimeRestoreRequest.fromJson(readerToUse.reset()); } else if ("AzureWorkloadSQLRestoreRequest".equals(discriminatorValue)) { return AzureWorkloadSqlRestoreRequest.fromJsonKnownDiscriminator(readerToUse.reset()); + } else if ("AzureWorkloadSQLRestoreWithRehydrateRequest".equals(discriminatorValue)) { + return AzureWorkloadSqlRestoreWithRehydrateRequest.fromJson(readerToUse.reset()); } else if ("AzureWorkloadSQLPointInTimeRestoreRequest".equals(discriminatorValue)) { return AzureWorkloadSqlPointInTimeRestoreRequest.fromJsonKnownDiscriminator(readerToUse.reset()); } else if ("AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest".equals(discriminatorValue)) { return AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.fromJson(readerToUse.reset()); - } else if ("AzureWorkloadSQLRestoreWithRehydrateRequest".equals(discriminatorValue)) { - return AzureWorkloadSqlRestoreWithRehydrateRequest.fromJson(readerToUse.reset()); + } else if ("AzureWorkloadPointInTimeRestoreRequest".equals(discriminatorValue)) { + return AzureWorkloadPointInTimeRestoreRequest.fromJson(readerToUse.reset()); } else if ("IaasVMRestoreRequest".equals(discriminatorValue)) { return IaasVMRestoreRequest.fromJsonKnownDiscriminator(readerToUse.reset()); } else if ("IaasVMRestoreWithRehydrationRequest".equals(discriminatorValue)) { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequestResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequestResource.java index 8d1a354bf3ea..b2cc28e698bd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequestResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequestResource.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -16,16 +17,31 @@ * Base class for restore request. Workload-specific restore requests are derived from this class. */ @Fluent -public final class RestoreRequestResource extends Resource { +public final class RestoreRequestResource extends ProxyResource { + /* + * Resource location. + */ + private String location; + + /* + * Resource tags. + */ + private Map tags; + + /* + * Optional ETag. + */ + private String eTag; + /* * RestoreRequestResource properties */ private RestoreRequest properties; /* - * Optional ETag. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private String etag; + private SystemData systemData; /* * The type of the resource. @@ -48,6 +64,66 @@ public final class RestoreRequestResource extends Resource { public RestoreRequestResource() { } + /** + * Get the location property: Resource location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Resource location. + * + * @param location the location value to set. + * @return the RestoreRequestResource object itself. + */ + public RestoreRequestResource withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the RestoreRequestResource object itself. + */ + public RestoreRequestResource withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the eTag property: Optional ETag. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Set the eTag property: Optional ETag. + * + * @param eTag the eTag value to set. + * @return the RestoreRequestResource object itself. + */ + public RestoreRequestResource withETag(String eTag) { + this.eTag = eTag; + return this; + } + /** * Get the properties property: RestoreRequestResource properties. * @@ -69,23 +145,12 @@ public RestoreRequestResource withProperties(RestoreRequest properties) { } /** - * Get the etag property: Optional ETag. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag property: Optional ETag. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param etag the etag value to set. - * @return the RestoreRequestResource object itself. + * @return the systemData value. */ - public RestoreRequestResource withEtag(String etag) { - this.etag = etag; - return this; + public SystemData systemData() { + return this.systemData; } /** @@ -118,45 +183,16 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public RestoreRequestResource withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public RestoreRequestResource withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("eTag", this.eTag); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("eTag", this.etag); return jsonWriter.writeEndObject(); } @@ -183,14 +219,16 @@ public static RestoreRequestResource fromJson(JsonReader jsonReader) throws IOEx } else if ("type".equals(fieldName)) { deserializedRestoreRequestResource.type = reader.getString(); } else if ("location".equals(fieldName)) { - deserializedRestoreRequestResource.withLocation(reader.getString()); + deserializedRestoreRequestResource.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedRestoreRequestResource.withTags(tags); + deserializedRestoreRequestResource.tags = tags; + } else if ("eTag".equals(fieldName)) { + deserializedRestoreRequestResource.eTag = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedRestoreRequestResource.properties = RestoreRequest.fromJson(reader); - } else if ("eTag".equals(fieldName)) { - deserializedRestoreRequestResource.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedRestoreRequestResource.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequestType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequestType.java index 212437a41c7d..f87b7cb657f9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequestType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequestType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Restores.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Restores.java index 9ad8df93e66c..82ff037ff41d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Restores.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Restores.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,12 +15,12 @@ public interface Restores { * use * GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource restore request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -34,12 +34,12 @@ void trigger(String vaultName, String resourceGroupName, String fabricName, Stri * use * GetProtectedItemOperationResult API. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param fabricName Fabric name associated with the backed up items. - * @param containerName Container name associated with the backed up items. - * @param protectedItemName Backed up item to be restored. - * @param recoveryPointId Recovery point ID which represents the backed up data to be restored. + * @param vaultName The name of the VaultResource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param fabricName The name of the BackupFabricResource. + * @param containerName Name of the container whose details need to be fetched. + * @param protectedItemName Backed up item name whose details are to be fetched. + * @param recoveryPointId RecoveryPointID represents the backed up data to be fetched. * @param parameters resource restore request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionDuration.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionDuration.java index a4ca37b36062..19134c729d89 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionDuration.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionDuration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -77,14 +77,6 @@ public RetentionDuration withDurationType(RetentionDurationType durationType) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionDurationType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionDurationType.java index 6a5c791112b9..6d328fff9dc0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionDurationType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionDurationType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionPolicy.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionPolicy.java index 011decc6a0d8..bb44c1ecc864 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionPolicy.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -38,14 +38,6 @@ public String retentionPolicyType() { return this.retentionPolicyType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionScheduleFormat.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionScheduleFormat.java index c69e5fc62847..f69aeade1cae 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionScheduleFormat.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionScheduleFormat.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SchedulePolicy.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SchedulePolicy.java index d2a531f9696d..8b118fdc0114 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SchedulePolicy.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SchedulePolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -38,14 +38,6 @@ public String schedulePolicyType() { return this.schedulePolicyType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ScheduleRunType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ScheduleRunType.java index 7752682140e5..fd22bf0893f1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ScheduleRunType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ScheduleRunType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SecuredVMDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SecuredVMDetails.java index 08475a6ef94b..48b86dad3778 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SecuredVMDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SecuredVMDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -47,14 +47,6 @@ public SecuredVMDetails withSecuredVmosDiskEncryptionSetId(String securedVmosDis return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SecurityPINs.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SecurityPINs.java index 68881087ea77..3ed1792e7ed9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SecurityPINs.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SecurityPINs.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,7 +15,7 @@ public interface SecurityPINs { * Get the security PIN. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters security pin request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,7 +30,7 @@ Response getWithResponse(String vaultName, String resourceGrou * Get the security PIN. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SecurityPinBase.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SecurityPinBase.java index ce0b154981fc..9784f1a89679 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SecurityPinBase.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SecurityPinBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -48,14 +48,6 @@ public SecurityPinBase withResourceGuardOperationRequests(List resourceG return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Settings.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Settings.java index dc17382a844e..1891470d294b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Settings.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Settings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -100,14 +100,6 @@ public Settings withIsCompression(Boolean isCompression) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SimpleRetentionPolicy.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SimpleRetentionPolicy.java index eb5dfe2cc7ee..d58369963f54 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SimpleRetentionPolicy.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SimpleRetentionPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -63,18 +63,6 @@ public SimpleRetentionPolicy withRetentionDuration(RetentionDuration retentionDu return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (retentionDuration() != null) { - retentionDuration().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SimpleSchedulePolicy.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SimpleSchedulePolicy.java index 8def25777cbb..09f4cdfc5759 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SimpleSchedulePolicy.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SimpleSchedulePolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -167,18 +167,6 @@ public SimpleSchedulePolicy withScheduleWeeklyFrequency(Integer scheduleWeeklyFr return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (hourlySchedule() != null) { - hourlySchedule().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SimpleSchedulePolicyV2.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SimpleSchedulePolicyV2.java index 23b500ee5644..b94fae935bd5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SimpleSchedulePolicyV2.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SimpleSchedulePolicyV2.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -138,24 +138,6 @@ public SimpleSchedulePolicyV2 withWeeklySchedule(WeeklySchedule weeklySchedule) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (hourlySchedule() != null) { - hourlySchedule().validate(); - } - if (dailySchedule() != null) { - dailySchedule().validate(); - } - if (weeklySchedule() != null) { - weeklySchedule().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SnapshotBackupAdditionalDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SnapshotBackupAdditionalDetails.java index d3726ac4dbf4..c410e9a93e8f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SnapshotBackupAdditionalDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SnapshotBackupAdditionalDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -98,17 +98,6 @@ public UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userAssignedManagedIdentityDetails() != null) { - userAssignedManagedIdentityDetails().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SnapshotRestoreParameters.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SnapshotRestoreParameters.java index d7908ba514c5..59bf2f4a060f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SnapshotRestoreParameters.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SnapshotRestoreParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -72,14 +72,6 @@ public SnapshotRestoreParameters withLogPointInTimeForDBRecovery(String logPoint return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SoftDeleteFeatureState.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SoftDeleteFeatureState.java index cdc49ee54028..c834871da05a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SoftDeleteFeatureState.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SoftDeleteFeatureState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SourceSideScanInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SourceSideScanInfo.java new file mode 100644 index 000000000000..e3ff531796c0 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SourceSideScanInfo.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.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 java.io.IOException; + +/** + * Source side threat information. + */ +@Fluent +public final class SourceSideScanInfo implements JsonSerializable { + /* + * Threat status of the container + */ + private SourceSideScanStatus sourceSideScanStatus; + + /* + * Threat summary for the container + */ + private SourceSideScanSummary sourceSideScanSummary; + + /** + * Creates an instance of SourceSideScanInfo class. + */ + public SourceSideScanInfo() { + } + + /** + * Get the sourceSideScanStatus property: Threat status of the container. + * + * @return the sourceSideScanStatus value. + */ + public SourceSideScanStatus sourceSideScanStatus() { + return this.sourceSideScanStatus; + } + + /** + * Set the sourceSideScanStatus property: Threat status of the container. + * + * @param sourceSideScanStatus the sourceSideScanStatus value to set. + * @return the SourceSideScanInfo object itself. + */ + public SourceSideScanInfo withSourceSideScanStatus(SourceSideScanStatus sourceSideScanStatus) { + this.sourceSideScanStatus = sourceSideScanStatus; + return this; + } + + /** + * Get the sourceSideScanSummary property: Threat summary for the container. + * + * @return the sourceSideScanSummary value. + */ + public SourceSideScanSummary sourceSideScanSummary() { + return this.sourceSideScanSummary; + } + + /** + * Set the sourceSideScanSummary property: Threat summary for the container. + * + * @param sourceSideScanSummary the sourceSideScanSummary value to set. + * @return the SourceSideScanInfo object itself. + */ + public SourceSideScanInfo withSourceSideScanSummary(SourceSideScanSummary sourceSideScanSummary) { + this.sourceSideScanSummary = sourceSideScanSummary; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceSideScanStatus", + this.sourceSideScanStatus == null ? null : this.sourceSideScanStatus.toString()); + jsonWriter.writeStringField("sourceSideScanSummary", + this.sourceSideScanSummary == null ? null : this.sourceSideScanSummary.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SourceSideScanInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SourceSideScanInfo 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 SourceSideScanInfo. + */ + public static SourceSideScanInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SourceSideScanInfo deserializedSourceSideScanInfo = new SourceSideScanInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceSideScanStatus".equals(fieldName)) { + deserializedSourceSideScanInfo.sourceSideScanStatus + = SourceSideScanStatus.fromString(reader.getString()); + } else if ("sourceSideScanSummary".equals(fieldName)) { + deserializedSourceSideScanInfo.sourceSideScanSummary + = SourceSideScanSummary.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSourceSideScanInfo; + }); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SourceSideScanStatus.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SourceSideScanStatus.java new file mode 100644 index 000000000000..a422071fa9b1 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SourceSideScanStatus.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Threat status of the container. + */ +public final class SourceSideScanStatus extends ExpandableStringEnum { + /** + * Static value Configured for SourceSideScanStatus. + */ + public static final SourceSideScanStatus CONFIGURED = fromString("Configured"); + + /** + * Static value NotConfigured for SourceSideScanStatus. + */ + public static final SourceSideScanStatus NOT_CONFIGURED = fromString("NotConfigured"); + + /** + * Static value NotApplicable for SourceSideScanStatus. + */ + public static final SourceSideScanStatus NOT_APPLICABLE = fromString("NotApplicable"); + + /** + * Creates a new instance of SourceSideScanStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SourceSideScanStatus() { + } + + /** + * Creates or finds a SourceSideScanStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding SourceSideScanStatus. + */ + public static SourceSideScanStatus fromString(String name) { + return fromString(name, SourceSideScanStatus.class); + } + + /** + * Gets known SourceSideScanStatus values. + * + * @return known SourceSideScanStatus values. + */ + public static Collection values() { + return values(SourceSideScanStatus.class); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SourceSideScanSummary.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SourceSideScanSummary.java new file mode 100644 index 000000000000..b1b0b94f93a5 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SourceSideScanSummary.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Threat summary for the container. + */ +public final class SourceSideScanSummary extends ExpandableStringEnum { + /** + * Static value Unknown for SourceSideScanSummary. + */ + public static final SourceSideScanSummary UNKNOWN = fromString("Unknown"); + + /** + * Static value NotApplicable for SourceSideScanSummary. + */ + public static final SourceSideScanSummary NOT_APPLICABLE = fromString("NotApplicable"); + + /** + * Static value Suspicious for SourceSideScanSummary. + */ + public static final SourceSideScanSummary SUSPICIOUS = fromString("Suspicious"); + + /** + * Static value Healthy for SourceSideScanSummary. + */ + public static final SourceSideScanSummary HEALTHY = fromString("Healthy"); + + /** + * Creates a new instance of SourceSideScanSummary value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SourceSideScanSummary() { + } + + /** + * Creates or finds a SourceSideScanSummary from its string representation. + * + * @param name a name to look for. + * @return the corresponding SourceSideScanSummary. + */ + public static SourceSideScanSummary fromString(String name) { + return fromString(name, SourceSideScanSummary.class); + } + + /** + * Gets known SourceSideScanSummary values. + * + * @return known SourceSideScanSummary values. + */ + public static Collection values() { + return values(SourceSideScanSummary.class); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SqlDataDirectory.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SqlDataDirectory.java index 7de5259d6475..372713ca83e2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SqlDataDirectory.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SqlDataDirectory.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * SQLDataDirectory info. */ -@Fluent +@Immutable public final class SqlDataDirectory implements JsonSerializable { /* * Type of data directory mapping @@ -34,7 +34,7 @@ public final class SqlDataDirectory implements JsonSerializable { - if (e != null) { - e.validate(); - } - }); - } - if (snapshotBackupAdditionalDetails() != null) { - snapshotBackupAdditionalDetails().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SupportStatus.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SupportStatus.java index 1a9a472373e4..547dffe6b1e5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SupportStatus.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SupportStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetAfsRestoreInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetAfsRestoreInfo.java index e891510ad478..1b8c2891f061 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetAfsRestoreInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetAfsRestoreInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -72,14 +72,6 @@ public TargetAfsRestoreInfo withTargetResourceId(String targetResourceId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetDiskNetworkAccessOption.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetDiskNetworkAccessOption.java index f3656f7377f3..240656111f2a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetDiskNetworkAccessOption.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetDiskNetworkAccessOption.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetDiskNetworkAccessSettings.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetDiskNetworkAccessSettings.java index fd32a1bca029..5707163bf8cf 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetDiskNetworkAccessSettings.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetDiskNetworkAccessSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -76,14 +76,6 @@ public TargetDiskNetworkAccessSettings withTargetDiskAccessId(String targetDiskA return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetRestoreInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetRestoreInfo.java index 359e3bfd5e45..ad6fb0f0167b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetRestoreInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetRestoreInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -122,14 +122,6 @@ public TargetRestoreInfo withTargetDirectoryForFileRestore(String targetDirector return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ThreatInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ThreatInfo.java new file mode 100644 index 000000000000..ac2c952e1dad --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ThreatInfo.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.models; + +import com.azure.core.annotation.Immutable; +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 java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Recovery Point Threat information. + */ +@Immutable +public final class ThreatInfo implements JsonSerializable { + /* + * Threat Subject + */ + private String threatTitle; + + /* + * Threat Description + */ + private String threatDescription; + + /* + * Timestamp when the last (latest)threat information was sent + */ + private OffsetDateTime lastUpdatedTime; + + /* + * Threat Status Types + */ + private ThreatState threatState; + + /* + * Start timestamp of the threat + */ + private OffsetDateTime threatStartTime; + + /* + * End timestamp of the threat + */ + private OffsetDateTime threatEndTime; + + /* + * threat details link + */ + private String threatURI; + + /* + * Threat Severity Types + */ + private ThreatSeverity threatSeverity; + + /** + * Creates an instance of ThreatInfo class. + */ + private ThreatInfo() { + } + + /** + * Get the threatTitle property: Threat Subject. + * + * @return the threatTitle value. + */ + public String threatTitle() { + return this.threatTitle; + } + + /** + * Get the threatDescription property: Threat Description. + * + * @return the threatDescription value. + */ + public String threatDescription() { + return this.threatDescription; + } + + /** + * Get the lastUpdatedTime property: Timestamp when the last (latest)threat information was sent. + * + * @return the lastUpdatedTime value. + */ + public OffsetDateTime lastUpdatedTime() { + return this.lastUpdatedTime; + } + + /** + * Get the threatState property: Threat Status Types. + * + * @return the threatState value. + */ + public ThreatState threatState() { + return this.threatState; + } + + /** + * Get the threatStartTime property: Start timestamp of the threat. + * + * @return the threatStartTime value. + */ + public OffsetDateTime threatStartTime() { + return this.threatStartTime; + } + + /** + * Get the threatEndTime property: End timestamp of the threat. + * + * @return the threatEndTime value. + */ + public OffsetDateTime threatEndTime() { + return this.threatEndTime; + } + + /** + * Get the threatURI property: threat details link. + * + * @return the threatURI value. + */ + public String threatURI() { + return this.threatURI; + } + + /** + * Get the threatSeverity property: Threat Severity Types. + * + * @return the threatSeverity value. + */ + public ThreatSeverity threatSeverity() { + return this.threatSeverity; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("threatState", this.threatState == null ? null : this.threatState.toString()); + jsonWriter.writeStringField("threatSeverity", + this.threatSeverity == null ? null : this.threatSeverity.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ThreatInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ThreatInfo 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 ThreatInfo. + */ + public static ThreatInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ThreatInfo deserializedThreatInfo = new ThreatInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("threatTitle".equals(fieldName)) { + deserializedThreatInfo.threatTitle = reader.getString(); + } else if ("threatDescription".equals(fieldName)) { + deserializedThreatInfo.threatDescription = reader.getString(); + } else if ("lastUpdatedTime".equals(fieldName)) { + deserializedThreatInfo.lastUpdatedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("threatState".equals(fieldName)) { + deserializedThreatInfo.threatState = ThreatState.fromString(reader.getString()); + } else if ("threatStartTime".equals(fieldName)) { + deserializedThreatInfo.threatStartTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("threatEndTime".equals(fieldName)) { + deserializedThreatInfo.threatEndTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("threatURI".equals(fieldName)) { + deserializedThreatInfo.threatURI = reader.getString(); + } else if ("threatSeverity".equals(fieldName)) { + deserializedThreatInfo.threatSeverity = ThreatSeverity.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedThreatInfo; + }); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ThreatSeverity.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ThreatSeverity.java new file mode 100644 index 000000000000..24b9e825bef7 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ThreatSeverity.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Threat Severity Types. + */ +public final class ThreatSeverity extends ExpandableStringEnum { + /** + * Static value Critical for ThreatSeverity. + */ + public static final ThreatSeverity CRITICAL = fromString("Critical"); + + /** + * Static value High for ThreatSeverity. + */ + public static final ThreatSeverity HIGH = fromString("High"); + + /** + * Static value Warning for ThreatSeverity. + */ + public static final ThreatSeverity WARNING = fromString("Warning"); + + /** + * Static value Informational for ThreatSeverity. + */ + public static final ThreatSeverity INFORMATIONAL = fromString("Informational"); + + /** + * Creates a new instance of ThreatSeverity value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ThreatSeverity() { + } + + /** + * Creates or finds a ThreatSeverity from its string representation. + * + * @param name a name to look for. + * @return the corresponding ThreatSeverity. + */ + public static ThreatSeverity fromString(String name) { + return fromString(name, ThreatSeverity.class); + } + + /** + * Gets known ThreatSeverity values. + * + * @return known ThreatSeverity values. + */ + public static Collection values() { + return values(ThreatSeverity.class); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ThreatState.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ThreatState.java new file mode 100644 index 000000000000..c245c75e9e25 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ThreatState.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Threat Status Types. + */ +public final class ThreatState extends ExpandableStringEnum { + /** + * Static value Active for ThreatState. + */ + public static final ThreatState ACTIVE = fromString("Active"); + + /** + * Static value InProgress for ThreatState. + */ + public static final ThreatState IN_PROGRESS = fromString("InProgress"); + + /** + * Static value Ignored for ThreatState. + */ + public static final ThreatState IGNORED = fromString("Ignored"); + + /** + * Static value Resolved for ThreatState. + */ + public static final ThreatState RESOLVED = fromString("Resolved"); + + /** + * Creates a new instance of ThreatState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ThreatState() { + } + + /** + * Creates or finds a ThreatState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ThreatState. + */ + public static ThreatState fromString(String name) { + return fromString(name, ThreatState.class); + } + + /** + * Gets known ThreatState values. + * + * @return known ThreatState values. + */ + public static Collection values() { + return values(ThreatState.class); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ThreatStatus.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ThreatStatus.java new file mode 100644 index 000000000000..999c3da52b80 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ThreatStatus.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Threat status of the recovery point. + */ +public final class ThreatStatus extends ExpandableStringEnum { + /** + * Static value Unknown for ThreatStatus. + */ + public static final ThreatStatus UNKNOWN = fromString("Unknown"); + + /** + * Static value Healthy for ThreatStatus. + */ + public static final ThreatStatus HEALTHY = fromString("Healthy"); + + /** + * Static value UnHealthy for ThreatStatus. + */ + public static final ThreatStatus UN_HEALTHY = fromString("UnHealthy"); + + /** + * Static value Warning for ThreatStatus. + */ + public static final ThreatStatus WARNING = fromString("Warning"); + + /** + * Static value NotAvailable for ThreatStatus. + */ + public static final ThreatStatus NOT_AVAILABLE = fromString("NotAvailable"); + + /** + * Creates a new instance of ThreatStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ThreatStatus() { + } + + /** + * Creates or finds a ThreatStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ThreatStatus. + */ + public static ThreatStatus fromString(String name) { + return fromString(name, ThreatStatus.class); + } + + /** + * Gets known ThreatStatus values. + * + * @return known ThreatStatus values. + */ + public static Collection values() { + return values(ThreatStatus.class); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostInfo.java index 2a6332e599b3..93c8a437cea1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostOperationStatus.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostOperationStatus.java index 37dcda492f26..c245ae25e709 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostOperationStatus.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostOperationStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -14,7 +14,7 @@ public interface TieringCostOperationStatus { /** * Gets the status of async operations of tiering cost. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId The operationId parameter. * @param context The context to associate with this operation. @@ -29,7 +29,7 @@ Response getWithResponse(String resourceGroupName, String vault /** * Gets the status of async operations of tiering cost. * - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId The operationId parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostRehydrationInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostRehydrationInfo.java index d8aa908f0cf7..4fe36dab99b5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostRehydrationInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostRehydrationInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -14,7 +14,7 @@ /** * Response parameters for tiering cost info for rehydration. */ -@Fluent +@Immutable public final class TieringCostRehydrationInfo extends TieringCostInfoInner { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -35,7 +35,7 @@ public final class TieringCostRehydrationInfo extends TieringCostInfoInner { /** * Creates an instance of TieringCostRehydrationInfo class. */ - public TieringCostRehydrationInfo() { + private TieringCostRehydrationInfo() { } /** @@ -58,17 +58,6 @@ public long rehydrationSizeInBytes() { return this.rehydrationSizeInBytes; } - /** - * Set the rehydrationSizeInBytes property: Rehydration size in bytes. - * - * @param rehydrationSizeInBytes the rehydrationSizeInBytes value to set. - * @return the TieringCostRehydrationInfo object itself. - */ - public TieringCostRehydrationInfo withRehydrationSizeInBytes(long rehydrationSizeInBytes) { - this.rehydrationSizeInBytes = rehydrationSizeInBytes; - return this; - } - /** * Get the retailRehydrationCostPerGBPerMonth property: Source tier to target tier rehydration cost per GB per * month. @@ -79,28 +68,6 @@ public double retailRehydrationCostPerGBPerMonth() { return this.retailRehydrationCostPerGBPerMonth; } - /** - * Set the retailRehydrationCostPerGBPerMonth property: Source tier to target tier rehydration cost per GB per - * month. - * - * @param retailRehydrationCostPerGBPerMonth the retailRehydrationCostPerGBPerMonth value to set. - * @return the TieringCostRehydrationInfo object itself. - */ - public TieringCostRehydrationInfo - withRetailRehydrationCostPerGBPerMonth(double retailRehydrationCostPerGBPerMonth) { - this.retailRehydrationCostPerGBPerMonth = retailRehydrationCostPerGBPerMonth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostSavingInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostSavingInfo.java index 775b7f12868b..cae3d7e5e642 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostSavingInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostSavingInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -14,7 +14,7 @@ /** * Response parameters for tiering cost info for savings. */ -@Fluent +@Immutable public final class TieringCostSavingInfo extends TieringCostInfoInner { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -45,7 +45,7 @@ public final class TieringCostSavingInfo extends TieringCostInfoInner { /** * Creates an instance of TieringCostSavingInfo class. */ - public TieringCostSavingInfo() { + private TieringCostSavingInfo() { } /** @@ -69,18 +69,6 @@ public long sourceTierSizeReductionInBytes() { return this.sourceTierSizeReductionInBytes; } - /** - * Set the sourceTierSizeReductionInBytes property: Source tier size reduction in bytes after moving all the - * recommended backup points to target tier. - * - * @param sourceTierSizeReductionInBytes the sourceTierSizeReductionInBytes value to set. - * @return the TieringCostSavingInfo object itself. - */ - public TieringCostSavingInfo withSourceTierSizeReductionInBytes(long sourceTierSizeReductionInBytes) { - this.sourceTierSizeReductionInBytes = sourceTierSizeReductionInBytes; - return this; - } - /** * Get the targetTierSizeIncreaseInBytes property: Target tier size increase in bytes after moving all the * recommended backup points to target tier. @@ -91,18 +79,6 @@ public long targetTierSizeIncreaseInBytes() { return this.targetTierSizeIncreaseInBytes; } - /** - * Set the targetTierSizeIncreaseInBytes property: Target tier size increase in bytes after moving all the - * recommended backup points to target tier. - * - * @param targetTierSizeIncreaseInBytes the targetTierSizeIncreaseInBytes value to set. - * @return the TieringCostSavingInfo object itself. - */ - public TieringCostSavingInfo withTargetTierSizeIncreaseInBytes(long targetTierSizeIncreaseInBytes) { - this.targetTierSizeIncreaseInBytes = targetTierSizeIncreaseInBytes; - return this; - } - /** * Get the retailSourceTierCostPerGBPerMonth property: Source tier retail cost per GB per month. * @@ -112,17 +88,6 @@ public double retailSourceTierCostPerGBPerMonth() { return this.retailSourceTierCostPerGBPerMonth; } - /** - * Set the retailSourceTierCostPerGBPerMonth property: Source tier retail cost per GB per month. - * - * @param retailSourceTierCostPerGBPerMonth the retailSourceTierCostPerGBPerMonth value to set. - * @return the TieringCostSavingInfo object itself. - */ - public TieringCostSavingInfo withRetailSourceTierCostPerGBPerMonth(double retailSourceTierCostPerGBPerMonth) { - this.retailSourceTierCostPerGBPerMonth = retailSourceTierCostPerGBPerMonth; - return this; - } - /** * Get the retailTargetTierCostPerGBPerMonth property: Target tier retail cost per GB per month. * @@ -132,26 +97,6 @@ public double retailTargetTierCostPerGBPerMonth() { return this.retailTargetTierCostPerGBPerMonth; } - /** - * Set the retailTargetTierCostPerGBPerMonth property: Target tier retail cost per GB per month. - * - * @param retailTargetTierCostPerGBPerMonth the retailTargetTierCostPerGBPerMonth value to set. - * @return the TieringCostSavingInfo object itself. - */ - public TieringCostSavingInfo withRetailTargetTierCostPerGBPerMonth(double retailTargetTierCostPerGBPerMonth) { - this.retailTargetTierCostPerGBPerMonth = retailTargetTierCostPerGBPerMonth; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringMode.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringMode.java index 34e908b8ecf3..75fd047bb9d2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringMode.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringPolicy.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringPolicy.java index 3dc121f86b7f..02e471a03d44 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringPolicy.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -114,14 +114,6 @@ public TieringPolicy withDurationType(RetentionDurationType durationType) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TokenInformation.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TokenInformation.java index 119ebca6a415..49c424d16e44 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TokenInformation.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TokenInformation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TriggerDataMoveRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TriggerDataMoveRequest.java index f184fcbee80b..b537532eae1d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TriggerDataMoveRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TriggerDataMoveRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -174,36 +173,6 @@ public TriggerDataMoveRequest withPauseGC(Boolean pauseGC) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sourceResourceId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property sourceResourceId in model TriggerDataMoveRequest")); - } - if (sourceRegion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property sourceRegion in model TriggerDataMoveRequest")); - } - if (dataMoveLevel() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property dataMoveLevel in model TriggerDataMoveRequest")); - } - if (correlationId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property correlationId in model TriggerDataMoveRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TriggerDataMoveRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UnlockDeleteRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UnlockDeleteRequest.java index 3a1b252f7fc7..e6d3e850d11b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UnlockDeleteRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UnlockDeleteRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -73,14 +73,6 @@ public UnlockDeleteRequest withResourceToBeDeleted(String resourceToBeDeleted) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UnlockDeleteResponse.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UnlockDeleteResponse.java index 270332b80b5b..5517fe8e3045 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UnlockDeleteResponse.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UnlockDeleteResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UpdateRecoveryPointRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UpdateRecoveryPointRequest.java new file mode 100644 index 000000000000..5e2c62d542e2 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UpdateRecoveryPointRequest.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.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 java.io.IOException; + +/** + * Patch Request content to update recovery point for given RecoveryPointId. + */ +@Fluent +public final class UpdateRecoveryPointRequest implements JsonSerializable { + /* + * Resource properties. + */ + private PatchRecoveryPointInput properties; + + /** + * Creates an instance of UpdateRecoveryPointRequest class. + */ + public UpdateRecoveryPointRequest() { + } + + /** + * Get the properties property: Resource properties. + * + * @return the properties value. + */ + public PatchRecoveryPointInput properties() { + return this.properties; + } + + /** + * Set the properties property: Resource properties. + * + * @param properties the properties value to set. + * @return the UpdateRecoveryPointRequest object itself. + */ + public UpdateRecoveryPointRequest withProperties(PatchRecoveryPointInput properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UpdateRecoveryPointRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpdateRecoveryPointRequest 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 UpdateRecoveryPointRequest. + */ + public static UpdateRecoveryPointRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UpdateRecoveryPointRequest deserializedUpdateRecoveryPointRequest = new UpdateRecoveryPointRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedUpdateRecoveryPointRequest.properties = PatchRecoveryPointInput.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedUpdateRecoveryPointRequest; + }); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UsagesUnit.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UsagesUnit.java index a55027647ad1..c913cb9ee29a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UsagesUnit.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UsagesUnit.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UserAssignedIdentityProperties.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UserAssignedIdentityProperties.java index 2a2af1a682ef..1f54bb1545c0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UserAssignedIdentityProperties.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UserAssignedIdentityProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -72,14 +72,6 @@ public UserAssignedIdentityProperties withPrincipalId(String principalId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UserAssignedManagedIdentityDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UserAssignedManagedIdentityDetails.java index 4e9029272b28..b30e77b1e4fe 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UserAssignedManagedIdentityDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UserAssignedManagedIdentityDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -98,17 +98,6 @@ public UserAssignedIdentityProperties userAssignedIdentityProperties() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userAssignedIdentityProperties() != null) { - userAssignedIdentityProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VMWorkloadPolicyType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VMWorkloadPolicyType.java new file mode 100644 index 000000000000..18c539bebbe7 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VMWorkloadPolicyType.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of the protection policy. + */ +public final class VMWorkloadPolicyType extends ExpandableStringEnum { + /** + * Static value Invalid for VMWorkloadPolicyType. + */ + public static final VMWorkloadPolicyType INVALID = fromString("Invalid"); + + /** + * Static value SnapshotV1 for VMWorkloadPolicyType. + */ + public static final VMWorkloadPolicyType SNAPSHOT_V1 = fromString("SnapshotV1"); + + /** + * Static value SnapshotV2 for VMWorkloadPolicyType. + */ + public static final VMWorkloadPolicyType SNAPSHOT_V2 = fromString("SnapshotV2"); + + /** + * Static value Streaming for VMWorkloadPolicyType. + */ + public static final VMWorkloadPolicyType STREAMING = fromString("Streaming"); + + /** + * Creates a new instance of VMWorkloadPolicyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VMWorkloadPolicyType() { + } + + /** + * Creates or finds a VMWorkloadPolicyType from its string representation. + * + * @param name a name to look for. + * @return the corresponding VMWorkloadPolicyType. + */ + public static VMWorkloadPolicyType fromString(String name) { + return fromString(name, VMWorkloadPolicyType.class); + } + + /** + * Gets known VMWorkloadPolicyType values. + * + * @return known VMWorkloadPolicyType values. + */ + public static Collection values() { + return values(VMWorkloadPolicyType.class); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateIaasVMRestoreOperationRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateIaasVMRestoreOperationRequest.java index b79c684d22e6..9b899a7de6a2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateIaasVMRestoreOperationRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateIaasVMRestoreOperationRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -47,18 +47,6 @@ public ValidateIaasVMRestoreOperationRequest withRestoreRequest(RestoreRequest r return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (restoreRequest() != null) { - restoreRequest().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationRequest.java index b323efd49a80..aa6f8b3a50f3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -38,14 +38,6 @@ public String objectType() { return this.objectType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationRequestResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationRequestResource.java index d9569eb720aa..64151f2b2d65 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationRequestResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationRequestResource.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -73,28 +72,6 @@ public ValidateOperationRequestResource withProperties(ValidateOperationRequest return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property id in model ValidateOperationRequestResource")); - } - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model ValidateOperationRequestResource")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ValidateOperationRequestResource.class); - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationResponse.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationResponse.java index b2aef590deff..8aa6bbefccad 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationResponse.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationResponse.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Base class for validate operation response. */ -@Fluent +@Immutable public final class ValidateOperationResponse implements JsonSerializable { /* * Gets the validation result @@ -25,7 +25,7 @@ public final class ValidateOperationResponse implements JsonSerializable validationResults() { return this.validationResults; } - /** - * Set the validationResults property: Gets the validation result. - * - * @param validationResults the validationResults value to set. - * @return the ValidateOperationResponse object itself. - */ - public ValidateOperationResponse withValidationResults(List validationResults) { - this.validationResults = validationResults; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (validationResults() != null) { - validationResults().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationResults.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationResults.java index 881778716d3c..b583d70cced5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationResults.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationResults.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,7 +15,7 @@ public interface ValidateOperationResults { * Fetches the result of a triggered validate operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation whose result needs to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,7 +30,7 @@ Response getWithResponse(String vaultName, String re * Fetches the result of a triggered validate operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID which represents the operation whose result needs to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationStatuses.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationStatuses.java index a5e6fc568313..03f7ae186b87 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationStatuses.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationStatuses.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -17,7 +17,7 @@ public interface ValidateOperationStatuses { * If operation has completed, this method returns the list of errors obtained while validating the operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID represents the operation whose status needs to be fetched. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -34,7 +34,7 @@ Response getWithResponse(String vaultName, String resourceGroup * If operation has completed, this method returns the list of errors obtained while validating the operation. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param operationId OperationID represents the operation whose status needs to be fetched. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperations.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperations.java index 03c461528d72..d5bb6f64d41c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperations.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -15,7 +15,7 @@ public interface ValidateOperations { * headers which can be tracked using GetValidateOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -28,7 +28,7 @@ public interface ValidateOperations { * headers which can be tracked using GetValidateOperationResult API. * * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param parameters resource validate operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationsResponse.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationsResponse.java index 0122271e2d54..ee7957ef4f68 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationsResponse.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationsResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateRestoreOperationRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateRestoreOperationRequest.java index 942c45750ee3..bcf8edc726b3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateRestoreOperationRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateRestoreOperationRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -63,18 +63,6 @@ public ValidateRestoreOperationRequest withRestoreRequest(RestoreRequest restore return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (restoreRequest() != null) { - restoreRequest().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidationStatus.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidationStatus.java index 53caf131c890..cab611793dc8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidationStatus.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidationStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultJob.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultJob.java index 545e0d3d66f0..09c1b4b7887a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultJob.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultJob.java @@ -1,24 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.Duration; -import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.List; /** * Vault level Job. */ -@Fluent +@Immutable public final class VaultJob extends Job { /* * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of @@ -49,7 +48,7 @@ public final class VaultJob extends Job { /** * Creates an instance of VaultJob class. */ - public VaultJob() { + private VaultJob() { } /** @@ -72,17 +71,6 @@ public Duration duration() { return this.duration; } - /** - * Set the duration property: Time elapsed during the execution of this job. - * - * @param duration the duration value to set. - * @return the VaultJob object itself. - */ - public VaultJob withDuration(Duration duration) { - this.duration = duration; - return this; - } - /** * Get the actionsInfo property: Gets or sets the state/actions applicable on this job like cancel/retry. * @@ -92,17 +80,6 @@ public List actionsInfo() { return this.actionsInfo; } - /** - * Set the actionsInfo property: Gets or sets the state/actions applicable on this job like cancel/retry. - * - * @param actionsInfo the actionsInfo value to set. - * @return the VaultJob object itself. - */ - public VaultJob withActionsInfo(List actionsInfo) { - this.actionsInfo = actionsInfo; - return this; - } - /** * Get the errorDetails property: Error details on execution of this job. * @@ -112,17 +89,6 @@ public List errorDetails() { return this.errorDetails; } - /** - * Set the errorDetails property: Error details on execution of this job. - * - * @param errorDetails the errorDetails value to set. - * @return the VaultJob object itself. - */ - public VaultJob withErrorDetails(List errorDetails) { - this.errorDetails = errorDetails; - return this; - } - /** * Get the extendedInfo property: Additional information about the job. * @@ -132,95 +98,6 @@ public VaultJobExtendedInfo extendedInfo() { return this.extendedInfo; } - /** - * Set the extendedInfo property: Additional information about the job. - * - * @param extendedInfo the extendedInfo value to set. - * @return the VaultJob object itself. - */ - public VaultJob withExtendedInfo(VaultJobExtendedInfo extendedInfo) { - this.extendedInfo = extendedInfo; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VaultJob withEntityFriendlyName(String entityFriendlyName) { - super.withEntityFriendlyName(entityFriendlyName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VaultJob withBackupManagementType(BackupManagementType backupManagementType) { - super.withBackupManagementType(backupManagementType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VaultJob withOperation(String operation) { - super.withOperation(operation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VaultJob withStatus(String status) { - super.withStatus(status); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VaultJob withStartTime(OffsetDateTime startTime) { - super.withStartTime(startTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VaultJob withEndTime(OffsetDateTime endTime) { - super.withEndTime(endTime); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public VaultJob withActivityId(String activityId) { - super.withActivityId(activityId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (errorDetails() != null) { - errorDetails().forEach(e -> e.validate()); - } - if (extendedInfo() != null) { - extendedInfo().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultJobErrorInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultJobErrorInfo.java index cf9b41675e22..99cf513a4fb2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultJobErrorInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultJobErrorInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Vault Job specific error information. */ -@Fluent +@Immutable public final class VaultJobErrorInfo implements JsonSerializable { /* * Error code. @@ -35,7 +35,7 @@ public final class VaultJobErrorInfo implements JsonSerializable recommendations() { return this.recommendations; } - /** - * Set the recommendations property: List of localized recommendations for above error code. - * - * @param recommendations the recommendations value to set. - * @return the VaultJobErrorInfo object itself. - */ - public VaultJobErrorInfo withRecommendations(List recommendations) { - this.recommendations = recommendations; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultJobExtendedInfo.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultJobExtendedInfo.java index fcd8f8e68c8d..9f8950384252 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultJobExtendedInfo.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultJobExtendedInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Vault Job for CMK - has CMK specific info. */ -@Fluent +@Immutable public final class VaultJobExtendedInfo implements JsonSerializable { /* * Job properties. @@ -25,7 +25,7 @@ public final class VaultJobExtendedInfo implements JsonSerializable propertyBag() { return this.propertyBag; } - /** - * Set the propertyBag property: Job properties. - * - * @param propertyBag the propertyBag value to set. - * @return the VaultJobExtendedInfo object itself. - */ - public VaultJobExtendedInfo withPropertyBag(Map propertyBag) { - this.propertyBag = propertyBag; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultRetentionPolicy.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultRetentionPolicy.java index 1cb65432692e..af8e870712d2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultRetentionPolicy.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultRetentionPolicy.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -73,23 +72,6 @@ public VaultRetentionPolicy withSnapshotRetentionInDays(int snapshotRetentionInD return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (vaultRetention() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property vaultRetention in model VaultRetentionPolicy")); - } else { - vaultRetention().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VaultRetentionPolicy.class); - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultStorageConfigOperationResultResponse.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultStorageConfigOperationResultResponse.java index 07a49369b846..740f72c85937 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultStorageConfigOperationResultResponse.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultStorageConfigOperationResultResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultSubResourceType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultSubResourceType.java index c1df681691cb..d6386a967fd5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultSubResourceType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultSubResourceType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeekOfMonth.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeekOfMonth.java index 6bd3b7433709..185dcc778602 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeekOfMonth.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeekOfMonth.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeeklyRetentionFormat.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeeklyRetentionFormat.java index 0bd660cd7ae7..4085a40e500d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeeklyRetentionFormat.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeeklyRetentionFormat.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -73,14 +73,6 @@ public WeeklyRetentionFormat withWeeksOfTheMonth(List weeksOfTheMon return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeeklyRetentionSchedule.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeeklyRetentionSchedule.java index 7b1f308a8ac7..943720e371c7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeeklyRetentionSchedule.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeeklyRetentionSchedule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -101,17 +101,6 @@ public WeeklyRetentionSchedule withRetentionDuration(RetentionDuration retention return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (retentionDuration() != null) { - retentionDuration().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeeklySchedule.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeeklySchedule.java index 06043316b5ca..c6cde207bafe 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeeklySchedule.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeeklySchedule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -76,14 +76,6 @@ public WeeklySchedule withScheduleRunTimes(List scheduleRunTimes return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadInquiryDetails.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadInquiryDetails.java index 22f4ee0c85ac..ed8ca9cfced0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadInquiryDetails.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadInquiryDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -97,17 +97,6 @@ public WorkloadInquiryDetails withInquiryValidation(InquiryValidation inquiryVal return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (inquiryValidation() != null) { - inquiryValidation().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItem.java index 548626f800bf..32f0fb3d8425 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Base class for backup item. Workload-specific backup items are derived from this class. */ -@Fluent +@Immutable public class WorkloadItem implements JsonSerializable { /* * Type of the backup item. @@ -44,7 +44,7 @@ public class WorkloadItem implements JsonSerializable { /** * Creates an instance of WorkloadItem class. */ - public WorkloadItem() { + protected WorkloadItem() { } /** @@ -71,7 +71,7 @@ public String backupManagementType() { * @param backupManagementType the backupManagementType value to set. * @return the WorkloadItem object itself. */ - public WorkloadItem withBackupManagementType(String backupManagementType) { + WorkloadItem withBackupManagementType(String backupManagementType) { this.backupManagementType = backupManagementType; return this; } @@ -91,7 +91,7 @@ public String workloadType() { * @param workloadType the workloadType value to set. * @return the WorkloadItem object itself. */ - public WorkloadItem withWorkloadType(String workloadType) { + WorkloadItem withWorkloadType(String workloadType) { this.workloadType = workloadType; return this; } @@ -111,7 +111,7 @@ public String friendlyName() { * @param friendlyName the friendlyName value to set. * @return the WorkloadItem object itself. */ - public WorkloadItem withFriendlyName(String friendlyName) { + WorkloadItem withFriendlyName(String friendlyName) { this.friendlyName = friendlyName; return this; } @@ -131,19 +131,11 @@ public ProtectionStatus protectionState() { * @param protectionState the protectionState value to set. * @return the WorkloadItem object itself. */ - public WorkloadItem withProtectionState(ProtectionStatus protectionState) { + WorkloadItem withProtectionState(ProtectionStatus protectionState) { this.protectionState = protectionState; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItemResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItemResource.java index a6d6e0778833..c0abff700f2f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItemResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItemResource.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadItemResourceInner; import java.util.Map; @@ -33,7 +34,7 @@ public interface WorkloadItemResource { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the location property: Resource location. * * @return the location value. */ @@ -46,6 +47,13 @@ public interface WorkloadItemResource { */ Map tags(); + /** + * Gets the eTag property: Optional ETag. + * + * @return the eTag value. + */ + String eTag(); + /** * Gets the properties property: WorkloadItemResource properties. * @@ -54,11 +62,11 @@ public interface WorkloadItemResource { WorkloadItem properties(); /** - * Gets the etag property: Optional ETag. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the etag value. + * @return the systemData value. */ - String etag(); + SystemData systemData(); /** * Gets the inner com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadItemResourceInner object. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItemType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItemType.java index 4ae1b57c1245..68c389602b2a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItemType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItemType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadProtectableItem.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadProtectableItem.java index c09d4f6e1e16..aec038022d07 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadProtectableItem.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadProtectableItem.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Base class for backup item. Workload-specific backup items are derived from this class. */ -@Fluent +@Immutable public class WorkloadProtectableItem implements JsonSerializable { /* * Type of the backup item. @@ -44,7 +44,7 @@ public class WorkloadProtectableItem implements JsonSerializable tags(); + /** + * Gets the eTag property: Optional ETag. + * + * @return the eTag value. + */ + String eTag(); + /** * Gets the properties property: WorkloadProtectableItemResource properties. * @@ -54,11 +62,11 @@ public interface WorkloadProtectableItemResource { WorkloadProtectableItem properties(); /** - * Gets the etag property: Optional ETag. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the etag value. + * @return the systemData value. */ - String etag(); + SystemData systemData(); /** * Gets the inner diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadType.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadType.java index f8603daf46fa..1fa03c09c9a4 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadType.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/XcoolState.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/XcoolState.java index a0f315b88ead..ce384a2f6df0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/XcoolState.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/XcoolState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/YearlyRetentionSchedule.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/YearlyRetentionSchedule.java index d42305916948..41f3c814457e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/YearlyRetentionSchedule.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/YearlyRetentionSchedule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.models; @@ -177,23 +177,6 @@ public YearlyRetentionSchedule withRetentionDuration(RetentionDuration retention return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (retentionScheduleDaily() != null) { - retentionScheduleDaily().validate(); - } - if (retentionScheduleWeekly() != null) { - retentionScheduleWeekly().validate(); - } - if (retentionDuration() != null) { - retentionDuration().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/package-info.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/package-info.java index 333989f4c749..882c5ae4d702 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/package-info.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for RecoveryServicesBackupClient. + * Package containing the data models for RecoveryServicesBackup. * Open API 2.0 Specs for Azure RecoveryServices Backup service. */ package com.azure.resourcemanager.recoveryservicesbackup.models; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/package-info.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/package-info.java index 34706d9ddf91..7d5319657288 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/package-info.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for RecoveryServicesBackupClient. + * Package containing the classes for RecoveryServicesBackup. * Open API 2.0 Specs for Azure RecoveryServices Backup service. */ package com.azure.resourcemanager.recoveryservicesbackup; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/module-info.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/module-info.java index 0fba7f1a1b09..1efa13ab3700 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/module-info.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.recoveryservicesbackup { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.recoveryservicesbackup.fluent.models to com.azure.core; opens com.azure.resourcemanager.recoveryservicesbackup.models to com.azure.core; + opens com.azure.resourcemanager.recoveryservicesbackup.implementation.models to com.azure.core; } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/resources/META-INF/azure-resourcemanager-recoveryservicesbackup_apiview_properties.json b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/resources/META-INF/azure-resourcemanager-recoveryservicesbackup_apiview_properties.json new file mode 100644 index 000000000000..206da26e7c11 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/resources/META-INF/azure-resourcemanager-recoveryservicesbackup_apiview_properties.json @@ -0,0 +1,585 @@ +{ + "flavor": "azure", + "CrossLanguageDefinitionId": { + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupEnginesClient": "Microsoft.RecoveryServices.BackupEngines", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupEnginesClient.get": "Microsoft.RecoveryServices.BackupEngines.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupEnginesClient.getWithResponse": "Microsoft.RecoveryServices.BackupEngines.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupEnginesClient.list": "Microsoft.RecoveryServices.BackupEngines.list", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupJobsClient": "Microsoft.RecoveryServices.BackupJobs", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupJobsClient.list": "Microsoft.RecoveryServices.BackupJobs.list", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupOperationResultsClient": "Microsoft.RecoveryServices.BackupOperationResults", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupOperationResultsClient.get": "Microsoft.RecoveryServices.BackupOperationResults.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupOperationResultsClient.getWithResponse": "Microsoft.RecoveryServices.BackupOperationResults.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupOperationStatusesClient": "Microsoft.RecoveryServices.BackupOperationStatuses", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupOperationStatusesClient.get": "Microsoft.RecoveryServices.BackupOperationStatuses.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupOperationStatusesClient.getWithResponse": "Microsoft.RecoveryServices.BackupOperationStatuses.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupPoliciesClient": "Microsoft.RecoveryServices.BackupPolicies", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupPoliciesClient.list": "Microsoft.RecoveryServices.BackupPolicies.list", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectableItemsClient": "Microsoft.RecoveryServices.BackupProtectableItems", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectableItemsClient.list": "Microsoft.RecoveryServices.BackupProtectableItems.list", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectedItemsClient": "Microsoft.RecoveryServices.BackupProtectedItems", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectedItemsClient.list": "Microsoft.RecoveryServices.BackupProtectedItems.list", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectionContainersClient": "Microsoft.RecoveryServices.BackupProtectionContainers", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectionContainersClient.list": "Microsoft.RecoveryServices.BackupProtectionContainers.list", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectionIntentsClient": "Microsoft.RecoveryServices.BackupProtectionIntent", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectionIntentsClient.list": "Microsoft.RecoveryServices.BackupProtectionIntent.list", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceEncryptionConfigsClient": "Microsoft.RecoveryServices.BackupResourceEncryptionConfigs", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceEncryptionConfigsClient.get": "Microsoft.RecoveryServices.BackupResourceEncryptionConfigs.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceEncryptionConfigsClient.getWithResponse": "Microsoft.RecoveryServices.BackupResourceEncryptionConfigs.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceEncryptionConfigsClient.update": "Microsoft.RecoveryServices.BackupResourceEncryptionConfigs.update", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceEncryptionConfigsClient.updateWithResponse": "Microsoft.RecoveryServices.BackupResourceEncryptionConfigs.update", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceStorageConfigsNonCrrsClient": "Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceStorageConfigsNonCrrsClient.get": "Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceStorageConfigsNonCrrsClient.getWithResponse": "Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceStorageConfigsNonCrrsClient.patch": "Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.patch", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceStorageConfigsNonCrrsClient.patchWithResponse": "Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.patch", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceStorageConfigsNonCrrsClient.update": "Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.update", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceStorageConfigsNonCrrsClient.updateWithResponse": "Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.update", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceVaultConfigsClient": "Microsoft.RecoveryServices.BackupResourceVaultConfigs", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceVaultConfigsClient.get": "Microsoft.RecoveryServices.BackupResourceVaultConfigs.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceVaultConfigsClient.getWithResponse": "Microsoft.RecoveryServices.BackupResourceVaultConfigs.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceVaultConfigsClient.put": "Microsoft.RecoveryServices.BackupResourceVaultConfigs.put", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceVaultConfigsClient.putWithResponse": "Microsoft.RecoveryServices.BackupResourceVaultConfigs.put", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceVaultConfigsClient.update": "Microsoft.RecoveryServices.BackupResourceVaultConfigs.update", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceVaultConfigsClient.updateWithResponse": "Microsoft.RecoveryServices.BackupResourceVaultConfigs.update", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupStatusClient": "Microsoft.RecoveryServices.BackupStatus", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupStatusClient.get": "Microsoft.RecoveryServices.BackupStatus.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupStatusClient.getWithResponse": "Microsoft.RecoveryServices.BackupStatus.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupUsageSummariesClient": "Microsoft.RecoveryServices.BackupUsageSummaries", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupUsageSummariesClient.list": "Microsoft.RecoveryServices.BackupUsageSummaries.list", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupWorkloadItemsClient": "Microsoft.RecoveryServices.BackupWorkloadItems", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupWorkloadItemsClient.list": "Microsoft.RecoveryServices.BackupWorkloadItems.list", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupsClient": "Microsoft.RecoveryServices.Backups", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupsClient.trigger": "Microsoft.RecoveryServices.Backups.trigger", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupsClient.triggerWithResponse": "Microsoft.RecoveryServices.Backups.trigger", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BmsPrepareDataMoveOperationResultsClient": "Microsoft.RecoveryServices.BMSPrepareDataMoveOperationResult", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BmsPrepareDataMoveOperationResultsClient.get": "Microsoft.RecoveryServices.BMSPrepareDataMoveOperationResult.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.BmsPrepareDataMoveOperationResultsClient.getWithResponse": "Microsoft.RecoveryServices.BMSPrepareDataMoveOperationResult.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.DeletedProtectionContainersClient": "Microsoft.RecoveryServices.DeletedProtectionContainers", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.DeletedProtectionContainersClient.list": "Microsoft.RecoveryServices.DeletedProtectionContainers.list", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ExportJobsOperationResultsClient": "Microsoft.RecoveryServices.ExportJobsOperationResults", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ExportJobsOperationResultsClient.get": "Microsoft.RecoveryServices.ExportJobsOperationResults.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ExportJobsOperationResultsClient.getWithResponse": "Microsoft.RecoveryServices.ExportJobsOperationResults.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.FeatureSupportsClient": "Microsoft.RecoveryServices.FeatureSupport", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.FeatureSupportsClient.validate": "Microsoft.RecoveryServices.FeatureSupport.validate", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.FeatureSupportsClient.validateWithResponse": "Microsoft.RecoveryServices.FeatureSupport.validate", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.FetchTieringCostsClient": "Microsoft.RecoveryServices.FetchTieringCost", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.FetchTieringCostsClient.beginPost": "Microsoft.RecoveryServices.FetchTieringCost.post", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.FetchTieringCostsClient.post": "Microsoft.RecoveryServices.FetchTieringCost.post", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.GetTieringCostOperationResultsClient": "Microsoft.RecoveryServices.GetTieringCostOperationResult", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.GetTieringCostOperationResultsClient.get": "Microsoft.RecoveryServices.GetTieringCostOperationResult.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.GetTieringCostOperationResultsClient.getWithResponse": "Microsoft.RecoveryServices.GetTieringCostOperationResult.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ItemLevelRecoveryConnectionsClient": "Microsoft.RecoveryServices.ItemLevelRecoveryConnections", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ItemLevelRecoveryConnectionsClient.provision": "Microsoft.RecoveryServices.ItemLevelRecoveryConnections.provision", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ItemLevelRecoveryConnectionsClient.provisionWithResponse": "Microsoft.RecoveryServices.ItemLevelRecoveryConnections.provision", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ItemLevelRecoveryConnectionsClient.revoke": "Microsoft.RecoveryServices.ItemLevelRecoveryConnections.revoke", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ItemLevelRecoveryConnectionsClient.revokeWithResponse": "Microsoft.RecoveryServices.ItemLevelRecoveryConnections.revoke", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.JobCancellationsClient": "Microsoft.RecoveryServices.JobCancellations", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.JobCancellationsClient.trigger": "Microsoft.RecoveryServices.JobCancellations.trigger", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.JobCancellationsClient.triggerWithResponse": "Microsoft.RecoveryServices.JobCancellations.trigger", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.JobDetailsClient": "Microsoft.RecoveryServices.JobDetails", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.JobDetailsClient.get": "Microsoft.RecoveryServices.JobDetails.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.JobDetailsClient.getWithResponse": "Microsoft.RecoveryServices.JobDetails.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.JobOperationResultsClient": "Microsoft.RecoveryServices.JobOperationResults", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.JobOperationResultsClient.get": "Microsoft.RecoveryServices.JobOperationResults.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.JobOperationResultsClient.getWithResponse": "Microsoft.RecoveryServices.JobOperationResults.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.JobsClient": "Microsoft.RecoveryServices.Jobs", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.JobsClient.export": "Microsoft.RecoveryServices.Jobs.export", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.JobsClient.exportWithResponse": "Microsoft.RecoveryServices.Jobs.export", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationOperationsClient": "Microsoft.RecoveryServices", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationOperationsClient.validate": "Microsoft.RecoveryServices.OperationOperationGroup.validate", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationOperationsClient.validateWithResponse": "Microsoft.RecoveryServices.OperationOperationGroup.validate", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationsClient": "Microsoft.RecoveryServices.Operations", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationsClient.list": "Azure.ResourceManager.Legacy.Operations.list", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointConnectionsClient": "Microsoft.RecoveryServices", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointConnectionsClient.beginDelete": "Microsoft.RecoveryServices.PrivateEndpointConnectionResources.delete", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointConnectionsClient.beginPut": "Microsoft.RecoveryServices.PrivateEndpointConnectionResources.put", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointConnectionsClient.delete": "Microsoft.RecoveryServices.PrivateEndpointConnectionResources.delete", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointConnectionsClient.get": "Microsoft.RecoveryServices.PrivateEndpointConnectionResources.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointConnectionsClient.getWithResponse": "Microsoft.RecoveryServices.PrivateEndpointConnectionResources.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointConnectionsClient.put": "Microsoft.RecoveryServices.PrivateEndpointConnectionResources.put", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointsClient": "Microsoft.RecoveryServices", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointsClient.getOperationStatus": "Microsoft.RecoveryServices.PrivateEndpointOperationStatuses.getOperationStatus", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointsClient.getOperationStatusWithResponse": "Microsoft.RecoveryServices.PrivateEndpointOperationStatuses.getOperationStatus", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectableContainersClient": "Microsoft.RecoveryServices.ProtectableContainers", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectableContainersClient.list": "Microsoft.RecoveryServices.ProtectableContainers.list", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemOperationResultsClient": "Microsoft.RecoveryServices.ProtectedItemOperationResults", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemOperationResultsClient.get": "Microsoft.RecoveryServices.ProtectedItemOperationResults.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemOperationResultsClient.getWithResponse": "Microsoft.RecoveryServices.ProtectedItemOperationResults.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemOperationStatusesClient": "Microsoft.RecoveryServices.ProtectedItemOperationStatuses", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemOperationStatusesClient.get": "Microsoft.RecoveryServices.ProtectedItemOperationStatuses.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemOperationStatusesClient.getWithResponse": "Microsoft.RecoveryServices.ProtectedItemOperationStatuses.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemsClient": "Microsoft.RecoveryServices.ProtectedItems", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemsClient.beginCreateOrUpdate": "Microsoft.RecoveryServices.ProtectedItems.createOrUpdate", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemsClient.createOrUpdate": "Microsoft.RecoveryServices.ProtectedItems.createOrUpdate", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemsClient.delete": "Microsoft.RecoveryServices.ProtectedItems.delete", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemsClient.deleteWithResponse": "Microsoft.RecoveryServices.ProtectedItems.delete", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemsClient.get": "Microsoft.RecoveryServices.ProtectedItems.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemsClient.getWithResponse": "Microsoft.RecoveryServices.ProtectedItems.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainerOperationResultsClient": "Microsoft.RecoveryServices.ProtectionContainerOperationResults", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainerOperationResultsClient.get": "Microsoft.RecoveryServices.ProtectionContainerOperationResults.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainerOperationResultsClient.getWithResponse": "Microsoft.RecoveryServices.ProtectionContainerOperationResults.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainerRefreshOperationResultsClient": "Microsoft.RecoveryServices.ProtectionContainerRefreshOperationResults", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainerRefreshOperationResultsClient.get": "Microsoft.RecoveryServices.ProtectionContainerRefreshOperationResults.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainerRefreshOperationResultsClient.getWithResponse": "Microsoft.RecoveryServices.ProtectionContainerRefreshOperationResults.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient": "Microsoft.RecoveryServices.ProtectionContainers", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.beginRegister": "Microsoft.RecoveryServices.ProtectionContainers.register", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.get": "Microsoft.RecoveryServices.ProtectionContainers.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.getWithResponse": "Microsoft.RecoveryServices.ProtectionContainers.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.inquire": "Microsoft.RecoveryServices.ProtectionContainers.inquire", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.inquireWithResponse": "Microsoft.RecoveryServices.ProtectionContainers.inquire", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.refresh": "Microsoft.RecoveryServices.ProtectionContainersOperationGroup.refresh", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.refreshWithResponse": "Microsoft.RecoveryServices.ProtectionContainersOperationGroup.refresh", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.register": "Microsoft.RecoveryServices.ProtectionContainers.register", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.unregister": "Microsoft.RecoveryServices.ProtectionContainers.unregister", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.unregisterWithResponse": "Microsoft.RecoveryServices.ProtectionContainers.unregister", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient": "Microsoft.RecoveryServices", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient.createOrUpdate": "Microsoft.RecoveryServices.ProtectionIntentResources.createOrUpdate", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient.createOrUpdateWithResponse": "Microsoft.RecoveryServices.ProtectionIntentResources.createOrUpdate", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient.delete": "Microsoft.RecoveryServices.ProtectionIntentResources.delete", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient.deleteWithResponse": "Microsoft.RecoveryServices.ProtectionIntentResources.delete", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient.get": "Microsoft.RecoveryServices.ProtectionIntentResources.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient.getWithResponse": "Microsoft.RecoveryServices.ProtectionIntentResources.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient.validate": "Microsoft.RecoveryServices.ProtectionIntentOperationGroup.validate", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient.validateWithResponse": "Microsoft.RecoveryServices.ProtectionIntentOperationGroup.validate", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPoliciesClient": "Microsoft.RecoveryServices.ProtectionPolicies", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPoliciesClient.beginDelete": "Microsoft.RecoveryServices.ProtectionPolicies.delete", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPoliciesClient.createOrUpdate": "Microsoft.RecoveryServices.ProtectionPolicies.createOrUpdate", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPoliciesClient.createOrUpdateWithResponse": "Microsoft.RecoveryServices.ProtectionPolicies.createOrUpdate", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPoliciesClient.delete": "Microsoft.RecoveryServices.ProtectionPolicies.delete", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPoliciesClient.get": "Microsoft.RecoveryServices.ProtectionPolicies.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPoliciesClient.getWithResponse": "Microsoft.RecoveryServices.ProtectionPolicies.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPolicyOperationResultsClient": "Microsoft.RecoveryServices.ProtectionPolicyOperationResults", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPolicyOperationResultsClient.get": "Microsoft.RecoveryServices.ProtectionPolicyOperationResults.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPolicyOperationResultsClient.getWithResponse": "Microsoft.RecoveryServices.ProtectionPolicyOperationResults.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPolicyOperationStatusesClient": "Microsoft.RecoveryServices.ProtectionPolicyOperationStatuses", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPolicyOperationStatusesClient.get": "Microsoft.RecoveryServices.ProtectionPolicyOperationStatuses.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPolicyOperationStatusesClient.getWithResponse": "Microsoft.RecoveryServices.ProtectionPolicyOperationStatuses.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsClient": "Microsoft.RecoveryServices.RecoveryPoints", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsClient.get": "Microsoft.RecoveryServices.RecoveryPoints.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsClient.getWithResponse": "Microsoft.RecoveryServices.RecoveryPoints.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsClient.list": "Microsoft.RecoveryServices.RecoveryPoints.list", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsClient.update": "Microsoft.RecoveryServices.RecoveryPoints.update", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsClient.updateWithResponse": "Microsoft.RecoveryServices.RecoveryPoints.update", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsRecommendedForMovesClient": "Microsoft.RecoveryServices.RecoveryPointsRecommendedForMove", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsRecommendedForMovesClient.list": "Microsoft.RecoveryServices.RecoveryPointsRecommendedForMove.list", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryServicesBackupManagementClient": "Microsoft.RecoveryServices", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient": "Microsoft.RecoveryServices", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.delete": "Microsoft.RecoveryServices.ResourceGuardProxy.delete", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.deleteWithResponse": "Microsoft.RecoveryServices.ResourceGuardProxy.delete", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.get": "Microsoft.RecoveryServices.ResourceGuardProxy.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.getWithResponse": "Microsoft.RecoveryServices.ResourceGuardProxy.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.list": "Microsoft.RecoveryServices.ResourceGuardProxies.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.put": "Microsoft.RecoveryServices.ResourceGuardProxy.put", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.putWithResponse": "Microsoft.RecoveryServices.ResourceGuardProxy.put", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.unlockDelete": "Microsoft.RecoveryServices.ResourceGuardProxy.unlockDelete", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.unlockDeleteWithResponse": "Microsoft.RecoveryServices.ResourceGuardProxy.unlockDelete", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient": "Microsoft.RecoveryServices", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient.beginBmsPrepareDataMove": "Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.bmsPrepareDataMove", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient.beginBmsTriggerDataMove": "Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.bmsTriggerDataMove", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient.beginMoveRecoveryPoint": "Microsoft.RecoveryServices.RecoveryPoints.moveRecoveryPoint", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient.bmsPrepareDataMove": "Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.bmsPrepareDataMove", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient.bmsTriggerDataMove": "Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.bmsTriggerDataMove", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient.getOperationStatus": "Microsoft.RecoveryServices.BackupResourceConfigOperationStatuses.getOperationStatus", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient.getOperationStatusWithResponse": "Microsoft.RecoveryServices.BackupResourceConfigOperationStatuses.getOperationStatus", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient.moveRecoveryPoint": "Microsoft.RecoveryServices.RecoveryPoints.moveRecoveryPoint", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.RestoresClient": "Microsoft.RecoveryServices.Restores", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.RestoresClient.beginTrigger": "Microsoft.RecoveryServices.Restores.trigger", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.RestoresClient.trigger": "Microsoft.RecoveryServices.Restores.trigger", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.SecurityPINsClient": "Microsoft.RecoveryServices.SecurityPINs", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.SecurityPINsClient.get": "Microsoft.RecoveryServices.SecurityPINs.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.SecurityPINsClient.getWithResponse": "Microsoft.RecoveryServices.SecurityPINs.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.TieringCostOperationStatusClient": "Microsoft.RecoveryServices.TieringCostOperationStatus", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.TieringCostOperationStatusClient.get": "Microsoft.RecoveryServices.TieringCostOperationStatus.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.TieringCostOperationStatusClient.getWithResponse": "Microsoft.RecoveryServices.TieringCostOperationStatus.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationResultsClient": "Microsoft.RecoveryServices.ValidateOperationResults", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationResultsClient.get": "Microsoft.RecoveryServices.ValidateOperationResults.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationResultsClient.getWithResponse": "Microsoft.RecoveryServices.ValidateOperationResults.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationStatusesClient": "Microsoft.RecoveryServices.ValidateOperationStatuses", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationStatusesClient.get": "Microsoft.RecoveryServices.ValidateOperationStatuses.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationStatusesClient.getWithResponse": "Microsoft.RecoveryServices.ValidateOperationStatuses.get", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationsClient": "Microsoft.RecoveryServices.ValidateOperation", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationsClient.beginTrigger": "Microsoft.RecoveryServices.ValidateOperation.trigger", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationsClient.trigger": "Microsoft.RecoveryServices.ValidateOperation.trigger", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.AzureVMResourceFeatureSupportResponseInner": "Microsoft.RecoveryServices.AzureVMResourceFeatureSupportResponse", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupEngineBaseResourceInner": "Microsoft.RecoveryServices.BackupEngineBaseResource", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupManagementUsageInner": "Microsoft.RecoveryServices.BackupManagementUsage", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceConfigResourceInner": "Microsoft.RecoveryServices.BackupResourceConfigResource", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigExtendedResourceInner": "Microsoft.RecoveryServices.BackupResourceEncryptionConfigExtendedResource", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceVaultConfigResourceInner": "Microsoft.RecoveryServices.BackupResourceVaultConfigResource", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupStatusResponseInner": "Microsoft.RecoveryServices.BackupStatusResponse", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ClientDiscoveryValueForSingleApiInner": "Microsoft.RecoveryServices.ClientDiscoveryValueForSingleApi", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.JobResourceInner": "Microsoft.RecoveryServices.JobResource", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.OperationResultInfoBaseResourceInner": "Microsoft.RecoveryServices.OperationResultInfoBaseResource", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.OperationStatusInner": "Microsoft.RecoveryServices.OperationStatus", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.PreValidateEnableBackupResponseInner": "Microsoft.RecoveryServices.PreValidateEnableBackupResponse", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.PrivateEndpointConnectionResourceInner": "Microsoft.RecoveryServices.PrivateEndpointConnectionResource", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectableContainerResourceInner": "Microsoft.RecoveryServices.ProtectableContainerResource", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectedItemResourceInner": "Microsoft.RecoveryServices.ProtectedItemResource", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionContainerResourceInner": "Microsoft.RecoveryServices.ProtectionContainerResource", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionIntentResourceInner": "Microsoft.RecoveryServices.ProtectionIntentResource", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionPolicyResourceInner": "Microsoft.RecoveryServices.ProtectionPolicyResource", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.RecoveryPointResourceInner": "Microsoft.RecoveryServices.RecoveryPointResource", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ResourceGuardProxyBaseResourceInner": "Microsoft.RecoveryServices.ResourceGuardProxyBaseResource", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.TieringCostInfoInner": "Microsoft.RecoveryServices.TieringCostInfo", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.TokenInformationInner": "Microsoft.RecoveryServices.TokenInformation", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.UnlockDeleteResponseInner": "Microsoft.RecoveryServices.UnlockDeleteResponse", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ValidateOperationsResponseInner": "Microsoft.RecoveryServices.ValidateOperationsResponse", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.VaultStorageConfigOperationResultResponseInner": "Microsoft.RecoveryServices.VaultStorageConfigOperationResultResponse", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadItemResourceInner": "Microsoft.RecoveryServices.WorkloadItemResource", + "com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadProtectableItemResourceInner": "Microsoft.RecoveryServices.WorkloadProtectableItemResource", + "com.azure.resourcemanager.recoveryservicesbackup.implementation.RecoveryServicesBackupManagementClientBuilder": "Microsoft.RecoveryServices", + "com.azure.resourcemanager.recoveryservicesbackup.implementation.models.BackupEngineBaseResourceList": "Microsoft.RecoveryServices.BackupEngineBaseResourceList", + "com.azure.resourcemanager.recoveryservicesbackup.implementation.models.BackupManagementUsageList": "Microsoft.RecoveryServices.BackupManagementUsageList", + "com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ClientDiscoveryResponse": "Microsoft.RecoveryServices.ClientDiscoveryResponse", + "com.azure.resourcemanager.recoveryservicesbackup.implementation.models.JobResourceList": "Microsoft.RecoveryServices.JobResourceList", + "com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectableContainerResourceList": "Microsoft.RecoveryServices.ProtectableContainerResourceList", + "com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectedItemResourceList": "Microsoft.RecoveryServices.ProtectedItemResourceList", + "com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectionContainerResourceList": "Microsoft.RecoveryServices.ProtectionContainerResourceList", + "com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectionIntentResourceList": "Microsoft.RecoveryServices.ProtectionIntentResourceList", + "com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectionPolicyResourceList": "Microsoft.RecoveryServices.ProtectionPolicyResourceList", + "com.azure.resourcemanager.recoveryservicesbackup.implementation.models.RecoveryPointResourceList": "Microsoft.RecoveryServices.RecoveryPointResourceList", + "com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ResourceGuardProxyBaseResourceList": "Microsoft.RecoveryServices.ResourceGuardProxyBaseResourceList", + "com.azure.resourcemanager.recoveryservicesbackup.implementation.models.WorkloadItemResourceList": "Microsoft.RecoveryServices.WorkloadItemResourceList", + "com.azure.resourcemanager.recoveryservicesbackup.implementation.models.WorkloadProtectableItemResourceList": "Microsoft.RecoveryServices.WorkloadProtectableItemResourceList", + "com.azure.resourcemanager.recoveryservicesbackup.models.AcquireStorageAccountLock": "Microsoft.RecoveryServices.AcquireStorageAccountLock", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureBackupGoalFeatureSupportRequest": "Microsoft.RecoveryServices.AzureBackupGoalFeatureSupportRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureBackupServerContainer": "Microsoft.RecoveryServices.AzureBackupServerContainer", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureBackupServerEngine": "Microsoft.RecoveryServices.AzureBackupServerEngine", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareBackupRequest": "Microsoft.RecoveryServices.AzureFileShareBackupRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareProtectableItem": "Microsoft.RecoveryServices.AzureFileShareProtectableItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareProtectionPolicy": "Microsoft.RecoveryServices.AzureFileShareProtectionPolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareProvisionIlrRequest": "Microsoft.RecoveryServices.AzureFileShareProvisionILRRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareRecoveryPoint": "Microsoft.RecoveryServices.AzureFileShareRecoveryPoint", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareRestoreRequest": "Microsoft.RecoveryServices.AzureFileShareRestoreRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareType": "Microsoft.RecoveryServices.AzureFileShareType", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileshareProtectedItem": "Microsoft.RecoveryServices.AzureFileshareProtectedItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileshareProtectedItemExtendedInfo": "Microsoft.RecoveryServices.AzureFileshareProtectedItemExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSClassicComputeVMContainer": "Microsoft.RecoveryServices.AzureIaaSClassicComputeVMContainer", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSClassicComputeVMProtectableItem": "Microsoft.RecoveryServices.AzureIaaSClassicComputeVMProtectableItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSClassicComputeVMProtectedItem": "Microsoft.RecoveryServices.AzureIaaSClassicComputeVMProtectedItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSComputeVMContainer": "Microsoft.RecoveryServices.AzureIaaSComputeVMContainer", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSComputeVMProtectableItem": "Microsoft.RecoveryServices.AzureIaaSComputeVMProtectableItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSComputeVMProtectedItem": "Microsoft.RecoveryServices.AzureIaaSComputeVMProtectedItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmErrorInfo": "Microsoft.RecoveryServices.AzureIaaSVMErrorInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmHealthDetails": "Microsoft.RecoveryServices.AzureIaaSVMHealthDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmJob": "Microsoft.RecoveryServices.AzureIaaSVMJob", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmJobExtendedInfo": "Microsoft.RecoveryServices.AzureIaaSVMJobExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmJobTaskDetails": "Microsoft.RecoveryServices.AzureIaaSVMJobTaskDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmJobV2": "Microsoft.RecoveryServices.AzureIaaSVMJobV2", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmProtectedItem": "Microsoft.RecoveryServices.AzureIaaSVMProtectedItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmProtectedItemExtendedInfo": "Microsoft.RecoveryServices.AzureIaaSVMProtectedItemExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmProtectionPolicy": "Microsoft.RecoveryServices.AzureIaaSVMProtectionPolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureRecoveryServiceVaultProtectionIntent": "Microsoft.RecoveryServices.AzureRecoveryServiceVaultProtectionIntent", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureResourceProtectionIntent": "Microsoft.RecoveryServices.AzureResourceProtectionIntent", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlContainer": "Microsoft.RecoveryServices.AzureSqlContainer", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlProtectedItem": "Microsoft.RecoveryServices.AzureSqlProtectedItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlProtectedItemExtendedInfo": "Microsoft.RecoveryServices.AzureSqlProtectedItemExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlProtectionPolicy": "Microsoft.RecoveryServices.AzureSqlProtectionPolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlagWorkloadContainerProtectionContainer": "Microsoft.RecoveryServices.AzureSQLAGWorkloadContainerProtectionContainer", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageContainer": "Microsoft.RecoveryServices.AzureStorageContainer", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageErrorInfo": "Microsoft.RecoveryServices.AzureStorageErrorInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageJob": "Microsoft.RecoveryServices.AzureStorageJob", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageJobExtendedInfo": "Microsoft.RecoveryServices.AzureStorageJobExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageJobTaskDetails": "Microsoft.RecoveryServices.AzureStorageJobTaskDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageProtectableContainer": "Microsoft.RecoveryServices.AzureStorageProtectableContainer", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVMAppContainerProtectableContainer": "Microsoft.RecoveryServices.AzureVMAppContainerProtectableContainer", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVMAppContainerProtectionContainer": "Microsoft.RecoveryServices.AzureVMAppContainerProtectionContainer", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVMResourceFeatureSupportRequest": "Microsoft.RecoveryServices.AzureVMResourceFeatureSupportRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadItem": "Microsoft.RecoveryServices.AzureVmWorkloadItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadProtectableItem": "Microsoft.RecoveryServices.AzureVmWorkloadProtectableItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadProtectedItem": "Microsoft.RecoveryServices.AzureVmWorkloadProtectedItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo": "Microsoft.RecoveryServices.AzureVmWorkloadProtectedItemExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadProtectionPolicy": "Microsoft.RecoveryServices.AzureVmWorkloadProtectionPolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSAPHanaScaleoutProtectableItem": "Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaScaleoutProtectableItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSQLInstanceProtectedItem": "Microsoft.RecoveryServices.AzureVmWorkloadSQLInstanceProtectedItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapAseDatabaseProtectableItem": "Microsoft.RecoveryServices.AzureVmWorkloadSAPAseDatabaseProtectableItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapAseDatabaseProtectedItem": "Microsoft.RecoveryServices.AzureVmWorkloadSAPAseDatabaseProtectedItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapAseDatabaseWorkloadItem": "Microsoft.RecoveryServices.AzureVmWorkloadSAPAseDatabaseWorkloadItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapAseSystemProtectableItem": "Microsoft.RecoveryServices.AzureVmWorkloadSAPAseSystemProtectableItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapAseSystemWorkloadItem": "Microsoft.RecoveryServices.AzureVmWorkloadSAPAseSystemWorkloadItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaDBInstance": "Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaDBInstance", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaDBInstanceProtectedItem": "Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaDBInstanceProtectedItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaDatabaseProtectableItem": "Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaDatabaseProtectableItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaDatabaseProtectedItem": "Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaDatabaseProtectedItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaDatabaseWorkloadItem": "Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaDatabaseWorkloadItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaHsr": "Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaHSRProtectableItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaSystemProtectableItem": "Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaSystemProtectableItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaSystemWorkloadItem": "Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaSystemWorkloadItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSqlAvailabilityGroupProtectableItem": "Microsoft.RecoveryServices.AzureVmWorkloadSQLAvailabilityGroupProtectableItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSqlDatabaseProtectableItem": "Microsoft.RecoveryServices.AzureVmWorkloadSQLDatabaseProtectableItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSqlDatabaseProtectedItem": "Microsoft.RecoveryServices.AzureVmWorkloadSQLDatabaseProtectedItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSqlDatabaseWorkloadItem": "Microsoft.RecoveryServices.AzureVmWorkloadSQLDatabaseWorkloadItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSqlInstanceProtectableItem": "Microsoft.RecoveryServices.AzureVmWorkloadSQLInstanceProtectableItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSqlInstanceWorkloadItem": "Microsoft.RecoveryServices.AzureVmWorkloadSQLInstanceWorkloadItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadAutoProtectionIntent": "Microsoft.RecoveryServices.AzureWorkloadAutoProtectionIntent", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadBackupRequest": "Microsoft.RecoveryServices.AzureWorkloadBackupRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadContainer": "Microsoft.RecoveryServices.AzureWorkloadContainer", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadContainerAutoProtectionIntent": "Microsoft.RecoveryServices.AzureWorkloadContainerAutoProtectionIntent", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo": "Microsoft.RecoveryServices.AzureWorkloadContainerExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadErrorInfo": "Microsoft.RecoveryServices.AzureWorkloadErrorInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadJob": "Microsoft.RecoveryServices.AzureWorkloadJob", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadJobExtendedInfo": "Microsoft.RecoveryServices.AzureWorkloadJobExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadJobTaskDetails": "Microsoft.RecoveryServices.AzureWorkloadJobTaskDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadPointInTimeRecoveryPoint": "Microsoft.RecoveryServices.AzureWorkloadPointInTimeRecoveryPoint", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadPointInTimeRestoreRequest": "Microsoft.RecoveryServices.AzureWorkloadPointInTimeRestoreRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadRecoveryPoint": "Microsoft.RecoveryServices.AzureWorkloadRecoveryPoint", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadRestoreRequest": "Microsoft.RecoveryServices.AzureWorkloadRestoreRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapAsePointInTimeRecoveryPoint": "Microsoft.RecoveryServices.AzureWorkloadSAPAsePointInTimeRecoveryPoint", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapAsePointInTimeRestoreRequest": "Microsoft.RecoveryServices.AzureWorkloadSAPAsePointInTimeRestoreRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapAseRecoveryPoint": "Microsoft.RecoveryServices.AzureWorkloadSAPAseRecoveryPoint", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapAseRestoreRequest": "Microsoft.RecoveryServices.AzureWorkloadSAPAseRestoreRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaPointInTimeRecoveryPoint": "Microsoft.RecoveryServices.AzureWorkloadSAPHanaPointInTimeRecoveryPoint", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaPointInTimeRestoreRequest": "Microsoft.RecoveryServices.AzureWorkloadSAPHanaPointInTimeRestoreRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest": "Microsoft.RecoveryServices.AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaRecoveryPoint": "Microsoft.RecoveryServices.AzureWorkloadSAPHanaRecoveryPoint", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaRestoreRequest": "Microsoft.RecoveryServices.AzureWorkloadSAPHanaRestoreRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaRestoreWithRehydrateRequest": "Microsoft.RecoveryServices.AzureWorkloadSAPHanaRestoreWithRehydrateRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlAutoProtectionIntent": "Microsoft.RecoveryServices.AzureWorkloadSQLAutoProtectionIntent", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlPointInTimeRecoveryPoint": "Microsoft.RecoveryServices.AzureWorkloadSQLPointInTimeRecoveryPoint", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlPointInTimeRestoreRequest": "Microsoft.RecoveryServices.AzureWorkloadSQLPointInTimeRestoreRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest": "Microsoft.RecoveryServices.AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlRecoveryPoint": "Microsoft.RecoveryServices.AzureWorkloadSQLRecoveryPoint", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlRecoveryPointExtendedInfo": "Microsoft.RecoveryServices.AzureWorkloadSQLRecoveryPointExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlRestoreRequest": "Microsoft.RecoveryServices.AzureWorkloadSQLRestoreRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlRestoreWithRehydrateRequest": "Microsoft.RecoveryServices.AzureWorkloadSQLRestoreWithRehydrateRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineBase": "Microsoft.RecoveryServices.BackupEngineBase", + "com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineExtendedInfo": "Microsoft.RecoveryServices.BackupEngineExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineType": "Microsoft.RecoveryServices.BackupEngineType", + "com.azure.resourcemanager.recoveryservicesbackup.models.BackupItemType": "Microsoft.RecoveryServices.BackupItemType", + "com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType": "Microsoft.RecoveryServices.BackupManagementType", + "com.azure.resourcemanager.recoveryservicesbackup.models.BackupRequest": "Microsoft.RecoveryServices.BackupRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.BackupRequestResource": "Microsoft.RecoveryServices.BackupRequestResource", + "com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceConfig": "Microsoft.RecoveryServices.BackupResourceConfig", + "com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfig": "Microsoft.RecoveryServices.BackupResourceEncryptionConfig", + "com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtended": "Microsoft.RecoveryServices.BackupResourceEncryptionConfigExtended", + "com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource": "Microsoft.RecoveryServices.BackupResourceEncryptionConfigResource", + "com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceVaultConfig": "Microsoft.RecoveryServices.BackupResourceVaultConfig", + "com.azure.resourcemanager.recoveryservicesbackup.models.BackupStatusRequest": "Microsoft.RecoveryServices.BackupStatusRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.BackupType": "Microsoft.RecoveryServices.BackupType", + "com.azure.resourcemanager.recoveryservicesbackup.models.BekDetails": "Microsoft.RecoveryServices.BEKDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryDisplay": "Microsoft.RecoveryServices.ClientDiscoveryDisplay", + "com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification": "Microsoft.RecoveryServices.ClientDiscoveryForLogSpecification", + "com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForProperties": "Microsoft.RecoveryServices.ClientDiscoveryForProperties", + "com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification": "Microsoft.RecoveryServices.ClientDiscoveryForServiceSpecification", + "com.azure.resourcemanager.recoveryservicesbackup.models.ClientScriptForConnect": "Microsoft.RecoveryServices.ClientScriptForConnect", + "com.azure.resourcemanager.recoveryservicesbackup.models.ContainerIdentityInfo": "Microsoft.RecoveryServices.ContainerIdentityInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.CopyOptions": "Microsoft.RecoveryServices.CopyOptions", + "com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode": "Microsoft.RecoveryServices.CreateMode", + "com.azure.resourcemanager.recoveryservicesbackup.models.DailyRetentionFormat": "Microsoft.RecoveryServices.DailyRetentionFormat", + "com.azure.resourcemanager.recoveryservicesbackup.models.DailyRetentionSchedule": "Microsoft.RecoveryServices.DailyRetentionSchedule", + "com.azure.resourcemanager.recoveryservicesbackup.models.DailySchedule": "Microsoft.RecoveryServices.DailySchedule", + "com.azure.resourcemanager.recoveryservicesbackup.models.DataMoveLevel": "Microsoft.RecoveryServices.DataMoveLevel", + "com.azure.resourcemanager.recoveryservicesbackup.models.DataSourceType": "Microsoft.RecoveryServices.DataSourceType", + "com.azure.resourcemanager.recoveryservicesbackup.models.DatabaseInRP": "Microsoft.RecoveryServices.DatabaseInRP", + "com.azure.resourcemanager.recoveryservicesbackup.models.Day": "Microsoft.RecoveryServices.Day", + "com.azure.resourcemanager.recoveryservicesbackup.models.DayOfWeek": "Microsoft.RecoveryServices.DayOfWeek", + "com.azure.resourcemanager.recoveryservicesbackup.models.DedupState": "Microsoft.RecoveryServices.DedupState", + "com.azure.resourcemanager.recoveryservicesbackup.models.DiskExclusionProperties": "Microsoft.RecoveryServices.DiskExclusionProperties", + "com.azure.resourcemanager.recoveryservicesbackup.models.DiskInformation": "Microsoft.RecoveryServices.DiskInformation", + "com.azure.resourcemanager.recoveryservicesbackup.models.DistributedNodesInfo": "Microsoft.RecoveryServices.DistributedNodesInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.DpmBackupEngine": "Microsoft.RecoveryServices.DpmBackupEngine", + "com.azure.resourcemanager.recoveryservicesbackup.models.DpmContainer": "Microsoft.RecoveryServices.DpmContainer", + "com.azure.resourcemanager.recoveryservicesbackup.models.DpmContainerExtendedInfo": "Microsoft.RecoveryServices.DPMContainerExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.DpmErrorInfo": "Microsoft.RecoveryServices.DpmErrorInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.DpmJob": "Microsoft.RecoveryServices.DpmJob", + "com.azure.resourcemanager.recoveryservicesbackup.models.DpmJobExtendedInfo": "Microsoft.RecoveryServices.DpmJobExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.DpmJobTaskDetails": "Microsoft.RecoveryServices.DpmJobTaskDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.DpmProtectedItem": "Microsoft.RecoveryServices.DPMProtectedItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.DpmProtectedItemExtendedInfo": "Microsoft.RecoveryServices.DPMProtectedItemExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.EncryptionAtRestType": "Microsoft.RecoveryServices.EncryptionAtRestType", + "com.azure.resourcemanager.recoveryservicesbackup.models.EncryptionDetails": "Microsoft.RecoveryServices.EncryptionDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.EnhancedSecurityState": "Microsoft.RecoveryServices.EnhancedSecurityState", + "com.azure.resourcemanager.recoveryservicesbackup.models.ErrorDetail": "Microsoft.RecoveryServices.ErrorDetail", + "com.azure.resourcemanager.recoveryservicesbackup.models.ExportJobsOperationResultInfo": "Microsoft.RecoveryServices.ExportJobsOperationResultInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.ExtendedLocation": "Microsoft.RecoveryServices.ExtendedLocation", + "com.azure.resourcemanager.recoveryservicesbackup.models.ExtendedProperties": "Microsoft.RecoveryServices.ExtendedProperties", + "com.azure.resourcemanager.recoveryservicesbackup.models.FabricName": "Microsoft.RecoveryServices.FabricName", + "com.azure.resourcemanager.recoveryservicesbackup.models.FeatureSupportRequest": "Microsoft.RecoveryServices.FeatureSupportRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.FetchTieringCostInfoForRehydrationRequest": "Microsoft.RecoveryServices.FetchTieringCostInfoForRehydrationRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.FetchTieringCostInfoRequest": "Microsoft.RecoveryServices.FetchTieringCostInfoRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.FetchTieringCostSavingsInfoForPolicyRequest": "Microsoft.RecoveryServices.FetchTieringCostSavingsInfoForPolicyRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.FetchTieringCostSavingsInfoForProtectedItemRequest": "Microsoft.RecoveryServices.FetchTieringCostSavingsInfoForProtectedItemRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.FetchTieringCostSavingsInfoForVaultRequest": "Microsoft.RecoveryServices.FetchTieringCostSavingsInfoForVaultRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.GenericContainer": "Microsoft.RecoveryServices.GenericContainer", + "com.azure.resourcemanager.recoveryservicesbackup.models.GenericContainerExtendedInfo": "Microsoft.RecoveryServices.GenericContainerExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.GenericProtectedItem": "Microsoft.RecoveryServices.GenericProtectedItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.GenericProtectionPolicy": "Microsoft.RecoveryServices.GenericProtectionPolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.GenericRecoveryPoint": "Microsoft.RecoveryServices.GenericRecoveryPoint", + "com.azure.resourcemanager.recoveryservicesbackup.models.HealthStatus": "Microsoft.RecoveryServices.HealthStatus", + "com.azure.resourcemanager.recoveryservicesbackup.models.HourlySchedule": "Microsoft.RecoveryServices.HourlySchedule", + "com.azure.resourcemanager.recoveryservicesbackup.models.HttpStatusCode": "Microsoft.RecoveryServices.HttpStatusCode", + "com.azure.resourcemanager.recoveryservicesbackup.models.IaaSvmContainer": "Microsoft.RecoveryServices.IaaSVMContainer", + "com.azure.resourcemanager.recoveryservicesbackup.models.IaasVMBackupRequest": "Microsoft.RecoveryServices.IaasVMBackupRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.IaasVMRecoveryPoint": "Microsoft.RecoveryServices.IaasVMRecoveryPoint", + "com.azure.resourcemanager.recoveryservicesbackup.models.IaasVMRestoreRequest": "Microsoft.RecoveryServices.IaasVMRestoreRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.IaasVMRestoreWithRehydrationRequest": "Microsoft.RecoveryServices.IaasVMRestoreWithRehydrationRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.IaasVMSnapshotConsistencyType": "Microsoft.RecoveryServices.IaasVMSnapshotConsistencyType", + "com.azure.resourcemanager.recoveryservicesbackup.models.IaasVmProtectableItem": "Microsoft.RecoveryServices.IaaSVMProtectableItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.IaasVmilrRegistrationRequest": "Microsoft.RecoveryServices.IaasVMILRRegistrationRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.IaasvmPolicyType": "Microsoft.RecoveryServices.IAASVMPolicyType", + "com.azure.resourcemanager.recoveryservicesbackup.models.IdentityBasedRestoreDetails": "Microsoft.RecoveryServices.IdentityBasedRestoreDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.IdentityInfo": "Microsoft.RecoveryServices.IdentityInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.IlrRequest": "Microsoft.RecoveryServices.ILRRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.IlrRequestResource": "Microsoft.RecoveryServices.ILRRequestResource", + "com.azure.resourcemanager.recoveryservicesbackup.models.InfrastructureEncryptionState": "Microsoft.RecoveryServices.InfrastructureEncryptionState", + "com.azure.resourcemanager.recoveryservicesbackup.models.InquiryInfo": "Microsoft.RecoveryServices.InquiryInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.InquiryStatus": "Microsoft.RecoveryServices.InquiryStatus", + "com.azure.resourcemanager.recoveryservicesbackup.models.InquiryValidation": "Microsoft.RecoveryServices.InquiryValidation", + "com.azure.resourcemanager.recoveryservicesbackup.models.InstanceProtectionReadiness": "Microsoft.RecoveryServices.InstanceProtectionReadiness", + "com.azure.resourcemanager.recoveryservicesbackup.models.InstantItemRecoveryTarget": "Microsoft.RecoveryServices.InstantItemRecoveryTarget", + "com.azure.resourcemanager.recoveryservicesbackup.models.InstantRPAdditionalDetails": "Microsoft.RecoveryServices.InstantRPAdditionalDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.Job": "Microsoft.RecoveryServices.Job", + "com.azure.resourcemanager.recoveryservicesbackup.models.JobSupportedAction": "Microsoft.RecoveryServices.JobSupportedAction", + "com.azure.resourcemanager.recoveryservicesbackup.models.KekDetails": "Microsoft.RecoveryServices.KEKDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.KeyAndSecretDetails": "Microsoft.RecoveryServices.KeyAndSecretDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.KpiResourceHealthDetails": "Microsoft.RecoveryServices.KPIResourceHealthDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.LastBackupStatus": "Microsoft.RecoveryServices.LastBackupStatus", + "com.azure.resourcemanager.recoveryservicesbackup.models.LastUpdateStatus": "Microsoft.RecoveryServices.LastUpdateStatus", + "com.azure.resourcemanager.recoveryservicesbackup.models.ListRecoveryPointsRecommendedForMoveRequest": "Microsoft.RecoveryServices.ListRecoveryPointsRecommendedForMoveRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.LogSchedulePolicy": "Microsoft.RecoveryServices.LogSchedulePolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.LongTermRetentionPolicy": "Microsoft.RecoveryServices.LongTermRetentionPolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.LongTermSchedulePolicy": "Microsoft.RecoveryServices.LongTermSchedulePolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.MabContainer": "Microsoft.RecoveryServices.MabContainer", + "com.azure.resourcemanager.recoveryservicesbackup.models.MabContainerExtendedInfo": "Microsoft.RecoveryServices.MabContainerExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.MabContainerHealthDetails": "Microsoft.RecoveryServices.MABContainerHealthDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.MabErrorInfo": "Microsoft.RecoveryServices.MabErrorInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.MabFileFolderProtectedItem": "Microsoft.RecoveryServices.MabFileFolderProtectedItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.MabFileFolderProtectedItemExtendedInfo": "Microsoft.RecoveryServices.MabFileFolderProtectedItemExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.MabJob": "Microsoft.RecoveryServices.MabJob", + "com.azure.resourcemanager.recoveryservicesbackup.models.MabJobExtendedInfo": "Microsoft.RecoveryServices.MabJobExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.MabJobTaskDetails": "Microsoft.RecoveryServices.MabJobTaskDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.MabProtectionPolicy": "Microsoft.RecoveryServices.MabProtectionPolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.MabServerType": "Microsoft.RecoveryServices.MabServerType", + "com.azure.resourcemanager.recoveryservicesbackup.models.MonthOfYear": "Microsoft.RecoveryServices.MonthOfYear", + "com.azure.resourcemanager.recoveryservicesbackup.models.MonthlyRetentionSchedule": "Microsoft.RecoveryServices.MonthlyRetentionSchedule", + "com.azure.resourcemanager.recoveryservicesbackup.models.MoveRPAcrossTiersRequest": "Microsoft.RecoveryServices.MoveRPAcrossTiersRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.NameInfo": "Microsoft.RecoveryServices.NameInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.OkResponse": "TypeSpec.Http.OkResponse", + "com.azure.resourcemanager.recoveryservicesbackup.models.OperationResultInfo": "Microsoft.RecoveryServices.OperationResultInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.OperationResultInfoBase": "Microsoft.RecoveryServices.OperationResultInfoBase", + "com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusError": "Microsoft.RecoveryServices.OperationStatusError", + "com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusExtendedInfo": "Microsoft.RecoveryServices.OperationStatusExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusJobExtendedInfo": "Microsoft.RecoveryServices.OperationStatusJobExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusJobsExtendedInfo": "Microsoft.RecoveryServices.OperationStatusJobsExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusProvisionIlrExtendedInfo": "Microsoft.RecoveryServices.OperationStatusProvisionILRExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusValidateOperationExtendedInfo": "Microsoft.RecoveryServices.OperationStatusValidateOperationExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusValues": "Microsoft.RecoveryServices.OperationStatusValues", + "com.azure.resourcemanager.recoveryservicesbackup.models.OperationType": "Microsoft.RecoveryServices.OperationType", + "com.azure.resourcemanager.recoveryservicesbackup.models.OperationWorkerResponse": "Microsoft.RecoveryServices.OperationWorkerResponse", + "com.azure.resourcemanager.recoveryservicesbackup.models.OverwriteOptions": "Microsoft.RecoveryServices.OverwriteOptions", + "com.azure.resourcemanager.recoveryservicesbackup.models.PatchRecoveryPointInput": "Microsoft.RecoveryServices.PatchRecoveryPointInput", + "com.azure.resourcemanager.recoveryservicesbackup.models.PatchRecoveryPointPropertiesInput": "Microsoft.RecoveryServices.PatchRecoveryPointPropertiesInput", + "com.azure.resourcemanager.recoveryservicesbackup.models.PointInTimeRange": "Microsoft.RecoveryServices.PointInTimeRange", + "com.azure.resourcemanager.recoveryservicesbackup.models.PolicyType": "Microsoft.RecoveryServices.PolicyType", + "com.azure.resourcemanager.recoveryservicesbackup.models.PreBackupValidation": "Microsoft.RecoveryServices.PreBackupValidation", + "com.azure.resourcemanager.recoveryservicesbackup.models.PreValidateEnableBackupRequest": "Microsoft.RecoveryServices.PreValidateEnableBackupRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.PrepareDataMoveRequest": "Microsoft.RecoveryServices.PrepareDataMoveRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.PrepareDataMoveResponse": "Microsoft.RecoveryServices.PrepareDataMoveResponse", + "com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpoint": "Microsoft.RecoveryServices.PrivateEndpoint", + "com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnection": "Microsoft.RecoveryServices.PrivateEndpointConnection", + "com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnectionStatus": "Microsoft.RecoveryServices.PrivateEndpointConnectionStatus", + "com.azure.resourcemanager.recoveryservicesbackup.models.PrivateLinkServiceConnectionState": "Microsoft.RecoveryServices.PrivateLinkServiceConnectionState", + "com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainer": "Microsoft.RecoveryServices.ProtectableContainer", + "com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainerType": "Microsoft.RecoveryServices.ProtectableContainerType", + "com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItem": "Microsoft.RecoveryServices.ProtectedItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItemHealthStatus": "Microsoft.RecoveryServices.ProtectedItemHealthStatus", + "com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItemState": "Microsoft.RecoveryServices.ProtectedItemState", + "com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionContainer": "Microsoft.RecoveryServices.ProtectionContainer", + "com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionIntent": "Microsoft.RecoveryServices.ProtectionIntent", + "com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionIntentItemType": "Microsoft.RecoveryServices.ProtectionIntentItemType", + "com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionLevel": "Microsoft.RecoveryServices.ProtectionLevel", + "com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionPolicy": "Microsoft.RecoveryServices.ProtectionPolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionState": "Microsoft.RecoveryServices.ProtectionState", + "com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus": "Microsoft.RecoveryServices.ProtectionStatus", + "com.azure.resourcemanager.recoveryservicesbackup.models.ProvisioningState": "Microsoft.RecoveryServices.ProvisioningState", + "com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryMode": "Microsoft.RecoveryServices.RecoveryMode", + "com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPoint": "Microsoft.RecoveryServices.RecoveryPoint", + "com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointDiskConfiguration": "Microsoft.RecoveryServices.RecoveryPointDiskConfiguration", + "com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo": "Microsoft.RecoveryServices.RecoveryPointMoveReadinessInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointProperties": "Microsoft.RecoveryServices.RecoveryPointProperties", + "com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointRehydrationInfo": "Microsoft.RecoveryServices.RecoveryPointRehydrationInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierInformation": "Microsoft.RecoveryServices.RecoveryPointTierInformation", + "com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierInformationV2": "Microsoft.RecoveryServices.RecoveryPointTierInformationV2", + "com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierStatus": "Microsoft.RecoveryServices.RecoveryPointTierStatus", + "com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType": "Microsoft.RecoveryServices.RecoveryPointTierType", + "com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryType": "Microsoft.RecoveryServices.RecoveryType", + "com.azure.resourcemanager.recoveryservicesbackup.models.RehydrationPriority": "Microsoft.RecoveryServices.RehydrationPriority", + "com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardOperationDetail": "Microsoft.RecoveryServices.ResourceGuardOperationDetail", + "com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBase": "Microsoft.RecoveryServices.ResourceGuardProxyBase", + "com.azure.resourcemanager.recoveryservicesbackup.models.ResourceHealthDetails": "Microsoft.RecoveryServices.ResourceHealthDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.ResourceHealthStatus": "Microsoft.RecoveryServices.ResourceHealthStatus", + "com.azure.resourcemanager.recoveryservicesbackup.models.ResourceList": "Microsoft.RecoveryServices.ResourceList", + "com.azure.resourcemanager.recoveryservicesbackup.models.RestoreFileSpecs": "Microsoft.RecoveryServices.RestoreFileSpecs", + "com.azure.resourcemanager.recoveryservicesbackup.models.RestorePointType": "Microsoft.RecoveryServices.RestorePointType", + "com.azure.resourcemanager.recoveryservicesbackup.models.RestoreRequest": "Microsoft.RecoveryServices.RestoreRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.RestoreRequestResource": "Microsoft.RecoveryServices.RestoreRequestResource", + "com.azure.resourcemanager.recoveryservicesbackup.models.RestoreRequestType": "Microsoft.RecoveryServices.RestoreRequestType", + "com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDuration": "Microsoft.RecoveryServices.RetentionDuration", + "com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDurationType": "Microsoft.RecoveryServices.RetentionDurationType", + "com.azure.resourcemanager.recoveryservicesbackup.models.RetentionPolicy": "Microsoft.RecoveryServices.RetentionPolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.RetentionScheduleFormat": "Microsoft.RecoveryServices.RetentionScheduleFormat", + "com.azure.resourcemanager.recoveryservicesbackup.models.SchedulePolicy": "Microsoft.RecoveryServices.SchedulePolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.ScheduleRunType": "Microsoft.RecoveryServices.ScheduleRunType", + "com.azure.resourcemanager.recoveryservicesbackup.models.SecuredVMDetails": "Microsoft.RecoveryServices.SecuredVMDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.SecurityPinBase": "Microsoft.RecoveryServices.SecurityPinBase", + "com.azure.resourcemanager.recoveryservicesbackup.models.Settings": "Microsoft.RecoveryServices.Settings", + "com.azure.resourcemanager.recoveryservicesbackup.models.SimpleRetentionPolicy": "Microsoft.RecoveryServices.SimpleRetentionPolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.SimpleSchedulePolicy": "Microsoft.RecoveryServices.SimpleSchedulePolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.SimpleSchedulePolicyV2": "Microsoft.RecoveryServices.SimpleSchedulePolicyV2", + "com.azure.resourcemanager.recoveryservicesbackup.models.SnapshotBackupAdditionalDetails": "Microsoft.RecoveryServices.SnapshotBackupAdditionalDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.SnapshotRestoreParameters": "Microsoft.RecoveryServices.SnapshotRestoreParameters", + "com.azure.resourcemanager.recoveryservicesbackup.models.SoftDeleteFeatureState": "Microsoft.RecoveryServices.SoftDeleteFeatureState", + "com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanInfo": "Microsoft.RecoveryServices.SourceSideScanInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanStatus": "Microsoft.RecoveryServices.SourceSideScanStatus", + "com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanSummary": "Microsoft.RecoveryServices.SourceSideScanSummary", + "com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectory": "Microsoft.RecoveryServices.SQLDataDirectory", + "com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryMapping": "Microsoft.RecoveryServices.SQLDataDirectoryMapping", + "com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryType": "Microsoft.RecoveryServices.SQLDataDirectoryType", + "com.azure.resourcemanager.recoveryservicesbackup.models.StorageType": "Microsoft.RecoveryServices.StorageType", + "com.azure.resourcemanager.recoveryservicesbackup.models.StorageTypeState": "Microsoft.RecoveryServices.StorageTypeState", + "com.azure.resourcemanager.recoveryservicesbackup.models.SubProtectionPolicy": "Microsoft.RecoveryServices.SubProtectionPolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.SupportStatus": "Microsoft.RecoveryServices.SupportStatus", + "com.azure.resourcemanager.recoveryservicesbackup.models.TargetAfsRestoreInfo": "Microsoft.RecoveryServices.TargetAFSRestoreInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.TargetDiskNetworkAccessOption": "Microsoft.RecoveryServices.TargetDiskNetworkAccessOption", + "com.azure.resourcemanager.recoveryservicesbackup.models.TargetDiskNetworkAccessSettings": "Microsoft.RecoveryServices.TargetDiskNetworkAccessSettings", + "com.azure.resourcemanager.recoveryservicesbackup.models.TargetRestoreInfo": "Microsoft.RecoveryServices.TargetRestoreInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.ThreatInfo": "Microsoft.RecoveryServices.ThreatInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity": "Microsoft.RecoveryServices.ThreatSeverity", + "com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState": "Microsoft.RecoveryServices.ThreatState", + "com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus": "Microsoft.RecoveryServices.ThreatStatus", + "com.azure.resourcemanager.recoveryservicesbackup.models.TieringCostRehydrationInfo": "Microsoft.RecoveryServices.TieringCostRehydrationInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.TieringCostSavingInfo": "Microsoft.RecoveryServices.TieringCostSavingInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.TieringMode": "Microsoft.RecoveryServices.TieringMode", + "com.azure.resourcemanager.recoveryservicesbackup.models.TieringPolicy": "Microsoft.RecoveryServices.TieringPolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.TriggerDataMoveRequest": "Microsoft.RecoveryServices.TriggerDataMoveRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.UnlockDeleteRequest": "Microsoft.RecoveryServices.UnlockDeleteRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.UpdateRecoveryPointRequest": "Microsoft.RecoveryServices.UpdateRecoveryPointRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.UsagesUnit": "Microsoft.RecoveryServices.UsagesUnit", + "com.azure.resourcemanager.recoveryservicesbackup.models.UserAssignedIdentityProperties": "Microsoft.RecoveryServices.UserAssignedIdentityProperties", + "com.azure.resourcemanager.recoveryservicesbackup.models.UserAssignedManagedIdentityDetails": "Microsoft.RecoveryServices.UserAssignedManagedIdentityDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.VMWorkloadPolicyType": "Microsoft.RecoveryServices.VMWorkloadPolicyType", + "com.azure.resourcemanager.recoveryservicesbackup.models.ValidateIaasVMRestoreOperationRequest": "Microsoft.RecoveryServices.ValidateIaasVMRestoreOperationRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequest": "Microsoft.RecoveryServices.ValidateOperationRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequestResource": "Microsoft.RecoveryServices.ValidateOperationRequestResource", + "com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationResponse": "Microsoft.RecoveryServices.ValidateOperationResponse", + "com.azure.resourcemanager.recoveryservicesbackup.models.ValidateRestoreOperationRequest": "Microsoft.RecoveryServices.ValidateRestoreOperationRequest", + "com.azure.resourcemanager.recoveryservicesbackup.models.ValidationStatus": "Microsoft.RecoveryServices.ValidationStatus", + "com.azure.resourcemanager.recoveryservicesbackup.models.VaultJob": "Microsoft.RecoveryServices.VaultJob", + "com.azure.resourcemanager.recoveryservicesbackup.models.VaultJobErrorInfo": "Microsoft.RecoveryServices.VaultJobErrorInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.VaultJobExtendedInfo": "Microsoft.RecoveryServices.VaultJobExtendedInfo", + "com.azure.resourcemanager.recoveryservicesbackup.models.VaultRetentionPolicy": "Microsoft.RecoveryServices.VaultRetentionPolicy", + "com.azure.resourcemanager.recoveryservicesbackup.models.VaultSubResourceType": "Microsoft.RecoveryServices.VaultSubResourceType", + "com.azure.resourcemanager.recoveryservicesbackup.models.WeekOfMonth": "Microsoft.RecoveryServices.WeekOfMonth", + "com.azure.resourcemanager.recoveryservicesbackup.models.WeeklyRetentionFormat": "Microsoft.RecoveryServices.WeeklyRetentionFormat", + "com.azure.resourcemanager.recoveryservicesbackup.models.WeeklyRetentionSchedule": "Microsoft.RecoveryServices.WeeklyRetentionSchedule", + "com.azure.resourcemanager.recoveryservicesbackup.models.WeeklySchedule": "Microsoft.RecoveryServices.WeeklySchedule", + "com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadInquiryDetails": "Microsoft.RecoveryServices.WorkloadInquiryDetails", + "com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadItem": "Microsoft.RecoveryServices.WorkloadItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadItemType": "Microsoft.RecoveryServices.WorkloadItemType", + "com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadProtectableItem": "Microsoft.RecoveryServices.WorkloadProtectableItem", + "com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadType": "Microsoft.RecoveryServices.WorkloadType", + "com.azure.resourcemanager.recoveryservicesbackup.models.XcoolState": "Microsoft.RecoveryServices.XcoolState", + "com.azure.resourcemanager.recoveryservicesbackup.models.YearlyRetentionSchedule": "Microsoft.RecoveryServices.YearlyRetentionSchedule" + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/resources/META-INF/azure-resourcemanager-recoveryservicesbackup_metadata.json b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/resources/META-INF/azure-resourcemanager-recoveryservicesbackup_metadata.json new file mode 100644 index 000000000000..f4c98445ff30 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/resources/META-INF/azure-resourcemanager-recoveryservicesbackup_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersion":"2026-01-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupEnginesClient":"Microsoft.RecoveryServices.BackupEngines","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupEnginesClient.get":"Microsoft.RecoveryServices.BackupEngines.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupEnginesClient.getWithResponse":"Microsoft.RecoveryServices.BackupEngines.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupEnginesClient.list":"Microsoft.RecoveryServices.BackupEngines.list","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupJobsClient":"Microsoft.RecoveryServices.BackupJobs","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupJobsClient.list":"Microsoft.RecoveryServices.BackupJobs.list","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupOperationResultsClient":"Microsoft.RecoveryServices.BackupOperationResults","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupOperationResultsClient.get":"Microsoft.RecoveryServices.BackupOperationResults.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupOperationResultsClient.getWithResponse":"Microsoft.RecoveryServices.BackupOperationResults.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupOperationStatusesClient":"Microsoft.RecoveryServices.BackupOperationStatuses","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupOperationStatusesClient.get":"Microsoft.RecoveryServices.BackupOperationStatuses.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupOperationStatusesClient.getWithResponse":"Microsoft.RecoveryServices.BackupOperationStatuses.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupPoliciesClient":"Microsoft.RecoveryServices.BackupPolicies","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupPoliciesClient.list":"Microsoft.RecoveryServices.BackupPolicies.list","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectableItemsClient":"Microsoft.RecoveryServices.BackupProtectableItems","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectableItemsClient.list":"Microsoft.RecoveryServices.BackupProtectableItems.list","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectedItemsClient":"Microsoft.RecoveryServices.BackupProtectedItems","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectedItemsClient.list":"Microsoft.RecoveryServices.BackupProtectedItems.list","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectionContainersClient":"Microsoft.RecoveryServices.BackupProtectionContainers","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectionContainersClient.list":"Microsoft.RecoveryServices.BackupProtectionContainers.list","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectionIntentsClient":"Microsoft.RecoveryServices.BackupProtectionIntent","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupProtectionIntentsClient.list":"Microsoft.RecoveryServices.BackupProtectionIntent.list","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceEncryptionConfigsClient":"Microsoft.RecoveryServices.BackupResourceEncryptionConfigs","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceEncryptionConfigsClient.get":"Microsoft.RecoveryServices.BackupResourceEncryptionConfigs.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceEncryptionConfigsClient.getWithResponse":"Microsoft.RecoveryServices.BackupResourceEncryptionConfigs.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceEncryptionConfigsClient.update":"Microsoft.RecoveryServices.BackupResourceEncryptionConfigs.update","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceEncryptionConfigsClient.updateWithResponse":"Microsoft.RecoveryServices.BackupResourceEncryptionConfigs.update","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceStorageConfigsNonCrrsClient":"Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceStorageConfigsNonCrrsClient.get":"Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceStorageConfigsNonCrrsClient.getWithResponse":"Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceStorageConfigsNonCrrsClient.patch":"Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.patch","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceStorageConfigsNonCrrsClient.patchWithResponse":"Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.patch","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceStorageConfigsNonCrrsClient.update":"Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.update","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceStorageConfigsNonCrrsClient.updateWithResponse":"Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.update","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceVaultConfigsClient":"Microsoft.RecoveryServices.BackupResourceVaultConfigs","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceVaultConfigsClient.get":"Microsoft.RecoveryServices.BackupResourceVaultConfigs.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceVaultConfigsClient.getWithResponse":"Microsoft.RecoveryServices.BackupResourceVaultConfigs.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceVaultConfigsClient.put":"Microsoft.RecoveryServices.BackupResourceVaultConfigs.put","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceVaultConfigsClient.putWithResponse":"Microsoft.RecoveryServices.BackupResourceVaultConfigs.put","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceVaultConfigsClient.update":"Microsoft.RecoveryServices.BackupResourceVaultConfigs.update","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceVaultConfigsClient.updateWithResponse":"Microsoft.RecoveryServices.BackupResourceVaultConfigs.update","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupStatusClient":"Microsoft.RecoveryServices.BackupStatus","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupStatusClient.get":"Microsoft.RecoveryServices.BackupStatus.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupStatusClient.getWithResponse":"Microsoft.RecoveryServices.BackupStatus.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupUsageSummariesClient":"Microsoft.RecoveryServices.BackupUsageSummaries","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupUsageSummariesClient.list":"Microsoft.RecoveryServices.BackupUsageSummaries.list","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupWorkloadItemsClient":"Microsoft.RecoveryServices.BackupWorkloadItems","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupWorkloadItemsClient.list":"Microsoft.RecoveryServices.BackupWorkloadItems.list","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupsClient":"Microsoft.RecoveryServices.Backups","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupsClient.trigger":"Microsoft.RecoveryServices.Backups.trigger","com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupsClient.triggerWithResponse":"Microsoft.RecoveryServices.Backups.trigger","com.azure.resourcemanager.recoveryservicesbackup.fluent.BmsPrepareDataMoveOperationResultsClient":"Microsoft.RecoveryServices.BMSPrepareDataMoveOperationResult","com.azure.resourcemanager.recoveryservicesbackup.fluent.BmsPrepareDataMoveOperationResultsClient.get":"Microsoft.RecoveryServices.BMSPrepareDataMoveOperationResult.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.BmsPrepareDataMoveOperationResultsClient.getWithResponse":"Microsoft.RecoveryServices.BMSPrepareDataMoveOperationResult.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.DeletedProtectionContainersClient":"Microsoft.RecoveryServices.DeletedProtectionContainers","com.azure.resourcemanager.recoveryservicesbackup.fluent.DeletedProtectionContainersClient.list":"Microsoft.RecoveryServices.DeletedProtectionContainers.list","com.azure.resourcemanager.recoveryservicesbackup.fluent.ExportJobsOperationResultsClient":"Microsoft.RecoveryServices.ExportJobsOperationResults","com.azure.resourcemanager.recoveryservicesbackup.fluent.ExportJobsOperationResultsClient.get":"Microsoft.RecoveryServices.ExportJobsOperationResults.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ExportJobsOperationResultsClient.getWithResponse":"Microsoft.RecoveryServices.ExportJobsOperationResults.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.FeatureSupportsClient":"Microsoft.RecoveryServices.FeatureSupport","com.azure.resourcemanager.recoveryservicesbackup.fluent.FeatureSupportsClient.validate":"Microsoft.RecoveryServices.FeatureSupport.validate","com.azure.resourcemanager.recoveryservicesbackup.fluent.FeatureSupportsClient.validateWithResponse":"Microsoft.RecoveryServices.FeatureSupport.validate","com.azure.resourcemanager.recoveryservicesbackup.fluent.FetchTieringCostsClient":"Microsoft.RecoveryServices.FetchTieringCost","com.azure.resourcemanager.recoveryservicesbackup.fluent.FetchTieringCostsClient.beginPost":"Microsoft.RecoveryServices.FetchTieringCost.post","com.azure.resourcemanager.recoveryservicesbackup.fluent.FetchTieringCostsClient.post":"Microsoft.RecoveryServices.FetchTieringCost.post","com.azure.resourcemanager.recoveryservicesbackup.fluent.GetTieringCostOperationResultsClient":"Microsoft.RecoveryServices.GetTieringCostOperationResult","com.azure.resourcemanager.recoveryservicesbackup.fluent.GetTieringCostOperationResultsClient.get":"Microsoft.RecoveryServices.GetTieringCostOperationResult.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.GetTieringCostOperationResultsClient.getWithResponse":"Microsoft.RecoveryServices.GetTieringCostOperationResult.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ItemLevelRecoveryConnectionsClient":"Microsoft.RecoveryServices.ItemLevelRecoveryConnections","com.azure.resourcemanager.recoveryservicesbackup.fluent.ItemLevelRecoveryConnectionsClient.provision":"Microsoft.RecoveryServices.ItemLevelRecoveryConnections.provision","com.azure.resourcemanager.recoveryservicesbackup.fluent.ItemLevelRecoveryConnectionsClient.provisionWithResponse":"Microsoft.RecoveryServices.ItemLevelRecoveryConnections.provision","com.azure.resourcemanager.recoveryservicesbackup.fluent.ItemLevelRecoveryConnectionsClient.revoke":"Microsoft.RecoveryServices.ItemLevelRecoveryConnections.revoke","com.azure.resourcemanager.recoveryservicesbackup.fluent.ItemLevelRecoveryConnectionsClient.revokeWithResponse":"Microsoft.RecoveryServices.ItemLevelRecoveryConnections.revoke","com.azure.resourcemanager.recoveryservicesbackup.fluent.JobCancellationsClient":"Microsoft.RecoveryServices.JobCancellations","com.azure.resourcemanager.recoveryservicesbackup.fluent.JobCancellationsClient.trigger":"Microsoft.RecoveryServices.JobCancellations.trigger","com.azure.resourcemanager.recoveryservicesbackup.fluent.JobCancellationsClient.triggerWithResponse":"Microsoft.RecoveryServices.JobCancellations.trigger","com.azure.resourcemanager.recoveryservicesbackup.fluent.JobDetailsClient":"Microsoft.RecoveryServices.JobDetails","com.azure.resourcemanager.recoveryservicesbackup.fluent.JobDetailsClient.get":"Microsoft.RecoveryServices.JobDetails.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.JobDetailsClient.getWithResponse":"Microsoft.RecoveryServices.JobDetails.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.JobOperationResultsClient":"Microsoft.RecoveryServices.JobOperationResults","com.azure.resourcemanager.recoveryservicesbackup.fluent.JobOperationResultsClient.get":"Microsoft.RecoveryServices.JobOperationResults.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.JobOperationResultsClient.getWithResponse":"Microsoft.RecoveryServices.JobOperationResults.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.JobsClient":"Microsoft.RecoveryServices.Jobs","com.azure.resourcemanager.recoveryservicesbackup.fluent.JobsClient.export":"Microsoft.RecoveryServices.Jobs.export","com.azure.resourcemanager.recoveryservicesbackup.fluent.JobsClient.exportWithResponse":"Microsoft.RecoveryServices.Jobs.export","com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationOperationsClient":"Microsoft.RecoveryServices","com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationOperationsClient.validate":"Microsoft.RecoveryServices.OperationOperationGroup.validate","com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationOperationsClient.validateWithResponse":"Microsoft.RecoveryServices.OperationOperationGroup.validate","com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationsClient":"Microsoft.RecoveryServices.Operations","com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointConnectionsClient":"Microsoft.RecoveryServices","com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointConnectionsClient.beginDelete":"Microsoft.RecoveryServices.PrivateEndpointConnectionResources.delete","com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointConnectionsClient.beginPut":"Microsoft.RecoveryServices.PrivateEndpointConnectionResources.put","com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointConnectionsClient.delete":"Microsoft.RecoveryServices.PrivateEndpointConnectionResources.delete","com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointConnectionsClient.get":"Microsoft.RecoveryServices.PrivateEndpointConnectionResources.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointConnectionsClient.getWithResponse":"Microsoft.RecoveryServices.PrivateEndpointConnectionResources.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointConnectionsClient.put":"Microsoft.RecoveryServices.PrivateEndpointConnectionResources.put","com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointsClient":"Microsoft.RecoveryServices","com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointsClient.getOperationStatus":"Microsoft.RecoveryServices.PrivateEndpointOperationStatuses.getOperationStatus","com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointsClient.getOperationStatusWithResponse":"Microsoft.RecoveryServices.PrivateEndpointOperationStatuses.getOperationStatus","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectableContainersClient":"Microsoft.RecoveryServices.ProtectableContainers","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectableContainersClient.list":"Microsoft.RecoveryServices.ProtectableContainers.list","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemOperationResultsClient":"Microsoft.RecoveryServices.ProtectedItemOperationResults","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemOperationResultsClient.get":"Microsoft.RecoveryServices.ProtectedItemOperationResults.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemOperationResultsClient.getWithResponse":"Microsoft.RecoveryServices.ProtectedItemOperationResults.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemOperationStatusesClient":"Microsoft.RecoveryServices.ProtectedItemOperationStatuses","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemOperationStatusesClient.get":"Microsoft.RecoveryServices.ProtectedItemOperationStatuses.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemOperationStatusesClient.getWithResponse":"Microsoft.RecoveryServices.ProtectedItemOperationStatuses.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemsClient":"Microsoft.RecoveryServices.ProtectedItems","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemsClient.beginCreateOrUpdate":"Microsoft.RecoveryServices.ProtectedItems.createOrUpdate","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemsClient.createOrUpdate":"Microsoft.RecoveryServices.ProtectedItems.createOrUpdate","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemsClient.delete":"Microsoft.RecoveryServices.ProtectedItems.delete","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemsClient.deleteWithResponse":"Microsoft.RecoveryServices.ProtectedItems.delete","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemsClient.get":"Microsoft.RecoveryServices.ProtectedItems.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectedItemsClient.getWithResponse":"Microsoft.RecoveryServices.ProtectedItems.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainerOperationResultsClient":"Microsoft.RecoveryServices.ProtectionContainerOperationResults","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainerOperationResultsClient.get":"Microsoft.RecoveryServices.ProtectionContainerOperationResults.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainerOperationResultsClient.getWithResponse":"Microsoft.RecoveryServices.ProtectionContainerOperationResults.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainerRefreshOperationResultsClient":"Microsoft.RecoveryServices.ProtectionContainerRefreshOperationResults","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainerRefreshOperationResultsClient.get":"Microsoft.RecoveryServices.ProtectionContainerRefreshOperationResults.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainerRefreshOperationResultsClient.getWithResponse":"Microsoft.RecoveryServices.ProtectionContainerRefreshOperationResults.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient":"Microsoft.RecoveryServices.ProtectionContainers","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.beginRegister":"Microsoft.RecoveryServices.ProtectionContainers.register","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.get":"Microsoft.RecoveryServices.ProtectionContainers.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.getWithResponse":"Microsoft.RecoveryServices.ProtectionContainers.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.inquire":"Microsoft.RecoveryServices.ProtectionContainers.inquire","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.inquireWithResponse":"Microsoft.RecoveryServices.ProtectionContainers.inquire","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.refresh":"Microsoft.RecoveryServices.ProtectionContainersOperationGroup.refresh","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.refreshWithResponse":"Microsoft.RecoveryServices.ProtectionContainersOperationGroup.refresh","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.register":"Microsoft.RecoveryServices.ProtectionContainers.register","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.unregister":"Microsoft.RecoveryServices.ProtectionContainers.unregister","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionContainersClient.unregisterWithResponse":"Microsoft.RecoveryServices.ProtectionContainers.unregister","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient":"Microsoft.RecoveryServices","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient.createOrUpdate":"Microsoft.RecoveryServices.ProtectionIntentResources.createOrUpdate","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient.createOrUpdateWithResponse":"Microsoft.RecoveryServices.ProtectionIntentResources.createOrUpdate","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient.delete":"Microsoft.RecoveryServices.ProtectionIntentResources.delete","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient.deleteWithResponse":"Microsoft.RecoveryServices.ProtectionIntentResources.delete","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient.get":"Microsoft.RecoveryServices.ProtectionIntentResources.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient.getWithResponse":"Microsoft.RecoveryServices.ProtectionIntentResources.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient.validate":"Microsoft.RecoveryServices.ProtectionIntentOperationGroup.validate","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionIntentsClient.validateWithResponse":"Microsoft.RecoveryServices.ProtectionIntentOperationGroup.validate","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPoliciesClient":"Microsoft.RecoveryServices.ProtectionPolicies","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPoliciesClient.beginDelete":"Microsoft.RecoveryServices.ProtectionPolicies.delete","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPoliciesClient.createOrUpdate":"Microsoft.RecoveryServices.ProtectionPolicies.createOrUpdate","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPoliciesClient.createOrUpdateWithResponse":"Microsoft.RecoveryServices.ProtectionPolicies.createOrUpdate","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPoliciesClient.delete":"Microsoft.RecoveryServices.ProtectionPolicies.delete","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPoliciesClient.get":"Microsoft.RecoveryServices.ProtectionPolicies.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPoliciesClient.getWithResponse":"Microsoft.RecoveryServices.ProtectionPolicies.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPolicyOperationResultsClient":"Microsoft.RecoveryServices.ProtectionPolicyOperationResults","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPolicyOperationResultsClient.get":"Microsoft.RecoveryServices.ProtectionPolicyOperationResults.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPolicyOperationResultsClient.getWithResponse":"Microsoft.RecoveryServices.ProtectionPolicyOperationResults.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPolicyOperationStatusesClient":"Microsoft.RecoveryServices.ProtectionPolicyOperationStatuses","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPolicyOperationStatusesClient.get":"Microsoft.RecoveryServices.ProtectionPolicyOperationStatuses.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectionPolicyOperationStatusesClient.getWithResponse":"Microsoft.RecoveryServices.ProtectionPolicyOperationStatuses.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsClient":"Microsoft.RecoveryServices.RecoveryPoints","com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsClient.get":"Microsoft.RecoveryServices.RecoveryPoints.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsClient.getWithResponse":"Microsoft.RecoveryServices.RecoveryPoints.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsClient.list":"Microsoft.RecoveryServices.RecoveryPoints.list","com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsClient.update":"Microsoft.RecoveryServices.RecoveryPoints.update","com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsClient.updateWithResponse":"Microsoft.RecoveryServices.RecoveryPoints.update","com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsRecommendedForMovesClient":"Microsoft.RecoveryServices.RecoveryPointsRecommendedForMove","com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryPointsRecommendedForMovesClient.list":"Microsoft.RecoveryServices.RecoveryPointsRecommendedForMove.list","com.azure.resourcemanager.recoveryservicesbackup.fluent.RecoveryServicesBackupManagementClient":"Microsoft.RecoveryServices","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient":"Microsoft.RecoveryServices","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.delete":"Microsoft.RecoveryServices.ResourceGuardProxy.delete","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.deleteWithResponse":"Microsoft.RecoveryServices.ResourceGuardProxy.delete","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.get":"Microsoft.RecoveryServices.ResourceGuardProxy.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.getWithResponse":"Microsoft.RecoveryServices.ResourceGuardProxy.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.list":"Microsoft.RecoveryServices.ResourceGuardProxies.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.put":"Microsoft.RecoveryServices.ResourceGuardProxy.put","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.putWithResponse":"Microsoft.RecoveryServices.ResourceGuardProxy.put","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.unlockDelete":"Microsoft.RecoveryServices.ResourceGuardProxy.unlockDelete","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceGuardProxyOperationsClient.unlockDeleteWithResponse":"Microsoft.RecoveryServices.ResourceGuardProxy.unlockDelete","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient":"Microsoft.RecoveryServices","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient.beginBmsPrepareDataMove":"Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.bmsPrepareDataMove","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient.beginBmsTriggerDataMove":"Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.bmsTriggerDataMove","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient.beginMoveRecoveryPoint":"Microsoft.RecoveryServices.RecoveryPoints.moveRecoveryPoint","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient.bmsPrepareDataMove":"Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.bmsPrepareDataMove","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient.bmsTriggerDataMove":"Microsoft.RecoveryServices.BackupResourceStorageConfigsNonCRR.bmsTriggerDataMove","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient.getOperationStatus":"Microsoft.RecoveryServices.BackupResourceConfigOperationStatuses.getOperationStatus","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient.getOperationStatusWithResponse":"Microsoft.RecoveryServices.BackupResourceConfigOperationStatuses.getOperationStatus","com.azure.resourcemanager.recoveryservicesbackup.fluent.ResourceProvidersClient.moveRecoveryPoint":"Microsoft.RecoveryServices.RecoveryPoints.moveRecoveryPoint","com.azure.resourcemanager.recoveryservicesbackup.fluent.RestoresClient":"Microsoft.RecoveryServices.Restores","com.azure.resourcemanager.recoveryservicesbackup.fluent.RestoresClient.beginTrigger":"Microsoft.RecoveryServices.Restores.trigger","com.azure.resourcemanager.recoveryservicesbackup.fluent.RestoresClient.trigger":"Microsoft.RecoveryServices.Restores.trigger","com.azure.resourcemanager.recoveryservicesbackup.fluent.SecurityPINsClient":"Microsoft.RecoveryServices.SecurityPINs","com.azure.resourcemanager.recoveryservicesbackup.fluent.SecurityPINsClient.get":"Microsoft.RecoveryServices.SecurityPINs.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.SecurityPINsClient.getWithResponse":"Microsoft.RecoveryServices.SecurityPINs.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.TieringCostOperationStatusClient":"Microsoft.RecoveryServices.TieringCostOperationStatus","com.azure.resourcemanager.recoveryservicesbackup.fluent.TieringCostOperationStatusClient.get":"Microsoft.RecoveryServices.TieringCostOperationStatus.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.TieringCostOperationStatusClient.getWithResponse":"Microsoft.RecoveryServices.TieringCostOperationStatus.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationResultsClient":"Microsoft.RecoveryServices.ValidateOperationResults","com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationResultsClient.get":"Microsoft.RecoveryServices.ValidateOperationResults.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationResultsClient.getWithResponse":"Microsoft.RecoveryServices.ValidateOperationResults.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationStatusesClient":"Microsoft.RecoveryServices.ValidateOperationStatuses","com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationStatusesClient.get":"Microsoft.RecoveryServices.ValidateOperationStatuses.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationStatusesClient.getWithResponse":"Microsoft.RecoveryServices.ValidateOperationStatuses.get","com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationsClient":"Microsoft.RecoveryServices.ValidateOperation","com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationsClient.beginTrigger":"Microsoft.RecoveryServices.ValidateOperation.trigger","com.azure.resourcemanager.recoveryservicesbackup.fluent.ValidateOperationsClient.trigger":"Microsoft.RecoveryServices.ValidateOperation.trigger","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.AzureVMResourceFeatureSupportResponseInner":"Microsoft.RecoveryServices.AzureVMResourceFeatureSupportResponse","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupEngineBaseResourceInner":"Microsoft.RecoveryServices.BackupEngineBaseResource","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupManagementUsageInner":"Microsoft.RecoveryServices.BackupManagementUsage","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceConfigResourceInner":"Microsoft.RecoveryServices.BackupResourceConfigResource","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigExtendedResourceInner":"Microsoft.RecoveryServices.BackupResourceEncryptionConfigExtendedResource","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceVaultConfigResourceInner":"Microsoft.RecoveryServices.BackupResourceVaultConfigResource","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupStatusResponseInner":"Microsoft.RecoveryServices.BackupStatusResponse","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ClientDiscoveryValueForSingleApiInner":"Microsoft.RecoveryServices.ClientDiscoveryValueForSingleApi","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.JobResourceInner":"Microsoft.RecoveryServices.JobResource","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.OperationResultInfoBaseResourceInner":"Microsoft.RecoveryServices.OperationResultInfoBaseResource","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.OperationStatusInner":"Microsoft.RecoveryServices.OperationStatus","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.PreValidateEnableBackupResponseInner":"Microsoft.RecoveryServices.PreValidateEnableBackupResponse","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.PrivateEndpointConnectionResourceInner":"Microsoft.RecoveryServices.PrivateEndpointConnectionResource","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectableContainerResourceInner":"Microsoft.RecoveryServices.ProtectableContainerResource","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectedItemResourceInner":"Microsoft.RecoveryServices.ProtectedItemResource","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionContainerResourceInner":"Microsoft.RecoveryServices.ProtectionContainerResource","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionIntentResourceInner":"Microsoft.RecoveryServices.ProtectionIntentResource","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionPolicyResourceInner":"Microsoft.RecoveryServices.ProtectionPolicyResource","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.RecoveryPointResourceInner":"Microsoft.RecoveryServices.RecoveryPointResource","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ResourceGuardProxyBaseResourceInner":"Microsoft.RecoveryServices.ResourceGuardProxyBaseResource","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.TieringCostInfoInner":"Microsoft.RecoveryServices.TieringCostInfo","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.TokenInformationInner":"Microsoft.RecoveryServices.TokenInformation","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.UnlockDeleteResponseInner":"Microsoft.RecoveryServices.UnlockDeleteResponse","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ValidateOperationsResponseInner":"Microsoft.RecoveryServices.ValidateOperationsResponse","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.VaultStorageConfigOperationResultResponseInner":"Microsoft.RecoveryServices.VaultStorageConfigOperationResultResponse","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadItemResourceInner":"Microsoft.RecoveryServices.WorkloadItemResource","com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadProtectableItemResourceInner":"Microsoft.RecoveryServices.WorkloadProtectableItemResource","com.azure.resourcemanager.recoveryservicesbackup.implementation.RecoveryServicesBackupManagementClientBuilder":"Microsoft.RecoveryServices","com.azure.resourcemanager.recoveryservicesbackup.implementation.models.BackupEngineBaseResourceList":"Microsoft.RecoveryServices.BackupEngineBaseResourceList","com.azure.resourcemanager.recoveryservicesbackup.implementation.models.BackupManagementUsageList":"Microsoft.RecoveryServices.BackupManagementUsageList","com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ClientDiscoveryResponse":"Microsoft.RecoveryServices.ClientDiscoveryResponse","com.azure.resourcemanager.recoveryservicesbackup.implementation.models.JobResourceList":"Microsoft.RecoveryServices.JobResourceList","com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectableContainerResourceList":"Microsoft.RecoveryServices.ProtectableContainerResourceList","com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectedItemResourceList":"Microsoft.RecoveryServices.ProtectedItemResourceList","com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectionContainerResourceList":"Microsoft.RecoveryServices.ProtectionContainerResourceList","com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectionIntentResourceList":"Microsoft.RecoveryServices.ProtectionIntentResourceList","com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectionPolicyResourceList":"Microsoft.RecoveryServices.ProtectionPolicyResourceList","com.azure.resourcemanager.recoveryservicesbackup.implementation.models.RecoveryPointResourceList":"Microsoft.RecoveryServices.RecoveryPointResourceList","com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ResourceGuardProxyBaseResourceList":"Microsoft.RecoveryServices.ResourceGuardProxyBaseResourceList","com.azure.resourcemanager.recoveryservicesbackup.implementation.models.WorkloadItemResourceList":"Microsoft.RecoveryServices.WorkloadItemResourceList","com.azure.resourcemanager.recoveryservicesbackup.implementation.models.WorkloadProtectableItemResourceList":"Microsoft.RecoveryServices.WorkloadProtectableItemResourceList","com.azure.resourcemanager.recoveryservicesbackup.models.AcquireStorageAccountLock":"Microsoft.RecoveryServices.AcquireStorageAccountLock","com.azure.resourcemanager.recoveryservicesbackup.models.AzureBackupGoalFeatureSupportRequest":"Microsoft.RecoveryServices.AzureBackupGoalFeatureSupportRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureBackupServerContainer":"Microsoft.RecoveryServices.AzureBackupServerContainer","com.azure.resourcemanager.recoveryservicesbackup.models.AzureBackupServerEngine":"Microsoft.RecoveryServices.AzureBackupServerEngine","com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareBackupRequest":"Microsoft.RecoveryServices.AzureFileShareBackupRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareProtectableItem":"Microsoft.RecoveryServices.AzureFileShareProtectableItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareProtectionPolicy":"Microsoft.RecoveryServices.AzureFileShareProtectionPolicy","com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareProvisionIlrRequest":"Microsoft.RecoveryServices.AzureFileShareProvisionILRRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareRecoveryPoint":"Microsoft.RecoveryServices.AzureFileShareRecoveryPoint","com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareRestoreRequest":"Microsoft.RecoveryServices.AzureFileShareRestoreRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareType":"Microsoft.RecoveryServices.AzureFileShareType","com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileshareProtectedItem":"Microsoft.RecoveryServices.AzureFileshareProtectedItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileshareProtectedItemExtendedInfo":"Microsoft.RecoveryServices.AzureFileshareProtectedItemExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSClassicComputeVMContainer":"Microsoft.RecoveryServices.AzureIaaSClassicComputeVMContainer","com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSClassicComputeVMProtectableItem":"Microsoft.RecoveryServices.AzureIaaSClassicComputeVMProtectableItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSClassicComputeVMProtectedItem":"Microsoft.RecoveryServices.AzureIaaSClassicComputeVMProtectedItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSComputeVMContainer":"Microsoft.RecoveryServices.AzureIaaSComputeVMContainer","com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSComputeVMProtectableItem":"Microsoft.RecoveryServices.AzureIaaSComputeVMProtectableItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSComputeVMProtectedItem":"Microsoft.RecoveryServices.AzureIaaSComputeVMProtectedItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmErrorInfo":"Microsoft.RecoveryServices.AzureIaaSVMErrorInfo","com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmHealthDetails":"Microsoft.RecoveryServices.AzureIaaSVMHealthDetails","com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmJob":"Microsoft.RecoveryServices.AzureIaaSVMJob","com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmJobExtendedInfo":"Microsoft.RecoveryServices.AzureIaaSVMJobExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmJobTaskDetails":"Microsoft.RecoveryServices.AzureIaaSVMJobTaskDetails","com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmJobV2":"Microsoft.RecoveryServices.AzureIaaSVMJobV2","com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmProtectedItem":"Microsoft.RecoveryServices.AzureIaaSVMProtectedItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmProtectedItemExtendedInfo":"Microsoft.RecoveryServices.AzureIaaSVMProtectedItemExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmProtectionPolicy":"Microsoft.RecoveryServices.AzureIaaSVMProtectionPolicy","com.azure.resourcemanager.recoveryservicesbackup.models.AzureRecoveryServiceVaultProtectionIntent":"Microsoft.RecoveryServices.AzureRecoveryServiceVaultProtectionIntent","com.azure.resourcemanager.recoveryservicesbackup.models.AzureResourceProtectionIntent":"Microsoft.RecoveryServices.AzureResourceProtectionIntent","com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlContainer":"Microsoft.RecoveryServices.AzureSqlContainer","com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlProtectedItem":"Microsoft.RecoveryServices.AzureSqlProtectedItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlProtectedItemExtendedInfo":"Microsoft.RecoveryServices.AzureSqlProtectedItemExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlProtectionPolicy":"Microsoft.RecoveryServices.AzureSqlProtectionPolicy","com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlagWorkloadContainerProtectionContainer":"Microsoft.RecoveryServices.AzureSQLAGWorkloadContainerProtectionContainer","com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageContainer":"Microsoft.RecoveryServices.AzureStorageContainer","com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageErrorInfo":"Microsoft.RecoveryServices.AzureStorageErrorInfo","com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageJob":"Microsoft.RecoveryServices.AzureStorageJob","com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageJobExtendedInfo":"Microsoft.RecoveryServices.AzureStorageJobExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageJobTaskDetails":"Microsoft.RecoveryServices.AzureStorageJobTaskDetails","com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageProtectableContainer":"Microsoft.RecoveryServices.AzureStorageProtectableContainer","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVMAppContainerProtectableContainer":"Microsoft.RecoveryServices.AzureVMAppContainerProtectableContainer","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVMAppContainerProtectionContainer":"Microsoft.RecoveryServices.AzureVMAppContainerProtectionContainer","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVMResourceFeatureSupportRequest":"Microsoft.RecoveryServices.AzureVMResourceFeatureSupportRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadItem":"Microsoft.RecoveryServices.AzureVmWorkloadItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadProtectableItem":"Microsoft.RecoveryServices.AzureVmWorkloadProtectableItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadProtectedItem":"Microsoft.RecoveryServices.AzureVmWorkloadProtectedItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo":"Microsoft.RecoveryServices.AzureVmWorkloadProtectedItemExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadProtectionPolicy":"Microsoft.RecoveryServices.AzureVmWorkloadProtectionPolicy","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSAPHanaScaleoutProtectableItem":"Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaScaleoutProtectableItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSQLInstanceProtectedItem":"Microsoft.RecoveryServices.AzureVmWorkloadSQLInstanceProtectedItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapAseDatabaseProtectableItem":"Microsoft.RecoveryServices.AzureVmWorkloadSAPAseDatabaseProtectableItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapAseDatabaseProtectedItem":"Microsoft.RecoveryServices.AzureVmWorkloadSAPAseDatabaseProtectedItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapAseDatabaseWorkloadItem":"Microsoft.RecoveryServices.AzureVmWorkloadSAPAseDatabaseWorkloadItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapAseSystemProtectableItem":"Microsoft.RecoveryServices.AzureVmWorkloadSAPAseSystemProtectableItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapAseSystemWorkloadItem":"Microsoft.RecoveryServices.AzureVmWorkloadSAPAseSystemWorkloadItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaDBInstance":"Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaDBInstance","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaDBInstanceProtectedItem":"Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaDBInstanceProtectedItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaDatabaseProtectableItem":"Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaDatabaseProtectableItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaDatabaseProtectedItem":"Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaDatabaseProtectedItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaDatabaseWorkloadItem":"Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaDatabaseWorkloadItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaHsr":"Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaHSRProtectableItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaSystemProtectableItem":"Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaSystemProtectableItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaSystemWorkloadItem":"Microsoft.RecoveryServices.AzureVmWorkloadSAPHanaSystemWorkloadItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSqlAvailabilityGroupProtectableItem":"Microsoft.RecoveryServices.AzureVmWorkloadSQLAvailabilityGroupProtectableItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSqlDatabaseProtectableItem":"Microsoft.RecoveryServices.AzureVmWorkloadSQLDatabaseProtectableItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSqlDatabaseProtectedItem":"Microsoft.RecoveryServices.AzureVmWorkloadSQLDatabaseProtectedItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSqlDatabaseWorkloadItem":"Microsoft.RecoveryServices.AzureVmWorkloadSQLDatabaseWorkloadItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSqlInstanceProtectableItem":"Microsoft.RecoveryServices.AzureVmWorkloadSQLInstanceProtectableItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSqlInstanceWorkloadItem":"Microsoft.RecoveryServices.AzureVmWorkloadSQLInstanceWorkloadItem","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadAutoProtectionIntent":"Microsoft.RecoveryServices.AzureWorkloadAutoProtectionIntent","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadBackupRequest":"Microsoft.RecoveryServices.AzureWorkloadBackupRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadContainer":"Microsoft.RecoveryServices.AzureWorkloadContainer","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadContainerAutoProtectionIntent":"Microsoft.RecoveryServices.AzureWorkloadContainerAutoProtectionIntent","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo":"Microsoft.RecoveryServices.AzureWorkloadContainerExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadErrorInfo":"Microsoft.RecoveryServices.AzureWorkloadErrorInfo","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadJob":"Microsoft.RecoveryServices.AzureWorkloadJob","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadJobExtendedInfo":"Microsoft.RecoveryServices.AzureWorkloadJobExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadJobTaskDetails":"Microsoft.RecoveryServices.AzureWorkloadJobTaskDetails","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadPointInTimeRecoveryPoint":"Microsoft.RecoveryServices.AzureWorkloadPointInTimeRecoveryPoint","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadPointInTimeRestoreRequest":"Microsoft.RecoveryServices.AzureWorkloadPointInTimeRestoreRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadRecoveryPoint":"Microsoft.RecoveryServices.AzureWorkloadRecoveryPoint","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadRestoreRequest":"Microsoft.RecoveryServices.AzureWorkloadRestoreRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapAsePointInTimeRecoveryPoint":"Microsoft.RecoveryServices.AzureWorkloadSAPAsePointInTimeRecoveryPoint","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapAsePointInTimeRestoreRequest":"Microsoft.RecoveryServices.AzureWorkloadSAPAsePointInTimeRestoreRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapAseRecoveryPoint":"Microsoft.RecoveryServices.AzureWorkloadSAPAseRecoveryPoint","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapAseRestoreRequest":"Microsoft.RecoveryServices.AzureWorkloadSAPAseRestoreRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaPointInTimeRecoveryPoint":"Microsoft.RecoveryServices.AzureWorkloadSAPHanaPointInTimeRecoveryPoint","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaPointInTimeRestoreRequest":"Microsoft.RecoveryServices.AzureWorkloadSAPHanaPointInTimeRestoreRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest":"Microsoft.RecoveryServices.AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaRecoveryPoint":"Microsoft.RecoveryServices.AzureWorkloadSAPHanaRecoveryPoint","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaRestoreRequest":"Microsoft.RecoveryServices.AzureWorkloadSAPHanaRestoreRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaRestoreWithRehydrateRequest":"Microsoft.RecoveryServices.AzureWorkloadSAPHanaRestoreWithRehydrateRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlAutoProtectionIntent":"Microsoft.RecoveryServices.AzureWorkloadSQLAutoProtectionIntent","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlPointInTimeRecoveryPoint":"Microsoft.RecoveryServices.AzureWorkloadSQLPointInTimeRecoveryPoint","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlPointInTimeRestoreRequest":"Microsoft.RecoveryServices.AzureWorkloadSQLPointInTimeRestoreRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest":"Microsoft.RecoveryServices.AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlRecoveryPoint":"Microsoft.RecoveryServices.AzureWorkloadSQLRecoveryPoint","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlRecoveryPointExtendedInfo":"Microsoft.RecoveryServices.AzureWorkloadSQLRecoveryPointExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlRestoreRequest":"Microsoft.RecoveryServices.AzureWorkloadSQLRestoreRequest","com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlRestoreWithRehydrateRequest":"Microsoft.RecoveryServices.AzureWorkloadSQLRestoreWithRehydrateRequest","com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineBase":"Microsoft.RecoveryServices.BackupEngineBase","com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineExtendedInfo":"Microsoft.RecoveryServices.BackupEngineExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineType":"Microsoft.RecoveryServices.BackupEngineType","com.azure.resourcemanager.recoveryservicesbackup.models.BackupItemType":"Microsoft.RecoveryServices.BackupItemType","com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType":"Microsoft.RecoveryServices.BackupManagementType","com.azure.resourcemanager.recoveryservicesbackup.models.BackupRequest":"Microsoft.RecoveryServices.BackupRequest","com.azure.resourcemanager.recoveryservicesbackup.models.BackupRequestResource":"Microsoft.RecoveryServices.BackupRequestResource","com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceConfig":"Microsoft.RecoveryServices.BackupResourceConfig","com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfig":"Microsoft.RecoveryServices.BackupResourceEncryptionConfig","com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtended":"Microsoft.RecoveryServices.BackupResourceEncryptionConfigExtended","com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource":"Microsoft.RecoveryServices.BackupResourceEncryptionConfigResource","com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceVaultConfig":"Microsoft.RecoveryServices.BackupResourceVaultConfig","com.azure.resourcemanager.recoveryservicesbackup.models.BackupStatusRequest":"Microsoft.RecoveryServices.BackupStatusRequest","com.azure.resourcemanager.recoveryservicesbackup.models.BackupType":"Microsoft.RecoveryServices.BackupType","com.azure.resourcemanager.recoveryservicesbackup.models.BekDetails":"Microsoft.RecoveryServices.BEKDetails","com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryDisplay":"Microsoft.RecoveryServices.ClientDiscoveryDisplay","com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification":"Microsoft.RecoveryServices.ClientDiscoveryForLogSpecification","com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForProperties":"Microsoft.RecoveryServices.ClientDiscoveryForProperties","com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification":"Microsoft.RecoveryServices.ClientDiscoveryForServiceSpecification","com.azure.resourcemanager.recoveryservicesbackup.models.ClientScriptForConnect":"Microsoft.RecoveryServices.ClientScriptForConnect","com.azure.resourcemanager.recoveryservicesbackup.models.ContainerIdentityInfo":"Microsoft.RecoveryServices.ContainerIdentityInfo","com.azure.resourcemanager.recoveryservicesbackup.models.CopyOptions":"Microsoft.RecoveryServices.CopyOptions","com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode":"Microsoft.RecoveryServices.CreateMode","com.azure.resourcemanager.recoveryservicesbackup.models.DailyRetentionFormat":"Microsoft.RecoveryServices.DailyRetentionFormat","com.azure.resourcemanager.recoveryservicesbackup.models.DailyRetentionSchedule":"Microsoft.RecoveryServices.DailyRetentionSchedule","com.azure.resourcemanager.recoveryservicesbackup.models.DailySchedule":"Microsoft.RecoveryServices.DailySchedule","com.azure.resourcemanager.recoveryservicesbackup.models.DataMoveLevel":"Microsoft.RecoveryServices.DataMoveLevel","com.azure.resourcemanager.recoveryservicesbackup.models.DataSourceType":"Microsoft.RecoveryServices.DataSourceType","com.azure.resourcemanager.recoveryservicesbackup.models.DatabaseInRP":"Microsoft.RecoveryServices.DatabaseInRP","com.azure.resourcemanager.recoveryservicesbackup.models.Day":"Microsoft.RecoveryServices.Day","com.azure.resourcemanager.recoveryservicesbackup.models.DayOfWeek":"Microsoft.RecoveryServices.DayOfWeek","com.azure.resourcemanager.recoveryservicesbackup.models.DedupState":"Microsoft.RecoveryServices.DedupState","com.azure.resourcemanager.recoveryservicesbackup.models.DiskExclusionProperties":"Microsoft.RecoveryServices.DiskExclusionProperties","com.azure.resourcemanager.recoveryservicesbackup.models.DiskInformation":"Microsoft.RecoveryServices.DiskInformation","com.azure.resourcemanager.recoveryservicesbackup.models.DistributedNodesInfo":"Microsoft.RecoveryServices.DistributedNodesInfo","com.azure.resourcemanager.recoveryservicesbackup.models.DpmBackupEngine":"Microsoft.RecoveryServices.DpmBackupEngine","com.azure.resourcemanager.recoveryservicesbackup.models.DpmContainer":"Microsoft.RecoveryServices.DpmContainer","com.azure.resourcemanager.recoveryservicesbackup.models.DpmContainerExtendedInfo":"Microsoft.RecoveryServices.DPMContainerExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.DpmErrorInfo":"Microsoft.RecoveryServices.DpmErrorInfo","com.azure.resourcemanager.recoveryservicesbackup.models.DpmJob":"Microsoft.RecoveryServices.DpmJob","com.azure.resourcemanager.recoveryservicesbackup.models.DpmJobExtendedInfo":"Microsoft.RecoveryServices.DpmJobExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.DpmJobTaskDetails":"Microsoft.RecoveryServices.DpmJobTaskDetails","com.azure.resourcemanager.recoveryservicesbackup.models.DpmProtectedItem":"Microsoft.RecoveryServices.DPMProtectedItem","com.azure.resourcemanager.recoveryservicesbackup.models.DpmProtectedItemExtendedInfo":"Microsoft.RecoveryServices.DPMProtectedItemExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.EncryptionAtRestType":"Microsoft.RecoveryServices.EncryptionAtRestType","com.azure.resourcemanager.recoveryservicesbackup.models.EncryptionDetails":"Microsoft.RecoveryServices.EncryptionDetails","com.azure.resourcemanager.recoveryservicesbackup.models.EnhancedSecurityState":"Microsoft.RecoveryServices.EnhancedSecurityState","com.azure.resourcemanager.recoveryservicesbackup.models.ErrorDetail":"Microsoft.RecoveryServices.ErrorDetail","com.azure.resourcemanager.recoveryservicesbackup.models.ExportJobsOperationResultInfo":"Microsoft.RecoveryServices.ExportJobsOperationResultInfo","com.azure.resourcemanager.recoveryservicesbackup.models.ExtendedLocation":"Microsoft.RecoveryServices.ExtendedLocation","com.azure.resourcemanager.recoveryservicesbackup.models.ExtendedProperties":"Microsoft.RecoveryServices.ExtendedProperties","com.azure.resourcemanager.recoveryservicesbackup.models.FabricName":"Microsoft.RecoveryServices.FabricName","com.azure.resourcemanager.recoveryservicesbackup.models.FeatureSupportRequest":"Microsoft.RecoveryServices.FeatureSupportRequest","com.azure.resourcemanager.recoveryservicesbackup.models.FetchTieringCostInfoForRehydrationRequest":"Microsoft.RecoveryServices.FetchTieringCostInfoForRehydrationRequest","com.azure.resourcemanager.recoveryservicesbackup.models.FetchTieringCostInfoRequest":"Microsoft.RecoveryServices.FetchTieringCostInfoRequest","com.azure.resourcemanager.recoveryservicesbackup.models.FetchTieringCostSavingsInfoForPolicyRequest":"Microsoft.RecoveryServices.FetchTieringCostSavingsInfoForPolicyRequest","com.azure.resourcemanager.recoveryservicesbackup.models.FetchTieringCostSavingsInfoForProtectedItemRequest":"Microsoft.RecoveryServices.FetchTieringCostSavingsInfoForProtectedItemRequest","com.azure.resourcemanager.recoveryservicesbackup.models.FetchTieringCostSavingsInfoForVaultRequest":"Microsoft.RecoveryServices.FetchTieringCostSavingsInfoForVaultRequest","com.azure.resourcemanager.recoveryservicesbackup.models.GenericContainer":"Microsoft.RecoveryServices.GenericContainer","com.azure.resourcemanager.recoveryservicesbackup.models.GenericContainerExtendedInfo":"Microsoft.RecoveryServices.GenericContainerExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.GenericProtectedItem":"Microsoft.RecoveryServices.GenericProtectedItem","com.azure.resourcemanager.recoveryservicesbackup.models.GenericProtectionPolicy":"Microsoft.RecoveryServices.GenericProtectionPolicy","com.azure.resourcemanager.recoveryservicesbackup.models.GenericRecoveryPoint":"Microsoft.RecoveryServices.GenericRecoveryPoint","com.azure.resourcemanager.recoveryservicesbackup.models.HealthStatus":"Microsoft.RecoveryServices.HealthStatus","com.azure.resourcemanager.recoveryservicesbackup.models.HourlySchedule":"Microsoft.RecoveryServices.HourlySchedule","com.azure.resourcemanager.recoveryservicesbackup.models.HttpStatusCode":"Microsoft.RecoveryServices.HttpStatusCode","com.azure.resourcemanager.recoveryservicesbackup.models.IaaSvmContainer":"Microsoft.RecoveryServices.IaaSVMContainer","com.azure.resourcemanager.recoveryservicesbackup.models.IaasVMBackupRequest":"Microsoft.RecoveryServices.IaasVMBackupRequest","com.azure.resourcemanager.recoveryservicesbackup.models.IaasVMRecoveryPoint":"Microsoft.RecoveryServices.IaasVMRecoveryPoint","com.azure.resourcemanager.recoveryservicesbackup.models.IaasVMRestoreRequest":"Microsoft.RecoveryServices.IaasVMRestoreRequest","com.azure.resourcemanager.recoveryservicesbackup.models.IaasVMRestoreWithRehydrationRequest":"Microsoft.RecoveryServices.IaasVMRestoreWithRehydrationRequest","com.azure.resourcemanager.recoveryservicesbackup.models.IaasVMSnapshotConsistencyType":"Microsoft.RecoveryServices.IaasVMSnapshotConsistencyType","com.azure.resourcemanager.recoveryservicesbackup.models.IaasVmProtectableItem":"Microsoft.RecoveryServices.IaaSVMProtectableItem","com.azure.resourcemanager.recoveryservicesbackup.models.IaasVmilrRegistrationRequest":"Microsoft.RecoveryServices.IaasVMILRRegistrationRequest","com.azure.resourcemanager.recoveryservicesbackup.models.IaasvmPolicyType":"Microsoft.RecoveryServices.IAASVMPolicyType","com.azure.resourcemanager.recoveryservicesbackup.models.IdentityBasedRestoreDetails":"Microsoft.RecoveryServices.IdentityBasedRestoreDetails","com.azure.resourcemanager.recoveryservicesbackup.models.IdentityInfo":"Microsoft.RecoveryServices.IdentityInfo","com.azure.resourcemanager.recoveryservicesbackup.models.IlrRequest":"Microsoft.RecoveryServices.ILRRequest","com.azure.resourcemanager.recoveryservicesbackup.models.IlrRequestResource":"Microsoft.RecoveryServices.ILRRequestResource","com.azure.resourcemanager.recoveryservicesbackup.models.InfrastructureEncryptionState":"Microsoft.RecoveryServices.InfrastructureEncryptionState","com.azure.resourcemanager.recoveryservicesbackup.models.InquiryInfo":"Microsoft.RecoveryServices.InquiryInfo","com.azure.resourcemanager.recoveryservicesbackup.models.InquiryStatus":"Microsoft.RecoveryServices.InquiryStatus","com.azure.resourcemanager.recoveryservicesbackup.models.InquiryValidation":"Microsoft.RecoveryServices.InquiryValidation","com.azure.resourcemanager.recoveryservicesbackup.models.InstanceProtectionReadiness":"Microsoft.RecoveryServices.InstanceProtectionReadiness","com.azure.resourcemanager.recoveryservicesbackup.models.InstantItemRecoveryTarget":"Microsoft.RecoveryServices.InstantItemRecoveryTarget","com.azure.resourcemanager.recoveryservicesbackup.models.InstantRPAdditionalDetails":"Microsoft.RecoveryServices.InstantRPAdditionalDetails","com.azure.resourcemanager.recoveryservicesbackup.models.Job":"Microsoft.RecoveryServices.Job","com.azure.resourcemanager.recoveryservicesbackup.models.JobSupportedAction":"Microsoft.RecoveryServices.JobSupportedAction","com.azure.resourcemanager.recoveryservicesbackup.models.KekDetails":"Microsoft.RecoveryServices.KEKDetails","com.azure.resourcemanager.recoveryservicesbackup.models.KeyAndSecretDetails":"Microsoft.RecoveryServices.KeyAndSecretDetails","com.azure.resourcemanager.recoveryservicesbackup.models.KpiResourceHealthDetails":"Microsoft.RecoveryServices.KPIResourceHealthDetails","com.azure.resourcemanager.recoveryservicesbackup.models.LastBackupStatus":"Microsoft.RecoveryServices.LastBackupStatus","com.azure.resourcemanager.recoveryservicesbackup.models.LastUpdateStatus":"Microsoft.RecoveryServices.LastUpdateStatus","com.azure.resourcemanager.recoveryservicesbackup.models.ListRecoveryPointsRecommendedForMoveRequest":"Microsoft.RecoveryServices.ListRecoveryPointsRecommendedForMoveRequest","com.azure.resourcemanager.recoveryservicesbackup.models.LogSchedulePolicy":"Microsoft.RecoveryServices.LogSchedulePolicy","com.azure.resourcemanager.recoveryservicesbackup.models.LongTermRetentionPolicy":"Microsoft.RecoveryServices.LongTermRetentionPolicy","com.azure.resourcemanager.recoveryservicesbackup.models.LongTermSchedulePolicy":"Microsoft.RecoveryServices.LongTermSchedulePolicy","com.azure.resourcemanager.recoveryservicesbackup.models.MabContainer":"Microsoft.RecoveryServices.MabContainer","com.azure.resourcemanager.recoveryservicesbackup.models.MabContainerExtendedInfo":"Microsoft.RecoveryServices.MabContainerExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.MabContainerHealthDetails":"Microsoft.RecoveryServices.MABContainerHealthDetails","com.azure.resourcemanager.recoveryservicesbackup.models.MabErrorInfo":"Microsoft.RecoveryServices.MabErrorInfo","com.azure.resourcemanager.recoveryservicesbackup.models.MabFileFolderProtectedItem":"Microsoft.RecoveryServices.MabFileFolderProtectedItem","com.azure.resourcemanager.recoveryservicesbackup.models.MabFileFolderProtectedItemExtendedInfo":"Microsoft.RecoveryServices.MabFileFolderProtectedItemExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.MabJob":"Microsoft.RecoveryServices.MabJob","com.azure.resourcemanager.recoveryservicesbackup.models.MabJobExtendedInfo":"Microsoft.RecoveryServices.MabJobExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.MabJobTaskDetails":"Microsoft.RecoveryServices.MabJobTaskDetails","com.azure.resourcemanager.recoveryservicesbackup.models.MabProtectionPolicy":"Microsoft.RecoveryServices.MabProtectionPolicy","com.azure.resourcemanager.recoveryservicesbackup.models.MabServerType":"Microsoft.RecoveryServices.MabServerType","com.azure.resourcemanager.recoveryservicesbackup.models.MonthOfYear":"Microsoft.RecoveryServices.MonthOfYear","com.azure.resourcemanager.recoveryservicesbackup.models.MonthlyRetentionSchedule":"Microsoft.RecoveryServices.MonthlyRetentionSchedule","com.azure.resourcemanager.recoveryservicesbackup.models.MoveRPAcrossTiersRequest":"Microsoft.RecoveryServices.MoveRPAcrossTiersRequest","com.azure.resourcemanager.recoveryservicesbackup.models.NameInfo":"Microsoft.RecoveryServices.NameInfo","com.azure.resourcemanager.recoveryservicesbackup.models.OkResponse":"TypeSpec.Http.OkResponse","com.azure.resourcemanager.recoveryservicesbackup.models.OperationResultInfo":"Microsoft.RecoveryServices.OperationResultInfo","com.azure.resourcemanager.recoveryservicesbackup.models.OperationResultInfoBase":"Microsoft.RecoveryServices.OperationResultInfoBase","com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusError":"Microsoft.RecoveryServices.OperationStatusError","com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusExtendedInfo":"Microsoft.RecoveryServices.OperationStatusExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusJobExtendedInfo":"Microsoft.RecoveryServices.OperationStatusJobExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusJobsExtendedInfo":"Microsoft.RecoveryServices.OperationStatusJobsExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusProvisionIlrExtendedInfo":"Microsoft.RecoveryServices.OperationStatusProvisionILRExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusValidateOperationExtendedInfo":"Microsoft.RecoveryServices.OperationStatusValidateOperationExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusValues":"Microsoft.RecoveryServices.OperationStatusValues","com.azure.resourcemanager.recoveryservicesbackup.models.OperationType":"Microsoft.RecoveryServices.OperationType","com.azure.resourcemanager.recoveryservicesbackup.models.OperationWorkerResponse":"Microsoft.RecoveryServices.OperationWorkerResponse","com.azure.resourcemanager.recoveryservicesbackup.models.OverwriteOptions":"Microsoft.RecoveryServices.OverwriteOptions","com.azure.resourcemanager.recoveryservicesbackup.models.PatchRecoveryPointInput":"Microsoft.RecoveryServices.PatchRecoveryPointInput","com.azure.resourcemanager.recoveryservicesbackup.models.PatchRecoveryPointPropertiesInput":"Microsoft.RecoveryServices.PatchRecoveryPointPropertiesInput","com.azure.resourcemanager.recoveryservicesbackup.models.PointInTimeRange":"Microsoft.RecoveryServices.PointInTimeRange","com.azure.resourcemanager.recoveryservicesbackup.models.PolicyType":"Microsoft.RecoveryServices.PolicyType","com.azure.resourcemanager.recoveryservicesbackup.models.PreBackupValidation":"Microsoft.RecoveryServices.PreBackupValidation","com.azure.resourcemanager.recoveryservicesbackup.models.PreValidateEnableBackupRequest":"Microsoft.RecoveryServices.PreValidateEnableBackupRequest","com.azure.resourcemanager.recoveryservicesbackup.models.PrepareDataMoveRequest":"Microsoft.RecoveryServices.PrepareDataMoveRequest","com.azure.resourcemanager.recoveryservicesbackup.models.PrepareDataMoveResponse":"Microsoft.RecoveryServices.PrepareDataMoveResponse","com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpoint":"Microsoft.RecoveryServices.PrivateEndpoint","com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnection":"Microsoft.RecoveryServices.PrivateEndpointConnection","com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnectionStatus":"Microsoft.RecoveryServices.PrivateEndpointConnectionStatus","com.azure.resourcemanager.recoveryservicesbackup.models.PrivateLinkServiceConnectionState":"Microsoft.RecoveryServices.PrivateLinkServiceConnectionState","com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainer":"Microsoft.RecoveryServices.ProtectableContainer","com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainerType":"Microsoft.RecoveryServices.ProtectableContainerType","com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItem":"Microsoft.RecoveryServices.ProtectedItem","com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItemHealthStatus":"Microsoft.RecoveryServices.ProtectedItemHealthStatus","com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItemState":"Microsoft.RecoveryServices.ProtectedItemState","com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionContainer":"Microsoft.RecoveryServices.ProtectionContainer","com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionIntent":"Microsoft.RecoveryServices.ProtectionIntent","com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionIntentItemType":"Microsoft.RecoveryServices.ProtectionIntentItemType","com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionLevel":"Microsoft.RecoveryServices.ProtectionLevel","com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionPolicy":"Microsoft.RecoveryServices.ProtectionPolicy","com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionState":"Microsoft.RecoveryServices.ProtectionState","com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus":"Microsoft.RecoveryServices.ProtectionStatus","com.azure.resourcemanager.recoveryservicesbackup.models.ProvisioningState":"Microsoft.RecoveryServices.ProvisioningState","com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryMode":"Microsoft.RecoveryServices.RecoveryMode","com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPoint":"Microsoft.RecoveryServices.RecoveryPoint","com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointDiskConfiguration":"Microsoft.RecoveryServices.RecoveryPointDiskConfiguration","com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo":"Microsoft.RecoveryServices.RecoveryPointMoveReadinessInfo","com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointProperties":"Microsoft.RecoveryServices.RecoveryPointProperties","com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointRehydrationInfo":"Microsoft.RecoveryServices.RecoveryPointRehydrationInfo","com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierInformation":"Microsoft.RecoveryServices.RecoveryPointTierInformation","com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierInformationV2":"Microsoft.RecoveryServices.RecoveryPointTierInformationV2","com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierStatus":"Microsoft.RecoveryServices.RecoveryPointTierStatus","com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType":"Microsoft.RecoveryServices.RecoveryPointTierType","com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryType":"Microsoft.RecoveryServices.RecoveryType","com.azure.resourcemanager.recoveryservicesbackup.models.RehydrationPriority":"Microsoft.RecoveryServices.RehydrationPriority","com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardOperationDetail":"Microsoft.RecoveryServices.ResourceGuardOperationDetail","com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBase":"Microsoft.RecoveryServices.ResourceGuardProxyBase","com.azure.resourcemanager.recoveryservicesbackup.models.ResourceHealthDetails":"Microsoft.RecoveryServices.ResourceHealthDetails","com.azure.resourcemanager.recoveryservicesbackup.models.ResourceHealthStatus":"Microsoft.RecoveryServices.ResourceHealthStatus","com.azure.resourcemanager.recoveryservicesbackup.models.ResourceList":"Microsoft.RecoveryServices.ResourceList","com.azure.resourcemanager.recoveryservicesbackup.models.RestoreFileSpecs":"Microsoft.RecoveryServices.RestoreFileSpecs","com.azure.resourcemanager.recoveryservicesbackup.models.RestorePointType":"Microsoft.RecoveryServices.RestorePointType","com.azure.resourcemanager.recoveryservicesbackup.models.RestoreRequest":"Microsoft.RecoveryServices.RestoreRequest","com.azure.resourcemanager.recoveryservicesbackup.models.RestoreRequestResource":"Microsoft.RecoveryServices.RestoreRequestResource","com.azure.resourcemanager.recoveryservicesbackup.models.RestoreRequestType":"Microsoft.RecoveryServices.RestoreRequestType","com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDuration":"Microsoft.RecoveryServices.RetentionDuration","com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDurationType":"Microsoft.RecoveryServices.RetentionDurationType","com.azure.resourcemanager.recoveryservicesbackup.models.RetentionPolicy":"Microsoft.RecoveryServices.RetentionPolicy","com.azure.resourcemanager.recoveryservicesbackup.models.RetentionScheduleFormat":"Microsoft.RecoveryServices.RetentionScheduleFormat","com.azure.resourcemanager.recoveryservicesbackup.models.SchedulePolicy":"Microsoft.RecoveryServices.SchedulePolicy","com.azure.resourcemanager.recoveryservicesbackup.models.ScheduleRunType":"Microsoft.RecoveryServices.ScheduleRunType","com.azure.resourcemanager.recoveryservicesbackup.models.SecuredVMDetails":"Microsoft.RecoveryServices.SecuredVMDetails","com.azure.resourcemanager.recoveryservicesbackup.models.SecurityPinBase":"Microsoft.RecoveryServices.SecurityPinBase","com.azure.resourcemanager.recoveryservicesbackup.models.Settings":"Microsoft.RecoveryServices.Settings","com.azure.resourcemanager.recoveryservicesbackup.models.SimpleRetentionPolicy":"Microsoft.RecoveryServices.SimpleRetentionPolicy","com.azure.resourcemanager.recoveryservicesbackup.models.SimpleSchedulePolicy":"Microsoft.RecoveryServices.SimpleSchedulePolicy","com.azure.resourcemanager.recoveryservicesbackup.models.SimpleSchedulePolicyV2":"Microsoft.RecoveryServices.SimpleSchedulePolicyV2","com.azure.resourcemanager.recoveryservicesbackup.models.SnapshotBackupAdditionalDetails":"Microsoft.RecoveryServices.SnapshotBackupAdditionalDetails","com.azure.resourcemanager.recoveryservicesbackup.models.SnapshotRestoreParameters":"Microsoft.RecoveryServices.SnapshotRestoreParameters","com.azure.resourcemanager.recoveryservicesbackup.models.SoftDeleteFeatureState":"Microsoft.RecoveryServices.SoftDeleteFeatureState","com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanInfo":"Microsoft.RecoveryServices.SourceSideScanInfo","com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanStatus":"Microsoft.RecoveryServices.SourceSideScanStatus","com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanSummary":"Microsoft.RecoveryServices.SourceSideScanSummary","com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectory":"Microsoft.RecoveryServices.SQLDataDirectory","com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryMapping":"Microsoft.RecoveryServices.SQLDataDirectoryMapping","com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryType":"Microsoft.RecoveryServices.SQLDataDirectoryType","com.azure.resourcemanager.recoveryservicesbackup.models.StorageType":"Microsoft.RecoveryServices.StorageType","com.azure.resourcemanager.recoveryservicesbackup.models.StorageTypeState":"Microsoft.RecoveryServices.StorageTypeState","com.azure.resourcemanager.recoveryservicesbackup.models.SubProtectionPolicy":"Microsoft.RecoveryServices.SubProtectionPolicy","com.azure.resourcemanager.recoveryservicesbackup.models.SupportStatus":"Microsoft.RecoveryServices.SupportStatus","com.azure.resourcemanager.recoveryservicesbackup.models.TargetAfsRestoreInfo":"Microsoft.RecoveryServices.TargetAFSRestoreInfo","com.azure.resourcemanager.recoveryservicesbackup.models.TargetDiskNetworkAccessOption":"Microsoft.RecoveryServices.TargetDiskNetworkAccessOption","com.azure.resourcemanager.recoveryservicesbackup.models.TargetDiskNetworkAccessSettings":"Microsoft.RecoveryServices.TargetDiskNetworkAccessSettings","com.azure.resourcemanager.recoveryservicesbackup.models.TargetRestoreInfo":"Microsoft.RecoveryServices.TargetRestoreInfo","com.azure.resourcemanager.recoveryservicesbackup.models.ThreatInfo":"Microsoft.RecoveryServices.ThreatInfo","com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity":"Microsoft.RecoveryServices.ThreatSeverity","com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState":"Microsoft.RecoveryServices.ThreatState","com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus":"Microsoft.RecoveryServices.ThreatStatus","com.azure.resourcemanager.recoveryservicesbackup.models.TieringCostRehydrationInfo":"Microsoft.RecoveryServices.TieringCostRehydrationInfo","com.azure.resourcemanager.recoveryservicesbackup.models.TieringCostSavingInfo":"Microsoft.RecoveryServices.TieringCostSavingInfo","com.azure.resourcemanager.recoveryservicesbackup.models.TieringMode":"Microsoft.RecoveryServices.TieringMode","com.azure.resourcemanager.recoveryservicesbackup.models.TieringPolicy":"Microsoft.RecoveryServices.TieringPolicy","com.azure.resourcemanager.recoveryservicesbackup.models.TriggerDataMoveRequest":"Microsoft.RecoveryServices.TriggerDataMoveRequest","com.azure.resourcemanager.recoveryservicesbackup.models.UnlockDeleteRequest":"Microsoft.RecoveryServices.UnlockDeleteRequest","com.azure.resourcemanager.recoveryservicesbackup.models.UpdateRecoveryPointRequest":"Microsoft.RecoveryServices.UpdateRecoveryPointRequest","com.azure.resourcemanager.recoveryservicesbackup.models.UsagesUnit":"Microsoft.RecoveryServices.UsagesUnit","com.azure.resourcemanager.recoveryservicesbackup.models.UserAssignedIdentityProperties":"Microsoft.RecoveryServices.UserAssignedIdentityProperties","com.azure.resourcemanager.recoveryservicesbackup.models.UserAssignedManagedIdentityDetails":"Microsoft.RecoveryServices.UserAssignedManagedIdentityDetails","com.azure.resourcemanager.recoveryservicesbackup.models.VMWorkloadPolicyType":"Microsoft.RecoveryServices.VMWorkloadPolicyType","com.azure.resourcemanager.recoveryservicesbackup.models.ValidateIaasVMRestoreOperationRequest":"Microsoft.RecoveryServices.ValidateIaasVMRestoreOperationRequest","com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequest":"Microsoft.RecoveryServices.ValidateOperationRequest","com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequestResource":"Microsoft.RecoveryServices.ValidateOperationRequestResource","com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationResponse":"Microsoft.RecoveryServices.ValidateOperationResponse","com.azure.resourcemanager.recoveryservicesbackup.models.ValidateRestoreOperationRequest":"Microsoft.RecoveryServices.ValidateRestoreOperationRequest","com.azure.resourcemanager.recoveryservicesbackup.models.ValidationStatus":"Microsoft.RecoveryServices.ValidationStatus","com.azure.resourcemanager.recoveryservicesbackup.models.VaultJob":"Microsoft.RecoveryServices.VaultJob","com.azure.resourcemanager.recoveryservicesbackup.models.VaultJobErrorInfo":"Microsoft.RecoveryServices.VaultJobErrorInfo","com.azure.resourcemanager.recoveryservicesbackup.models.VaultJobExtendedInfo":"Microsoft.RecoveryServices.VaultJobExtendedInfo","com.azure.resourcemanager.recoveryservicesbackup.models.VaultRetentionPolicy":"Microsoft.RecoveryServices.VaultRetentionPolicy","com.azure.resourcemanager.recoveryservicesbackup.models.VaultSubResourceType":"Microsoft.RecoveryServices.VaultSubResourceType","com.azure.resourcemanager.recoveryservicesbackup.models.WeekOfMonth":"Microsoft.RecoveryServices.WeekOfMonth","com.azure.resourcemanager.recoveryservicesbackup.models.WeeklyRetentionFormat":"Microsoft.RecoveryServices.WeeklyRetentionFormat","com.azure.resourcemanager.recoveryservicesbackup.models.WeeklyRetentionSchedule":"Microsoft.RecoveryServices.WeeklyRetentionSchedule","com.azure.resourcemanager.recoveryservicesbackup.models.WeeklySchedule":"Microsoft.RecoveryServices.WeeklySchedule","com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadInquiryDetails":"Microsoft.RecoveryServices.WorkloadInquiryDetails","com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadItem":"Microsoft.RecoveryServices.WorkloadItem","com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadItemType":"Microsoft.RecoveryServices.WorkloadItemType","com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadProtectableItem":"Microsoft.RecoveryServices.WorkloadProtectableItem","com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadType":"Microsoft.RecoveryServices.WorkloadType","com.azure.resourcemanager.recoveryservicesbackup.models.XcoolState":"Microsoft.RecoveryServices.XcoolState","com.azure.resourcemanager.recoveryservicesbackup.models.YearlyRetentionSchedule":"Microsoft.RecoveryServices.YearlyRetentionSchedule"},"generatedFiles":["src/main/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManager.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupEnginesClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupJobsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupOperationResultsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupOperationStatusesClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupPoliciesClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectableItemsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectedItemsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectionContainersClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupProtectionIntentsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceEncryptionConfigsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceStorageConfigsNonCrrsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceVaultConfigsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupStatusClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupUsageSummariesClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupWorkloadItemsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BmsPrepareDataMoveOperationResultsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/DeletedProtectionContainersClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ExportJobsOperationResultsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/FeatureSupportsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/FetchTieringCostsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/GetTieringCostOperationResultsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ItemLevelRecoveryConnectionsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobCancellationsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobDetailsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobOperationResultsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/JobsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationOperationsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/PrivateEndpointsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectableContainersClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectedItemOperationResultsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectedItemOperationStatusesClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectedItemsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionContainerOperationResultsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionContainerRefreshOperationResultsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionContainersClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionIntentsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPoliciesClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPolicyOperationResultsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ProtectionPolicyOperationStatusesClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryPointsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryPointsRecommendedForMovesClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryServicesBackupManagementClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceGuardProxyOperationsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ResourceProvidersClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RestoresClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/SecurityPINsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/TieringCostOperationStatusClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ValidateOperationResultsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ValidateOperationStatusesClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/ValidateOperationsClient.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/AzureVMResourceFeatureSupportResponseInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupEngineBaseResourceInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupManagementUsageInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceConfigResourceInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigExtendedResourceInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceVaultConfigResourceInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupStatusResponseInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ClientDiscoveryValueForSingleApiInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/JobResourceInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/OperationResultInfoBaseResourceInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/OperationStatusInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/PreValidateEnableBackupResponseInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/PrivateEndpointConnectionResourceInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectableContainerResourceInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectedItemResourceInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectionContainerResourceInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectionIntentResourceInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectionPolicyResourceInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/RecoveryPointResourceInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ResourceGuardProxyBaseResourceInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/TieringCostInfoInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/TokenInformationInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/UnlockDeleteResponseInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ValidateOperationsResponseInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/VaultStorageConfigOperationResultResponseInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/WorkloadItemResourceInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/WorkloadProtectableItemResourceInner.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/package-info.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/AzureVMResourceFeatureSupportResponseImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEngineBaseResourceImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupManagementUsageImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceConfigResourceImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigExtendedResourceImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceStorageConfigsNonCrrsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigResourceImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ClientDiscoveryValueForSingleApiImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/DeletedProtectionContainersClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/DeletedProtectionContainersImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FetchTieringCostsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FetchTieringCostsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/GetTieringCostOperationResultsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/GetTieringCostOperationResultsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobResourceImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationResultInfoBaseResourceImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationStatusImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PreValidateEnableBackupResponseImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionResourceImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainerResourceImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemResourceImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerResourceImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentResourceImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPoliciesImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationResultsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationResultsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationStatusesImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyResourceImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointResourceImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsRecommendedForMovesClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsRecommendedForMovesImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupManagementClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxyBaseResourceImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxyOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceGuardProxyOperationsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceProvidersClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceProvidersImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RestoresClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RestoresImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/SecurityPINsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/SecurityPINsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TieringCostInfoImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TieringCostOperationStatusClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TieringCostOperationStatusImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/TokenInformationImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/UnlockDeleteResponseImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationResultsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationResultsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationStatusesClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationStatusesImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationsImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ValidateOperationsResponseImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/VaultStorageConfigOperationResultResponseImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/WorkloadItemResourceImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/WorkloadProtectableItemResourceImpl.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/BackupEngineBaseResourceList.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/BackupManagementUsageList.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ClientDiscoveryResponse.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/JobResourceList.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectableContainerResourceList.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectedItemResourceList.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectionContainerResourceList.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectionIntentResourceList.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ProtectionPolicyResourceList.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/RecoveryPointResourceList.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/ResourceGuardProxyBaseResourceList.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/WorkloadItemResourceList.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/models/WorkloadProtectableItemResourceList.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/package-info.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AcquireStorageAccountLock.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureBackupGoalFeatureSupportRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureBackupServerContainer.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureBackupServerEngine.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareBackupRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareProtectableItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareProtectionPolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareProvisionIlrRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareRecoveryPoint.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareRestoreRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileShareType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileshareProtectedItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureFileshareProtectedItemExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSClassicComputeVMContainer.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSClassicComputeVMProtectableItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSClassicComputeVMProtectedItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSComputeVMContainer.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSComputeVMProtectableItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSComputeVMProtectedItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmErrorInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmHealthDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmJob.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmJobExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmJobTaskDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmJobV2.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmProtectedItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmProtectedItemExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureIaaSvmProtectionPolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureRecoveryServiceVaultProtectionIntent.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureResourceProtectionIntent.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlContainer.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlProtectedItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlProtectedItemExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlProtectionPolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureSqlagWorkloadContainerProtectionContainer.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageContainer.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageErrorInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageJob.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageJobExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageJobTaskDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureStorageProtectableContainer.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVMAppContainerProtectableContainer.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVMAppContainerProtectionContainer.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVMResourceFeatureSupportRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVMResourceFeatureSupportResponse.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadProtectableItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadProtectedItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadProtectedItemExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadProtectionPolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSAPHanaScaleoutProtectableItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSQLInstanceProtectedItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseDatabaseProtectableItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseDatabaseProtectedItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseDatabaseWorkloadItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseSystemProtectableItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapAseSystemWorkloadItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDBInstance.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDBInstanceProtectedItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDatabaseProtectableItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDatabaseProtectedItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaDatabaseWorkloadItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaHsr.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaSystemProtectableItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSapHanaSystemWorkloadItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlAvailabilityGroupProtectableItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlDatabaseProtectableItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlDatabaseProtectedItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlDatabaseWorkloadItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlInstanceProtectableItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlInstanceWorkloadItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadAutoProtectionIntent.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadBackupRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadContainer.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadContainerAutoProtectionIntent.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadContainerExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadErrorInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadJob.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadJobExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadJobTaskDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadPointInTimeRecoveryPoint.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadPointInTimeRestoreRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRecoveryPoint.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRestoreRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapAsePointInTimeRecoveryPoint.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapAsePointInTimeRestoreRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapAseRecoveryPoint.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapAseRestoreRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRecoveryPoint.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRecoveryPoint.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreWithRehydrateRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlAutoProtectionIntent.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRecoveryPoint.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRecoveryPoint.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRecoveryPointExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreWithRehydrateRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineBase.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineBaseResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngineType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupEngines.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupItemType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupJobs.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupManagementType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupManagementUsage.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupOperationResults.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupOperationStatuses.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupPolicies.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectableItems.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectedItems.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectionContainers.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupProtectionIntents.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupRequestResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceConfig.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceConfigResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfig.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigExtended.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigExtendedResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigs.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceStorageConfigsNonCrrs.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceVaultConfig.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceVaultConfigResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceVaultConfigs.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupStatus.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupStatusRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupStatusResponse.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupUsageSummaries.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupWorkloadItems.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Backups.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BekDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BmsPrepareDataMoveOperationResults.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryDisplay.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryForLogSpecification.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryForProperties.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryForServiceSpecification.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientDiscoveryValueForSingleApi.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ClientScriptForConnect.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ContainerIdentityInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/CopyOptions.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/CreateMode.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DailyRetentionFormat.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DailyRetentionSchedule.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DailySchedule.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DataMoveLevel.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DataSourceType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DatabaseInRP.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Day.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DayOfWeek.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DedupState.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DeletedProtectionContainers.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DiskExclusionProperties.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DiskInformation.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DistributedNodesInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmBackupEngine.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmContainer.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmContainerExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmErrorInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmJob.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmJobExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmJobTaskDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmProtectedItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/DpmProtectedItemExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/EncryptionAtRestType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/EncryptionDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/EnhancedSecurityState.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ErrorDetail.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExportJobsOperationResultInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExportJobsOperationResults.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ExtendedProperties.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FabricName.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FeatureSupportRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FeatureSupports.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostInfoForRehydrationRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostInfoRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostSavingsInfoForPolicyRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostSavingsInfoForProtectedItemRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCostSavingsInfoForVaultRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/FetchTieringCosts.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericContainer.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericContainerExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericProtectedItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericProtectionPolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GenericRecoveryPoint.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/GetTieringCostOperationResults.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/HealthStatus.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/HourlySchedule.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/HttpStatusCode.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaaSvmContainer.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMBackupRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMRecoveryPoint.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMRestoreRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMRestoreWithRehydrationRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVMSnapshotConsistencyType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVmProtectableItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasVmilrRegistrationRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IaasvmPolicyType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IdentityBasedRestoreDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IdentityInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IlrRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/IlrRequestResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InfrastructureEncryptionState.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InquiryInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InquiryStatus.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InquiryValidation.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InstanceProtectionReadiness.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InstantItemRecoveryTarget.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/InstantRPAdditionalDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ItemLevelRecoveryConnections.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Job.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobCancellations.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobOperationResults.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/JobSupportedAction.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Jobs.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/KekDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/KeyAndSecretDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/KpiResourceHealthDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LastBackupStatus.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LastUpdateStatus.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ListRecoveryPointsRecommendedForMoveRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LogSchedulePolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LongTermRetentionPolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LongTermSchedulePolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabContainer.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabContainerExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabContainerHealthDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabErrorInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabFileFolderProtectedItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabFileFolderProtectedItemExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabJob.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabJobExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabJobTaskDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabProtectionPolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MabServerType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MonthOfYear.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MonthlyRetentionSchedule.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/MoveRPAcrossTiersRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/NameInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OkResponse.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationOperations.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationResultInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationResultInfoBase.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationResultInfoBaseResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatus.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusError.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusJobExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusJobsExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusProvisionIlrExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusValidateOperationExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationStatusValues.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationWorkerResponse.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Operations.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OverwriteOptions.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PatchRecoveryPointInput.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PatchRecoveryPointPropertiesInput.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PointInTimeRange.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PolicyType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PreBackupValidation.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PreValidateEnableBackupRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PreValidateEnableBackupResponse.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrepareDataMoveRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrepareDataMoveResponse.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnectionResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnectionStatus.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpointConnections.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateEndpoints.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainer.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainerResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainerType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectableContainers.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemHealthStatus.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemOperationResults.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemOperationStatuses.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItemState.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectedItems.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainer.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerOperationResults.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerRefreshOperationResults.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainerResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionContainers.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntent.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntentItemType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntentResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionIntents.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionLevel.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicies.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyOperationResults.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyOperationStatuses.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionPolicyResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionState.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProtectionStatus.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryMode.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPoint.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointDiskConfiguration.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointMoveReadinessInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointProperties.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointRehydrationInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierInformation.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierInformationV2.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierStatus.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointTierType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPoints.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryPointsRecommendedForMoves.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RecoveryType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RehydrationPriority.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardOperationDetail.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyBase.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyBaseResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceGuardProxyOperations.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceHealthDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceHealthStatus.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceList.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ResourceProviders.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreFileSpecs.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestorePointType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequestResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequestType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Restores.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionDuration.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionDurationType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionPolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RetentionScheduleFormat.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SchedulePolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ScheduleRunType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SecuredVMDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SecurityPINs.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SecurityPinBase.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Settings.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SimpleRetentionPolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SimpleSchedulePolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SimpleSchedulePolicyV2.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SnapshotBackupAdditionalDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SnapshotRestoreParameters.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SoftDeleteFeatureState.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SourceSideScanInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SourceSideScanStatus.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SourceSideScanSummary.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SqlDataDirectory.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SqlDataDirectoryMapping.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SqlDataDirectoryType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/StorageType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/StorageTypeState.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SubProtectionPolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/SupportStatus.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetAfsRestoreInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetDiskNetworkAccessOption.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetDiskNetworkAccessSettings.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TargetRestoreInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ThreatInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ThreatSeverity.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ThreatState.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ThreatStatus.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostOperationStatus.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostRehydrationInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringCostSavingInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringMode.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TieringPolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TokenInformation.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/TriggerDataMoveRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UnlockDeleteRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UnlockDeleteResponse.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UpdateRecoveryPointRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UsagesUnit.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UserAssignedIdentityProperties.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/UserAssignedManagedIdentityDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VMWorkloadPolicyType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateIaasVMRestoreOperationRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationRequestResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationResponse.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationResults.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationStatuses.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperations.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateOperationsResponse.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidateRestoreOperationRequest.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/ValidationStatus.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultJob.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultJobErrorInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultJobExtendedInfo.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultRetentionPolicy.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultStorageConfigOperationResultResponse.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/VaultSubResourceType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeekOfMonth.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeeklyRetentionFormat.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeeklyRetentionSchedule.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WeeklySchedule.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadInquiryDetails.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItemResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadItemType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadProtectableItem.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadProtectableItemResource.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/WorkloadType.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/XcoolState.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/YearlyRetentionSchedule.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/package-info.java","src/main/java/com/azure/resourcemanager/recoveryservicesbackup/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-recoveryservicesbackup/proxy-config.json b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-recoveryservicesbackup/proxy-config.json index b81e412f8d36..6a4769af2fc1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-recoveryservicesbackup/proxy-config.json +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-recoveryservicesbackup/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupEnginesClientImpl$BackupEnginesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupJobsClientImpl$BackupJobsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupOperationResultsClientImpl$BackupOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupOperationStatusesClientImpl$BackupOperationStatusesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupPoliciesClientImpl$BackupPoliciesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupProtectableItemsClientImpl$BackupProtectableItemsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupProtectedItemsClientImpl$BackupProtectedItemsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupProtectionContainersClientImpl$BackupProtectionContainersService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupProtectionIntentsClientImpl$BackupProtectionIntentsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupResourceEncryptionConfigsClientImpl$BackupResourceEncryptionConfigsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupResourceStorageConfigsNonCrrsClientImpl$BackupResourceStorageConfigsNonCrrsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupResourceVaultConfigsClientImpl$BackupResourceVaultConfigsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupStatusClientImpl$BackupStatusService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupUsageSummariesClientImpl$BackupUsageSummariesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupWorkloadItemsClientImpl$BackupWorkloadItemsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupsClientImpl$BackupsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BmsPrepareDataMoveOperationResultsClientImpl$BmsPrepareDataMoveOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.DeletedProtectionContainersClientImpl$DeletedProtectionContainersService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ExportJobsOperationResultsClientImpl$ExportJobsOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.FeatureSupportsClientImpl$FeatureSupportsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.FetchTieringCostsClientImpl$FetchTieringCostsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.GetTieringCostOperationResultsClientImpl$GetTieringCostOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ItemLevelRecoveryConnectionsClientImpl$ItemLevelRecoveryConnectionsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.JobCancellationsClientImpl$JobCancellationsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.JobDetailsClientImpl$JobDetailsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.JobOperationResultsClientImpl$JobOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.JobsClientImpl$JobsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.OperationOperationsClientImpl$OperationOperationsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.PrivateEndpointsClientImpl$PrivateEndpointsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectableContainersClientImpl$ProtectableContainersService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectedItemOperationResultsClientImpl$ProtectedItemOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectedItemOperationStatusesClientImpl$ProtectedItemOperationStatusesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectedItemsClientImpl$ProtectedItemsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectionContainerOperationResultsClientImpl$ProtectionContainerOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectionContainerRefreshOperationResultsClientImpl$ProtectionContainerRefreshOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectionContainersClientImpl$ProtectionContainersService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectionIntentsClientImpl$ProtectionIntentsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectionPoliciesClientImpl$ProtectionPoliciesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectionPolicyOperationResultsClientImpl$ProtectionPolicyOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectionPolicyOperationStatusesClientImpl$ProtectionPolicyOperationStatusesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.RecoveryPointsClientImpl$RecoveryPointsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.RecoveryPointsRecommendedForMovesClientImpl$RecoveryPointsRecommendedForMovesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ResourceGuardProxiesClientImpl$ResourceGuardProxiesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ResourceGuardProxyOperationsClientImpl$ResourceGuardProxyOperationsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ResourceProvidersClientImpl$ResourceProvidersService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.RestoresClientImpl$RestoresService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.SecurityPINsClientImpl$SecurityPINsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.TieringCostOperationStatusClientImpl$TieringCostOperationStatusService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ValidateOperationResultsClientImpl$ValidateOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ValidateOperationStatusesClientImpl$ValidateOperationStatusesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ValidateOperationsClientImpl$ValidateOperationsService"]] \ No newline at end of file +[["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupEnginesClientImpl$BackupEnginesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupJobsClientImpl$BackupJobsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupOperationResultsClientImpl$BackupOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupOperationStatusesClientImpl$BackupOperationStatusesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupPoliciesClientImpl$BackupPoliciesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupProtectableItemsClientImpl$BackupProtectableItemsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupProtectedItemsClientImpl$BackupProtectedItemsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupProtectionContainersClientImpl$BackupProtectionContainersService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupProtectionIntentsClientImpl$BackupProtectionIntentsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupResourceEncryptionConfigsClientImpl$BackupResourceEncryptionConfigsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupResourceStorageConfigsNonCrrsClientImpl$BackupResourceStorageConfigsNonCrrsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupResourceVaultConfigsClientImpl$BackupResourceVaultConfigsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupStatusClientImpl$BackupStatusService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupUsageSummariesClientImpl$BackupUsageSummariesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupWorkloadItemsClientImpl$BackupWorkloadItemsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BackupsClientImpl$BackupsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.BmsPrepareDataMoveOperationResultsClientImpl$BmsPrepareDataMoveOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.DeletedProtectionContainersClientImpl$DeletedProtectionContainersService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ExportJobsOperationResultsClientImpl$ExportJobsOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.FeatureSupportsClientImpl$FeatureSupportsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.FetchTieringCostsClientImpl$FetchTieringCostsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.GetTieringCostOperationResultsClientImpl$GetTieringCostOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ItemLevelRecoveryConnectionsClientImpl$ItemLevelRecoveryConnectionsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.JobCancellationsClientImpl$JobCancellationsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.JobDetailsClientImpl$JobDetailsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.JobOperationResultsClientImpl$JobOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.JobsClientImpl$JobsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.OperationOperationsClientImpl$OperationOperationsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.PrivateEndpointsClientImpl$PrivateEndpointsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectableContainersClientImpl$ProtectableContainersService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectedItemOperationResultsClientImpl$ProtectedItemOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectedItemOperationStatusesClientImpl$ProtectedItemOperationStatusesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectedItemsClientImpl$ProtectedItemsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectionContainerOperationResultsClientImpl$ProtectionContainerOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectionContainerRefreshOperationResultsClientImpl$ProtectionContainerRefreshOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectionContainersClientImpl$ProtectionContainersService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectionIntentsClientImpl$ProtectionIntentsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectionPoliciesClientImpl$ProtectionPoliciesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectionPolicyOperationResultsClientImpl$ProtectionPolicyOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectionPolicyOperationStatusesClientImpl$ProtectionPolicyOperationStatusesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.RecoveryPointsClientImpl$RecoveryPointsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.RecoveryPointsRecommendedForMovesClientImpl$RecoveryPointsRecommendedForMovesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ResourceGuardProxyOperationsClientImpl$ResourceGuardProxyOperationsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ResourceProvidersClientImpl$ResourceProvidersService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.RestoresClientImpl$RestoresService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.SecurityPINsClientImpl$SecurityPINsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.TieringCostOperationStatusClientImpl$TieringCostOperationStatusService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ValidateOperationResultsClientImpl$ValidateOperationResultsService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ValidateOperationStatusesClientImpl$ValidateOperationStatusesService"],["com.azure.resourcemanager.recoveryservicesbackup.implementation.ValidateOperationsClientImpl$ValidateOperationsService"]] \ No newline at end of file diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesGetSamples.java index e5f79b9f52db..2b7fae3d3019 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class BackupEnginesGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/Dpm/ - * BackupEngines_Get.json + * x-ms-original-file: 2026-01-01-preview/Dpm/BackupEngines_Get.json */ /** * Sample code: Get Dpm/AzureBackupServer/Lajolla Backup Engine Details. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesListSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesListSamples.java index 3ed8e97f37db..06fbb1e6ca19 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesListSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class BackupEnginesListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/Dpm/ - * BackupEngines_List.json + * x-ms-original-file: 2026-01-01-preview/Dpm/BackupEngines_List.json */ /** * Sample code: List Dpm/AzureBackupServer/Lajolla Backup Engines. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupJobsListSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupJobsListSamples.java index 18b1128cf166..2d1e4733674d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupJobsListSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupJobsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class BackupJobsListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/ListJobs.json + * x-ms-original-file: 2026-01-01-preview/Common/ListJobs.json */ /** * Sample code: List All Jobs. @@ -24,9 +22,7 @@ public final class BackupJobsListSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/ListJobsWithAllSupportedFilters.json + * x-ms-original-file: 2026-01-01-preview/Common/ListJobsWithAllSupportedFilters.json */ /** * Sample code: List Jobs With Filters. @@ -42,9 +38,7 @@ public final class BackupJobsListSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/ListJobsWithStartTimeAndEndTimeFilters.json + * x-ms-original-file: 2026-01-01-preview/Common/ListJobsWithStartTimeAndEndTimeFilters.json */ /** * Sample code: List Jobs With Time Filter. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupOperationResultsGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupOperationResultsGetSamples.java index 6175a0832eba..9a5fae208ee6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupOperationResultsGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupOperationResultsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class BackupOperationResultsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/ProtectedItem_Delete_OperationResult.json + * x-ms-original-file: 2026-01-01-preview/Common/ProtectedItem_Delete_OperationResult.json */ /** * Sample code: Get Result for Protected Item Delete Operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupOperationStatusesGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupOperationStatusesGetSamples.java index 1939dd3cca37..9326e92fcc7e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupOperationStatusesGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupOperationStatusesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class BackupOperationStatusesGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/ProtectedItem_Delete_OperationStatus.json + * x-ms-original-file: 2026-01-01-preview/Common/ProtectedItem_Delete_OperationStatus.json */ /** * Sample code: Get Protected Item Delete Operation Status. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupPoliciesListSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupPoliciesListSamples.java index 68bc5df3dca6..138c4aee535b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupPoliciesListSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupPoliciesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureWorkload/BackupPolicies_List.json + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/BackupPolicies_List.json */ /** * Sample code: List protection policies with backupManagementType filter as AzureWorkload. @@ -26,9 +24,7 @@ public static void listProtectionPoliciesWithBackupManagementTypeFilterAsAzureWo } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/V2Policy/v2-List-Policies.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/V2Policy/v2-List-Policies.json */ /** * Sample code: List protection policies with backupManagementType filter as AzureIaasVm with both V1 and V2 @@ -44,9 +40,7 @@ public static void listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIa } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/BackupPolicies_List.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/BackupPolicies_List.json */ /** * Sample code: List protection policies with backupManagementType filter as AzureIaasVm. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectableItemsListSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectableItemsListSamples.java index f093b3887108..c00dd8adae23 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectableItemsListSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectableItemsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class BackupProtectableItemsListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/BackupProtectableItems_List.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/BackupProtectableItems_List.json */ /** * Sample code: List protectable items with backupManagementType filter as AzureIaasVm. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectedItemsListSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectedItemsListSamples.java index abf8893bf546..343830e68a0f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectedItemsListSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectedItemsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class BackupProtectedItemsListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/BackupProtectedItems_List.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/BackupProtectedItems_List.json */ /** * Sample code: List protected items with backupManagementType filter as AzureIaasVm. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionContainersListSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionContainersListSamples.java index fe4b0748930f..d1625b8107ea 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionContainersListSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionContainersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class BackupProtectionContainersListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/ProtectionContainers_List.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/ProtectionContainers_List.json */ /** * Sample code: List Backup Protection Containers. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionIntentListSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionIntentListSamples.java index e78cecd601e6..799a0c6061e3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionIntentListSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionIntentListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class BackupProtectionIntentListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureWorkload/BackupProtectionIntent_List.json + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/BackupProtectionIntent_List.json */ /** * Sample code: List protection intent with backupManagementType filter. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceEncryptionConfigsGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceEncryptionConfigsGetSamples.java index 832854eb5378..81d0bc53821b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceEncryptionConfigsGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceEncryptionConfigsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class BackupResourceEncryptionConfigsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * BackupResourceEncryptionConfig_Get.json + * x-ms-original-file: 2026-01-01-preview/BackupResourceEncryptionConfig_Get.json */ /** * Sample code: Get Vault Encryption Configuration. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceEncryptionConfigsUpdateSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceEncryptionConfigsUpdateSamples.java index b154afe3c46d..23cf80b5ed83 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceEncryptionConfigsUpdateSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceEncryptionConfigsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,9 +14,7 @@ */ public final class BackupResourceEncryptionConfigsUpdateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * BackupResourceEncryptionConfig_Put.json + * x-ms-original-file: 2026-01-01-preview/BackupResourceEncryptionConfig_Put.json */ /** * Sample code: Update Vault Encryption Configuration. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrGetSamples.java index 4147e6411f17..546bb7d3633f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class BackupResourceStorageConfigsNonCrrGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupStorageConfig_Get.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupStorageConfig_Get.json */ /** * Sample code: Get Vault Storage Configuration. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrPatchSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrPatchSamples.java index ee8dd02800a3..74be5f119043 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrPatchSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrPatchSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,9 +14,7 @@ */ public final class BackupResourceStorageConfigsNonCrrPatchSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupStorageConfig_Patch.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupStorageConfig_Patch.json */ /** * Sample code: Update Vault Storage Configuration. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrUpdateSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrUpdateSamples.java index edbfa4e07ea9..a38a507c0049 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrUpdateSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,9 +14,7 @@ */ public final class BackupResourceStorageConfigsNonCrrUpdateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupStorageConfig_Put.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupStorageConfig_Put.json */ /** * Sample code: Update Vault Storage Configuration. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsGetSamples.java index 59af8aa0825f..66cf65b00ead 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class BackupResourceVaultConfigsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupResourceVaultConfigs_Get.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupResourceVaultConfigs_Get.json */ /** * Sample code: Get Vault Security Config. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsPutSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsPutSamples.java index 5d7444f02b55..7ee33387654d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsPutSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsPutSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,9 +14,7 @@ */ public final class BackupResourceVaultConfigsPutSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupResourceVaultConfigs_Put.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupResourceVaultConfigs_Put.json */ /** * Sample code: Update Vault Security Config. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsUpdateSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsUpdateSamples.java index 8d8a90a09f88..cb4ca663fc00 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsUpdateSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,9 +13,7 @@ */ public final class BackupResourceVaultConfigsUpdateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupResourceVaultConfigs_Patch.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupResourceVaultConfigs_Patch.json */ /** * Sample code: Update Vault Security Config. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupStatusGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupStatusGetSamples.java index fe2630123521..3feaba7a64f0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupStatusGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupStatusGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,9 +12,7 @@ */ public final class BackupStatusGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/GetBackupStatus.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/GetBackupStatus.json */ /** * Sample code: Get Azure Virtual Machine Backup Status. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupUsageSummariesListSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupUsageSummariesListSamples.java index 2f31231adc5a..1d07292e6b39 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupUsageSummariesListSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupUsageSummariesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class BackupUsageSummariesListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupProtectedItem_UsageSummary_Get.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupProtectedItem_UsageSummary_Get.json */ /** * Sample code: Get Protected Items Usages Summary. @@ -26,9 +24,7 @@ public static void getProtectedItemsUsagesSummary( } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupProtectionContainers_UsageSummary_Get.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupProtectionContainers_UsageSummary_Get.json */ /** * Sample code: Get Protected Containers Usages Summary. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupWorkloadItemsListSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupWorkloadItemsListSamples.java index addc9ab571be..805104e8d7d8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupWorkloadItemsListSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupWorkloadItemsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class BackupWorkloadItemsListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureWorkload/BackupWorkloadItems_List.json + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/BackupWorkloadItems_List.json */ /** * Sample code: List Workload Items in Container. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupsTriggerSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupsTriggerSamples.java index a92f46eae207..b373acbc3c62 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupsTriggerSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupsTriggerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,9 +12,7 @@ */ public final class BackupsTriggerSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/TriggerBackup_Post.json + * x-ms-original-file: 2026-01-01-preview/Common/TriggerBackup_Post.json */ /** * Sample code: Trigger Backup. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BmsPrepareDataMoveOperationResultGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BmsPrepareDataMoveOperationResultGetSamples.java index 6480163151a7..f4fc33f0ba61 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BmsPrepareDataMoveOperationResultGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BmsPrepareDataMoveOperationResultGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class BmsPrepareDataMoveOperationResultGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * BackupDataMove/PrepareDataMoveOperationResult_Get.json + * x-ms-original-file: 2026-01-01-preview/BackupDataMove/PrepareDataMoveOperationResult_Get.json */ /** * Sample code: Get operation result for PrepareDataMove. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DeletedProtectionContainersListSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DeletedProtectionContainersListSamples.java index 45de090811c4..e231c6ecbf64 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DeletedProtectionContainersListSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DeletedProtectionContainersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class DeletedProtectionContainersListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/SoftDeletedContainers_List.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/SoftDeletedContainers_List.json */ /** * Sample code: List Backup Protection Containers. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ExportJobsOperationResultsGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ExportJobsOperationResultsGetSamples.java index c51b907dd857..828164b9abc9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ExportJobsOperationResultsGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ExportJobsOperationResultsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ExportJobsOperationResultsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/ExportJobsOperationResult.json + * x-ms-original-file: 2026-01-01-preview/Common/ExportJobsOperationResult.json */ /** * Sample code: Export Jobs Operation Results. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FeatureSupportValidateSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FeatureSupportValidateSamples.java index 24f109dd4f1c..9ba1c80d7f4e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FeatureSupportValidateSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FeatureSupportValidateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,9 +11,7 @@ */ public final class FeatureSupportValidateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/BackupFeature_Validate.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/BackupFeature_Validate.json */ /** * Sample code: Check Azure Vm Backup Feature Support. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostPostSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostPostSamples.java index 086ce9a78eac..855e2d5647ec 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostPostSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostPostSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -16,9 +16,7 @@ */ public final class FetchTieringCostPostSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * TieringCost/FetchTieringCostForRehydrate.json + * x-ms-original-file: 2026-01-01-preview/TieringCost/FetchTieringCostForRehydrate.json */ /** * Sample code: Get the rehydration cost for recovery point. @@ -39,9 +37,7 @@ public static void getTheRehydrationCostForRecoveryPoint( } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * TieringCost/FetchTieringCostForProtectedItem.json + * x-ms-original-file: 2026-01-01-preview/TieringCost/FetchTieringCostForProtectedItem.json */ /** * Sample code: Get the tiering savings cost info for protected item. @@ -61,9 +57,7 @@ public static void getTheTieringSavingsCostInfoForProtectedItem( } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * TieringCost/FetchTieringCostForPolicy.json + * x-ms-original-file: 2026-01-01-preview/TieringCost/FetchTieringCostForPolicy.json */ /** * Sample code: Get the tiering savings cost info for policy. @@ -81,9 +75,7 @@ public static void getTheTieringSavingsCostInfoForPolicy( } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * TieringCost/FetchTieringCostForVault.json + * x-ms-original-file: 2026-01-01-preview/TieringCost/FetchTieringCostForVault.json */ /** * Sample code: Get the tiering savings cost info for vault. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GetTieringCostOperationResultGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GetTieringCostOperationResultGetSamples.java index 6569974a1abc..bb83fa88190b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GetTieringCostOperationResultGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GetTieringCostOperationResultGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class GetTieringCostOperationResultGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * TieringCost/GetTieringCostOperationResult.json + * x-ms-original-file: 2026-01-01-preview/TieringCost/GetTieringCostOperationResult.json */ /** * Sample code: Fetch Tiering Cost Operation Result. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsProvisionSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsProvisionSamples.java index 9eb05a4fb6a3..41b5097088f5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsProvisionSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsProvisionSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,9 +12,7 @@ */ public final class ItemLevelRecoveryConnectionsProvisionSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/Provision_Ilr.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/Provision_Ilr.json */ /** * Sample code: Provision Instant Item Level Recovery for Azure Vm. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsRevokeSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsRevokeSamples.java index 9beda050c32e..9bbbb072572d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsRevokeSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsRevokeSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ItemLevelRecoveryConnectionsRevokeSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/Revoke_Ilr.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/Revoke_Ilr.json */ /** * Sample code: Revoke Instant Item Level Recovery for Azure Vm. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobCancellationsTriggerSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobCancellationsTriggerSamples.java index de115476656d..d7f4b49e6907 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobCancellationsTriggerSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobCancellationsTriggerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class JobCancellationsTriggerSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/TriggerCancelJob.json + * x-ms-original-file: 2026-01-01-preview/Common/TriggerCancelJob.json */ /** * Sample code: Cancel Job. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobDetailsGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobDetailsGetSamples.java index a194bd33dcc1..6d3ae7138ac4 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobDetailsGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobDetailsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class JobDetailsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/GetJobDetails.json + * x-ms-original-file: 2026-01-01-preview/Common/GetJobDetails.json */ /** * Sample code: Get Job Details. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobOperationResultsGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobOperationResultsGetSamples.java index 87daa644d765..3b06a6f5529e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobOperationResultsGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobOperationResultsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class JobOperationResultsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/CancelJobOperationResult.json + * x-ms-original-file: 2026-01-01-preview/Common/CancelJobOperationResult.json */ /** * Sample code: Cancel Job Operation Result. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobsExportSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobsExportSamples.java index 510f6537b0a9..5b3505aa1f27 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobsExportSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobsExportSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class JobsExportSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/TriggerExportJobs.json + * x-ms-original-file: 2026-01-01-preview/Common/TriggerExportJobs.json */ /** * Sample code: Export Jobs. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationOperationValidateSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationOperationValidateSamples.java index 2685d7c1f261..e845c6e77514 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationOperationValidateSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationOperationValidateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -17,9 +17,7 @@ */ public final class OperationOperationValidateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ValidateOperation_RestoreDisk.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ValidateOperation_RestoreDisk.json */ /** * Sample code: Validate Operation. @@ -49,9 +47,7 @@ public final class OperationOperationValidateSamples { } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ValidateOperation_RestoreDisk_IdentityBasedRestoreDetails.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ValidateOperation_RestoreDisk_IdentityBasedRestoreDetails.json */ /** * Sample code: Validate Operation with identityBasedRestoreDetails. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationsListSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationsListSamples.java index 1ed10af39fef..62f6be67091b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationsListSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * ListOperations.json + * x-ms-original-file: 2026-01-01-preview/ListOperations.json */ /** * Sample code: ListOperations. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionDeleteSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionDeleteSamples.java index 73c4a58270ad..00b9dffb79b1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionDeleteSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class PrivateEndpointConnectionDeleteSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * PrivateEndpointConnection/DeletePrivateEndpointConnection.json + * x-ms-original-file: 2026-01-01-preview/PrivateEndpointConnection/DeletePrivateEndpointConnection.json */ /** * Sample code: Delete PrivateEndpointConnection. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionGetSamples.java index 5447004e56b2..7ab16dc5272c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class PrivateEndpointConnectionGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * PrivateEndpointConnection/GetPrivateEndpointConnection.json + * x-ms-original-file: 2026-01-01-preview/PrivateEndpointConnection/GetPrivateEndpointConnection.json */ /** * Sample code: Get PrivateEndpointConnection. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionPutSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionPutSamples.java index db73fe5ad5ec..e028e39324c5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionPutSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionPutSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -18,9 +18,7 @@ */ public final class PrivateEndpointConnectionPutSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * PrivateEndpointConnection/PutPrivateEndpointConnection.json + * x-ms-original-file: 2026-01-01-preview/PrivateEndpointConnection/PutPrivateEndpointConnection.json */ /** * Sample code: Update PrivateEndpointConnection. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointGetOperationStatusSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointGetOperationStatusSamples.java index e665bc81ec87..014f79d3a8b2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointGetOperationStatusSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointGetOperationStatusSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class PrivateEndpointGetOperationStatusSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * PrivateEndpointConnection/GetPrivateEndpointConnectionOperationStatus.json + * x-ms-original-file: 2026-01-01-preview/PrivateEndpointConnection/GetPrivateEndpointConnectionOperationStatus.json */ /** * Sample code: Get OperationStatus. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainersListSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainersListSamples.java index 551be7b2aaac..fbc8ee583302 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainersListSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectableContainersListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/ProtectableContainers_List.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/ProtectableContainers_List.json */ /** * Sample code: List protectable items with backupManagementType filter as AzureStorage. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemOperationResultsGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemOperationResultsGetSamples.java index c1e9b783e551..54b6a04fa92c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemOperationResultsGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemOperationResultsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectedItemOperationResultsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectedItemOperationResults.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectedItemOperationResults.json */ /** * Sample code: Get Operation Results of Protected Vm. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemOperationStatusesGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemOperationStatusesGetSamples.java index 61face59145d..14fb410cf628 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemOperationStatusesGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemOperationStatusesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectedItemOperationStatusesGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectedItemOperationStatus.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectedItemOperationStatus.json */ /** * Sample code: Get Operation Status of Protected Vm. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsCreateOrUpdateSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsCreateOrUpdateSamples.java index f7dc7142a551..4444d1da435b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsCreateOrUpdateSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,9 +12,7 @@ */ public final class ProtectedItemsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/StopProtection.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/StopProtection.json */ /** * Sample code: Stop Protection with retain data on Azure IaasVm. @@ -25,7 +23,6 @@ public static void stopProtectionWithRetainDataOnAzureIaasVm( com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectedItems() .define("VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1") - .withRegion((String) null) .withExistingProtectionContainer("NetSDKTestRsVault", "SwaggerTestRg", "Azure", "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1") .withProperties(new AzureIaaSComputeVMProtectedItem().withSourceResourceId( @@ -35,9 +32,7 @@ public static void stopProtectionWithRetainDataOnAzureIaasVm( } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ConfigureProtection.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ConfigureProtection.json */ /** * Sample code: Enable Protection on Azure IaasVm. @@ -48,7 +43,6 @@ public static void enableProtectionOnAzureIaasVm( com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectedItems() .define("VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1") - .withRegion((String) null) .withExistingProtectionContainer("NetSDKTestRsVault", "SwaggerTestRg", "Azure", "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1") .withProperties(new AzureIaaSComputeVMProtectedItem().withSourceResourceId( diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsDeleteSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsDeleteSamples.java index 80e7339a9272..d26c80761571 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsDeleteSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectedItemsDeleteSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/ProtectedItem_Delete.json + * x-ms-original-file: 2026-01-01-preview/Common/ProtectedItem_Delete.json */ /** * Sample code: Delete Protection from Azure Virtual Machine. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsGetSamples.java index 0a6c53858a19..7c94fbc73256 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectedItemsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ClassicCompute_ProtectedItem_Get.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json */ /** * Sample code: Get Protected Classic Virtual Machine Details. @@ -27,9 +25,7 @@ public static void getProtectedClassicVirtualMachineDetails( } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/Compute_ProtectedItem_Get.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/Compute_ProtectedItem_Get.json */ /** * Sample code: Get Protected Virtual Machine Details. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerOperationResultsGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerOperationResultsGetSamples.java index 7c1f4f9ed6c3..1d8488d648da 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerOperationResultsGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerOperationResultsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectionContainerOperationResultsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/ProtectionContainers_Inquire_Result.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/ProtectionContainers_Inquire_Result.json */ /** * Sample code: Get Azure Storage Protection Container Operation Result. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerRefreshOperationResultsGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerRefreshOperationResultsGetSamples.java index 365462db8c93..7137b78f2ee2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerRefreshOperationResultsGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerRefreshOperationResultsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectionContainerRefreshOperationResultsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/RefreshContainers_OperationResults.json + * x-ms-original-file: 2026-01-01-preview/Common/RefreshContainers_OperationResults.json */ /** * Sample code: Azure Vm Discovery Operation Result. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersGetSamples.java index d735f1d54496..f34690f85dfa 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectionContainersGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureWorkload/ProtectionContainers_Get.json + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/ProtectionContainers_Get.json */ /** * Sample code: Get Protection Container Details. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersInquireSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersInquireSamples.java index b83994179cdb..aabe833dfd38 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersInquireSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersInquireSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectionContainersInquireSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/ProtectionContainers_Inquire.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/ProtectionContainers_Inquire.json */ /** * Sample code: Inquire Azure Storage Protection Containers. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersRefreshSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersRefreshSamples.java index 97aab614f214..c16d7c5de854 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersRefreshSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersRefreshSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectionContainersRefreshSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/RefreshContainers.json + * x-ms-original-file: 2026-01-01-preview/Common/RefreshContainers.json */ /** * Sample code: Trigger Azure Vm Discovery. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersRegisterSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersRegisterSamples.java index 392b3d4346ec..e9759a837494 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersRegisterSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersRegisterSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,9 +13,7 @@ */ public final class ProtectionContainersRegisterSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/ProtectionContainers_Register.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/ProtectionContainers_Register.json */ /** * Sample code: RegisterAzure Storage ProtectionContainers. @@ -26,7 +24,6 @@ public static void registerAzureStorageProtectionContainers( com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionContainers() .define("StorageContainer;Storage;SwaggerTestRg;swaggertestsa") - .withRegion((String) null) .withExistingBackupFabric("swaggertestvault", "SwaggerTestRg", "Azure") .withProperties(new AzureStorageContainer().withFriendlyName("swaggertestsa") .withBackupManagementType(BackupManagementType.AZURE_STORAGE) diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersUnregisterSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersUnregisterSamples.java index 408a4faf57ee..5375acf6ce45 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersUnregisterSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersUnregisterSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectionContainersUnregisterSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureWorkload/ProtectionContainers_Unregister.json + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/ProtectionContainers_Unregister.json */ /** * Sample code: Unregister Protection Container. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentCreateOrUpdateSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentCreateOrUpdateSamples.java index 1b2e1a7feb6f..91a8ce1f8bed 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentCreateOrUpdateSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,9 +11,7 @@ */ public final class ProtectionIntentCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectionIntent_CreateOrUpdate.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json */ /** * Sample code: Create or Update Azure Vm Protection Intent. @@ -24,7 +22,6 @@ public static void createOrUpdateAzureVmProtectionIntent( com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionIntents() .define("vm;iaasvmcontainerv2;chamsrgtest;chamscandel") - .withRegion((String) null) .withExistingBackupFabric("myVault", "myRG", "Azure") .withProperties(new AzureResourceProtectionIntent().withSourceResourceId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/chamsrgtest/providers/Microsoft.Compute/virtualMachines/chamscandel") diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentDeleteSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentDeleteSamples.java index c3d6c2d754ab..becc0ff8976d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentDeleteSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectionIntentDeleteSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureWorkload/BackupProtectionIntent_Delete.json + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/BackupProtectionIntent_Delete.json */ /** * Sample code: Delete Protection intent from item. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentGetSamples.java index 4a7a158582cf..3f2b452eab4e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectionIntentGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureWorkload/BackupProtectionIntent_Get.json + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/BackupProtectionIntent_Get.json */ /** * Sample code: Get ProtectionIntent for an item. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentValidateSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentValidateSamples.java index 2a2742dfec6d..5130e63d998f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentValidateSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentValidateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,9 +12,7 @@ */ public final class ProtectionIntentValidateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectionIntent_Validate.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectionIntent_Validate.json */ /** * Sample code: Validate Enable Protection on Azure Vm. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesCreateOrUpdateSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesCreateOrUpdateSamples.java index 772314fec040..7c3369369af7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesCreateOrUpdateSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -26,7 +26,11 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.SimpleRetentionPolicy; import com.azure.resourcemanager.recoveryservicesbackup.models.SimpleSchedulePolicy; import com.azure.resourcemanager.recoveryservicesbackup.models.SimpleSchedulePolicyV2; +import com.azure.resourcemanager.recoveryservicesbackup.models.SnapshotBackupAdditionalDetails; import com.azure.resourcemanager.recoveryservicesbackup.models.SubProtectionPolicy; +import com.azure.resourcemanager.recoveryservicesbackup.models.UserAssignedIdentityProperties; +import com.azure.resourcemanager.recoveryservicesbackup.models.UserAssignedManagedIdentityDetails; +import com.azure.resourcemanager.recoveryservicesbackup.models.VMWorkloadPolicyType; import com.azure.resourcemanager.recoveryservicesbackup.models.VaultRetentionPolicy; import com.azure.resourcemanager.recoveryservicesbackup.models.WeekOfMonth; import com.azure.resourcemanager.recoveryservicesbackup.models.WeeklyRetentionFormat; @@ -41,9 +45,31 @@ */ public final class ProtectionPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json + */ + /** + * Sample code: Create or Update Simple Azure Vm Protection Policy. + * + * @param manager Entry point to RecoveryServicesBackupManager. + */ + public static void createOrUpdateSimpleAzureVmProtectionPolicy( + com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { + manager.protectionPolicies() + .define("testPolicy1") + .withExistingVault("NetSDKTestRsVault", "SwaggerTestRg") + .withProperties(new AzureIaaSvmProtectionPolicy() + .withSchedulePolicy(new SimpleSchedulePolicy().withScheduleRunFrequency(ScheduleRunType.DAILY) + .withScheduleRunTimes(Arrays.asList(OffsetDateTime.parse("2018-01-24T02:00:00Z")))) + .withRetentionPolicy(new LongTermRetentionPolicy().withDailySchedule(new DailyRetentionSchedule() + .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2018-01-24T02:00:00Z"))) + .withRetentionDuration( + new RetentionDuration().withCount(1).withDurationType(RetentionDurationType.DAYS)))) + .withTimeZone("Pacific Standard Time")) + .create(); + } + + /* + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json */ /** * Sample code: Create or Update Full Azure Workload Protection Policy. @@ -54,7 +80,6 @@ public static void createOrUpdateFullAzureWorkloadProtectionPolicy( com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionPolicies() .define("testPolicy1") - .withRegion((String) null) .withExistingVault("NetSDKTestRsVault", "SwaggerTestRg") .withProperties( new AzureVmWorkloadProtectionPolicy().withWorkLoadType(WorkloadType.SQLDATA_BASE) @@ -107,36 +132,7 @@ public static void createOrUpdateFullAzureWorkloadProtectionPolicy( } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json - */ - /** - * Sample code: Create or Update Simple Azure Vm Protection Policy. - * - * @param manager Entry point to RecoveryServicesBackupManager. - */ - public static void createOrUpdateSimpleAzureVmProtectionPolicy( - com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { - manager.protectionPolicies() - .define("testPolicy1") - .withRegion((String) null) - .withExistingVault("NetSDKTestRsVault", "SwaggerTestRg") - .withProperties(new AzureIaaSvmProtectionPolicy() - .withSchedulePolicy(new SimpleSchedulePolicy().withScheduleRunFrequency(ScheduleRunType.DAILY) - .withScheduleRunTimes(Arrays.asList(OffsetDateTime.parse("2018-01-24T02:00:00Z")))) - .withRetentionPolicy(new LongTermRetentionPolicy().withDailySchedule(new DailyRetentionSchedule() - .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2018-01-24T02:00:00Z"))) - .withRetentionDuration( - new RetentionDuration().withCount(1).withDurationType(RetentionDurationType.DAYS)))) - .withTimeZone("Pacific Standard Time")) - .create(); - } - - /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json */ /** * Sample code: Create or Update Daily Azure Storage Protection Policy. @@ -147,7 +143,6 @@ public static void createOrUpdateDailyAzureStorageProtectionPolicy( com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionPolicies() .define("dailyPolicy2") - .withRegion((String) null) .withExistingVault("swaggertestvault", "SwaggerTestRg") .withProperties( new AzureFileShareProtectionPolicy().withWorkLoadType(WorkloadType.AZURE_FILE_SHARE) @@ -187,9 +182,7 @@ public static void createOrUpdateDailyAzureStorageProtectionPolicy( } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/ProtectionPolicies_CreateOrUpdate_Hardened.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hardened.json */ /** * Sample code: Create or Update Azure Storage Vault Standard Protection Policy. @@ -200,7 +193,6 @@ public static void createOrUpdateAzureStorageVaultStandardProtectionPolicy( com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionPolicies() .define("newPolicyV2") - .withRegion((String) null) .withExistingVault("swaggertestvault", "SwaggerTestRg") .withProperties( new AzureFileShareProtectionPolicy().withWorkLoadType(WorkloadType.AZURE_FILE_SHARE) @@ -245,9 +237,7 @@ public static void createOrUpdateAzureStorageVaultStandardProtectionPolicy( } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json + * x-ms-original-file: 2026-01-01-preview/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json */ /** * Sample code: Create or Update Hourly Azure Storage Protection Policy. @@ -258,7 +248,6 @@ public static void createOrUpdateHourlyAzureStorageProtectionPolicy( com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionPolicies() .define("newPolicy2") - .withRegion((String) null) .withExistingVault("swaggertestvault", "SwaggerTestRg") .withProperties( new AzureFileShareProtectionPolicy().withWorkLoadType(WorkloadType.AZURE_FILE_SHARE) @@ -293,9 +282,7 @@ public static void createOrUpdateHourlyAzureStorageProtectionPolicy( } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json */ /** * Sample code: Create or Update Full Azure Vm Protection Policy. @@ -306,7 +293,6 @@ public static void createOrUpdateFullAzureVmProtectionPolicy( com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionPolicies() .define("testPolicy1") - .withRegion((String) null) .withExistingVault("NetSDKTestRsVault", "SwaggerTestRg") .withProperties( new AzureIaaSvmProtectionPolicy() @@ -346,9 +332,7 @@ public static void createOrUpdateFullAzureVmProtectionPolicy( } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/V2Policy/IaaS_v2_hourly.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/V2Policy/IaaS_v2_hourly.json */ /** * Sample code: Create or Update Enhanced Azure Vm Protection Policy with Hourly backup. @@ -359,7 +343,6 @@ public static void createOrUpdateEnhancedAzureVmProtectionPolicyWithHourlyBackup com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionPolicies() .define("v2-daily-sample") - .withRegion((String) null) .withExistingVault("NetSDKTestRsVault", "SwaggerTestRg") .withProperties( new AzureIaaSvmProtectionPolicy() @@ -403,9 +386,7 @@ public static void createOrUpdateEnhancedAzureVmProtectionPolicyWithHourlyBackup } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/V2Policy/IaaS_v2_daily.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/V2Policy/IaaS_v2_daily.json */ /** * Sample code: Create or Update Enhanced Azure Vm Protection Policy with daily backup. @@ -416,7 +397,6 @@ public static void createOrUpdateEnhancedAzureVmProtectionPolicyWithDailyBackup( com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager.protectionPolicies() .define("v2-daily-sample") - .withRegion((String) null) .withExistingVault("NetSDKTestRsVault", "SwaggerTestRg") .withProperties( new AzureIaaSvmProtectionPolicy() @@ -457,4 +437,71 @@ public static void createOrUpdateEnhancedAzureVmProtectionPolicyWithDailyBackup( .withSnapshotConsistencyType(IaasVMSnapshotConsistencyType.ONLY_CRASH_CONSISTENT)) .create(); } + + /* + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/ProtectionPolicies_CreateOrUpdate_SapHanaDBInstance.json + */ + /** + * Sample code: Create or Update Sap Hana DB Instance Workload Protection Policy. + * + * @param manager Entry point to RecoveryServicesBackupManager. + */ + public static void createOrUpdateSapHanaDBInstanceWorkloadProtectionPolicy( + com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { + manager.protectionPolicies() + .define("testHanaSnapshotV2Policy1") + .withExistingVault("HanaTestRsVault", "SwaggerTestRg") + .withProperties(new AzureVmWorkloadProtectionPolicy().withProtectedItemsCount(0) + .withWorkLoadType(WorkloadType.SAPHANA_DBINSTANCE) + .withVmWorkloadPolicyType(VMWorkloadPolicyType.SNAPSHOT_V2) + .withSettings(new Settings().withTimeZone("UTC").withIssqlcompression(false).withIsCompression(false)) + .withSubProtectionPolicy( + Arrays.asList(new SubProtectionPolicy().withPolicyType(PolicyType.SNAPSHOT_FULL) + .withSchedulePolicy(new SimpleSchedulePolicy().withScheduleRunFrequency(ScheduleRunType.DAILY) + .withScheduleRunTimes(Arrays.asList(OffsetDateTime.parse("2024-10-01T03:30:00.000Z")))) + .withRetentionPolicy( + new LongTermRetentionPolicy() + .withDailySchedule(new DailyRetentionSchedule() + .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2023-12-19T20:00:00.000Z"))) + .withRetentionDuration(new RetentionDuration().withCount(30) + .withDurationType(RetentionDurationType.DAYS))) + .withWeeklySchedule(new WeeklyRetentionSchedule() + .withDaysOfTheWeek(Arrays.asList(DayOfWeek.SUNDAY)) + .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2023-12-19T20:00:00.000Z"))) + .withRetentionDuration(new RetentionDuration().withCount(10) + .withDurationType(RetentionDurationType.WEEKS))) + .withMonthlySchedule( + new MonthlyRetentionSchedule() + .withRetentionScheduleFormatType(RetentionScheduleFormat.WEEKLY) + .withRetentionScheduleWeekly(new WeeklyRetentionFormat() + .withDaysOfTheWeek(Arrays.asList(DayOfWeek.SUNDAY)) + .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.SECOND))) + .withRetentionTimes( + Arrays.asList(OffsetDateTime.parse("2023-12-15T20:00:00.000Z"))) + .withRetentionDuration(new RetentionDuration().withCount(6) + .withDurationType(RetentionDurationType.MONTHS))) + .withYearlySchedule( + new YearlyRetentionSchedule() + .withRetentionScheduleFormatType(RetentionScheduleFormat.WEEKLY) + .withMonthsOfYear(Arrays.asList(MonthOfYear.JANUARY)) + .withRetentionScheduleWeekly(new WeeklyRetentionFormat() + .withDaysOfTheWeek(Arrays.asList(DayOfWeek.SUNDAY)) + .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.LAST))) + .withRetentionTimes( + Arrays.asList(OffsetDateTime.parse("2023-12-19T20:00:00.000Z"))) + .withRetentionDuration(new RetentionDuration() + .withCount(2) + .withDurationType(RetentionDurationType.YEARS)))) + .withSnapshotBackupAdditionalDetails(new SnapshotBackupAdditionalDetails() + .withInstantRpRetentionRangeInDays(5) + .withInstantRPDetails("SwaggerTestRG") + .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails() + .withIdentityArmId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/SwaggerMsiRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/SwaggerUMI") + .withIdentityName("SwaggerUMI") + .withUserAssignedIdentityProperties(new UserAssignedIdentityProperties() + .withClientId("00000000-0000-0000-0000-000000000000") + .withPrincipalId("00000000-0000-0000-0000-000000000000"))))))) + .create(); + } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesDeleteSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesDeleteSamples.java index a15bde68bd56..d52306ff967e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesDeleteSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectionPoliciesDeleteSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectionPolicies_Delete.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectionPolicies_Delete.json */ /** * Sample code: Delete Azure Vm Protection Policy. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesGetSamples.java index b57429c49e93..91d68558cbcd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectionPoliciesGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectionPolicies_Get.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectionPolicies_Get.json */ /** * Sample code: Get Azure IaasVm Protection Policy Details. @@ -25,9 +23,7 @@ public static void getAzureIaasVmProtectionPolicyDetails( } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/V2Policy/v2-Get-Policy.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/V2Policy/v2-Get-Policy.json */ /** * Sample code: Get Azure IaasVm Enhanced Protection Policy Details. @@ -39,4 +35,19 @@ public static void getAzureIaasVmEnhancedProtectionPolicyDetails( manager.protectionPolicies() .getWithResponse("NetSDKTestRsVault", "SwaggerTestRg", "v2-daily-sample", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2026-01-01-preview/AzureWorkload/ProtectionPolicies_Get_SapHanaDBInstance.json + */ + /** + * Sample code: Get Sap Hana DB Instance Workload Protection Policy Details. + * + * @param manager Entry point to RecoveryServicesBackupManager. + */ + public static void getSapHanaDBInstanceWorkloadProtectionPolicyDetails( + com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { + manager.protectionPolicies() + .getWithResponse("HanaTestRsVault", "SwaggerTestRg", "testHanaSnapshotV2Policy1", + com.azure.core.util.Context.NONE); + } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyOperationResultsGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyOperationResultsGetSamples.java index 801b281a915a..d6c540cbf098 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyOperationResultsGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyOperationResultsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectionPolicyOperationResultsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectionPolicyOperationResults_Get.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectionPolicyOperationResults_Get.json */ /** * Sample code: Get Protection Policy Operation Results. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyOperationStatusesGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyOperationStatusesGetSamples.java index 0de84818aa58..98b33617ef13 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyOperationStatusesGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyOperationStatusesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ProtectionPolicyOperationStatusesGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ProtectionPolicyOperationStatuses_Get.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ProtectionPolicyOperationStatuses_Get.json */ /** * Sample code: Get Protection Policy Operation Status. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsGetSamples.java index cc1da632757f..6ba8a2189a4c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class RecoveryPointsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/RecoveryPoints_Get.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/RecoveryPoints_Get.json */ /** * Sample code: Get Azure Vm Recovery Point Details. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsListSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsListSamples.java index 36fbed5dc3d2..269b29b6e35e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsListSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class RecoveryPointsListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/RecoveryPoints_List.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/RecoveryPoints_List.json */ /** * Sample code: Get Protected Azure Vm Recovery Points. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsRecommendedForMoveListSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsRecommendedForMoveListSamples.java index 3f8f70419895..a754e71413fb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsRecommendedForMoveListSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsRecommendedForMoveListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,9 +12,7 @@ */ public final class RecoveryPointsRecommendedForMoveListSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/RecoveryPointsRecommendedForMove_List.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/RecoveryPointsRecommendedForMove_List.json */ /** * Sample code: Get Protected Azure Vm Recovery Points Recommended for Move. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsUpdateSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsUpdateSamples.java new file mode 100644 index 000000000000..e62644a0cb8c --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsUpdateSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.generated; + +import com.azure.resourcemanager.recoveryservicesbackup.models.PatchRecoveryPointInput; +import com.azure.resourcemanager.recoveryservicesbackup.models.PatchRecoveryPointPropertiesInput; +import com.azure.resourcemanager.recoveryservicesbackup.models.UpdateRecoveryPointRequest; +import java.time.OffsetDateTime; + +/** + * Samples for RecoveryPoints Update. + */ +public final class RecoveryPointsUpdateSamples { + /* + * x-ms-original-file: 2026-01-01-preview/Common/RecoveryPoints_Update.json + */ + /** + * Sample code: Update Azure Vm Recovery Point Details. + * + * @param manager Entry point to RecoveryServicesBackupManager. + */ + public static void updateAzureVmRecoveryPointDetails( + com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { + manager.recoveryPoints() + .updateWithResponse("hanasnapshottesting", "HanaSnapshotTest", "Azure", + "VMAppContainer;compute;hanasnapshottesting;hana-eacan-2", "SAPHanaDatabase;hye;hye", + "2265668074516978193", + new UpdateRecoveryPointRequest().withProperties( + new PatchRecoveryPointInput().withRecoveryPointProperties(new PatchRecoveryPointPropertiesInput() + .withExpiryTime(OffsetDateTime.parse("2025-01-02T00:00:00.0000000Z")))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxiesGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxiesGetSamples.java deleted file mode 100644 index c46403cc026c..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxiesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -/** - * Samples for ResourceGuardProxies Get. - */ -public final class ResourceGuardProxiesGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * ResourceGuardProxyCRUD/ListResourceGuardProxy.json - */ - /** - * Sample code: Get VaultGuardProxies. - * - * @param manager Entry point to RecoveryServicesBackupManager. - */ - public static void - getVaultGuardProxies(com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { - manager.resourceGuardProxies().get("sampleVault", "SampleResourceGroup", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationDeleteSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationDeleteSamples.java deleted file mode 100644 index 4b1a27e7d420..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationDeleteSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -/** - * Samples for ResourceGuardProxyOperation Delete. - */ -public final class ResourceGuardProxyOperationDeleteSamples { - /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json - */ - /** - * Sample code: Delete ResourceGuardProxy. - * - * @param manager Entry point to RecoveryServicesBackupManager. - */ - public static void deleteResourceGuardProxy( - com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { - manager.resourceGuardProxyOperations() - .deleteWithResponse("sampleVault", "SampleResourceGroup", "swaggerExample", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationGetSamples.java deleted file mode 100644 index 7dbcce8f3ed0..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -/** - * Samples for ResourceGuardProxyOperation Get. - */ -public final class ResourceGuardProxyOperationGetSamples { - /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * ResourceGuardProxyCRUD/GetResourceGuardProxy.json - */ - /** - * Sample code: Get ResourceGuardProxy. - * - * @param manager Entry point to RecoveryServicesBackupManager. - */ - public static void - getResourceGuardProxy(com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { - manager.resourceGuardProxyOperations() - .getWithResponse("sampleVault", "SampleResourceGroup", "swaggerExample", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationPutSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationPutSamples.java deleted file mode 100644 index 74f7d94fe674..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationPutSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBase; - -/** - * Samples for ResourceGuardProxyOperation Put. - */ -public final class ResourceGuardProxyOperationPutSamples { - /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * ResourceGuardProxyCRUD/PutResourceGuardProxy.json - */ - /** - * Sample code: Create ResourceGuardProxy. - * - * @param manager Entry point to RecoveryServicesBackupManager. - */ - public static void createResourceGuardProxy( - com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { - manager.resourceGuardProxyOperations() - .define("swaggerExample") - .withRegion((String) null) - .withExistingVault("sampleVault", "SampleResourceGroup") - .withProperties(new ResourceGuardProxyBase().withResourceGuardResourceId( - "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew")) - .create(); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationUnlockDeleteSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationUnlockDeleteSamples.java deleted file mode 100644 index 92d256dc0e2d..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationUnlockDeleteSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.resourcemanager.recoveryservicesbackup.models.UnlockDeleteRequest; -import java.util.Arrays; - -/** - * Samples for ResourceGuardProxyOperation UnlockDelete. - */ -public final class ResourceGuardProxyOperationUnlockDeleteSamples { - /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json - */ - /** - * Sample code: UnlockDelete ResourceGuardProxy. - * - * @param manager Entry point to RecoveryServicesBackupManager. - */ - public static void unlockDeleteResourceGuardProxy( - com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { - manager.resourceGuardProxyOperations() - .unlockDeleteWithResponse("sampleVault", "SampleResourceGroup", "swaggerExample", new UnlockDeleteRequest() - .withResourceGuardOperationRequests(Arrays.asList( - "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew/deleteProtectedItemRequests/default")) - .withResourceToBeDeleted( - "/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/gaallarg/providers/Microsoft.RecoveryServices/vaults/MercuryCrrVault/backupFabrics/Azure/protectionContainers/VMAppContainer;compute;crrtestrg;crrtestvm/protectedItems/SQLDataBase;mssqlserver;testdb"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProviderBmsPrepareDataMoveSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProviderBmsPrepareDataMoveSamples.java index 7502ff26b33b..73c7e4878c97 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProviderBmsPrepareDataMoveSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProviderBmsPrepareDataMoveSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,9 +12,7 @@ */ public final class ResourceProviderBmsPrepareDataMoveSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * BackupDataMove/PrepareDataMove_Post.json + * x-ms-original-file: 2026-01-01-preview/BackupDataMove/PrepareDataMove_Post.json */ /** * Sample code: Prepare Data Move. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProviderBmsTriggerDataMoveSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProviderBmsTriggerDataMoveSamples.java index 30db1b71c601..33281baaf25a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProviderBmsTriggerDataMoveSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProviderBmsTriggerDataMoveSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,9 +12,7 @@ */ public final class ResourceProviderBmsTriggerDataMoveSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * BackupDataMove/TriggerDataMove_Post.json + * x-ms-original-file: 2026-01-01-preview/BackupDataMove/TriggerDataMove_Post.json */ /** * Sample code: Trigger Data Move. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProviderGetOperationStatusSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProviderGetOperationStatusSamples.java index 236973b82a6d..e9c301ce374c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProviderGetOperationStatusSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProviderGetOperationStatusSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ResourceProviderGetOperationStatusSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * BackupDataMove/BackupDataMoveOperationStatus_Get.json + * x-ms-original-file: 2026-01-01-preview/BackupDataMove/BackupDataMoveOperationStatus_Get.json */ /** * Sample code: Get OperationStatus. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProviderMoveRecoveryPointSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProviderMoveRecoveryPointSamples.java index 1eb076f1fe3b..a4b88c0baa61 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProviderMoveRecoveryPointSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProviderMoveRecoveryPointSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,9 +12,7 @@ */ public final class ResourceProviderMoveRecoveryPointSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * TriggerRecoveryPointMove_Post.json + * x-ms-original-file: 2026-01-01-preview/TriggerRecoveryPointMove_Post.json */ /** * Sample code: Trigger RP Move Operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoresTriggerSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoresTriggerSamples.java index 8ca27f02c7cb..6b82c5eba9cd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoresTriggerSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoresTriggerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -22,9 +22,7 @@ */ public final class RestoresTriggerSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreWithRehydrationRequest.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreWithRehydrationRequest.json */ /** * Sample code: Restore to New Azure IaasVm with IaasVMRestoreWithRehydrationRequest. @@ -63,9 +61,7 @@ public static void restoreToNewAzureIaasVmWithIaasVMRestoreWithRehydrationReques } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest.json */ /** * Sample code: Restore to New Azure IaasVm with IaasVMRestoreRequest. @@ -103,8 +99,7 @@ public static void restoreToNewAzureIaasVmWithIaasVMRestoreRequest( /* * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreWithRehydrationRequest.json + * 2026-01-01-preview/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreWithRehydrationRequest.json */ /** * Sample code: Restore Disks with IaasVMRestoreWithRehydrationRequest. @@ -136,8 +131,7 @@ public static void restoreDisksWithIaasVMRestoreWithRehydrationRequest( /* * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json + * 2026-01-01-preview/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json */ /** * Sample code: Restore to New Azure IaasVm with IaasVMRestoreRequest with identityBasedRestoreDetails. @@ -174,9 +168,7 @@ public static void restoreToNewAzureIaasVmWithIaasVMRestoreRequestWithIdentityBa } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json */ /** * Sample code: Restore Disks with IaasVMRestoreRequest. @@ -213,8 +205,7 @@ public static void restoreDisksWithIaasVMRestoreRequest( /* * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json + * 2026-01-01-preview/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json */ /** * Sample code: Restore Disks with IaasVMRestoreRequest with IdentityBasedRestoreDetails. @@ -245,9 +236,7 @@ public static void restoreDisksWithIaasVMRestoreRequestWithIdentityBasedRestoreD } /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/TriggerRestore_ResourceGuardEnabled.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/TriggerRestore_ResourceGuardEnabled.json */ /** * Sample code: Restore with Resource Guard Enabled. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SecurityPINsGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SecurityPINsGetSamples.java index 8226a78e1c99..af87424e7841 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SecurityPINsGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SecurityPINsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class SecurityPINsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * Common/BackupSecurityPin_Get.json + * x-ms-original-file: 2026-01-01-preview/Common/BackupSecurityPin_Get.json */ /** * Sample code: Get Vault Security Pin. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringCostOperationStatusGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringCostOperationStatusGetSamples.java index 5fb85849cf00..ad9727ee2eed 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringCostOperationStatusGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringCostOperationStatusGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class TieringCostOperationStatusGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * TieringCost/GetTieringCostOperationStatus.json + * x-ms-original-file: 2026-01-01-preview/TieringCost/GetTieringCostOperationStatus.json */ /** * Sample code: Fetch Tiering Cost Operation Status. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationResultsGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationResultsGetSamples.java index 8d6c7528822f..d97c5742bad8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationResultsGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationResultsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ValidateOperationResultsGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ValidateOperationResults.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ValidateOperationResults.json */ /** * Sample code: Get Operation Results of Validate Operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationStatusesGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationStatusesGetSamples.java index 7aef257d2591..d4885e2e20df 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationStatusesGetSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationStatusesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,9 +9,7 @@ */ public final class ValidateOperationStatusesGetSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/ValidateOperationStatus.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/ValidateOperationStatus.json */ /** * Sample code: Get Operation Status of Validate Operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationTriggerSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationTriggerSamples.java index 053ab7488d9c..ae619ff0d55e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationTriggerSamples.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationTriggerSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -16,9 +16,7 @@ */ public final class ValidateOperationTriggerSamples { /* - * x-ms-original-file: - * specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/ - * AzureIaasVm/TriggerValidateOperation_RestoreDisk.json + * x-ms-original-file: 2026-01-01-preview/AzureIaasVm/TriggerValidateOperation_RestoreDisk.json */ /** * Sample code: Trigger Validate Operation. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManagerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManagerTests.java index 84e8c19f1606..2e3bcb132fc8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManagerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManagerTests.java @@ -179,8 +179,8 @@ public void testCreateProtectionPolicy() { protectionPolicyResource = recoveryServicesBackupManager.protectionPolicies() .define(policyName) - .withRegion(REGION) .withExistingVault(vaultName, resourceGroupName) + .withRegion(REGION) .withProperties(new AzureVmWorkloadProtectionPolicy().withWorkLoadType(WorkloadType.SQLDATA_BASE) .withSettings(new Settings().withTimeZone("Pacific Standard Time").withIssqlcompression(false)) .withSubProtectionPolicy(lstSubProtectionPolicy)) diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureBackupGoalFeatureSupportRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureBackupGoalFeatureSupportRequestTests.java index d385a657a1c8..19d287f2722e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureBackupGoalFeatureSupportRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureBackupGoalFeatureSupportRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureBackupServerContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureBackupServerContainerTests.java index b061fda5e6ed..a169f882fa40 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureBackupServerContainerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureBackupServerContainerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -16,52 +16,52 @@ public final class AzureBackupServerContainerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureBackupServerContainer model = BinaryData.fromString( - "{\"containerType\":\"AzureBackupServerContainer\",\"canReRegister\":false,\"containerId\":\"irwgdnqzbrf\",\"protectedItemCount\":4076756726294180282,\"dpmAgentVersion\":\"zmtksjci\",\"dpmServers\":[\"gsxcdgljplkeua\",\"htomflrytswfp\",\"mdgycxn\"],\"upgradeAvailable\":false,\"protectionStatus\":\"hqjjys\",\"extendedInfo\":{\"lastRefreshedAt\":\"2020-12-27T12:35:27Z\"},\"friendlyName\":\"shhkvpedw\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"rhmpqvwwsk\",\"healthStatus\":\"dcbrwimuvq\",\"protectableObjectType\":\"osovyrrleaesin\"}") + "{\"containerType\":\"AzureBackupServerContainer\",\"canReRegister\":true,\"containerId\":\"czu\",\"protectedItemCount\":1242445927897356629,\"dpmAgentVersion\":\"cwwqiokn\",\"dpmServers\":[\"mojmsvpkjprvkw\",\"fz\",\"ljyxgtczhe\"],\"upgradeAvailable\":true,\"protectionStatus\":\"dshmkxmaehvbbx\",\"extendedInfo\":{\"lastRefreshedAt\":\"2021-03-13T23:52:08Z\"},\"friendlyName\":\"tfnhtbaxkgxywr\",\"backupManagementType\":\"MAB\",\"registrationStatus\":\"kl\",\"healthStatus\":\"pluodpv\",\"protectableObjectType\":\"udlgzibthostgkts\"}") .toObject(AzureBackupServerContainer.class); - Assertions.assertEquals("shhkvpedw", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.backupManagementType()); - Assertions.assertEquals("rhmpqvwwsk", model.registrationStatus()); - Assertions.assertEquals("dcbrwimuvq", model.healthStatus()); - Assertions.assertEquals("osovyrrleaesin", model.protectableObjectType()); - Assertions.assertEquals(false, model.canReRegister()); - Assertions.assertEquals("irwgdnqzbrf", model.containerId()); - Assertions.assertEquals(4076756726294180282L, model.protectedItemCount()); - Assertions.assertEquals("zmtksjci", model.dpmAgentVersion()); - Assertions.assertEquals("gsxcdgljplkeua", model.dpmServers().get(0)); - Assertions.assertEquals(false, model.upgradeAvailable()); - Assertions.assertEquals("hqjjys", model.protectionStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-27T12:35:27Z"), model.extendedInfo().lastRefreshedAt()); + Assertions.assertEquals("tfnhtbaxkgxywr", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); + Assertions.assertEquals("kl", model.registrationStatus()); + Assertions.assertEquals("pluodpv", model.healthStatus()); + Assertions.assertEquals("udlgzibthostgkts", model.protectableObjectType()); + Assertions.assertTrue(model.canReRegister()); + Assertions.assertEquals("czu", model.containerId()); + Assertions.assertEquals(1242445927897356629L, model.protectedItemCount()); + Assertions.assertEquals("cwwqiokn", model.dpmAgentVersion()); + Assertions.assertEquals("mojmsvpkjprvkw", model.dpmServers().get(0)); + Assertions.assertTrue(model.upgradeAvailable()); + Assertions.assertEquals("dshmkxmaehvbbx", model.protectionStatus()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-13T23:52:08Z"), model.extendedInfo().lastRefreshedAt()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureBackupServerContainer model = new AzureBackupServerContainer().withFriendlyName("shhkvpedw") - .withBackupManagementType(BackupManagementType.AZURE_WORKLOAD) - .withRegistrationStatus("rhmpqvwwsk") - .withHealthStatus("dcbrwimuvq") - .withProtectableObjectType("osovyrrleaesin") - .withCanReRegister(false) - .withContainerId("irwgdnqzbrf") - .withProtectedItemCount(4076756726294180282L) - .withDpmAgentVersion("zmtksjci") - .withDpmServers(Arrays.asList("gsxcdgljplkeua", "htomflrytswfp", "mdgycxn")) - .withUpgradeAvailable(false) - .withProtectionStatus("hqjjys") + AzureBackupServerContainer model = new AzureBackupServerContainer().withFriendlyName("tfnhtbaxkgxywr") + .withBackupManagementType(BackupManagementType.MAB) + .withRegistrationStatus("kl") + .withHealthStatus("pluodpv") + .withProtectableObjectType("udlgzibthostgkts") + .withCanReRegister(true) + .withContainerId("czu") + .withProtectedItemCount(1242445927897356629L) + .withDpmAgentVersion("cwwqiokn") + .withDpmServers(Arrays.asList("mojmsvpkjprvkw", "fz", "ljyxgtczhe")) + .withUpgradeAvailable(true) + .withProtectionStatus("dshmkxmaehvbbx") .withExtendedInfo( - new DpmContainerExtendedInfo().withLastRefreshedAt(OffsetDateTime.parse("2020-12-27T12:35:27Z"))); + new DpmContainerExtendedInfo().withLastRefreshedAt(OffsetDateTime.parse("2021-03-13T23:52:08Z"))); model = BinaryData.fromObject(model).toObject(AzureBackupServerContainer.class); - Assertions.assertEquals("shhkvpedw", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.backupManagementType()); - Assertions.assertEquals("rhmpqvwwsk", model.registrationStatus()); - Assertions.assertEquals("dcbrwimuvq", model.healthStatus()); - Assertions.assertEquals("osovyrrleaesin", model.protectableObjectType()); - Assertions.assertEquals(false, model.canReRegister()); - Assertions.assertEquals("irwgdnqzbrf", model.containerId()); - Assertions.assertEquals(4076756726294180282L, model.protectedItemCount()); - Assertions.assertEquals("zmtksjci", model.dpmAgentVersion()); - Assertions.assertEquals("gsxcdgljplkeua", model.dpmServers().get(0)); - Assertions.assertEquals(false, model.upgradeAvailable()); - Assertions.assertEquals("hqjjys", model.protectionStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-27T12:35:27Z"), model.extendedInfo().lastRefreshedAt()); + Assertions.assertEquals("tfnhtbaxkgxywr", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); + Assertions.assertEquals("kl", model.registrationStatus()); + Assertions.assertEquals("pluodpv", model.healthStatus()); + Assertions.assertEquals("udlgzibthostgkts", model.protectableObjectType()); + Assertions.assertTrue(model.canReRegister()); + Assertions.assertEquals("czu", model.containerId()); + Assertions.assertEquals(1242445927897356629L, model.protectedItemCount()); + Assertions.assertEquals("cwwqiokn", model.dpmAgentVersion()); + Assertions.assertEquals("mojmsvpkjprvkw", model.dpmServers().get(0)); + Assertions.assertTrue(model.upgradeAvailable()); + Assertions.assertEquals("dshmkxmaehvbbx", model.protectionStatus()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-13T23:52:08Z"), model.extendedInfo().lastRefreshedAt()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureBackupServerEngineTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureBackupServerEngineTests.java index 3f20480f119b..1facd8e57703 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureBackupServerEngineTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureBackupServerEngineTests.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.AzureBackupServerEngine; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineExtendedInfo; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -15,69 +14,26 @@ public final class AzureBackupServerEngineTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureBackupServerEngine model = BinaryData.fromString( - "{\"backupEngineType\":\"AzureBackupServerEngine\",\"friendlyName\":\"ui\",\"backupManagementType\":\"AzureStorage\",\"registrationStatus\":\"cazt\",\"backupEngineState\":\"snsqowxwcoml\",\"healthStatus\":\"ytwvczcswkacve\",\"canReRegister\":false,\"backupEngineId\":\"vlvhbwrnfxtgd\",\"dpmVersion\":\"qthe\",\"azureBackupAgentVersion\":\"mnaoy\",\"isAzureBackupAgentUpgradeAvailable\":true,\"isDpmUpgradeAvailable\":false,\"extendedInfo\":{\"databaseName\":\"swankltytmh\",\"protectedItemsCount\":986610623,\"protectedServersCount\":1515443122,\"diskCount\":1705440283,\"usedDiskSpace\":65.67282877478155,\"availableDiskSpace\":77.43775870619531,\"refreshedAt\":\"2021-06-06T03:18:11Z\",\"azureProtectedInstances\":677941744}}") + "{\"backupEngineType\":\"AzureBackupServerEngine\",\"friendlyName\":\"lbijpzgsksrfhfvo\",\"backupManagementType\":\"AzureIaasVM\",\"registrationStatus\":\"bnxwc\",\"backupEngineState\":\"mmpvf\",\"healthStatus\":\"wzfgbrttuiaclkie\",\"canReRegister\":true,\"backupEngineId\":\"lfnthiqfyut\",\"dpmVersion\":\"iygbpvn\",\"azureBackupAgentVersion\":\"wmtxkyctwwgz\",\"isAzureBackupAgentUpgradeAvailable\":false,\"isDpmUpgradeAvailable\":true,\"extendedInfo\":{\"databaseName\":\"vogygzyvneez\",\"protectedItemsCount\":488658265,\"protectedServersCount\":1673103368,\"diskCount\":1019718195,\"usedDiskSpace\":75.45567237613729,\"availableDiskSpace\":27.253170156472674,\"refreshedAt\":\"2021-04-17T18:57:09Z\",\"azureProtectedInstances\":1354517943}}") .toObject(AzureBackupServerEngine.class); - Assertions.assertEquals("ui", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_STORAGE, model.backupManagementType()); - Assertions.assertEquals("cazt", model.registrationStatus()); - Assertions.assertEquals("snsqowxwcoml", model.backupEngineState()); - Assertions.assertEquals("ytwvczcswkacve", model.healthStatus()); - Assertions.assertEquals(false, model.canReRegister()); - Assertions.assertEquals("vlvhbwrnfxtgd", model.backupEngineId()); - Assertions.assertEquals("qthe", model.dpmVersion()); - Assertions.assertEquals("mnaoy", model.azureBackupAgentVersion()); - Assertions.assertEquals(true, model.isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(false, model.isDpmUpgradeAvailable()); - Assertions.assertEquals("swankltytmh", model.extendedInfo().databaseName()); - Assertions.assertEquals(986610623, model.extendedInfo().protectedItemsCount()); - Assertions.assertEquals(1515443122, model.extendedInfo().protectedServersCount()); - Assertions.assertEquals(1705440283, model.extendedInfo().diskCount()); - Assertions.assertEquals(65.67282877478155D, model.extendedInfo().usedDiskSpace()); - Assertions.assertEquals(77.43775870619531D, model.extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-06T03:18:11Z"), model.extendedInfo().refreshedAt()); - Assertions.assertEquals(677941744, model.extendedInfo().azureProtectedInstances()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureBackupServerEngine model = new AzureBackupServerEngine().withFriendlyName("ui") - .withBackupManagementType(BackupManagementType.AZURE_STORAGE) - .withRegistrationStatus("cazt") - .withBackupEngineState("snsqowxwcoml") - .withHealthStatus("ytwvczcswkacve") - .withCanReRegister(false) - .withBackupEngineId("vlvhbwrnfxtgd") - .withDpmVersion("qthe") - .withAzureBackupAgentVersion("mnaoy") - .withIsAzureBackupAgentUpgradeAvailable(true) - .withIsDpmUpgradeAvailable(false) - .withExtendedInfo(new BackupEngineExtendedInfo().withDatabaseName("swankltytmh") - .withProtectedItemsCount(986610623) - .withProtectedServersCount(1515443122) - .withDiskCount(1705440283) - .withUsedDiskSpace(65.67282877478155D) - .withAvailableDiskSpace(77.43775870619531D) - .withRefreshedAt(OffsetDateTime.parse("2021-06-06T03:18:11Z")) - .withAzureProtectedInstances(677941744)); - model = BinaryData.fromObject(model).toObject(AzureBackupServerEngine.class); - Assertions.assertEquals("ui", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_STORAGE, model.backupManagementType()); - Assertions.assertEquals("cazt", model.registrationStatus()); - Assertions.assertEquals("snsqowxwcoml", model.backupEngineState()); - Assertions.assertEquals("ytwvczcswkacve", model.healthStatus()); - Assertions.assertEquals(false, model.canReRegister()); - Assertions.assertEquals("vlvhbwrnfxtgd", model.backupEngineId()); - Assertions.assertEquals("qthe", model.dpmVersion()); - Assertions.assertEquals("mnaoy", model.azureBackupAgentVersion()); - Assertions.assertEquals(true, model.isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(false, model.isDpmUpgradeAvailable()); - Assertions.assertEquals("swankltytmh", model.extendedInfo().databaseName()); - Assertions.assertEquals(986610623, model.extendedInfo().protectedItemsCount()); - Assertions.assertEquals(1515443122, model.extendedInfo().protectedServersCount()); - Assertions.assertEquals(1705440283, model.extendedInfo().diskCount()); - Assertions.assertEquals(65.67282877478155D, model.extendedInfo().usedDiskSpace()); - Assertions.assertEquals(77.43775870619531D, model.extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-06T03:18:11Z"), model.extendedInfo().refreshedAt()); - Assertions.assertEquals(677941744, model.extendedInfo().azureProtectedInstances()); + Assertions.assertEquals("lbijpzgsksrfhfvo", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.backupManagementType()); + Assertions.assertEquals("bnxwc", model.registrationStatus()); + Assertions.assertEquals("mmpvf", model.backupEngineState()); + Assertions.assertEquals("wzfgbrttuiaclkie", model.healthStatus()); + Assertions.assertTrue(model.canReRegister()); + Assertions.assertEquals("lfnthiqfyut", model.backupEngineId()); + Assertions.assertEquals("iygbpvn", model.dpmVersion()); + Assertions.assertEquals("wmtxkyctwwgz", model.azureBackupAgentVersion()); + Assertions.assertFalse(model.isAzureBackupAgentUpgradeAvailable()); + Assertions.assertTrue(model.isDpmUpgradeAvailable()); + Assertions.assertEquals("vogygzyvneez", model.extendedInfo().databaseName()); + Assertions.assertEquals(488658265, model.extendedInfo().protectedItemsCount()); + Assertions.assertEquals(1673103368, model.extendedInfo().protectedServersCount()); + Assertions.assertEquals(1019718195, model.extendedInfo().diskCount()); + Assertions.assertEquals(75.45567237613729D, model.extendedInfo().usedDiskSpace()); + Assertions.assertEquals(27.253170156472674D, model.extendedInfo().availableDiskSpace()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-17T18:57:09Z"), model.extendedInfo().refreshedAt()); + Assertions.assertEquals(1354517943, model.extendedInfo().azureProtectedInstances()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareBackupRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareBackupRequestTests.java index 68de8f421f37..ec1c36851b2b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareBackupRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareBackupRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,16 +13,16 @@ public final class AzureFileShareBackupRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureFileShareBackupRequest model = BinaryData.fromString( - "{\"objectType\":\"AzureFileShareBackupRequest\",\"recoveryPointExpiryTimeInUTC\":\"2021-10-29T05:50:42Z\"}") + "{\"objectType\":\"AzureFileShareBackupRequest\",\"recoveryPointExpiryTimeInUTC\":\"2021-04-13T09:17:59Z\"}") .toObject(AzureFileShareBackupRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-29T05:50:42Z"), model.recoveryPointExpiryTimeInUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-13T09:17:59Z"), model.recoveryPointExpiryTimeInUtc()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureFileShareBackupRequest model = new AzureFileShareBackupRequest() - .withRecoveryPointExpiryTimeInUtc(OffsetDateTime.parse("2021-10-29T05:50:42Z")); + .withRecoveryPointExpiryTimeInUtc(OffsetDateTime.parse("2021-04-13T09:17:59Z")); model = BinaryData.fromObject(model).toObject(AzureFileShareBackupRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-29T05:50:42Z"), model.recoveryPointExpiryTimeInUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-13T09:17:59Z"), model.recoveryPointExpiryTimeInUtc()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareProtectableItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareProtectableItemTests.java index 983fb83be9ed..387422792e20 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareProtectableItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareProtectableItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,33 +14,14 @@ public final class AzureFileShareProtectableItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureFileShareProtectableItem model = BinaryData.fromString( - "{\"protectableItemType\":\"AzureFileShare\",\"parentContainerFabricId\":\"hemlwywaee\",\"parentContainerFriendlyName\":\"gfbukklelss\",\"azureFileShareType\":\"Invalid\",\"backupManagementType\":\"c\",\"workloadType\":\"zujksrlsmdes\",\"friendlyName\":\"lpvmjcdoewbidy\",\"protectionState\":\"ProtectionFailed\"}") + "{\"protectableItemType\":\"AzureFileShare\",\"parentContainerFabricId\":\"mtuowogtgitsqhzv\",\"parentContainerFriendlyName\":\"zcdba\",\"azureFileShareType\":\"XSMB\",\"backupManagementType\":\"ds\",\"workloadType\":\"mxeatkdbmwnrdjy\",\"friendlyName\":\"q\",\"protectionState\":\"NotProtected\"}") .toObject(AzureFileShareProtectableItem.class); - Assertions.assertEquals("c", model.backupManagementType()); - Assertions.assertEquals("zujksrlsmdes", model.workloadType()); - Assertions.assertEquals("lpvmjcdoewbidy", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); - Assertions.assertEquals("hemlwywaee", model.parentContainerFabricId()); - Assertions.assertEquals("gfbukklelss", model.parentContainerFriendlyName()); - Assertions.assertEquals(AzureFileShareType.INVALID, model.azureFileShareType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureFileShareProtectableItem model = new AzureFileShareProtectableItem().withBackupManagementType("c") - .withWorkloadType("zujksrlsmdes") - .withFriendlyName("lpvmjcdoewbidy") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED) - .withParentContainerFabricId("hemlwywaee") - .withParentContainerFriendlyName("gfbukklelss") - .withAzureFileShareType(AzureFileShareType.INVALID); - model = BinaryData.fromObject(model).toObject(AzureFileShareProtectableItem.class); - Assertions.assertEquals("c", model.backupManagementType()); - Assertions.assertEquals("zujksrlsmdes", model.workloadType()); - Assertions.assertEquals("lpvmjcdoewbidy", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); - Assertions.assertEquals("hemlwywaee", model.parentContainerFabricId()); - Assertions.assertEquals("gfbukklelss", model.parentContainerFriendlyName()); - Assertions.assertEquals(AzureFileShareType.INVALID, model.azureFileShareType()); + Assertions.assertEquals("ds", model.backupManagementType()); + Assertions.assertEquals("mxeatkdbmwnrdjy", model.workloadType()); + Assertions.assertEquals("q", model.friendlyName()); + Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.protectionState()); + Assertions.assertEquals("mtuowogtgitsqhzv", model.parentContainerFabricId()); + Assertions.assertEquals("zcdba", model.parentContainerFriendlyName()); + Assertions.assertEquals(AzureFileShareType.XSMB, model.azureFileShareType()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareProtectionPolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareProtectionPolicyTests.java index 66b848db06ef..f3d8a0273333 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareProtectionPolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareProtectionPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -17,30 +17,30 @@ public final class AzureFileShareProtectionPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureFileShareProtectionPolicy model = BinaryData.fromString( - "{\"backupManagementType\":\"AzureStorage\",\"workLoadType\":\"FileFolder\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"vaultRetentionPolicy\":{\"vaultRetention\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"snapshotRetentionInDays\":724220741},\"timeZone\":\"ookk\",\"protectedItemsCount\":870237510,\"resourceGuardOperationRequests\":[\"vleo\",\"fmluiqtqzfavyvn\",\"qybaryeua\",\"jkqa\"]}") + "{\"backupManagementType\":\"AzureStorage\",\"workLoadType\":\"SystemState\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"vaultRetentionPolicy\":{\"vaultRetention\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"snapshotRetentionInDays\":127275301},\"timeZone\":\"uuuybnchrsziz\",\"protectedItemsCount\":108034081,\"resourceGuardOperationRequests\":[\"yetnd\",\"bf\",\"yggagflnlgmt\",\"wahzjmucftbyr\"]}") .toObject(AzureFileShareProtectionPolicy.class); - Assertions.assertEquals(870237510, model.protectedItemsCount()); - Assertions.assertEquals("vleo", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(WorkloadType.FILE_FOLDER, model.workLoadType()); - Assertions.assertEquals(724220741, model.vaultRetentionPolicy().snapshotRetentionInDays()); - Assertions.assertEquals("ookk", model.timeZone()); + Assertions.assertEquals(108034081, model.protectedItemsCount()); + Assertions.assertEquals("yetnd", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(WorkloadType.SYSTEM_STATE, model.workLoadType()); + Assertions.assertEquals(127275301, model.vaultRetentionPolicy().snapshotRetentionInDays()); + Assertions.assertEquals("uuuybnchrsziz", model.timeZone()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureFileShareProtectionPolicy model = new AzureFileShareProtectionPolicy().withProtectedItemsCount(870237510) - .withResourceGuardOperationRequests(Arrays.asList("vleo", "fmluiqtqzfavyvn", "qybaryeua", "jkqa")) - .withWorkLoadType(WorkloadType.FILE_FOLDER) + AzureFileShareProtectionPolicy model = new AzureFileShareProtectionPolicy().withProtectedItemsCount(108034081) + .withResourceGuardOperationRequests(Arrays.asList("yetnd", "bf", "yggagflnlgmt", "wahzjmucftbyr")) + .withWorkLoadType(WorkloadType.SYSTEM_STATE) .withSchedulePolicy(new SchedulePolicy()) .withRetentionPolicy(new RetentionPolicy()) .withVaultRetentionPolicy(new VaultRetentionPolicy().withVaultRetention(new RetentionPolicy()) - .withSnapshotRetentionInDays(724220741)) - .withTimeZone("ookk"); + .withSnapshotRetentionInDays(127275301)) + .withTimeZone("uuuybnchrsziz"); model = BinaryData.fromObject(model).toObject(AzureFileShareProtectionPolicy.class); - Assertions.assertEquals(870237510, model.protectedItemsCount()); - Assertions.assertEquals("vleo", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(WorkloadType.FILE_FOLDER, model.workLoadType()); - Assertions.assertEquals(724220741, model.vaultRetentionPolicy().snapshotRetentionInDays()); - Assertions.assertEquals("ookk", model.timeZone()); + Assertions.assertEquals(108034081, model.protectedItemsCount()); + Assertions.assertEquals("yetnd", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(WorkloadType.SYSTEM_STATE, model.workLoadType()); + Assertions.assertEquals(127275301, model.vaultRetentionPolicy().snapshotRetentionInDays()); + Assertions.assertEquals("uuuybnchrsziz", model.timeZone()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareProvisionIlrRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareProvisionIlrRequestTests.java index 14895240c069..e5bc737b4880 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareProvisionIlrRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareProvisionIlrRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,19 +12,19 @@ public final class AzureFileShareProvisionIlrRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureFileShareProvisionIlrRequest model = BinaryData.fromString( - "{\"objectType\":\"AzureFileShareProvisionILRRequest\",\"recoveryPointId\":\"wxvgpiudeugfsxze\",\"sourceResourceId\":\"axwk\"}") + "{\"objectType\":\"AzureFileShareProvisionILRRequest\",\"recoveryPointId\":\"jtvczkcnyxrxmun\",\"sourceResourceId\":\"xvglnkvxlxp\"}") .toObject(AzureFileShareProvisionIlrRequest.class); - Assertions.assertEquals("wxvgpiudeugfsxze", model.recoveryPointId()); - Assertions.assertEquals("axwk", model.sourceResourceId()); + Assertions.assertEquals("jtvczkcnyxrxmun", model.recoveryPointId()); + Assertions.assertEquals("xvglnkvxlxp", model.sourceResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureFileShareProvisionIlrRequest model - = new AzureFileShareProvisionIlrRequest().withRecoveryPointId("wxvgpiudeugfsxze") - .withSourceResourceId("axwk"); + = new AzureFileShareProvisionIlrRequest().withRecoveryPointId("jtvczkcnyxrxmun") + .withSourceResourceId("xvglnkvxlxp"); model = BinaryData.fromObject(model).toObject(AzureFileShareProvisionIlrRequest.class); - Assertions.assertEquals("wxvgpiudeugfsxze", model.recoveryPointId()); - Assertions.assertEquals("axwk", model.sourceResourceId()); + Assertions.assertEquals("jtvczkcnyxrxmun", model.recoveryPointId()); + Assertions.assertEquals("xvglnkvxlxp", model.sourceResourceId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareRecoveryPointTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareRecoveryPointTests.java index 6cf75142f902..1bff5caefc1b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareRecoveryPointTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareRecoveryPointTests.java @@ -1,83 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareRecoveryPoint; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointProperties; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierInformation; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierStatus; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class AzureFileShareRecoveryPointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureFileShareRecoveryPoint model = BinaryData.fromString( - "{\"objectType\":\"AzureFileShareRecoveryPoint\",\"recoveryPointType\":\"h\",\"recoveryPointTime\":\"2021-03-17T00:42:38Z\",\"fileShareSnapshotUri\":\"fdntwjchrdgoih\",\"recoveryPointSizeInGB\":1654736009,\"recoveryPointProperties\":{\"expiryTime\":\"ton\",\"ruleName\":\"jl\",\"isSoftDeleted\":true},\"recoveryPointTierDetails\":[{\"type\":\"ArchivedRP\",\"status\":\"Deleted\",\"extendedInfo\":{\"tov\":\"sb\",\"irgne\":\"tgseinqfiufxqkn\",\"fcdmqnrojlpijn\":\"ttwqmsni\"}},{\"type\":\"InstantRP\",\"status\":\"Valid\",\"extendedInfo\":{\"zzronasx\":\"hcrat\",\"zq\":\"ft\"}},{\"type\":\"HardenedRP\",\"status\":\"Deleted\",\"extendedInfo\":{\"lgnyhmo\":\"sgogczhonnxk\",\"h\":\"sxkkg\"}},{\"type\":\"Invalid\",\"status\":\"Valid\",\"extendedInfo\":{\"frpdsofbshrns\":\"dhqxvcx\",\"ycnunvjsrtk\":\"buswdvzyy\",\"uxzejntpsew\":\"awnopqgikyzirtxd\"}}]}") + "{\"objectType\":\"AzureFileShareRecoveryPoint\",\"recoveryPointType\":\"y\",\"recoveryPointTime\":\"2021-01-19T22:33:55Z\",\"fileShareSnapshotUri\":\"l\",\"recoveryPointSizeInGB\":10940345,\"recoveryPointProperties\":{\"expiryTime\":\"lfmmdnbbglzpswi\",\"ruleName\":\"mcwyhzdxssadb\",\"isSoftDeleted\":true},\"recoveryPointTierDetails\":[{\"type\":\"Invalid\",\"status\":\"Invalid\",\"extendedInfo\":{\"xzb\":\"od\"}},{\"type\":\"HardenedRP\",\"status\":\"Deleted\",\"extendedInfo\":{\"erscdntne\":\"stdbhhxsrzdzu\",\"tmweriofzpyq\":\"fiwjmygtdssls\",\"hhszh\":\"emwabnet\"}},{\"type\":\"ArchivedRP\",\"status\":\"Deleted\",\"extendedInfo\":{\"wwtppj\":\"wubmwmbesldn\",\"okonzmnsikvmkqz\":\"lcxog\",\"eodkwobda\":\"qqkdltfzxmhhvhgu\",\"xndlkzgxhu\":\"xtibqdxbxwakbog\"}}],\"threatStatus\":\"Unknown\",\"threatInfo\":[{\"threatTitle\":\"odxun\",\"threatDescription\":\"ebxmubyynt\",\"lastUpdatedTime\":\"2021-07-30T15:53:47Z\",\"threatState\":\"InProgress\",\"threatStartTime\":\"2021-02-09T09:52:19Z\",\"threatEndTime\":\"2021-01-12T19:16:50Z\",\"threatURI\":\"vseotgqrl\",\"threatSeverity\":\"Informational\"},{\"threatTitle\":\"wlauwzizxbmpg\",\"threatDescription\":\"efuzmuvpbttd\",\"lastUpdatedTime\":\"2021-06-13T09:46:24Z\",\"threatState\":\"Active\",\"threatStartTime\":\"2021-10-21T18:07:19Z\",\"threatEndTime\":\"2021-11-04T09:02:42Z\",\"threatURI\":\"nzbtbhj\",\"threatSeverity\":\"Critical\"},{\"threatTitle\":\"fgohdneuelfphs\",\"threatDescription\":\"htozfikdow\",\"lastUpdatedTime\":\"2021-03-27T06:25:36Z\",\"threatState\":\"Active\",\"threatStartTime\":\"2021-11-12T18:41:55Z\",\"threatEndTime\":\"2021-05-28T10:42:53Z\",\"threatURI\":\"vithh\",\"threatSeverity\":\"Critical\"},{\"threatTitle\":\"osggbhc\",\"threatDescription\":\"fwdsj\",\"lastUpdatedTime\":\"2021-11-15T02:10:44Z\",\"threatState\":\"Ignored\",\"threatStartTime\":\"2021-03-28T17:35:22Z\",\"threatEndTime\":\"2021-08-31T11:12:28Z\",\"threatURI\":\"wacf\",\"threatSeverity\":\"Informational\"}]}") .toObject(AzureFileShareRecoveryPoint.class); - Assertions.assertEquals("h", model.recoveryPointType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-17T00:42:38Z"), model.recoveryPointTime()); - Assertions.assertEquals("fdntwjchrdgoih", model.fileShareSnapshotUri()); - Assertions.assertEquals(1654736009, model.recoveryPointSizeInGB()); - Assertions.assertEquals("ton", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("jl", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(true, model.recoveryPointProperties().isSoftDeleted()); - Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.DELETED, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("sb", model.recoveryPointTierDetails().get(0).extendedInfo().get("tov")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureFileShareRecoveryPoint model = new AzureFileShareRecoveryPoint().withRecoveryPointType("h") - .withRecoveryPointTime(OffsetDateTime.parse("2021-03-17T00:42:38Z")) - .withFileShareSnapshotUri("fdntwjchrdgoih") - .withRecoveryPointSizeInGB(1654736009) - .withRecoveryPointProperties( - new RecoveryPointProperties().withExpiryTime("ton").withRuleName("jl").withIsSoftDeleted(true)) - .withRecoveryPointTierDetails(Arrays.asList( - new RecoveryPointTierInformation().withType(RecoveryPointTierType.ARCHIVED_RP) - .withStatus(RecoveryPointTierStatus.DELETED) - .withExtendedInfo(mapOf("tov", "sb", "irgne", "tgseinqfiufxqkn", "fcdmqnrojlpijn", "ttwqmsni")), - new RecoveryPointTierInformation().withType(RecoveryPointTierType.INSTANT_RP) - .withStatus(RecoveryPointTierStatus.VALID) - .withExtendedInfo(mapOf("zzronasx", "hcrat", "zq", "ft")), - new RecoveryPointTierInformation().withType(RecoveryPointTierType.HARDENED_RP) - .withStatus(RecoveryPointTierStatus.DELETED) - .withExtendedInfo(mapOf("lgnyhmo", "sgogczhonnxk", "h", "sxkkg")), - new RecoveryPointTierInformation().withType(RecoveryPointTierType.INVALID) - .withStatus(RecoveryPointTierStatus.VALID) - .withExtendedInfo(mapOf("frpdsofbshrns", "dhqxvcx", "ycnunvjsrtk", "buswdvzyy", "uxzejntpsew", - "awnopqgikyzirtxd")))); - model = BinaryData.fromObject(model).toObject(AzureFileShareRecoveryPoint.class); - Assertions.assertEquals("h", model.recoveryPointType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-17T00:42:38Z"), model.recoveryPointTime()); - Assertions.assertEquals("fdntwjchrdgoih", model.fileShareSnapshotUri()); - Assertions.assertEquals(1654736009, model.recoveryPointSizeInGB()); - Assertions.assertEquals("ton", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("jl", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(true, model.recoveryPointProperties().isSoftDeleted()); - Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.DELETED, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("sb", model.recoveryPointTierDetails().get(0).extendedInfo().get("tov")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(ThreatStatus.UNKNOWN, model.threatStatus()); + Assertions.assertEquals(ThreatState.IN_PROGRESS, model.threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.INFORMATIONAL, model.threatInfo().get(0).threatSeverity()); + Assertions.assertEquals("y", model.recoveryPointType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-19T22:33:55Z"), model.recoveryPointTime()); + Assertions.assertEquals("l", model.fileShareSnapshotUri()); + Assertions.assertEquals(10940345, model.recoveryPointSizeInGB()); + Assertions.assertEquals("lfmmdnbbglzpswi", model.recoveryPointProperties().expiryTime()); + Assertions.assertEquals("mcwyhzdxssadb", model.recoveryPointProperties().ruleName()); + Assertions.assertTrue(model.recoveryPointProperties().isSoftDeleted()); + Assertions.assertEquals(RecoveryPointTierType.INVALID, model.recoveryPointTierDetails().get(0).type()); + Assertions.assertEquals(RecoveryPointTierStatus.INVALID, model.recoveryPointTierDetails().get(0).status()); + Assertions.assertEquals("od", model.recoveryPointTierDetails().get(0).extendedInfo().get("xzb")); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareRestoreRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareRestoreRequestTests.java index b5d999a25ef2..175bae9129a8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareRestoreRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareRestoreRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -18,47 +18,45 @@ public final class AzureFileShareRestoreRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureFileShareRestoreRequest model = BinaryData.fromString( - "{\"objectType\":\"AzureFileShareRestoreRequest\",\"recoveryType\":\"AlternateLocation\",\"sourceResourceId\":\"fxumv\",\"copyOptions\":\"Overwrite\",\"restoreRequestType\":\"Invalid\",\"restoreFileSpecs\":[{\"path\":\"xnbkfezzxscyhwzd\",\"fileSpecType\":\"rujbzbomvzzbtdc\",\"targetFolderPath\":\"pniyujviyl\"},{\"path\":\"shfssnrbgyef\",\"fileSpecType\":\"msgaoj\",\"targetFolderPath\":\"wncot\"}],\"targetDetails\":{\"name\":\"hirctymoxoftpipi\",\"targetResourceId\":\"czuhxacpqjlihh\"},\"resourceGuardOperationRequests\":[\"pskasdvlmfwdg\",\"x\",\"lucvpam\",\"sreuzvxurisjnh\"]}") + "{\"objectType\":\"AzureFileShareRestoreRequest\",\"recoveryType\":\"Offline\",\"sourceResourceId\":\"zjhfjmhvv\",\"copyOptions\":\"CreateCopy\",\"restoreRequestType\":\"FullShareRestore\",\"restoreFileSpecs\":[{\"path\":\"eqsx\",\"fileSpecType\":\"hfbuzjyihsasbhud\",\"targetFolderPath\":\"ohyuemslynsq\"},{\"path\":\"pfoobr\",\"fileSpecType\":\"tyms\",\"targetFolderPath\":\"ygqdnfwqzdz\"},{\"path\":\"ilaxhn\",\"fileSpecType\":\"qlyvijo\",\"targetFolderPath\":\"iv\"}],\"targetDetails\":{\"name\":\"yzunbixxrtikv\",\"targetResourceId\":\"wpgclrcivt\"},\"resourceGuardOperationRequests\":[\"frkenxpmyyefrp\"]}") .toObject(AzureFileShareRestoreRequest.class); - Assertions.assertEquals("pskasdvlmfwdg", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.ALTERNATE_LOCATION, model.recoveryType()); - Assertions.assertEquals("fxumv", model.sourceResourceId()); - Assertions.assertEquals(CopyOptions.OVERWRITE, model.copyOptions()); - Assertions.assertEquals(RestoreRequestType.INVALID, model.restoreRequestType()); - Assertions.assertEquals("xnbkfezzxscyhwzd", model.restoreFileSpecs().get(0).path()); - Assertions.assertEquals("rujbzbomvzzbtdc", model.restoreFileSpecs().get(0).fileSpecType()); - Assertions.assertEquals("pniyujviyl", model.restoreFileSpecs().get(0).targetFolderPath()); - Assertions.assertEquals("hirctymoxoftpipi", model.targetDetails().name()); - Assertions.assertEquals("czuhxacpqjlihh", model.targetDetails().targetResourceId()); + Assertions.assertEquals("frkenxpmyyefrp", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.OFFLINE, model.recoveryType()); + Assertions.assertEquals("zjhfjmhvv", model.sourceResourceId()); + Assertions.assertEquals(CopyOptions.CREATE_COPY, model.copyOptions()); + Assertions.assertEquals(RestoreRequestType.FULL_SHARE_RESTORE, model.restoreRequestType()); + Assertions.assertEquals("eqsx", model.restoreFileSpecs().get(0).path()); + Assertions.assertEquals("hfbuzjyihsasbhud", model.restoreFileSpecs().get(0).fileSpecType()); + Assertions.assertEquals("ohyuemslynsq", model.restoreFileSpecs().get(0).targetFolderPath()); + Assertions.assertEquals("yzunbixxrtikv", model.targetDetails().name()); + Assertions.assertEquals("wpgclrcivt", model.targetDetails().targetResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureFileShareRestoreRequest model = new AzureFileShareRestoreRequest() - .withResourceGuardOperationRequests(Arrays.asList("pskasdvlmfwdg", "x", "lucvpam", "sreuzvxurisjnh")) - .withRecoveryType(RecoveryType.ALTERNATE_LOCATION) - .withSourceResourceId("fxumv") - .withCopyOptions(CopyOptions.OVERWRITE) - .withRestoreRequestType(RestoreRequestType.INVALID) + .withResourceGuardOperationRequests(Arrays.asList("frkenxpmyyefrp")) + .withRecoveryType(RecoveryType.OFFLINE) + .withSourceResourceId("zjhfjmhvv") + .withCopyOptions(CopyOptions.CREATE_COPY) + .withRestoreRequestType(RestoreRequestType.FULL_SHARE_RESTORE) .withRestoreFileSpecs(Arrays.asList( - new RestoreFileSpecs().withPath("xnbkfezzxscyhwzd") - .withFileSpecType("rujbzbomvzzbtdc") - .withTargetFolderPath("pniyujviyl"), - new RestoreFileSpecs().withPath("shfssnrbgyef") - .withFileSpecType("msgaoj") - .withTargetFolderPath("wncot"))) - .withTargetDetails( - new TargetAfsRestoreInfo().withName("hirctymoxoftpipi").withTargetResourceId("czuhxacpqjlihh")); + new RestoreFileSpecs().withPath("eqsx") + .withFileSpecType("hfbuzjyihsasbhud") + .withTargetFolderPath("ohyuemslynsq"), + new RestoreFileSpecs().withPath("pfoobr").withFileSpecType("tyms").withTargetFolderPath("ygqdnfwqzdz"), + new RestoreFileSpecs().withPath("ilaxhn").withFileSpecType("qlyvijo").withTargetFolderPath("iv"))) + .withTargetDetails(new TargetAfsRestoreInfo().withName("yzunbixxrtikv").withTargetResourceId("wpgclrcivt")); model = BinaryData.fromObject(model).toObject(AzureFileShareRestoreRequest.class); - Assertions.assertEquals("pskasdvlmfwdg", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.ALTERNATE_LOCATION, model.recoveryType()); - Assertions.assertEquals("fxumv", model.sourceResourceId()); - Assertions.assertEquals(CopyOptions.OVERWRITE, model.copyOptions()); - Assertions.assertEquals(RestoreRequestType.INVALID, model.restoreRequestType()); - Assertions.assertEquals("xnbkfezzxscyhwzd", model.restoreFileSpecs().get(0).path()); - Assertions.assertEquals("rujbzbomvzzbtdc", model.restoreFileSpecs().get(0).fileSpecType()); - Assertions.assertEquals("pniyujviyl", model.restoreFileSpecs().get(0).targetFolderPath()); - Assertions.assertEquals("hirctymoxoftpipi", model.targetDetails().name()); - Assertions.assertEquals("czuhxacpqjlihh", model.targetDetails().targetResourceId()); + Assertions.assertEquals("frkenxpmyyefrp", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.OFFLINE, model.recoveryType()); + Assertions.assertEquals("zjhfjmhvv", model.sourceResourceId()); + Assertions.assertEquals(CopyOptions.CREATE_COPY, model.copyOptions()); + Assertions.assertEquals(RestoreRequestType.FULL_SHARE_RESTORE, model.restoreRequestType()); + Assertions.assertEquals("eqsx", model.restoreFileSpecs().get(0).path()); + Assertions.assertEquals("hfbuzjyihsasbhud", model.restoreFileSpecs().get(0).fileSpecType()); + Assertions.assertEquals("ohyuemslynsq", model.restoreFileSpecs().get(0).targetFolderPath()); + Assertions.assertEquals("yzunbixxrtikv", model.targetDetails().name()); + Assertions.assertEquals("wpgclrcivt", model.targetDetails().targetResourceId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileshareProtectedItemExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileshareProtectedItemExtendedInfoTests.java index 8f35e52eea29..243d1f1dc62d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileshareProtectedItemExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileshareProtectedItemExtendedInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,22 +13,22 @@ public final class AzureFileshareProtectedItemExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureFileshareProtectedItemExtendedInfo model = BinaryData.fromString( - "{\"oldestRecoveryPoint\":\"2021-05-17T23:03:28Z\",\"recoveryPointCount\":1368964811,\"policyState\":\"lbfpncurd\",\"resourceState\":\"wiithtywub\",\"resourceStateSyncTime\":\"2021-05-27T18:04:18Z\"}") + "{\"oldestRecoveryPoint\":\"2021-07-19T23:59:40Z\",\"recoveryPointCount\":1059289451,\"policyState\":\"x\",\"resourceState\":\"qgtz\",\"resourceStateSyncTime\":\"2021-05-26T20:14:49Z\"}") .toObject(AzureFileshareProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-17T23:03:28Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(1368964811, model.recoveryPointCount()); - Assertions.assertEquals("lbfpncurd", model.policyState()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-19T23:59:40Z"), model.oldestRecoveryPoint()); + Assertions.assertEquals(1059289451, model.recoveryPointCount()); + Assertions.assertEquals("x", model.policyState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureFileshareProtectedItemExtendedInfo model = new AzureFileshareProtectedItemExtendedInfo() - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-05-17T23:03:28Z")) - .withRecoveryPointCount(1368964811) - .withPolicyState("lbfpncurd"); + .withOldestRecoveryPoint(OffsetDateTime.parse("2021-07-19T23:59:40Z")) + .withRecoveryPointCount(1059289451) + .withPolicyState("x"); model = BinaryData.fromObject(model).toObject(AzureFileshareProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-17T23:03:28Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(1368964811, model.recoveryPointCount()); - Assertions.assertEquals("lbfpncurd", model.policyState()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-19T23:59:40Z"), model.oldestRecoveryPoint()); + Assertions.assertEquals(1059289451, model.recoveryPointCount()); + Assertions.assertEquals("x", model.policyState()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSClassicComputeVMContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSClassicComputeVMContainerTests.java index 4d37e9a756f0..e8bf242b83c8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSClassicComputeVMContainerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSClassicComputeVMContainerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,37 +13,37 @@ public final class AzureIaaSClassicComputeVMContainerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureIaaSClassicComputeVMContainer model = BinaryData.fromString( - "{\"containerType\":\"Microsoft.ClassicCompute/virtualMachines\",\"virtualMachineId\":\"ykhv\",\"virtualMachineVersion\":\"xepmrut\",\"resourceGroup\":\"abaobnslujdjltym\",\"friendlyName\":\"vguihywar\",\"backupManagementType\":\"DPM\",\"registrationStatus\":\"hkixkykxdssj\",\"healthStatus\":\"mmuc\",\"protectableObjectType\":\"hikkflrmy\"}") + "{\"containerType\":\"Microsoft.ClassicCompute/virtualMachines\",\"virtualMachineId\":\"luiqtqzfavyvnqq\",\"virtualMachineVersion\":\"aryeu\",\"resourceGroup\":\"jkqa\",\"friendlyName\":\"gzslesjcbhernnti\",\"backupManagementType\":\"AzureBackupServer\",\"registrationStatus\":\"cv\",\"healthStatus\":\"uwrbehwagoh\",\"protectableObjectType\":\"f\"}") .toObject(AzureIaaSClassicComputeVMContainer.class); - Assertions.assertEquals("vguihywar", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.DPM, model.backupManagementType()); - Assertions.assertEquals("hkixkykxdssj", model.registrationStatus()); - Assertions.assertEquals("mmuc", model.healthStatus()); - Assertions.assertEquals("hikkflrmy", model.protectableObjectType()); - Assertions.assertEquals("ykhv", model.virtualMachineId()); - Assertions.assertEquals("xepmrut", model.virtualMachineVersion()); - Assertions.assertEquals("abaobnslujdjltym", model.resourceGroup()); + Assertions.assertEquals("gzslesjcbhernnti", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); + Assertions.assertEquals("cv", model.registrationStatus()); + Assertions.assertEquals("uwrbehwagoh", model.healthStatus()); + Assertions.assertEquals("f", model.protectableObjectType()); + Assertions.assertEquals("luiqtqzfavyvnqq", model.virtualMachineId()); + Assertions.assertEquals("aryeu", model.virtualMachineVersion()); + Assertions.assertEquals("jkqa", model.resourceGroup()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureIaaSClassicComputeVMContainer model - = new AzureIaaSClassicComputeVMContainer().withFriendlyName("vguihywar") - .withBackupManagementType(BackupManagementType.DPM) - .withRegistrationStatus("hkixkykxdssj") - .withHealthStatus("mmuc") - .withProtectableObjectType("hikkflrmy") - .withVirtualMachineId("ykhv") - .withVirtualMachineVersion("xepmrut") - .withResourceGroup("abaobnslujdjltym"); + = new AzureIaaSClassicComputeVMContainer().withFriendlyName("gzslesjcbhernnti") + .withBackupManagementType(BackupManagementType.AZURE_BACKUP_SERVER) + .withRegistrationStatus("cv") + .withHealthStatus("uwrbehwagoh") + .withProtectableObjectType("f") + .withVirtualMachineId("luiqtqzfavyvnqq") + .withVirtualMachineVersion("aryeu") + .withResourceGroup("jkqa"); model = BinaryData.fromObject(model).toObject(AzureIaaSClassicComputeVMContainer.class); - Assertions.assertEquals("vguihywar", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.DPM, model.backupManagementType()); - Assertions.assertEquals("hkixkykxdssj", model.registrationStatus()); - Assertions.assertEquals("mmuc", model.healthStatus()); - Assertions.assertEquals("hikkflrmy", model.protectableObjectType()); - Assertions.assertEquals("ykhv", model.virtualMachineId()); - Assertions.assertEquals("xepmrut", model.virtualMachineVersion()); - Assertions.assertEquals("abaobnslujdjltym", model.resourceGroup()); + Assertions.assertEquals("gzslesjcbhernnti", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); + Assertions.assertEquals("cv", model.registrationStatus()); + Assertions.assertEquals("uwrbehwagoh", model.healthStatus()); + Assertions.assertEquals("f", model.protectableObjectType()); + Assertions.assertEquals("luiqtqzfavyvnqq", model.virtualMachineId()); + Assertions.assertEquals("aryeu", model.virtualMachineVersion()); + Assertions.assertEquals("jkqa", model.resourceGroup()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSClassicComputeVMProtectableItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSClassicComputeVMProtectableItemTests.java index ca76b4ce966a..55fe24247361 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSClassicComputeVMProtectableItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSClassicComputeVMProtectableItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,34 +13,14 @@ public final class AzureIaaSClassicComputeVMProtectableItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureIaaSClassicComputeVMProtectableItem model = BinaryData.fromString( - "{\"protectableItemType\":\"Microsoft.ClassicCompute/virtualMachines\",\"virtualMachineId\":\"z\",\"virtualMachineVersion\":\"fypiv\",\"resourceGroup\":\"bbjpmcubkmif\",\"backupManagementType\":\"xkubvphavpmhbrbq\",\"workloadType\":\"govpbbtte\",\"friendlyName\":\"oknssqyzqedikdf\",\"protectionState\":\"ProtectionFailed\"}") + "{\"protectableItemType\":\"Microsoft.ClassicCompute/virtualMachines\",\"virtualMachineId\":\"mhjrm\",\"virtualMachineVersion\":\"hmaxljalfi\",\"resourceGroup\":\"jmobca\",\"backupManagementType\":\"de\",\"workloadType\":\"qcwgaxfgvaknokz\",\"friendlyName\":\"jzrltixldzy\",\"protectionState\":\"Invalid\"}") .toObject(AzureIaaSClassicComputeVMProtectableItem.class); - Assertions.assertEquals("xkubvphavpmhbrbq", model.backupManagementType()); - Assertions.assertEquals("govpbbtte", model.workloadType()); - Assertions.assertEquals("oknssqyzqedikdf", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); - Assertions.assertEquals("z", model.virtualMachineId()); - Assertions.assertEquals("fypiv", model.virtualMachineVersion()); - Assertions.assertEquals("bbjpmcubkmif", model.resourceGroup()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureIaaSClassicComputeVMProtectableItem model - = new AzureIaaSClassicComputeVMProtectableItem().withBackupManagementType("xkubvphavpmhbrbq") - .withWorkloadType("govpbbtte") - .withFriendlyName("oknssqyzqedikdf") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED) - .withVirtualMachineId("z") - .withVirtualMachineVersion("fypiv") - .withResourceGroup("bbjpmcubkmif"); - model = BinaryData.fromObject(model).toObject(AzureIaaSClassicComputeVMProtectableItem.class); - Assertions.assertEquals("xkubvphavpmhbrbq", model.backupManagementType()); - Assertions.assertEquals("govpbbtte", model.workloadType()); - Assertions.assertEquals("oknssqyzqedikdf", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); - Assertions.assertEquals("z", model.virtualMachineId()); - Assertions.assertEquals("fypiv", model.virtualMachineVersion()); - Assertions.assertEquals("bbjpmcubkmif", model.resourceGroup()); + Assertions.assertEquals("de", model.backupManagementType()); + Assertions.assertEquals("qcwgaxfgvaknokz", model.workloadType()); + Assertions.assertEquals("jzrltixldzy", model.friendlyName()); + Assertions.assertEquals(ProtectionStatus.INVALID, model.protectionState()); + Assertions.assertEquals("mhjrm", model.virtualMachineId()); + Assertions.assertEquals("hmaxljalfi", model.virtualMachineVersion()); + Assertions.assertEquals("jmobca", model.resourceGroup()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSComputeVMContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSComputeVMContainerTests.java index 5716f00c704b..cd03f5983204 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSComputeVMContainerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSComputeVMContainerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,36 +13,36 @@ public final class AzureIaaSComputeVMContainerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureIaaSComputeVMContainer model = BinaryData.fromString( - "{\"containerType\":\"Microsoft.Compute/virtualMachines\",\"virtualMachineId\":\"cabvnuil\",\"virtualMachineVersion\":\"yaswlpaugmr\",\"resourceGroup\":\"jlrxwtoaukhfk\",\"friendlyName\":\"isizm\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"sx\",\"healthStatus\":\"uivedwcgyeewxeiq\",\"protectableObjectType\":\"smgomguaml\"}") + "{\"containerType\":\"Microsoft.Compute/virtualMachines\",\"virtualMachineId\":\"qubkw\",\"virtualMachineVersion\":\"enr\",\"resourceGroup\":\"utujba\",\"friendlyName\":\"juohminyflnorw\",\"backupManagementType\":\"DefaultBackup\",\"registrationStatus\":\"wpklvxw\",\"healthStatus\":\"gdxpg\",\"protectableObjectType\":\"chisze\"}") .toObject(AzureIaaSComputeVMContainer.class); - Assertions.assertEquals("isizm", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.backupManagementType()); - Assertions.assertEquals("sx", model.registrationStatus()); - Assertions.assertEquals("uivedwcgyeewxeiq", model.healthStatus()); - Assertions.assertEquals("smgomguaml", model.protectableObjectType()); - Assertions.assertEquals("cabvnuil", model.virtualMachineId()); - Assertions.assertEquals("yaswlpaugmr", model.virtualMachineVersion()); - Assertions.assertEquals("jlrxwtoaukhfk", model.resourceGroup()); + Assertions.assertEquals("juohminyflnorw", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); + Assertions.assertEquals("wpklvxw", model.registrationStatus()); + Assertions.assertEquals("gdxpg", model.healthStatus()); + Assertions.assertEquals("chisze", model.protectableObjectType()); + Assertions.assertEquals("qubkw", model.virtualMachineId()); + Assertions.assertEquals("enr", model.virtualMachineVersion()); + Assertions.assertEquals("utujba", model.resourceGroup()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureIaaSComputeVMContainer model = new AzureIaaSComputeVMContainer().withFriendlyName("isizm") - .withBackupManagementType(BackupManagementType.AZURE_WORKLOAD) - .withRegistrationStatus("sx") - .withHealthStatus("uivedwcgyeewxeiq") - .withProtectableObjectType("smgomguaml") - .withVirtualMachineId("cabvnuil") - .withVirtualMachineVersion("yaswlpaugmr") - .withResourceGroup("jlrxwtoaukhfk"); + AzureIaaSComputeVMContainer model = new AzureIaaSComputeVMContainer().withFriendlyName("juohminyflnorw") + .withBackupManagementType(BackupManagementType.DEFAULT_BACKUP) + .withRegistrationStatus("wpklvxw") + .withHealthStatus("gdxpg") + .withProtectableObjectType("chisze") + .withVirtualMachineId("qubkw") + .withVirtualMachineVersion("enr") + .withResourceGroup("utujba"); model = BinaryData.fromObject(model).toObject(AzureIaaSComputeVMContainer.class); - Assertions.assertEquals("isizm", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.backupManagementType()); - Assertions.assertEquals("sx", model.registrationStatus()); - Assertions.assertEquals("uivedwcgyeewxeiq", model.healthStatus()); - Assertions.assertEquals("smgomguaml", model.protectableObjectType()); - Assertions.assertEquals("cabvnuil", model.virtualMachineId()); - Assertions.assertEquals("yaswlpaugmr", model.virtualMachineVersion()); - Assertions.assertEquals("jlrxwtoaukhfk", model.resourceGroup()); + Assertions.assertEquals("juohminyflnorw", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); + Assertions.assertEquals("wpklvxw", model.registrationStatus()); + Assertions.assertEquals("gdxpg", model.healthStatus()); + Assertions.assertEquals("chisze", model.protectableObjectType()); + Assertions.assertEquals("qubkw", model.virtualMachineId()); + Assertions.assertEquals("enr", model.virtualMachineVersion()); + Assertions.assertEquals("utujba", model.resourceGroup()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSComputeVMProtectableItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSComputeVMProtectableItemTests.java index 6981e5ab537a..febbfc21c57e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSComputeVMProtectableItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSComputeVMProtectableItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,33 +13,14 @@ public final class AzureIaaSComputeVMProtectableItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureIaaSComputeVMProtectableItem model = BinaryData.fromString( - "{\"protectableItemType\":\"Microsoft.Compute/virtualMachines\",\"virtualMachineId\":\"l\",\"virtualMachineVersion\":\"msplzgaufcshhvn\",\"resourceGroup\":\"gnxkympqan\",\"backupManagementType\":\"jk\",\"workloadType\":\"tw\",\"friendlyName\":\"aoypny\",\"protectionState\":\"Invalid\"}") + "{\"protectableItemType\":\"Microsoft.Compute/virtualMachines\",\"virtualMachineId\":\"pirykycndzfqiv\",\"virtualMachineVersion\":\"euy\",\"resourceGroup\":\"bmnwa\",\"backupManagementType\":\"tbxoee\",\"workloadType\":\"qlnfw\",\"friendlyName\":\"ymvqdbpbhfckdvez\",\"protectionState\":\"Invalid\"}") .toObject(AzureIaaSComputeVMProtectableItem.class); - Assertions.assertEquals("jk", model.backupManagementType()); - Assertions.assertEquals("tw", model.workloadType()); - Assertions.assertEquals("aoypny", model.friendlyName()); + Assertions.assertEquals("tbxoee", model.backupManagementType()); + Assertions.assertEquals("qlnfw", model.workloadType()); + Assertions.assertEquals("ymvqdbpbhfckdvez", model.friendlyName()); Assertions.assertEquals(ProtectionStatus.INVALID, model.protectionState()); - Assertions.assertEquals("l", model.virtualMachineId()); - Assertions.assertEquals("msplzgaufcshhvn", model.virtualMachineVersion()); - Assertions.assertEquals("gnxkympqan", model.resourceGroup()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureIaaSComputeVMProtectableItem model = new AzureIaaSComputeVMProtectableItem().withBackupManagementType("jk") - .withWorkloadType("tw") - .withFriendlyName("aoypny") - .withProtectionState(ProtectionStatus.INVALID) - .withVirtualMachineId("l") - .withVirtualMachineVersion("msplzgaufcshhvn") - .withResourceGroup("gnxkympqan"); - model = BinaryData.fromObject(model).toObject(AzureIaaSComputeVMProtectableItem.class); - Assertions.assertEquals("jk", model.backupManagementType()); - Assertions.assertEquals("tw", model.workloadType()); - Assertions.assertEquals("aoypny", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.INVALID, model.protectionState()); - Assertions.assertEquals("l", model.virtualMachineId()); - Assertions.assertEquals("msplzgaufcshhvn", model.virtualMachineVersion()); - Assertions.assertEquals("gnxkympqan", model.resourceGroup()); + Assertions.assertEquals("pirykycndzfqiv", model.virtualMachineId()); + Assertions.assertEquals("euy", model.virtualMachineVersion()); + Assertions.assertEquals("bmnwa", model.resourceGroup()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmJobExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmJobExtendedInfoTests.java index b3acbc1d0f61..0892ba4f950e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmJobExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmJobExtendedInfoTests.java @@ -1,81 +1,33 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmJobExtendedInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmJobTaskDetails; import java.time.Duration; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class AzureIaaSvmJobExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureIaaSvmJobExtendedInfo model = BinaryData.fromString( - "{\"tasksList\":[{\"taskId\":\"epn\",\"startTime\":\"2021-05-29T06:21:05Z\",\"endTime\":\"2021-05-09T12:03:02Z\",\"instanceId\":\"gibbdaxc\",\"duration\":\"PT190H25M17S\",\"status\":\"zauorsuk\",\"progressPercentage\":26.03201613518045,\"taskExecutionDetails\":\"plhlvnuuepzlrp\"}],\"propertyBag\":{\"nnrwrbiork\":\"soldweyuqdunv\",\"xmsivfomiloxggdu\":\"alywjhhgdn\"},\"internalPropertyBag\":{\"hvcyyysfg\":\"ndieuzaofj\"},\"progressPercentage\":99.77033821162951,\"estimatedRemainingDuration\":\"biipuip\",\"dynamicErrorMessage\":\"qonmacj\"}") + "{\"tasksList\":[{\"taskId\":\"dy\",\"startTime\":\"2021-10-14T11:15:51Z\",\"endTime\":\"2021-08-05T00:47:26Z\",\"instanceId\":\"klmtkhlowkx\",\"duration\":\"PT151H34M23S\",\"status\":\"rdfjmzsyzfhotl\",\"progressPercentage\":0.29130527965174347,\"taskExecutionDetails\":\"ychunsjlpjrtwszh\"},{\"taskId\":\"uic\",\"startTime\":\"2021-07-19T03:46:29Z\",\"endTime\":\"2021-09-11T09:13:01Z\",\"instanceId\":\"mhwrb\",\"duration\":\"PT13H8M25S\",\"status\":\"f\",\"progressPercentage\":38.028674094238625,\"taskExecutionDetails\":\"jgl\"},{\"taskId\":\"cuyzlwhhmemhoocl\",\"startTime\":\"2021-02-20T18:59:35Z\",\"endTime\":\"2021-10-05T09:41:59Z\",\"instanceId\":\"emc\",\"duration\":\"PT162H31M3S\",\"status\":\"mykyujxsglhs\",\"progressPercentage\":16.52978357112915,\"taskExecutionDetails\":\"jylmbkzudnigr\"}],\"propertyBag\":{\"qyhqo\":\"otjewlpxuzzjgnre\"},\"internalPropertyBag\":{\"pzdqtvhcspod\":\"hiqakydiwfbrk\",\"lbmoichd\":\"qaxsipietgbebjf\",\"viqsowsaaelcattc\":\"pnfpubntnbat\"},\"progressPercentage\":87.99951052496706,\"estimatedRemainingDuration\":\"rvkmjcwmjvlgfggc\",\"dynamicErrorMessage\":\"yylizrz\"}") .toObject(AzureIaaSvmJobExtendedInfo.class); - Assertions.assertEquals("epn", model.tasksList().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-29T06:21:05Z"), model.tasksList().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-09T12:03:02Z"), model.tasksList().get(0).endTime()); - Assertions.assertEquals("gibbdaxc", model.tasksList().get(0).instanceId()); - Assertions.assertEquals(Duration.parse("PT190H25M17S"), model.tasksList().get(0).duration()); - Assertions.assertEquals("zauorsuk", model.tasksList().get(0).status()); - Assertions.assertEquals(26.03201613518045D, model.tasksList().get(0).progressPercentage()); - Assertions.assertEquals("plhlvnuuepzlrp", model.tasksList().get(0).taskExecutionDetails()); - Assertions.assertEquals("soldweyuqdunv", model.propertyBag().get("nnrwrbiork")); - Assertions.assertEquals("ndieuzaofj", model.internalPropertyBag().get("hvcyyysfg")); - Assertions.assertEquals(99.77033821162951D, model.progressPercentage()); - Assertions.assertEquals("biipuip", model.estimatedRemainingDuration()); - Assertions.assertEquals("qonmacj", model.dynamicErrorMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureIaaSvmJobExtendedInfo model = new AzureIaaSvmJobExtendedInfo() - .withTasksList(Arrays.asList(new AzureIaaSvmJobTaskDetails().withTaskId("epn") - .withStartTime(OffsetDateTime.parse("2021-05-29T06:21:05Z")) - .withEndTime(OffsetDateTime.parse("2021-05-09T12:03:02Z")) - .withInstanceId("gibbdaxc") - .withDuration(Duration.parse("PT190H25M17S")) - .withStatus("zauorsuk") - .withProgressPercentage(26.03201613518045D) - .withTaskExecutionDetails("plhlvnuuepzlrp"))) - .withPropertyBag(mapOf("nnrwrbiork", "soldweyuqdunv", "xmsivfomiloxggdu", "alywjhhgdn")) - .withInternalPropertyBag(mapOf("hvcyyysfg", "ndieuzaofj")) - .withProgressPercentage(99.77033821162951D) - .withEstimatedRemainingDuration("biipuip") - .withDynamicErrorMessage("qonmacj"); - model = BinaryData.fromObject(model).toObject(AzureIaaSvmJobExtendedInfo.class); - Assertions.assertEquals("epn", model.tasksList().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-29T06:21:05Z"), model.tasksList().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-09T12:03:02Z"), model.tasksList().get(0).endTime()); - Assertions.assertEquals("gibbdaxc", model.tasksList().get(0).instanceId()); - Assertions.assertEquals(Duration.parse("PT190H25M17S"), model.tasksList().get(0).duration()); - Assertions.assertEquals("zauorsuk", model.tasksList().get(0).status()); - Assertions.assertEquals(26.03201613518045D, model.tasksList().get(0).progressPercentage()); - Assertions.assertEquals("plhlvnuuepzlrp", model.tasksList().get(0).taskExecutionDetails()); - Assertions.assertEquals("soldweyuqdunv", model.propertyBag().get("nnrwrbiork")); - Assertions.assertEquals("ndieuzaofj", model.internalPropertyBag().get("hvcyyysfg")); - Assertions.assertEquals(99.77033821162951D, model.progressPercentage()); - Assertions.assertEquals("biipuip", model.estimatedRemainingDuration()); - Assertions.assertEquals("qonmacj", model.dynamicErrorMessage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("dy", model.tasksList().get(0).taskId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-14T11:15:51Z"), model.tasksList().get(0).startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-05T00:47:26Z"), model.tasksList().get(0).endTime()); + Assertions.assertEquals("klmtkhlowkx", model.tasksList().get(0).instanceId()); + Assertions.assertEquals(Duration.parse("PT151H34M23S"), model.tasksList().get(0).duration()); + Assertions.assertEquals("rdfjmzsyzfhotl", model.tasksList().get(0).status()); + Assertions.assertEquals(0.29130527965174347D, model.tasksList().get(0).progressPercentage()); + Assertions.assertEquals("ychunsjlpjrtwszh", model.tasksList().get(0).taskExecutionDetails()); + Assertions.assertEquals("otjewlpxuzzjgnre", model.propertyBag().get("qyhqo")); + Assertions.assertEquals("hiqakydiwfbrk", model.internalPropertyBag().get("pzdqtvhcspod")); + Assertions.assertEquals(87.99951052496706D, model.progressPercentage()); + Assertions.assertEquals("rvkmjcwmjvlgfggc", model.estimatedRemainingDuration()); + Assertions.assertEquals("yylizrz", model.dynamicErrorMessage()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmJobTaskDetailsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmJobTaskDetailsTests.java index 79138e4c9d5c..810794218ac8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmJobTaskDetailsTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmJobTaskDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,36 +14,15 @@ public final class AzureIaaSvmJobTaskDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureIaaSvmJobTaskDetails model = BinaryData.fromString( - "{\"taskId\":\"nizshqvcim\",\"startTime\":\"2021-12-04T05:53:02Z\",\"endTime\":\"2021-02-23T02:47:27Z\",\"instanceId\":\"b\",\"duration\":\"PT19H5M11S\",\"status\":\"lbywdxsm\",\"progressPercentage\":31.605477205960717,\"taskExecutionDetails\":\"wfscjfn\"}") + "{\"taskId\":\"psfxsf\",\"startTime\":\"2021-06-27T03:41:35Z\",\"endTime\":\"2021-07-16T14:55:45Z\",\"instanceId\":\"mvagbwidqlvhuko\",\"duration\":\"PT100H15M24S\",\"status\":\"i\",\"progressPercentage\":21.16068549152601,\"taskExecutionDetails\":\"nmjmvlwyzgiblk\"}") .toObject(AzureIaaSvmJobTaskDetails.class); - Assertions.assertEquals("nizshqvcim", model.taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-04T05:53:02Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-23T02:47:27Z"), model.endTime()); - Assertions.assertEquals("b", model.instanceId()); - Assertions.assertEquals(Duration.parse("PT19H5M11S"), model.duration()); - Assertions.assertEquals("lbywdxsm", model.status()); - Assertions.assertEquals(31.605477205960717D, model.progressPercentage()); - Assertions.assertEquals("wfscjfn", model.taskExecutionDetails()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureIaaSvmJobTaskDetails model = new AzureIaaSvmJobTaskDetails().withTaskId("nizshqvcim") - .withStartTime(OffsetDateTime.parse("2021-12-04T05:53:02Z")) - .withEndTime(OffsetDateTime.parse("2021-02-23T02:47:27Z")) - .withInstanceId("b") - .withDuration(Duration.parse("PT19H5M11S")) - .withStatus("lbywdxsm") - .withProgressPercentage(31.605477205960717D) - .withTaskExecutionDetails("wfscjfn"); - model = BinaryData.fromObject(model).toObject(AzureIaaSvmJobTaskDetails.class); - Assertions.assertEquals("nizshqvcim", model.taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-04T05:53:02Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-23T02:47:27Z"), model.endTime()); - Assertions.assertEquals("b", model.instanceId()); - Assertions.assertEquals(Duration.parse("PT19H5M11S"), model.duration()); - Assertions.assertEquals("lbywdxsm", model.status()); - Assertions.assertEquals(31.605477205960717D, model.progressPercentage()); - Assertions.assertEquals("wfscjfn", model.taskExecutionDetails()); + Assertions.assertEquals("psfxsf", model.taskId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-27T03:41:35Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-16T14:55:45Z"), model.endTime()); + Assertions.assertEquals("mvagbwidqlvhuko", model.instanceId()); + Assertions.assertEquals(Duration.parse("PT100H15M24S"), model.duration()); + Assertions.assertEquals("i", model.status()); + Assertions.assertEquals(21.16068549152601D, model.progressPercentage()); + Assertions.assertEquals("nmjmvlwyzgiblk", model.taskExecutionDetails()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmProtectedItemExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmProtectedItemExtendedInfoTests.java index a82cb31bdd62..fcfd5e836305 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmProtectedItemExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmProtectedItemExtendedInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,31 +13,31 @@ public final class AzureIaaSvmProtectedItemExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureIaaSvmProtectedItemExtendedInfo model = BinaryData.fromString( - "{\"oldestRecoveryPoint\":\"2021-12-08T10:15:59Z\",\"oldestRecoveryPointInVault\":\"2021-11-06T19:48:56Z\",\"oldestRecoveryPointInArchive\":\"2021-05-31T02:13:42Z\",\"newestRecoveryPointInArchive\":\"2021-02-14T17:29:05Z\",\"recoveryPointCount\":1921546293,\"policyInconsistent\":false}") + "{\"oldestRecoveryPoint\":\"2021-11-16T19:25:53Z\",\"oldestRecoveryPointInVault\":\"2021-03-24T05:32:31Z\",\"oldestRecoveryPointInArchive\":\"2021-03-06T13:07:05Z\",\"newestRecoveryPointInArchive\":\"2020-12-22T21:08:32Z\",\"recoveryPointCount\":678602064,\"policyInconsistent\":true}") .toObject(AzureIaaSvmProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-08T10:15:59Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-06T19:48:56Z"), model.oldestRecoveryPointInVault()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-31T02:13:42Z"), model.oldestRecoveryPointInArchive()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-14T17:29:05Z"), model.newestRecoveryPointInArchive()); - Assertions.assertEquals(1921546293, model.recoveryPointCount()); - Assertions.assertEquals(false, model.policyInconsistent()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-16T19:25:53Z"), model.oldestRecoveryPoint()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-24T05:32:31Z"), model.oldestRecoveryPointInVault()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-06T13:07:05Z"), model.oldestRecoveryPointInArchive()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-22T21:08:32Z"), model.newestRecoveryPointInArchive()); + Assertions.assertEquals(678602064, model.recoveryPointCount()); + Assertions.assertTrue(model.policyInconsistent()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureIaaSvmProtectedItemExtendedInfo model = new AzureIaaSvmProtectedItemExtendedInfo() - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-12-08T10:15:59Z")) - .withOldestRecoveryPointInVault(OffsetDateTime.parse("2021-11-06T19:48:56Z")) - .withOldestRecoveryPointInArchive(OffsetDateTime.parse("2021-05-31T02:13:42Z")) - .withNewestRecoveryPointInArchive(OffsetDateTime.parse("2021-02-14T17:29:05Z")) - .withRecoveryPointCount(1921546293) - .withPolicyInconsistent(false); + .withOldestRecoveryPoint(OffsetDateTime.parse("2021-11-16T19:25:53Z")) + .withOldestRecoveryPointInVault(OffsetDateTime.parse("2021-03-24T05:32:31Z")) + .withOldestRecoveryPointInArchive(OffsetDateTime.parse("2021-03-06T13:07:05Z")) + .withNewestRecoveryPointInArchive(OffsetDateTime.parse("2020-12-22T21:08:32Z")) + .withRecoveryPointCount(678602064) + .withPolicyInconsistent(true); model = BinaryData.fromObject(model).toObject(AzureIaaSvmProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-08T10:15:59Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-06T19:48:56Z"), model.oldestRecoveryPointInVault()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-31T02:13:42Z"), model.oldestRecoveryPointInArchive()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-14T17:29:05Z"), model.newestRecoveryPointInArchive()); - Assertions.assertEquals(1921546293, model.recoveryPointCount()); - Assertions.assertEquals(false, model.policyInconsistent()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-16T19:25:53Z"), model.oldestRecoveryPoint()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-24T05:32:31Z"), model.oldestRecoveryPointInVault()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-06T13:07:05Z"), model.oldestRecoveryPointInArchive()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-22T21:08:32Z"), model.newestRecoveryPointInArchive()); + Assertions.assertEquals(678602064, model.recoveryPointCount()); + Assertions.assertTrue(model.policyInconsistent()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmProtectionPolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmProtectionPolicyTests.java index 532036c53a72..5e79d70f78de 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmProtectionPolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmProtectionPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -23,52 +23,50 @@ public final class AzureIaaSvmProtectionPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureIaaSvmProtectionPolicy model = BinaryData.fromString( - "{\"backupManagementType\":\"AzureIaasVM\",\"instantRPDetails\":{\"azureBackupRGNamePrefix\":\"yo\",\"azureBackupRGNameSuffix\":\"blgyavutpthj\"},\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{\"iml\":{\"tieringMode\":\"Invalid\",\"duration\":1828523289,\"durationType\":\"Invalid\"},\"gxxlxsffgcvizq\":{\"tieringMode\":\"TierAfter\",\"duration\":1639942247,\"durationType\":\"Weeks\"}},\"instantRpRetentionRangeInDays\":514804559,\"timeZone\":\"vwlyoup\",\"policyType\":\"V1\",\"snapshotConsistencyType\":\"OnlyCrashConsistent\",\"protectedItemsCount\":1781890675,\"resourceGuardOperationRequests\":[\"yhgk\",\"minsgowzf\",\"tsttktlahbq\"]}") + "{\"backupManagementType\":\"AzureIaasVM\",\"instantRPDetails\":{\"azureBackupRGNamePrefix\":\"hkpigqfusuckzmkw\",\"azureBackupRGNameSuffix\":\"snoxaxmqeqa\"},\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{\"ynfsvkhgbvqtan\":{\"tieringMode\":\"TierRecommended\",\"duration\":273714552,\"durationType\":\"Days\"}},\"instantRpRetentionRangeInDays\":439727663,\"timeZone\":\"lpu\",\"policyType\":\"Invalid\",\"snapshotConsistencyType\":\"OnlyCrashConsistent\",\"protectedItemsCount\":1532018074,\"resourceGuardOperationRequests\":[\"jcpeogkhnmg\",\"ro\"]}") .toObject(AzureIaaSvmProtectionPolicy.class); - Assertions.assertEquals(1781890675, model.protectedItemsCount()); - Assertions.assertEquals("yhgk", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("yo", model.instantRPDetails().azureBackupRGNamePrefix()); - Assertions.assertEquals("blgyavutpthj", model.instantRPDetails().azureBackupRGNameSuffix()); - Assertions.assertEquals(TieringMode.INVALID, model.tieringPolicy().get("iml").tieringMode()); - Assertions.assertEquals(1828523289, model.tieringPolicy().get("iml").duration()); - Assertions.assertEquals(RetentionDurationType.INVALID, model.tieringPolicy().get("iml").durationType()); - Assertions.assertEquals(514804559, model.instantRpRetentionRangeInDays()); - Assertions.assertEquals("vwlyoup", model.timeZone()); - Assertions.assertEquals(IaasvmPolicyType.V1, model.policyType()); + Assertions.assertEquals(1532018074, model.protectedItemsCount()); + Assertions.assertEquals("jcpeogkhnmg", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("hkpigqfusuckzmkw", model.instantRPDetails().azureBackupRGNamePrefix()); + Assertions.assertEquals("snoxaxmqeqa", model.instantRPDetails().azureBackupRGNameSuffix()); + Assertions.assertEquals(TieringMode.TIER_RECOMMENDED, + model.tieringPolicy().get("ynfsvkhgbvqtan").tieringMode()); + Assertions.assertEquals(273714552, model.tieringPolicy().get("ynfsvkhgbvqtan").duration()); + Assertions.assertEquals(RetentionDurationType.DAYS, model.tieringPolicy().get("ynfsvkhgbvqtan").durationType()); + Assertions.assertEquals(439727663, model.instantRpRetentionRangeInDays()); + Assertions.assertEquals("lpu", model.timeZone()); + Assertions.assertEquals(IaasvmPolicyType.INVALID, model.policyType()); Assertions.assertEquals(IaasVMSnapshotConsistencyType.ONLY_CRASH_CONSISTENT, model.snapshotConsistencyType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureIaaSvmProtectionPolicy model = new AzureIaaSvmProtectionPolicy().withProtectedItemsCount(1781890675) - .withResourceGuardOperationRequests(Arrays.asList("yhgk", "minsgowzf", "tsttktlahbq")) - .withInstantRPDetails(new InstantRPAdditionalDetails().withAzureBackupRGNamePrefix("yo") - .withAzureBackupRGNameSuffix("blgyavutpthj")) + AzureIaaSvmProtectionPolicy model = new AzureIaaSvmProtectionPolicy().withProtectedItemsCount(1532018074) + .withResourceGuardOperationRequests(Arrays.asList("jcpeogkhnmg", "ro")) + .withInstantRPDetails(new InstantRPAdditionalDetails().withAzureBackupRGNamePrefix("hkpigqfusuckzmkw") + .withAzureBackupRGNameSuffix("snoxaxmqeqa")) .withSchedulePolicy(new SchedulePolicy()) .withRetentionPolicy(new RetentionPolicy()) - .withTieringPolicy(mapOf("iml", - new TieringPolicy().withTieringMode(TieringMode.INVALID) - .withDuration(1828523289) - .withDurationType(RetentionDurationType.INVALID), - "gxxlxsffgcvizq", - new TieringPolicy().withTieringMode(TieringMode.TIER_AFTER) - .withDuration(1639942247) - .withDurationType(RetentionDurationType.WEEKS))) - .withInstantRpRetentionRangeInDays(514804559) - .withTimeZone("vwlyoup") - .withPolicyType(IaasvmPolicyType.V1) + .withTieringPolicy(mapOf("ynfsvkhgbvqtan", + new TieringPolicy().withTieringMode(TieringMode.TIER_RECOMMENDED) + .withDuration(273714552) + .withDurationType(RetentionDurationType.DAYS))) + .withInstantRpRetentionRangeInDays(439727663) + .withTimeZone("lpu") + .withPolicyType(IaasvmPolicyType.INVALID) .withSnapshotConsistencyType(IaasVMSnapshotConsistencyType.ONLY_CRASH_CONSISTENT); model = BinaryData.fromObject(model).toObject(AzureIaaSvmProtectionPolicy.class); - Assertions.assertEquals(1781890675, model.protectedItemsCount()); - Assertions.assertEquals("yhgk", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("yo", model.instantRPDetails().azureBackupRGNamePrefix()); - Assertions.assertEquals("blgyavutpthj", model.instantRPDetails().azureBackupRGNameSuffix()); - Assertions.assertEquals(TieringMode.INVALID, model.tieringPolicy().get("iml").tieringMode()); - Assertions.assertEquals(1828523289, model.tieringPolicy().get("iml").duration()); - Assertions.assertEquals(RetentionDurationType.INVALID, model.tieringPolicy().get("iml").durationType()); - Assertions.assertEquals(514804559, model.instantRpRetentionRangeInDays()); - Assertions.assertEquals("vwlyoup", model.timeZone()); - Assertions.assertEquals(IaasvmPolicyType.V1, model.policyType()); + Assertions.assertEquals(1532018074, model.protectedItemsCount()); + Assertions.assertEquals("jcpeogkhnmg", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("hkpigqfusuckzmkw", model.instantRPDetails().azureBackupRGNamePrefix()); + Assertions.assertEquals("snoxaxmqeqa", model.instantRPDetails().azureBackupRGNameSuffix()); + Assertions.assertEquals(TieringMode.TIER_RECOMMENDED, + model.tieringPolicy().get("ynfsvkhgbvqtan").tieringMode()); + Assertions.assertEquals(273714552, model.tieringPolicy().get("ynfsvkhgbvqtan").duration()); + Assertions.assertEquals(RetentionDurationType.DAYS, model.tieringPolicy().get("ynfsvkhgbvqtan").durationType()); + Assertions.assertEquals(439727663, model.instantRpRetentionRangeInDays()); + Assertions.assertEquals("lpu", model.timeZone()); + Assertions.assertEquals(IaasvmPolicyType.INVALID, model.policyType()); Assertions.assertEquals(IaasVMSnapshotConsistencyType.ONLY_CRASH_CONSISTENT, model.snapshotConsistencyType()); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureRecoveryServiceVaultProtectionIntentTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureRecoveryServiceVaultProtectionIntentTests.java index 40f2071fe7dd..47b61fd1ee0e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureRecoveryServiceVaultProtectionIntentTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureRecoveryServiceVaultProtectionIntentTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,28 +14,28 @@ public final class AzureRecoveryServiceVaultProtectionIntentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureRecoveryServiceVaultProtectionIntent model = BinaryData.fromString( - "{\"protectionIntentItemType\":\"RecoveryServiceVaultItem\",\"backupManagementType\":\"Invalid\",\"sourceResourceId\":\"trekidswys\",\"itemId\":\"ruffgllukk\",\"policyId\":\"vlxhrpqhvmblc\",\"protectionState\":\"Protected\"}") + "{\"protectionIntentItemType\":\"RecoveryServiceVaultItem\",\"backupManagementType\":\"AzureIaasVM\",\"sourceResourceId\":\"uipldqq\",\"itemId\":\"ekvalblhtjq\",\"policyId\":\"yvwehtaemxh\",\"protectionState\":\"Invalid\"}") .toObject(AzureRecoveryServiceVaultProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.INVALID, model.backupManagementType()); - Assertions.assertEquals("trekidswys", model.sourceResourceId()); - Assertions.assertEquals("ruffgllukk", model.itemId()); - Assertions.assertEquals("vlxhrpqhvmblc", model.policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); + Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.backupManagementType()); + Assertions.assertEquals("uipldqq", model.sourceResourceId()); + Assertions.assertEquals("ekvalblhtjq", model.itemId()); + Assertions.assertEquals("yvwehtaemxh", model.policyId()); + Assertions.assertEquals(ProtectionStatus.INVALID, model.protectionState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureRecoveryServiceVaultProtectionIntent model - = new AzureRecoveryServiceVaultProtectionIntent().withBackupManagementType(BackupManagementType.INVALID) - .withSourceResourceId("trekidswys") - .withItemId("ruffgllukk") - .withPolicyId("vlxhrpqhvmblc") - .withProtectionState(ProtectionStatus.PROTECTED); + AzureRecoveryServiceVaultProtectionIntent model = new AzureRecoveryServiceVaultProtectionIntent() + .withBackupManagementType(BackupManagementType.AZURE_IAAS_VM) + .withSourceResourceId("uipldqq") + .withItemId("ekvalblhtjq") + .withPolicyId("yvwehtaemxh") + .withProtectionState(ProtectionStatus.INVALID); model = BinaryData.fromObject(model).toObject(AzureRecoveryServiceVaultProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.INVALID, model.backupManagementType()); - Assertions.assertEquals("trekidswys", model.sourceResourceId()); - Assertions.assertEquals("ruffgllukk", model.itemId()); - Assertions.assertEquals("vlxhrpqhvmblc", model.policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); + Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.backupManagementType()); + Assertions.assertEquals("uipldqq", model.sourceResourceId()); + Assertions.assertEquals("ekvalblhtjq", model.itemId()); + Assertions.assertEquals("yvwehtaemxh", model.policyId()); + Assertions.assertEquals(ProtectionStatus.INVALID, model.protectionState()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureResourceProtectionIntentTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureResourceProtectionIntentTests.java index a4d24cacf062..0e5181f3902c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureResourceProtectionIntentTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureResourceProtectionIntentTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,31 +14,31 @@ public final class AzureResourceProtectionIntentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureResourceProtectionIntent model = BinaryData.fromString( - "{\"protectionIntentItemType\":\"AzureResourceItem\",\"friendlyName\":\"hbh\",\"backupManagementType\":\"AzureBackupServer\",\"sourceResourceId\":\"ziryrandoy\",\"itemId\":\"blto\",\"policyId\":\"mkfqlwxldy\",\"protectionState\":\"Protected\"}") + "{\"protectionIntentItemType\":\"AzureResourceItem\",\"friendlyName\":\"smk\",\"backupManagementType\":\"MAB\",\"sourceResourceId\":\"bbaedorvvm\",\"itemId\":\"loyg\",\"policyId\":\"gwumgxdgdhpa\",\"protectionState\":\"Protecting\"}") .toObject(AzureResourceProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); - Assertions.assertEquals("ziryrandoy", model.sourceResourceId()); - Assertions.assertEquals("blto", model.itemId()); - Assertions.assertEquals("mkfqlwxldy", model.policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); - Assertions.assertEquals("hbh", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); + Assertions.assertEquals("bbaedorvvm", model.sourceResourceId()); + Assertions.assertEquals("loyg", model.itemId()); + Assertions.assertEquals("gwumgxdgdhpa", model.policyId()); + Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); + Assertions.assertEquals("smk", model.friendlyName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureResourceProtectionIntent model - = new AzureResourceProtectionIntent().withBackupManagementType(BackupManagementType.AZURE_BACKUP_SERVER) - .withSourceResourceId("ziryrandoy") - .withItemId("blto") - .withPolicyId("mkfqlwxldy") - .withProtectionState(ProtectionStatus.PROTECTED) - .withFriendlyName("hbh"); + = new AzureResourceProtectionIntent().withBackupManagementType(BackupManagementType.MAB) + .withSourceResourceId("bbaedorvvm") + .withItemId("loyg") + .withPolicyId("gwumgxdgdhpa") + .withProtectionState(ProtectionStatus.PROTECTING) + .withFriendlyName("smk"); model = BinaryData.fromObject(model).toObject(AzureResourceProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); - Assertions.assertEquals("ziryrandoy", model.sourceResourceId()); - Assertions.assertEquals("blto", model.itemId()); - Assertions.assertEquals("mkfqlwxldy", model.policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); - Assertions.assertEquals("hbh", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); + Assertions.assertEquals("bbaedorvvm", model.sourceResourceId()); + Assertions.assertEquals("loyg", model.itemId()); + Assertions.assertEquals("gwumgxdgdhpa", model.policyId()); + Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); + Assertions.assertEquals("smk", model.friendlyName()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlContainerTests.java index b4bfcd5b5baf..0f80795f03f8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlContainerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlContainerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,27 +13,27 @@ public final class AzureSqlContainerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureSqlContainer model = BinaryData.fromString( - "{\"containerType\":\"AzureSqlContainer\",\"friendlyName\":\"qqqagwwrxaomzi\",\"backupManagementType\":\"DefaultBackup\",\"registrationStatus\":\"rczezkhhlt\",\"healthStatus\":\"adhqoa\",\"protectableObjectType\":\"qoyueayfbpcmsplb\"}") + "{\"containerType\":\"AzureSqlContainer\",\"friendlyName\":\"ffgcvizqz\",\"backupManagementType\":\"MAB\",\"registrationStatus\":\"w\",\"healthStatus\":\"oupfgfb\",\"protectableObjectType\":\"ubdyhgk\"}") .toObject(AzureSqlContainer.class); - Assertions.assertEquals("qqqagwwrxaomzi", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); - Assertions.assertEquals("rczezkhhlt", model.registrationStatus()); - Assertions.assertEquals("adhqoa", model.healthStatus()); - Assertions.assertEquals("qoyueayfbpcmsplb", model.protectableObjectType()); + Assertions.assertEquals("ffgcvizqz", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); + Assertions.assertEquals("w", model.registrationStatus()); + Assertions.assertEquals("oupfgfb", model.healthStatus()); + Assertions.assertEquals("ubdyhgk", model.protectableObjectType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureSqlContainer model = new AzureSqlContainer().withFriendlyName("qqqagwwrxaomzi") - .withBackupManagementType(BackupManagementType.DEFAULT_BACKUP) - .withRegistrationStatus("rczezkhhlt") - .withHealthStatus("adhqoa") - .withProtectableObjectType("qoyueayfbpcmsplb"); + AzureSqlContainer model = new AzureSqlContainer().withFriendlyName("ffgcvizqz") + .withBackupManagementType(BackupManagementType.MAB) + .withRegistrationStatus("w") + .withHealthStatus("oupfgfb") + .withProtectableObjectType("ubdyhgk"); model = BinaryData.fromObject(model).toObject(AzureSqlContainer.class); - Assertions.assertEquals("qqqagwwrxaomzi", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); - Assertions.assertEquals("rczezkhhlt", model.registrationStatus()); - Assertions.assertEquals("adhqoa", model.healthStatus()); - Assertions.assertEquals("qoyueayfbpcmsplb", model.protectableObjectType()); + Assertions.assertEquals("ffgcvizqz", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); + Assertions.assertEquals("w", model.registrationStatus()); + Assertions.assertEquals("oupfgfb", model.healthStatus()); + Assertions.assertEquals("ubdyhgk", model.protectableObjectType()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlProtectedItemExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlProtectedItemExtendedInfoTests.java index 8ec6ac246a84..5968e322c98d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlProtectedItemExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlProtectedItemExtendedInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,22 +13,22 @@ public final class AzureSqlProtectedItemExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureSqlProtectedItemExtendedInfo model = BinaryData.fromString( - "{\"oldestRecoveryPoint\":\"2021-05-27T09:18:41Z\",\"recoveryPointCount\":704877183,\"policyState\":\"gstcyohpf\"}") + "{\"oldestRecoveryPoint\":\"2021-10-29T02:59:08Z\",\"recoveryPointCount\":61185346,\"policyState\":\"refovgmkqsleyyvx\"}") .toObject(AzureSqlProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-27T09:18:41Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(704877183, model.recoveryPointCount()); - Assertions.assertEquals("gstcyohpf", model.policyState()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-29T02:59:08Z"), model.oldestRecoveryPoint()); + Assertions.assertEquals(61185346, model.recoveryPointCount()); + Assertions.assertEquals("refovgmkqsleyyvx", model.policyState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureSqlProtectedItemExtendedInfo model = new AzureSqlProtectedItemExtendedInfo() - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-05-27T09:18:41Z")) - .withRecoveryPointCount(704877183) - .withPolicyState("gstcyohpf"); + .withOldestRecoveryPoint(OffsetDateTime.parse("2021-10-29T02:59:08Z")) + .withRecoveryPointCount(61185346) + .withPolicyState("refovgmkqsleyyvx"); model = BinaryData.fromObject(model).toObject(AzureSqlProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-27T09:18:41Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(704877183, model.recoveryPointCount()); - Assertions.assertEquals("gstcyohpf", model.policyState()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-29T02:59:08Z"), model.oldestRecoveryPoint()); + Assertions.assertEquals(61185346, model.recoveryPointCount()); + Assertions.assertEquals("refovgmkqsleyyvx", model.policyState()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlProtectedItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlProtectedItemTests.java index 113c83d8abe8..7c266da5c557 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlProtectedItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlProtectedItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,6 +9,9 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlProtectedItemExtendedInfo; import com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItemState; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanInfo; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanStatus; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanSummary; import java.time.OffsetDateTime; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -17,75 +20,82 @@ public final class AzureSqlProtectedItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureSqlProtectedItem model = BinaryData.fromString( - "{\"protectedItemType\":\"Microsoft.Sql/servers/databases\",\"protectedItemDataId\":\"hrnxrxc\",\"protectionState\":\"BackupsSuspended\",\"extendedInfo\":{\"oldestRecoveryPoint\":\"2021-04-05T16:50:28Z\",\"recoveryPointCount\":120876150,\"policyState\":\"qdzfvazivjlfrqtt\"},\"backupManagementType\":\"DefaultBackup\",\"workloadType\":\"VMwareVM\",\"containerName\":\"tnwxy\",\"sourceResourceId\":\"pidkqqfkuvscxkdm\",\"policyId\":\"govibrxkpmloazu\",\"lastRecoveryPoint\":\"2021-08-28T07:45:52Z\",\"backupSetName\":\"bgo\",\"createMode\":\"Recover\",\"deferredDeleteTimeInUTC\":\"2021-06-09T05:18:29Z\",\"isScheduledForDeferredDelete\":false,\"deferredDeleteTimeRemaining\":\"fhjxakvvjgs\",\"isDeferredDeleteScheduleUpcoming\":false,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"yw\",\"t\",\"gkxnyedabg\",\"vudtjuewbcihx\"],\"isArchiveEnabled\":false,\"policyName\":\"c\",\"softDeleteRetentionPeriodInDays\":2057414837,\"vaultId\":\"cybvpayakkudzpxg\"}") + "{\"protectedItemType\":\"Microsoft.Sql/servers/databases\",\"protectedItemDataId\":\"ltyfsop\",\"protectionState\":\"IRPending\",\"extendedInfo\":{\"oldestRecoveryPoint\":\"2020-12-22T21:06:46Z\",\"recoveryPointCount\":517935134,\"policyState\":\"dejbavo\"},\"backupManagementType\":\"DPM\",\"workloadType\":\"Exchange\",\"containerName\":\"hctbqvudwxdn\",\"sourceResourceId\":\"vo\",\"policyId\":\"ujjugwdkcglh\",\"lastRecoveryPoint\":\"2021-08-25T22:16:35Z\",\"backupSetName\":\"jdyggdtji\",\"createMode\":\"Recover\",\"deferredDeleteTimeInUTC\":\"2021-11-28T10:21:02Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"wey\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"fyexfwhy\",\"cibvyvdcsitynn\"],\"isArchiveEnabled\":true,\"policyName\":\"ectehf\",\"softDeleteRetentionPeriodInDays\":1860942440,\"vaultId\":\"jeyp\",\"sourceSideScanInfo\":{\"sourceSideScanStatus\":\"NotApplicable\",\"sourceSideScanSummary\":\"Suspicious\"}}") .toObject(AzureSqlProtectedItem.class); - Assertions.assertEquals("tnwxy", model.containerName()); - Assertions.assertEquals("pidkqqfkuvscxkdm", model.sourceResourceId()); - Assertions.assertEquals("govibrxkpmloazu", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-28T07:45:52Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("bgo", model.backupSetName()); + Assertions.assertEquals("hctbqvudwxdn", model.containerName()); + Assertions.assertEquals("vo", model.sourceResourceId()); + Assertions.assertEquals("ujjugwdkcglh", model.policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-25T22:16:35Z"), model.lastRecoveryPoint()); + Assertions.assertEquals("jdyggdtji", model.backupSetName()); Assertions.assertEquals(CreateMode.RECOVER, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T05:18:29Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("fhjxakvvjgs", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(false, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, model.isRehydrate()); - Assertions.assertEquals("yw", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.isArchiveEnabled()); - Assertions.assertEquals("c", model.policyName()); - Assertions.assertEquals(2057414837, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("hrnxrxc", model.protectedItemDataId()); - Assertions.assertEquals(ProtectedItemState.BACKUPS_SUSPENDED, model.protectionState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-05T16:50:28Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-11-28T10:21:02Z"), model.deferredDeleteTimeInUtc()); + Assertions.assertTrue(model.isScheduledForDeferredDelete()); + Assertions.assertEquals("wey", model.deferredDeleteTimeRemaining()); + Assertions.assertTrue(model.isDeferredDeleteScheduleUpcoming()); + Assertions.assertFalse(model.isRehydrate()); + Assertions.assertEquals("fyexfwhy", model.resourceGuardOperationRequests().get(0)); + Assertions.assertTrue(model.isArchiveEnabled()); + Assertions.assertEquals("ectehf", model.policyName()); + Assertions.assertEquals(1860942440, model.softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.NOT_APPLICABLE, model.sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.SUSPICIOUS, model.sourceSideScanInfo().sourceSideScanSummary()); + Assertions.assertEquals("ltyfsop", model.protectedItemDataId()); + Assertions.assertEquals(ProtectedItemState.IRPENDING, model.protectionState()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-22T21:06:46Z"), model.extendedInfo().oldestRecoveryPoint()); - Assertions.assertEquals(120876150, model.extendedInfo().recoveryPointCount()); - Assertions.assertEquals("qdzfvazivjlfrqtt", model.extendedInfo().policyState()); + Assertions.assertEquals(517935134, model.extendedInfo().recoveryPointCount()); + Assertions.assertEquals("dejbavo", model.extendedInfo().policyState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureSqlProtectedItem model = new AzureSqlProtectedItem().withContainerName("tnwxy") - .withSourceResourceId("pidkqqfkuvscxkdm") - .withPolicyId("govibrxkpmloazu") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-08-28T07:45:52Z")) - .withBackupSetName("bgo") + AzureSqlProtectedItem model = new AzureSqlProtectedItem().withContainerName("hctbqvudwxdn") + .withSourceResourceId("vo") + .withPolicyId("ujjugwdkcglh") + .withLastRecoveryPoint(OffsetDateTime.parse("2021-08-25T22:16:35Z")) + .withBackupSetName("jdyggdtji") .withCreateMode(CreateMode.RECOVER) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-06-09T05:18:29Z")) - .withIsScheduledForDeferredDelete(false) - .withDeferredDeleteTimeRemaining("fhjxakvvjgs") - .withIsDeferredDeleteScheduleUpcoming(false) + .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-11-28T10:21:02Z")) + .withIsScheduledForDeferredDelete(true) + .withDeferredDeleteTimeRemaining("wey") + .withIsDeferredDeleteScheduleUpcoming(true) .withIsRehydrate(false) - .withResourceGuardOperationRequests(Arrays.asList("yw", "t", "gkxnyedabg", "vudtjuewbcihx")) - .withIsArchiveEnabled(false) - .withPolicyName("c") - .withSoftDeleteRetentionPeriod(2057414837) - .withProtectedItemDataId("hrnxrxc") - .withProtectionState(ProtectedItemState.BACKUPS_SUSPENDED) + .withResourceGuardOperationRequests(Arrays.asList("fyexfwhy", "cibvyvdcsitynn")) + .withIsArchiveEnabled(true) + .withPolicyName("ectehf") + .withSoftDeleteRetentionPeriodInDays(1860942440) + .withSourceSideScanInfo( + new SourceSideScanInfo().withSourceSideScanStatus(SourceSideScanStatus.NOT_APPLICABLE) + .withSourceSideScanSummary(SourceSideScanSummary.SUSPICIOUS)) + .withProtectedItemDataId("ltyfsop") + .withProtectionState(ProtectedItemState.IRPENDING) .withExtendedInfo(new AzureSqlProtectedItemExtendedInfo() - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-04-05T16:50:28Z")) - .withRecoveryPointCount(120876150) - .withPolicyState("qdzfvazivjlfrqtt")); + .withOldestRecoveryPoint(OffsetDateTime.parse("2020-12-22T21:06:46Z")) + .withRecoveryPointCount(517935134) + .withPolicyState("dejbavo")); model = BinaryData.fromObject(model).toObject(AzureSqlProtectedItem.class); - Assertions.assertEquals("tnwxy", model.containerName()); - Assertions.assertEquals("pidkqqfkuvscxkdm", model.sourceResourceId()); - Assertions.assertEquals("govibrxkpmloazu", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-28T07:45:52Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("bgo", model.backupSetName()); + Assertions.assertEquals("hctbqvudwxdn", model.containerName()); + Assertions.assertEquals("vo", model.sourceResourceId()); + Assertions.assertEquals("ujjugwdkcglh", model.policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-25T22:16:35Z"), model.lastRecoveryPoint()); + Assertions.assertEquals("jdyggdtji", model.backupSetName()); Assertions.assertEquals(CreateMode.RECOVER, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T05:18:29Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("fhjxakvvjgs", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(false, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, model.isRehydrate()); - Assertions.assertEquals("yw", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.isArchiveEnabled()); - Assertions.assertEquals("c", model.policyName()); - Assertions.assertEquals(2057414837, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("hrnxrxc", model.protectedItemDataId()); - Assertions.assertEquals(ProtectedItemState.BACKUPS_SUSPENDED, model.protectionState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-05T16:50:28Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-11-28T10:21:02Z"), model.deferredDeleteTimeInUtc()); + Assertions.assertTrue(model.isScheduledForDeferredDelete()); + Assertions.assertEquals("wey", model.deferredDeleteTimeRemaining()); + Assertions.assertTrue(model.isDeferredDeleteScheduleUpcoming()); + Assertions.assertFalse(model.isRehydrate()); + Assertions.assertEquals("fyexfwhy", model.resourceGuardOperationRequests().get(0)); + Assertions.assertTrue(model.isArchiveEnabled()); + Assertions.assertEquals("ectehf", model.policyName()); + Assertions.assertEquals(1860942440, model.softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.NOT_APPLICABLE, model.sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.SUSPICIOUS, model.sourceSideScanInfo().sourceSideScanSummary()); + Assertions.assertEquals("ltyfsop", model.protectedItemDataId()); + Assertions.assertEquals(ProtectedItemState.IRPENDING, model.protectionState()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-22T21:06:46Z"), model.extendedInfo().oldestRecoveryPoint()); - Assertions.assertEquals(120876150, model.extendedInfo().recoveryPointCount()); - Assertions.assertEquals("qdzfvazivjlfrqtt", model.extendedInfo().policyState()); + Assertions.assertEquals(517935134, model.extendedInfo().recoveryPointCount()); + Assertions.assertEquals("dejbavo", model.extendedInfo().policyState()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlProtectionPolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlProtectionPolicyTests.java index 6a18c68d4d3c..bfc6c96cc142 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlProtectionPolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlProtectionPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,19 +14,19 @@ public final class AzureSqlProtectionPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureSqlProtectionPolicy model = BinaryData.fromString( - "{\"backupManagementType\":\"AzureSql\",\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"protectedItemsCount\":172770191,\"resourceGuardOperationRequests\":[\"iogsjkmnwq\",\"nobaiyhddviacegf\",\"m\",\"tfpmvmemfnczdw\"]}") + "{\"backupManagementType\":\"AzureSql\",\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"protectedItemsCount\":1181873760,\"resourceGuardOperationRequests\":[\"cnpqwteht\"]}") .toObject(AzureSqlProtectionPolicy.class); - Assertions.assertEquals(172770191, model.protectedItemsCount()); - Assertions.assertEquals("iogsjkmnwq", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(1181873760, model.protectedItemsCount()); + Assertions.assertEquals("cnpqwteht", model.resourceGuardOperationRequests().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureSqlProtectionPolicy model = new AzureSqlProtectionPolicy().withProtectedItemsCount(172770191) - .withResourceGuardOperationRequests(Arrays.asList("iogsjkmnwq", "nobaiyhddviacegf", "m", "tfpmvmemfnczdw")) + AzureSqlProtectionPolicy model = new AzureSqlProtectionPolicy().withProtectedItemsCount(1181873760) + .withResourceGuardOperationRequests(Arrays.asList("cnpqwteht")) .withRetentionPolicy(new RetentionPolicy()); model = BinaryData.fromObject(model).toObject(AzureSqlProtectionPolicy.class); - Assertions.assertEquals(172770191, model.protectedItemsCount()); - Assertions.assertEquals("iogsjkmnwq", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(1181873760, model.protectedItemsCount()); + Assertions.assertEquals("cnpqwteht", model.resourceGuardOperationRequests().get(0)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageContainerTests.java index 94930f024912..a36439223691 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageContainerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageContainerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -15,45 +15,45 @@ public final class AzureStorageContainerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureStorageContainer model = BinaryData.fromString( - "{\"containerType\":\"StorageContainer\",\"sourceResourceId\":\"rueqthwm\",\"storageAccountVersion\":\"mbscbbx\",\"resourceGroup\":\"dhxiidlopedbwd\",\"protectedItemCount\":7104137474906929796,\"acquireStorageAccountLock\":\"Acquire\",\"operationType\":\"Rehydrate\",\"friendlyName\":\"md\",\"backupManagementType\":\"DPM\",\"registrationStatus\":\"bqwremjela\",\"healthStatus\":\"cigeleohdbvqvw\",\"protectableObjectType\":\"jopwbeonrlkwz\"}") + "{\"containerType\":\"StorageContainer\",\"sourceResourceId\":\"in\",\"storageAccountVersion\":\"owzfttsttkt\",\"resourceGroup\":\"hbq\",\"protectedItemCount\":2084936073486724926,\"acquireStorageAccountLock\":\"NotAcquire\",\"operationType\":\"Register\",\"friendlyName\":\"xitmmqtgqqq\",\"backupManagementType\":\"DPM\",\"registrationStatus\":\"xrxc\",\"healthStatus\":\"uisavokq\",\"protectableObjectType\":\"fvazivjlfrqttba\"}") .toObject(AzureStorageContainer.class); - Assertions.assertEquals("md", model.friendlyName()); + Assertions.assertEquals("xitmmqtgqqq", model.friendlyName()); Assertions.assertEquals(BackupManagementType.DPM, model.backupManagementType()); - Assertions.assertEquals("bqwremjela", model.registrationStatus()); - Assertions.assertEquals("cigeleohdbvqvw", model.healthStatus()); - Assertions.assertEquals("jopwbeonrlkwz", model.protectableObjectType()); - Assertions.assertEquals("rueqthwm", model.sourceResourceId()); - Assertions.assertEquals("mbscbbx", model.storageAccountVersion()); - Assertions.assertEquals("dhxiidlopedbwd", model.resourceGroup()); - Assertions.assertEquals(7104137474906929796L, model.protectedItemCount()); - Assertions.assertEquals(AcquireStorageAccountLock.ACQUIRE, model.acquireStorageAccountLock()); - Assertions.assertEquals(OperationType.REHYDRATE, model.operationType()); + Assertions.assertEquals("xrxc", model.registrationStatus()); + Assertions.assertEquals("uisavokq", model.healthStatus()); + Assertions.assertEquals("fvazivjlfrqttba", model.protectableObjectType()); + Assertions.assertEquals("in", model.sourceResourceId()); + Assertions.assertEquals("owzfttsttkt", model.storageAccountVersion()); + Assertions.assertEquals("hbq", model.resourceGroup()); + Assertions.assertEquals(2084936073486724926L, model.protectedItemCount()); + Assertions.assertEquals(AcquireStorageAccountLock.NOT_ACQUIRE, model.acquireStorageAccountLock()); + Assertions.assertEquals(OperationType.REGISTER, model.operationType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureStorageContainer model = new AzureStorageContainer().withFriendlyName("md") + AzureStorageContainer model = new AzureStorageContainer().withFriendlyName("xitmmqtgqqq") .withBackupManagementType(BackupManagementType.DPM) - .withRegistrationStatus("bqwremjela") - .withHealthStatus("cigeleohdbvqvw") - .withProtectableObjectType("jopwbeonrlkwz") - .withSourceResourceId("rueqthwm") - .withStorageAccountVersion("mbscbbx") - .withResourceGroup("dhxiidlopedbwd") - .withProtectedItemCount(7104137474906929796L) - .withAcquireStorageAccountLock(AcquireStorageAccountLock.ACQUIRE) - .withOperationType(OperationType.REHYDRATE); + .withRegistrationStatus("xrxc") + .withHealthStatus("uisavokq") + .withProtectableObjectType("fvazivjlfrqttba") + .withSourceResourceId("in") + .withStorageAccountVersion("owzfttsttkt") + .withResourceGroup("hbq") + .withProtectedItemCount(2084936073486724926L) + .withAcquireStorageAccountLock(AcquireStorageAccountLock.NOT_ACQUIRE) + .withOperationType(OperationType.REGISTER); model = BinaryData.fromObject(model).toObject(AzureStorageContainer.class); - Assertions.assertEquals("md", model.friendlyName()); + Assertions.assertEquals("xitmmqtgqqq", model.friendlyName()); Assertions.assertEquals(BackupManagementType.DPM, model.backupManagementType()); - Assertions.assertEquals("bqwremjela", model.registrationStatus()); - Assertions.assertEquals("cigeleohdbvqvw", model.healthStatus()); - Assertions.assertEquals("jopwbeonrlkwz", model.protectableObjectType()); - Assertions.assertEquals("rueqthwm", model.sourceResourceId()); - Assertions.assertEquals("mbscbbx", model.storageAccountVersion()); - Assertions.assertEquals("dhxiidlopedbwd", model.resourceGroup()); - Assertions.assertEquals(7104137474906929796L, model.protectedItemCount()); - Assertions.assertEquals(AcquireStorageAccountLock.ACQUIRE, model.acquireStorageAccountLock()); - Assertions.assertEquals(OperationType.REHYDRATE, model.operationType()); + Assertions.assertEquals("xrxc", model.registrationStatus()); + Assertions.assertEquals("uisavokq", model.healthStatus()); + Assertions.assertEquals("fvazivjlfrqttba", model.protectableObjectType()); + Assertions.assertEquals("in", model.sourceResourceId()); + Assertions.assertEquals("owzfttsttkt", model.storageAccountVersion()); + Assertions.assertEquals("hbq", model.resourceGroup()); + Assertions.assertEquals(2084936073486724926L, model.protectedItemCount()); + Assertions.assertEquals(AcquireStorageAccountLock.NOT_ACQUIRE, model.acquireStorageAccountLock()); + Assertions.assertEquals(OperationType.REGISTER, model.operationType()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageJobExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageJobExtendedInfoTests.java index 79fd2a7d205e..1185a2bc65e6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageJobExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageJobExtendedInfoTests.java @@ -1,53 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageJobExtendedInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageJobTaskDetails; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class AzureStorageJobExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureStorageJobExtendedInfo model = BinaryData.fromString( - "{\"tasksList\":[{\"taskId\":\"zevwrdnhfukuv\",\"status\":\"cswsmystul\"}],\"propertyBag\":{\"babwidfcxss\":\"pfcvlerchpqbmfp\",\"i\":\"uunnoxyhkxgqdd\",\"djvlpj\":\"pfhoqcaaewdao\",\"msgeivsiykzk\":\"xkzb\"},\"dynamicErrorMessage\":\"cjdx\"}") + "{\"tasksList\":[{\"taskId\":\"uzk\",\"status\":\"qzolxrzvhqjw\"},{\"taskId\":\"htgv\",\"status\":\"pcrrk\"}],\"propertyBag\":{\"mjsmwr\":\"w\",\"jafi\":\"kcdxfzzzw\"},\"dynamicErrorMessage\":\"hguynuchlgmltxdw\"}") .toObject(AzureStorageJobExtendedInfo.class); - Assertions.assertEquals("zevwrdnhfukuv", model.tasksList().get(0).taskId()); - Assertions.assertEquals("cswsmystul", model.tasksList().get(0).status()); - Assertions.assertEquals("pfcvlerchpqbmfp", model.propertyBag().get("babwidfcxss")); - Assertions.assertEquals("cjdx", model.dynamicErrorMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStorageJobExtendedInfo model = new AzureStorageJobExtendedInfo() - .withTasksList( - Arrays.asList(new AzureStorageJobTaskDetails().withTaskId("zevwrdnhfukuv").withStatus("cswsmystul"))) - .withPropertyBag(mapOf("babwidfcxss", "pfcvlerchpqbmfp", "i", "uunnoxyhkxgqdd", "djvlpj", "pfhoqcaaewdao", - "msgeivsiykzk", "xkzb")) - .withDynamicErrorMessage("cjdx"); - model = BinaryData.fromObject(model).toObject(AzureStorageJobExtendedInfo.class); - Assertions.assertEquals("zevwrdnhfukuv", model.tasksList().get(0).taskId()); - Assertions.assertEquals("cswsmystul", model.tasksList().get(0).status()); - Assertions.assertEquals("pfcvlerchpqbmfp", model.propertyBag().get("babwidfcxss")); - Assertions.assertEquals("cjdx", model.dynamicErrorMessage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("uzk", model.tasksList().get(0).taskId()); + Assertions.assertEquals("qzolxrzvhqjw", model.tasksList().get(0).status()); + Assertions.assertEquals("w", model.propertyBag().get("mjsmwr")); + Assertions.assertEquals("hguynuchlgmltxdw", model.dynamicErrorMessage()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageJobTaskDetailsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageJobTaskDetailsTests.java index a936134a7c8c..2b7ec4c67684 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageJobTaskDetailsTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageJobTaskDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,18 +11,9 @@ public final class AzureStorageJobTaskDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AzureStorageJobTaskDetails model = BinaryData.fromString("{\"taskId\":\"bzo\",\"status\":\"culapzwyrpgogtq\"}") + AzureStorageJobTaskDetails model = BinaryData.fromString("{\"taskId\":\"ozusgz\",\"status\":\"ns\"}") .toObject(AzureStorageJobTaskDetails.class); - Assertions.assertEquals("bzo", model.taskId()); - Assertions.assertEquals("culapzwyrpgogtq", model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStorageJobTaskDetails model - = new AzureStorageJobTaskDetails().withTaskId("bzo").withStatus("culapzwyrpgogtq"); - model = BinaryData.fromObject(model).toObject(AzureStorageJobTaskDetails.class); - Assertions.assertEquals("bzo", model.taskId()); - Assertions.assertEquals("culapzwyrpgogtq", model.status()); + Assertions.assertEquals("ozusgz", model.taskId()); + Assertions.assertEquals("ns", model.status()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageProtectableContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageProtectableContainerTests.java index 1131492dc848..a0b2355ee538 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageProtectableContainerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageProtectableContainerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,24 +13,11 @@ public final class AzureStorageProtectableContainerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureStorageProtectableContainer model = BinaryData.fromString( - "{\"protectableContainerType\":\"StorageContainer\",\"friendlyName\":\"ybxc\",\"backupManagementType\":\"Invalid\",\"healthStatus\":\"cptsoqfyiase\",\"containerId\":\"hkrttzrazis\"}") + "{\"protectableContainerType\":\"StorageContainer\",\"friendlyName\":\"rmcqmiciijqpkz\",\"backupManagementType\":\"MAB\",\"healthStatus\":\"xjmcsmyqwixvcpw\",\"containerId\":\"wy\"}") .toObject(AzureStorageProtectableContainer.class); - Assertions.assertEquals("ybxc", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.INVALID, model.backupManagementType()); - Assertions.assertEquals("cptsoqfyiase", model.healthStatus()); - Assertions.assertEquals("hkrttzrazis", model.containerId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStorageProtectableContainer model = new AzureStorageProtectableContainer().withFriendlyName("ybxc") - .withBackupManagementType(BackupManagementType.INVALID) - .withHealthStatus("cptsoqfyiase") - .withContainerId("hkrttzrazis"); - model = BinaryData.fromObject(model).toObject(AzureStorageProtectableContainer.class); - Assertions.assertEquals("ybxc", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.INVALID, model.backupManagementType()); - Assertions.assertEquals("cptsoqfyiase", model.healthStatus()); - Assertions.assertEquals("hkrttzrazis", model.containerId()); + Assertions.assertEquals("rmcqmiciijqpkz", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); + Assertions.assertEquals("xjmcsmyqwixvcpw", model.healthStatus()); + Assertions.assertEquals("wy", model.containerId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMAppContainerProtectableContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMAppContainerProtectableContainerTests.java index 98e0aab959a1..b9f4eb4c512f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMAppContainerProtectableContainerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMAppContainerProtectableContainerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,25 +13,11 @@ public final class AzureVMAppContainerProtectableContainerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureVMAppContainerProtectableContainer model = BinaryData.fromString( - "{\"protectableContainerType\":\"VMAppContainer\",\"friendlyName\":\"kiuemv\",\"backupManagementType\":\"AzureSql\",\"healthStatus\":\"zohmnrxxbs\",\"containerId\":\"klinhmdptysprq\"}") + "{\"protectableContainerType\":\"VMAppContainer\",\"friendlyName\":\"wofali\",\"backupManagementType\":\"DefaultBackup\",\"healthStatus\":\"oiqtamtyvskn\",\"containerId\":\"wzawnvsbcfhzagxn\"}") .toObject(AzureVMAppContainerProtectableContainer.class); - Assertions.assertEquals("kiuemv", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_SQL, model.backupManagementType()); - Assertions.assertEquals("zohmnrxxbs", model.healthStatus()); - Assertions.assertEquals("klinhmdptysprq", model.containerId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureVMAppContainerProtectableContainer model - = new AzureVMAppContainerProtectableContainer().withFriendlyName("kiuemv") - .withBackupManagementType(BackupManagementType.AZURE_SQL) - .withHealthStatus("zohmnrxxbs") - .withContainerId("klinhmdptysprq"); - model = BinaryData.fromObject(model).toObject(AzureVMAppContainerProtectableContainer.class); - Assertions.assertEquals("kiuemv", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_SQL, model.backupManagementType()); - Assertions.assertEquals("zohmnrxxbs", model.healthStatus()); - Assertions.assertEquals("klinhmdptysprq", model.containerId()); + Assertions.assertEquals("wofali", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); + Assertions.assertEquals("oiqtamtyvskn", model.healthStatus()); + Assertions.assertEquals("wzawnvsbcfhzagxn", model.containerId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMResourceFeatureSupportRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMResourceFeatureSupportRequestTests.java index 03498c57cdf0..4e0b71e4f629 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMResourceFeatureSupportRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMResourceFeatureSupportRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,19 +12,18 @@ public final class AzureVMResourceFeatureSupportRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureVMResourceFeatureSupportRequest model = BinaryData - .fromString( - "{\"featureType\":\"AzureVMResourceBackup\",\"vmSize\":\"ygaolnjpnnb\",\"vmSku\":\"ksibjgsjjxx\"}") + .fromString("{\"featureType\":\"AzureVMResourceBackup\",\"vmSize\":\"bsizus\",\"vmSku\":\"zlbscmnlziji\"}") .toObject(AzureVMResourceFeatureSupportRequest.class); - Assertions.assertEquals("ygaolnjpnnb", model.vmSize()); - Assertions.assertEquals("ksibjgsjjxx", model.vmSku()); + Assertions.assertEquals("bsizus", model.vmSize()); + Assertions.assertEquals("zlbscmnlziji", model.vmSku()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureVMResourceFeatureSupportRequest model - = new AzureVMResourceFeatureSupportRequest().withVmSize("ygaolnjpnnb").withVmSku("ksibjgsjjxx"); + = new AzureVMResourceFeatureSupportRequest().withVmSize("bsizus").withVmSku("zlbscmnlziji"); model = BinaryData.fromObject(model).toObject(AzureVMResourceFeatureSupportRequest.class); - Assertions.assertEquals("ygaolnjpnnb", model.vmSize()); - Assertions.assertEquals("ksibjgsjjxx", model.vmSku()); + Assertions.assertEquals("bsizus", model.vmSize()); + Assertions.assertEquals("zlbscmnlziji", model.vmSku()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMResourceFeatureSupportResponseInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMResourceFeatureSupportResponseInnerTests.java index ed590ec67ccb..b9b5445052d7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMResourceFeatureSupportResponseInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMResourceFeatureSupportResponseInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,16 +12,8 @@ public final class AzureVMResourceFeatureSupportResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AzureVMResourceFeatureSupportResponseInner model = BinaryData.fromString("{\"supportStatus\":\"DefaultOFF\"}") + AzureVMResourceFeatureSupportResponseInner model = BinaryData.fromString("{\"supportStatus\":\"NotSupported\"}") .toObject(AzureVMResourceFeatureSupportResponseInner.class); - Assertions.assertEquals(SupportStatus.DEFAULT_OFF, model.supportStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureVMResourceFeatureSupportResponseInner model - = new AzureVMResourceFeatureSupportResponseInner().withSupportStatus(SupportStatus.DEFAULT_OFF); - model = BinaryData.fromObject(model).toObject(AzureVMResourceFeatureSupportResponseInner.class); - Assertions.assertEquals(SupportStatus.DEFAULT_OFF, model.supportStatus()); + Assertions.assertEquals(SupportStatus.NOT_SUPPORTED, model.supportStatus()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadItemTests.java index ff307b4ef25d..c49cb022450c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,39 +13,16 @@ public final class AzureVmWorkloadItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureVmWorkloadItem model = BinaryData.fromString( - "{\"workloadItemType\":\"AzureVmWorkloadItem\",\"parentName\":\"bcawetz\",\"serverName\":\"dtjwfljhznamt\",\"isAutoProtectable\":false,\"subinquireditemcount\":510933333,\"subWorkloadItemCount\":1222277856,\"backupManagementType\":\"jncqtjzmi\",\"workloadType\":\"gbgatzuuvbxn\",\"friendlyName\":\"ebwgga\",\"protectionState\":\"NotProtected\"}") + "{\"workloadItemType\":\"AzureVmWorkloadItem\",\"parentName\":\"ojocqwogf\",\"serverName\":\"jvusfzldmozux\",\"isAutoProtectable\":false,\"subinquireditemcount\":2142846069,\"subWorkloadItemCount\":233477103,\"backupManagementType\":\"dp\",\"workloadType\":\"own\",\"friendlyName\":\"gkbugrjqct\",\"protectionState\":\"ProtectionFailed\"}") .toObject(AzureVmWorkloadItem.class); - Assertions.assertEquals("jncqtjzmi", model.backupManagementType()); - Assertions.assertEquals("gbgatzuuvbxn", model.workloadType()); - Assertions.assertEquals("ebwgga", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.protectionState()); - Assertions.assertEquals("bcawetz", model.parentName()); - Assertions.assertEquals("dtjwfljhznamt", model.serverName()); - Assertions.assertEquals(false, model.isAutoProtectable()); - Assertions.assertEquals(510933333, model.subinquireditemcount()); - Assertions.assertEquals(1222277856, model.subWorkloadItemCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureVmWorkloadItem model = new AzureVmWorkloadItem().withBackupManagementType("jncqtjzmi") - .withWorkloadType("gbgatzuuvbxn") - .withFriendlyName("ebwgga") - .withProtectionState(ProtectionStatus.NOT_PROTECTED) - .withParentName("bcawetz") - .withServerName("dtjwfljhznamt") - .withIsAutoProtectable(false) - .withSubinquireditemcount(510933333) - .withSubWorkloadItemCount(1222277856); - model = BinaryData.fromObject(model).toObject(AzureVmWorkloadItem.class); - Assertions.assertEquals("jncqtjzmi", model.backupManagementType()); - Assertions.assertEquals("gbgatzuuvbxn", model.workloadType()); - Assertions.assertEquals("ebwgga", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.protectionState()); - Assertions.assertEquals("bcawetz", model.parentName()); - Assertions.assertEquals("dtjwfljhznamt", model.serverName()); - Assertions.assertEquals(false, model.isAutoProtectable()); - Assertions.assertEquals(510933333, model.subinquireditemcount()); - Assertions.assertEquals(1222277856, model.subWorkloadItemCount()); + Assertions.assertEquals("dp", model.backupManagementType()); + Assertions.assertEquals("own", model.workloadType()); + Assertions.assertEquals("gkbugrjqct", model.friendlyName()); + Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); + Assertions.assertEquals("ojocqwogf", model.parentName()); + Assertions.assertEquals("jvusfzldmozux", model.serverName()); + Assertions.assertFalse(model.isAutoProtectable()); + Assertions.assertEquals(2142846069, model.subinquireditemcount()); + Assertions.assertEquals(233477103, model.subWorkloadItemCount()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadProtectedItemExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadProtectedItemExtendedInfoTests.java index 6eb9f38dbe00..f761bb073520 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadProtectedItemExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadProtectedItemExtendedInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,34 +13,34 @@ public final class AzureVmWorkloadProtectedItemExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureVmWorkloadProtectedItemExtendedInfo model = BinaryData.fromString( - "{\"oldestRecoveryPoint\":\"2021-05-13T09:41:29Z\",\"oldestRecoveryPointInVault\":\"2021-08-22T06:33:45Z\",\"oldestRecoveryPointInArchive\":\"2021-11-15T01:45:03Z\",\"newestRecoveryPointInArchive\":\"2021-11-04T00:11:34Z\",\"recoveryPointCount\":900352978,\"policyState\":\"kdmflvestmjlx\",\"recoveryModel\":\"ilozapeewchpxlk\"}") + "{\"oldestRecoveryPoint\":\"2021-08-11T20:32:50Z\",\"oldestRecoveryPointInVault\":\"2021-09-21T08:55:02Z\",\"oldestRecoveryPointInArchive\":\"2021-05-17T00:15:40Z\",\"newestRecoveryPointInArchive\":\"2021-08-21T06:29:15Z\",\"recoveryPointCount\":691407592,\"policyState\":\"bin\",\"recoveryModel\":\"pu\"}") .toObject(AzureVmWorkloadProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-13T09:41:29Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-22T06:33:45Z"), model.oldestRecoveryPointInVault()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-15T01:45:03Z"), model.oldestRecoveryPointInArchive()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-04T00:11:34Z"), model.newestRecoveryPointInArchive()); - Assertions.assertEquals(900352978, model.recoveryPointCount()); - Assertions.assertEquals("kdmflvestmjlx", model.policyState()); - Assertions.assertEquals("ilozapeewchpxlk", model.recoveryModel()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-11T20:32:50Z"), model.oldestRecoveryPoint()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-21T08:55:02Z"), model.oldestRecoveryPointInVault()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-17T00:15:40Z"), model.oldestRecoveryPointInArchive()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-21T06:29:15Z"), model.newestRecoveryPointInArchive()); + Assertions.assertEquals(691407592, model.recoveryPointCount()); + Assertions.assertEquals("bin", model.policyState()); + Assertions.assertEquals("pu", model.recoveryModel()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureVmWorkloadProtectedItemExtendedInfo model = new AzureVmWorkloadProtectedItemExtendedInfo() - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-05-13T09:41:29Z")) - .withOldestRecoveryPointInVault(OffsetDateTime.parse("2021-08-22T06:33:45Z")) - .withOldestRecoveryPointInArchive(OffsetDateTime.parse("2021-11-15T01:45:03Z")) - .withNewestRecoveryPointInArchive(OffsetDateTime.parse("2021-11-04T00:11:34Z")) - .withRecoveryPointCount(900352978) - .withPolicyState("kdmflvestmjlx") - .withRecoveryModel("ilozapeewchpxlk"); + .withOldestRecoveryPoint(OffsetDateTime.parse("2021-08-11T20:32:50Z")) + .withOldestRecoveryPointInVault(OffsetDateTime.parse("2021-09-21T08:55:02Z")) + .withOldestRecoveryPointInArchive(OffsetDateTime.parse("2021-05-17T00:15:40Z")) + .withNewestRecoveryPointInArchive(OffsetDateTime.parse("2021-08-21T06:29:15Z")) + .withRecoveryPointCount(691407592) + .withPolicyState("bin") + .withRecoveryModel("pu"); model = BinaryData.fromObject(model).toObject(AzureVmWorkloadProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-13T09:41:29Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-22T06:33:45Z"), model.oldestRecoveryPointInVault()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-15T01:45:03Z"), model.oldestRecoveryPointInArchive()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-04T00:11:34Z"), model.newestRecoveryPointInArchive()); - Assertions.assertEquals(900352978, model.recoveryPointCount()); - Assertions.assertEquals("kdmflvestmjlx", model.policyState()); - Assertions.assertEquals("ilozapeewchpxlk", model.recoveryModel()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-11T20:32:50Z"), model.oldestRecoveryPoint()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-21T08:55:02Z"), model.oldestRecoveryPointInVault()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-17T00:15:40Z"), model.oldestRecoveryPointInArchive()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-21T06:29:15Z"), model.newestRecoveryPointInArchive()); + Assertions.assertEquals(691407592, model.recoveryPointCount()); + Assertions.assertEquals("bin", model.policyState()); + Assertions.assertEquals("pu", model.recoveryModel()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadProtectionPolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadProtectionPolicyTests.java index e8895328598d..d3eddfa83421 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadProtectionPolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadProtectionPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -17,6 +17,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.TieringPolicy; import com.azure.resourcemanager.recoveryservicesbackup.models.UserAssignedIdentityProperties; import com.azure.resourcemanager.recoveryservicesbackup.models.UserAssignedManagedIdentityDetails; +import com.azure.resourcemanager.recoveryservicesbackup.models.VMWorkloadPolicyType; import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadType; import java.util.Arrays; import java.util.HashMap; @@ -27,125 +28,193 @@ public final class AzureVmWorkloadProtectionPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureVmWorkloadProtectionPolicy model = BinaryData.fromString( - "{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"AzureSqlDb\",\"settings\":{\"timeZone\":\"n\",\"issqlcompression\":true,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"SnapshotCopyOnlyFull\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{\"izjx\":{\"tieringMode\":\"TierRecommended\",\"duration\":37072566,\"durationType\":\"Weeks\"},\"cvlhv\":{\"tieringMode\":\"TierRecommended\",\"duration\":843222419,\"durationType\":\"Days\"}},\"snapshotBackupAdditionalDetails\":{\"instantRpRetentionRangeInDays\":370516258,\"instantRPDetails\":\"t\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"twnawjslbiwkojgc\",\"identityName\":\"tsf\",\"userAssignedIdentityProperties\":{\"clientId\":\"baeqphc\",\"principalId\":\"nrnrp\"}}}}],\"makePolicyConsistent\":true,\"protectedItemsCount\":1909534369,\"resourceGuardOperationRequests\":[\"k\",\"gaifmvik\",\"bydvkhbejdz\"]}") + "{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SystemState\",\"vmWorkloadPolicyType\":\"SnapshotV1\",\"settings\":{\"timeZone\":\"sgmwoh\",\"issqlcompression\":true,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"SnapshotCopyOnlyFull\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{\"zt\":{\"tieringMode\":\"TierRecommended\",\"duration\":1281920058,\"durationType\":\"Invalid\"}},\"snapshotBackupAdditionalDetails\":{\"instantRpRetentionRangeInDays\":1962597445,\"instantRPDetails\":\"ribi\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"gplucfotangcfhny\",\"identityName\":\"cugswvxwlmzqw\",\"userAssignedIdentityProperties\":{\"clientId\":\"xnjmxm\",\"principalId\":\"qudtcvclx\"}}}},{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{\"jibuzphdug\":{\"tieringMode\":\"TierRecommended\",\"duration\":1392311287,\"durationType\":\"Weeks\"},\"oxgjiuqhibt\":{\"tieringMode\":\"Invalid\",\"duration\":15341893,\"durationType\":\"Invalid\"},\"edmurrxxge\":{\"tieringMode\":\"Invalid\",\"duration\":470619426,\"durationType\":\"Invalid\"},\"lkm\":{\"tieringMode\":\"DoNotTier\",\"duration\":1206365747,\"durationType\":\"Months\"}},\"snapshotBackupAdditionalDetails\":{\"instantRpRetentionRangeInDays\":26203163,\"instantRPDetails\":\"hlfbcgwgc\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"oebqinjipn\",\"identityName\":\"fujqlafcba\",\"userAssignedIdentityProperties\":{\"clientId\":\"zpofoiyjwpfilk\",\"principalId\":\"kholvd\"}}}},{\"policyType\":\"CopyOnlyFull\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{\"tvt\":{\"tieringMode\":\"TierRecommended\",\"duration\":1629551574,\"durationType\":\"Invalid\"},\"hnmnahmnx\":{\"tieringMode\":\"DoNotTier\",\"duration\":1323258140,\"durationType\":\"Weeks\"},\"wrweoo\":{\"tieringMode\":\"TierAfter\",\"duration\":475134082,\"durationType\":\"Invalid\"}},\"snapshotBackupAdditionalDetails\":{\"instantRpRetentionRangeInDays\":82886294,\"instantRPDetails\":\"hx\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"newmozqvb\",\"identityName\":\"qmamhsycxhxzga\",\"userAssignedIdentityProperties\":{\"clientId\":\"abo\",\"principalId\":\"vmfqhppubo\"}}}},{\"policyType\":\"SnapshotFull\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{\"rngbtcjuahokqtob\":{\"tieringMode\":\"TierAfter\",\"duration\":342947659,\"durationType\":\"Weeks\"}},\"snapshotBackupAdditionalDetails\":{\"instantRpRetentionRangeInDays\":758253225,\"instantRPDetails\":\"fshfph\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"ulaiywzejywhs\",\"identityName\":\"koj\",\"userAssignedIdentityProperties\":{\"clientId\":\"ndnpdwrpqafgfug\",\"principalId\":\"n\"}}}}],\"makePolicyConsistent\":false,\"protectedItemsCount\":1701232505,\"resourceGuardOperationRequests\":[\"ypococtfjgtixr\",\"vzuyturmlmu\",\"wolba\",\"iropionszon\"]}") .toObject(AzureVmWorkloadProtectionPolicy.class); - Assertions.assertEquals(1909534369, model.protectedItemsCount()); - Assertions.assertEquals("k", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(WorkloadType.AZURE_SQL_DB, model.workLoadType()); - Assertions.assertEquals("n", model.settings().timeZone()); - Assertions.assertEquals(true, model.settings().issqlcompression()); - Assertions.assertEquals(false, model.settings().isCompression()); + Assertions.assertEquals(1701232505, model.protectedItemsCount()); + Assertions.assertEquals("ypococtfjgtixr", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(WorkloadType.SYSTEM_STATE, model.workLoadType()); + Assertions.assertEquals(VMWorkloadPolicyType.SNAPSHOT_V1, model.vmWorkloadPolicyType()); + Assertions.assertEquals("sgmwoh", model.settings().timeZone()); + Assertions.assertTrue(model.settings().issqlcompression()); + Assertions.assertFalse(model.settings().isCompression()); Assertions.assertEquals(PolicyType.SNAPSHOT_COPY_ONLY_FULL, model.subProtectionPolicy().get(0).policyType()); Assertions.assertEquals(TieringMode.TIER_RECOMMENDED, - model.subProtectionPolicy().get(0).tieringPolicy().get("izjx").tieringMode()); - Assertions.assertEquals(37072566, model.subProtectionPolicy().get(0).tieringPolicy().get("izjx").duration()); - Assertions.assertEquals(RetentionDurationType.WEEKS, - model.subProtectionPolicy().get(0).tieringPolicy().get("izjx").durationType()); - Assertions.assertEquals(370516258, + model.subProtectionPolicy().get(0).tieringPolicy().get("zt").tieringMode()); + Assertions.assertEquals(1281920058, model.subProtectionPolicy().get(0).tieringPolicy().get("zt").duration()); + Assertions.assertEquals(RetentionDurationType.INVALID, + model.subProtectionPolicy().get(0).tieringPolicy().get("zt").durationType()); + Assertions.assertEquals(1962597445, model.subProtectionPolicy().get(0).snapshotBackupAdditionalDetails().instantRpRetentionRangeInDays()); - Assertions.assertEquals("t", + Assertions.assertEquals("ribi", model.subProtectionPolicy().get(0).snapshotBackupAdditionalDetails().instantRPDetails()); - Assertions.assertEquals("twnawjslbiwkojgc", + Assertions.assertEquals("gplucfotangcfhny", model.subProtectionPolicy() .get(0) .snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .identityArmId()); - Assertions.assertEquals("tsf", + Assertions.assertEquals("cugswvxwlmzqw", model.subProtectionPolicy() .get(0) .snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .identityName()); - Assertions.assertEquals("baeqphc", + Assertions.assertEquals("xnjmxm", model.subProtectionPolicy() .get(0) .snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .userAssignedIdentityProperties() .clientId()); - Assertions.assertEquals("nrnrp", + Assertions.assertEquals("qudtcvclx", model.subProtectionPolicy() .get(0) .snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .userAssignedIdentityProperties() .principalId()); - Assertions.assertEquals(true, model.makePolicyConsistent()); + Assertions.assertFalse(model.makePolicyConsistent()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureVmWorkloadProtectionPolicy model = new AzureVmWorkloadProtectionPolicy() - .withProtectedItemsCount(1909534369) - .withResourceGuardOperationRequests(Arrays.asList("k", "gaifmvik", "bydvkhbejdz")) - .withWorkLoadType(WorkloadType.AZURE_SQL_DB) - .withSettings(new Settings().withTimeZone("n").withIssqlcompression(true).withIsCompression(false)) - .withSubProtectionPolicy(Arrays.asList(new SubProtectionPolicy() - .withPolicyType(PolicyType.SNAPSHOT_COPY_ONLY_FULL) - .withSchedulePolicy(new SchedulePolicy()) - .withRetentionPolicy(new RetentionPolicy()) - .withTieringPolicy(mapOf("izjx", - new TieringPolicy().withTieringMode(TieringMode.TIER_RECOMMENDED) - .withDuration(37072566) - .withDurationType(RetentionDurationType.WEEKS), - "cvlhv", - new TieringPolicy().withTieringMode(TieringMode.TIER_RECOMMENDED) - .withDuration(843222419) - .withDurationType(RetentionDurationType.DAYS))) - .withSnapshotBackupAdditionalDetails(new SnapshotBackupAdditionalDetails() - .withInstantRpRetentionRangeInDays(370516258) - .withInstantRPDetails("t") - .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails() - .withIdentityArmId("twnawjslbiwkojgc") - .withIdentityName("tsf") - .withUserAssignedIdentityProperties( - new UserAssignedIdentityProperties().withClientId("baeqphc").withPrincipalId("nrnrp")))))) - .withMakePolicyConsistent(true); + .withProtectedItemsCount(1701232505) + .withResourceGuardOperationRequests(Arrays.asList("ypococtfjgtixr", "vzuyturmlmu", "wolba", "iropionszon")) + .withWorkLoadType(WorkloadType.SYSTEM_STATE) + .withVmWorkloadPolicyType(VMWorkloadPolicyType.SNAPSHOT_V1) + .withSettings(new Settings().withTimeZone("sgmwoh").withIssqlcompression(true).withIsCompression(false)) + .withSubProtectionPolicy(Arrays.asList( + new SubProtectionPolicy().withPolicyType(PolicyType.SNAPSHOT_COPY_ONLY_FULL) + .withSchedulePolicy(new SchedulePolicy()) + .withRetentionPolicy(new RetentionPolicy()) + .withTieringPolicy(mapOf( + "zt", + new TieringPolicy().withTieringMode(TieringMode.TIER_RECOMMENDED) + .withDuration(1281920058) + .withDurationType(RetentionDurationType.INVALID))) + .withSnapshotBackupAdditionalDetails( + new SnapshotBackupAdditionalDetails().withInstantRpRetentionRangeInDays(1962597445) + .withInstantRPDetails("ribi") + .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails() + .withIdentityArmId("gplucfotangcfhny") + .withIdentityName("cugswvxwlmzqw") + .withUserAssignedIdentityProperties( + new UserAssignedIdentityProperties().withClientId("xnjmxm") + .withPrincipalId("qudtcvclx")))), + new SubProtectionPolicy().withPolicyType(PolicyType.DIFFERENTIAL) + .withSchedulePolicy(new SchedulePolicy()) + .withRetentionPolicy(new RetentionPolicy()) + .withTieringPolicy(mapOf("jibuzphdug", + new TieringPolicy().withTieringMode(TieringMode.TIER_RECOMMENDED) + .withDuration(1392311287) + .withDurationType(RetentionDurationType.WEEKS), + "oxgjiuqhibt", + new TieringPolicy().withTieringMode(TieringMode.INVALID) + .withDuration(15341893) + .withDurationType(RetentionDurationType.INVALID), + "edmurrxxge", + new TieringPolicy().withTieringMode(TieringMode.INVALID) + .withDuration(470619426) + .withDurationType(RetentionDurationType.INVALID), + "lkm", + new TieringPolicy().withTieringMode(TieringMode.DO_NOT_TIER) + .withDuration(1206365747) + .withDurationType(RetentionDurationType.MONTHS))) + .withSnapshotBackupAdditionalDetails( + new SnapshotBackupAdditionalDetails().withInstantRpRetentionRangeInDays(26203163) + .withInstantRPDetails("hlfbcgwgc") + .withUserAssignedManagedIdentityDetails( + new UserAssignedManagedIdentityDetails().withIdentityArmId("oebqinjipn") + .withIdentityName("fujqlafcba") + .withUserAssignedIdentityProperties( + new UserAssignedIdentityProperties().withClientId("zpofoiyjwpfilk") + .withPrincipalId("kholvd")))), + new SubProtectionPolicy().withPolicyType(PolicyType.COPY_ONLY_FULL) + .withSchedulePolicy(new SchedulePolicy()) + .withRetentionPolicy(new RetentionPolicy()) + .withTieringPolicy(mapOf("tvt", + new TieringPolicy().withTieringMode(TieringMode.TIER_RECOMMENDED) + .withDuration(1629551574) + .withDurationType(RetentionDurationType.INVALID), + "hnmnahmnx", + new TieringPolicy().withTieringMode(TieringMode.DO_NOT_TIER) + .withDuration(1323258140) + .withDurationType(RetentionDurationType.WEEKS), + "wrweoo", + new TieringPolicy().withTieringMode(TieringMode.TIER_AFTER) + .withDuration(475134082) + .withDurationType(RetentionDurationType.INVALID))) + .withSnapshotBackupAdditionalDetails(new SnapshotBackupAdditionalDetails() + .withInstantRpRetentionRangeInDays(82886294) + .withInstantRPDetails("hx") + .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails() + .withIdentityArmId("newmozqvb") + .withIdentityName("qmamhsycxhxzga") + .withUserAssignedIdentityProperties(new UserAssignedIdentityProperties().withClientId("abo") + .withPrincipalId("vmfqhppubo")))), + new SubProtectionPolicy().withPolicyType(PolicyType.SNAPSHOT_FULL) + .withSchedulePolicy(new SchedulePolicy()) + .withRetentionPolicy(new RetentionPolicy()) + .withTieringPolicy(mapOf("rngbtcjuahokqtob", + new TieringPolicy().withTieringMode(TieringMode.TIER_AFTER) + .withDuration(342947659) + .withDurationType(RetentionDurationType.WEEKS))) + .withSnapshotBackupAdditionalDetails( + new SnapshotBackupAdditionalDetails().withInstantRpRetentionRangeInDays(758253225) + .withInstantRPDetails("fshfph") + .withUserAssignedManagedIdentityDetails( + new UserAssignedManagedIdentityDetails().withIdentityArmId("ulaiywzejywhs") + .withIdentityName("koj") + .withUserAssignedIdentityProperties( + new UserAssignedIdentityProperties().withClientId("ndnpdwrpqafgfug") + .withPrincipalId("n")))))) + .withMakePolicyConsistent(false); model = BinaryData.fromObject(model).toObject(AzureVmWorkloadProtectionPolicy.class); - Assertions.assertEquals(1909534369, model.protectedItemsCount()); - Assertions.assertEquals("k", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(WorkloadType.AZURE_SQL_DB, model.workLoadType()); - Assertions.assertEquals("n", model.settings().timeZone()); - Assertions.assertEquals(true, model.settings().issqlcompression()); - Assertions.assertEquals(false, model.settings().isCompression()); + Assertions.assertEquals(1701232505, model.protectedItemsCount()); + Assertions.assertEquals("ypococtfjgtixr", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(WorkloadType.SYSTEM_STATE, model.workLoadType()); + Assertions.assertEquals(VMWorkloadPolicyType.SNAPSHOT_V1, model.vmWorkloadPolicyType()); + Assertions.assertEquals("sgmwoh", model.settings().timeZone()); + Assertions.assertTrue(model.settings().issqlcompression()); + Assertions.assertFalse(model.settings().isCompression()); Assertions.assertEquals(PolicyType.SNAPSHOT_COPY_ONLY_FULL, model.subProtectionPolicy().get(0).policyType()); Assertions.assertEquals(TieringMode.TIER_RECOMMENDED, - model.subProtectionPolicy().get(0).tieringPolicy().get("izjx").tieringMode()); - Assertions.assertEquals(37072566, model.subProtectionPolicy().get(0).tieringPolicy().get("izjx").duration()); - Assertions.assertEquals(RetentionDurationType.WEEKS, - model.subProtectionPolicy().get(0).tieringPolicy().get("izjx").durationType()); - Assertions.assertEquals(370516258, + model.subProtectionPolicy().get(0).tieringPolicy().get("zt").tieringMode()); + Assertions.assertEquals(1281920058, model.subProtectionPolicy().get(0).tieringPolicy().get("zt").duration()); + Assertions.assertEquals(RetentionDurationType.INVALID, + model.subProtectionPolicy().get(0).tieringPolicy().get("zt").durationType()); + Assertions.assertEquals(1962597445, model.subProtectionPolicy().get(0).snapshotBackupAdditionalDetails().instantRpRetentionRangeInDays()); - Assertions.assertEquals("t", + Assertions.assertEquals("ribi", model.subProtectionPolicy().get(0).snapshotBackupAdditionalDetails().instantRPDetails()); - Assertions.assertEquals("twnawjslbiwkojgc", + Assertions.assertEquals("gplucfotangcfhny", model.subProtectionPolicy() .get(0) .snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .identityArmId()); - Assertions.assertEquals("tsf", + Assertions.assertEquals("cugswvxwlmzqw", model.subProtectionPolicy() .get(0) .snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .identityName()); - Assertions.assertEquals("baeqphc", + Assertions.assertEquals("xnjmxm", model.subProtectionPolicy() .get(0) .snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .userAssignedIdentityProperties() .clientId()); - Assertions.assertEquals("nrnrp", + Assertions.assertEquals("qudtcvclx", model.subProtectionPolicy() .get(0) .snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .userAssignedIdentityProperties() .principalId()); - Assertions.assertEquals(true, model.makePolicyConsistent()); + Assertions.assertFalse(model.makePolicyConsistent()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapAseDatabaseWorkloadItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapAseDatabaseWorkloadItemTests.java index 43209b248863..f18bf13f04b9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapAseDatabaseWorkloadItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapAseDatabaseWorkloadItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,40 +13,16 @@ public final class AzureVmWorkloadSapAseDatabaseWorkloadItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureVmWorkloadSapAseDatabaseWorkloadItem model = BinaryData.fromString( - "{\"workloadItemType\":\"SAPAseDatabase\",\"parentName\":\"hi\",\"serverName\":\"gjlgvvpase\",\"isAutoProtectable\":true,\"subinquireditemcount\":1996272230,\"subWorkloadItemCount\":1935598051,\"backupManagementType\":\"tu\",\"workloadType\":\"dhga\",\"friendlyName\":\"pirpiwrqof\",\"protectionState\":\"Protected\"}") + "{\"workloadItemType\":\"SAPAseDatabase\",\"parentName\":\"isofieypefojyqd\",\"serverName\":\"u\",\"isAutoProtectable\":false,\"subinquireditemcount\":967461151,\"subWorkloadItemCount\":1554312221,\"backupManagementType\":\"hihihlhzdsqtzbsr\",\"workloadType\":\"o\",\"friendlyName\":\"jhf\",\"protectionState\":\"Invalid\"}") .toObject(AzureVmWorkloadSapAseDatabaseWorkloadItem.class); - Assertions.assertEquals("tu", model.backupManagementType()); - Assertions.assertEquals("dhga", model.workloadType()); - Assertions.assertEquals("pirpiwrqof", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); - Assertions.assertEquals("hi", model.parentName()); - Assertions.assertEquals("gjlgvvpase", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1996272230, model.subinquireditemcount()); - Assertions.assertEquals(1935598051, model.subWorkloadItemCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureVmWorkloadSapAseDatabaseWorkloadItem model - = new AzureVmWorkloadSapAseDatabaseWorkloadItem().withBackupManagementType("tu") - .withWorkloadType("dhga") - .withFriendlyName("pirpiwrqof") - .withProtectionState(ProtectionStatus.PROTECTED) - .withParentName("hi") - .withServerName("gjlgvvpase") - .withIsAutoProtectable(true) - .withSubinquireditemcount(1996272230) - .withSubWorkloadItemCount(1935598051); - model = BinaryData.fromObject(model).toObject(AzureVmWorkloadSapAseDatabaseWorkloadItem.class); - Assertions.assertEquals("tu", model.backupManagementType()); - Assertions.assertEquals("dhga", model.workloadType()); - Assertions.assertEquals("pirpiwrqof", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); - Assertions.assertEquals("hi", model.parentName()); - Assertions.assertEquals("gjlgvvpase", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1996272230, model.subinquireditemcount()); - Assertions.assertEquals(1935598051, model.subWorkloadItemCount()); + Assertions.assertEquals("hihihlhzdsqtzbsr", model.backupManagementType()); + Assertions.assertEquals("o", model.workloadType()); + Assertions.assertEquals("jhf", model.friendlyName()); + Assertions.assertEquals(ProtectionStatus.INVALID, model.protectionState()); + Assertions.assertEquals("isofieypefojyqd", model.parentName()); + Assertions.assertEquals("u", model.serverName()); + Assertions.assertFalse(model.isAutoProtectable()); + Assertions.assertEquals(967461151, model.subinquireditemcount()); + Assertions.assertEquals(1554312221, model.subWorkloadItemCount()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapAseSystemWorkloadItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapAseSystemWorkloadItemTests.java index 5c4602accbbf..ebb06db5c26b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapAseSystemWorkloadItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapAseSystemWorkloadItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,40 +13,16 @@ public final class AzureVmWorkloadSapAseSystemWorkloadItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureVmWorkloadSapAseSystemWorkloadItem model = BinaryData.fromString( - "{\"workloadItemType\":\"SAPAseSystem\",\"parentName\":\"vcrrpcj\",\"serverName\":\"bstvje\",\"isAutoProtectable\":true,\"subinquireditemcount\":1392569239,\"subWorkloadItemCount\":1809839347,\"backupManagementType\":\"koxmlghk\",\"workloadType\":\"idvrmaz\",\"friendlyName\":\"dwwexymz\",\"protectionState\":\"ProtectionFailed\"}") + "{\"workloadItemType\":\"SAPAseSystem\",\"parentName\":\"cact\",\"serverName\":\"wotey\",\"isAutoProtectable\":true,\"subinquireditemcount\":1671078862,\"subWorkloadItemCount\":811608052,\"backupManagementType\":\"ekqvgqouwif\",\"workloadType\":\"pjwyiv\",\"friendlyName\":\"kfxcvhrfs\",\"protectionState\":\"Protecting\"}") .toObject(AzureVmWorkloadSapAseSystemWorkloadItem.class); - Assertions.assertEquals("koxmlghk", model.backupManagementType()); - Assertions.assertEquals("idvrmaz", model.workloadType()); - Assertions.assertEquals("dwwexymz", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); - Assertions.assertEquals("vcrrpcj", model.parentName()); - Assertions.assertEquals("bstvje", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1392569239, model.subinquireditemcount()); - Assertions.assertEquals(1809839347, model.subWorkloadItemCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureVmWorkloadSapAseSystemWorkloadItem model - = new AzureVmWorkloadSapAseSystemWorkloadItem().withBackupManagementType("koxmlghk") - .withWorkloadType("idvrmaz") - .withFriendlyName("dwwexymz") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED) - .withParentName("vcrrpcj") - .withServerName("bstvje") - .withIsAutoProtectable(true) - .withSubinquireditemcount(1392569239) - .withSubWorkloadItemCount(1809839347); - model = BinaryData.fromObject(model).toObject(AzureVmWorkloadSapAseSystemWorkloadItem.class); - Assertions.assertEquals("koxmlghk", model.backupManagementType()); - Assertions.assertEquals("idvrmaz", model.workloadType()); - Assertions.assertEquals("dwwexymz", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); - Assertions.assertEquals("vcrrpcj", model.parentName()); - Assertions.assertEquals("bstvje", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1392569239, model.subinquireditemcount()); - Assertions.assertEquals(1809839347, model.subWorkloadItemCount()); + Assertions.assertEquals("ekqvgqouwif", model.backupManagementType()); + Assertions.assertEquals("pjwyiv", model.workloadType()); + Assertions.assertEquals("kfxcvhrfs", model.friendlyName()); + Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); + Assertions.assertEquals("cact", model.parentName()); + Assertions.assertEquals("wotey", model.serverName()); + Assertions.assertTrue(model.isAutoProtectable()); + Assertions.assertEquals(1671078862, model.subinquireditemcount()); + Assertions.assertEquals(811608052, model.subWorkloadItemCount()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapHanaDatabaseWorkloadItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapHanaDatabaseWorkloadItemTests.java index 87f0fbcf2f47..c3f6cf34f567 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapHanaDatabaseWorkloadItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapHanaDatabaseWorkloadItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,40 +13,16 @@ public final class AzureVmWorkloadSapHanaDatabaseWorkloadItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureVmWorkloadSapHanaDatabaseWorkloadItem model = BinaryData.fromString( - "{\"workloadItemType\":\"SAPHanaDatabase\",\"parentName\":\"fhfv\",\"serverName\":\"mknbnxwcdommpv\",\"isAutoProtectable\":false,\"subinquireditemcount\":1859698744,\"subWorkloadItemCount\":850531614,\"backupManagementType\":\"rttuiaclkiexha\",\"workloadType\":\"fnth\",\"friendlyName\":\"fyut\",\"protectionState\":\"Protecting\"}") + "{\"workloadItemType\":\"SAPHanaDatabase\",\"parentName\":\"grttikteusqczk\",\"serverName\":\"klxubyja\",\"isAutoProtectable\":true,\"subinquireditemcount\":1173878912,\"subWorkloadItemCount\":1105640722,\"backupManagementType\":\"qcuubgqibrta\",\"workloadType\":\"etttwgdslqxihhr\",\"friendlyName\":\"oi\",\"protectionState\":\"ProtectionFailed\"}") .toObject(AzureVmWorkloadSapHanaDatabaseWorkloadItem.class); - Assertions.assertEquals("rttuiaclkiexha", model.backupManagementType()); - Assertions.assertEquals("fnth", model.workloadType()); - Assertions.assertEquals("fyut", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - Assertions.assertEquals("fhfv", model.parentName()); - Assertions.assertEquals("mknbnxwcdommpv", model.serverName()); - Assertions.assertEquals(false, model.isAutoProtectable()); - Assertions.assertEquals(1859698744, model.subinquireditemcount()); - Assertions.assertEquals(850531614, model.subWorkloadItemCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureVmWorkloadSapHanaDatabaseWorkloadItem model - = new AzureVmWorkloadSapHanaDatabaseWorkloadItem().withBackupManagementType("rttuiaclkiexha") - .withWorkloadType("fnth") - .withFriendlyName("fyut") - .withProtectionState(ProtectionStatus.PROTECTING) - .withParentName("fhfv") - .withServerName("mknbnxwcdommpv") - .withIsAutoProtectable(false) - .withSubinquireditemcount(1859698744) - .withSubWorkloadItemCount(850531614); - model = BinaryData.fromObject(model).toObject(AzureVmWorkloadSapHanaDatabaseWorkloadItem.class); - Assertions.assertEquals("rttuiaclkiexha", model.backupManagementType()); - Assertions.assertEquals("fnth", model.workloadType()); - Assertions.assertEquals("fyut", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - Assertions.assertEquals("fhfv", model.parentName()); - Assertions.assertEquals("mknbnxwcdommpv", model.serverName()); - Assertions.assertEquals(false, model.isAutoProtectable()); - Assertions.assertEquals(1859698744, model.subinquireditemcount()); - Assertions.assertEquals(850531614, model.subWorkloadItemCount()); + Assertions.assertEquals("qcuubgqibrta", model.backupManagementType()); + Assertions.assertEquals("etttwgdslqxihhr", model.workloadType()); + Assertions.assertEquals("oi", model.friendlyName()); + Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); + Assertions.assertEquals("grttikteusqczk", model.parentName()); + Assertions.assertEquals("klxubyja", model.serverName()); + Assertions.assertTrue(model.isAutoProtectable()); + Assertions.assertEquals(1173878912, model.subinquireditemcount()); + Assertions.assertEquals(1105640722, model.subWorkloadItemCount()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapHanaSystemWorkloadItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapHanaSystemWorkloadItemTests.java index 2ea0c86aafd7..270795327344 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapHanaSystemWorkloadItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapHanaSystemWorkloadItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,40 +13,16 @@ public final class AzureVmWorkloadSapHanaSystemWorkloadItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureVmWorkloadSapHanaSystemWorkloadItem model = BinaryData.fromString( - "{\"workloadItemType\":\"SAPHanaSystem\",\"parentName\":\"mslclblyjxlt\",\"serverName\":\"juscvsfx\",\"isAutoProtectable\":true,\"subinquireditemcount\":1008970730,\"subWorkloadItemCount\":495815281,\"backupManagementType\":\"upbezqccydrt\",\"workloadType\":\"ukdqkkyihztg\",\"friendlyName\":\"mgqzgwldoyc\",\"protectionState\":\"Protected\"}") + "{\"workloadItemType\":\"SAPHanaSystem\",\"parentName\":\"ypxiutcxap\",\"serverName\":\"y\",\"isAutoProtectable\":false,\"subinquireditemcount\":182458575,\"subWorkloadItemCount\":26791348,\"backupManagementType\":\"joxslhvnhla\",\"workloadType\":\"q\",\"friendlyName\":\"kzjcjbtrgae\",\"protectionState\":\"Protected\"}") .toObject(AzureVmWorkloadSapHanaSystemWorkloadItem.class); - Assertions.assertEquals("upbezqccydrt", model.backupManagementType()); - Assertions.assertEquals("ukdqkkyihztg", model.workloadType()); - Assertions.assertEquals("mgqzgwldoyc", model.friendlyName()); + Assertions.assertEquals("joxslhvnhla", model.backupManagementType()); + Assertions.assertEquals("q", model.workloadType()); + Assertions.assertEquals("kzjcjbtrgae", model.friendlyName()); Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); - Assertions.assertEquals("mslclblyjxlt", model.parentName()); - Assertions.assertEquals("juscvsfx", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1008970730, model.subinquireditemcount()); - Assertions.assertEquals(495815281, model.subWorkloadItemCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureVmWorkloadSapHanaSystemWorkloadItem model - = new AzureVmWorkloadSapHanaSystemWorkloadItem().withBackupManagementType("upbezqccydrt") - .withWorkloadType("ukdqkkyihztg") - .withFriendlyName("mgqzgwldoyc") - .withProtectionState(ProtectionStatus.PROTECTED) - .withParentName("mslclblyjxlt") - .withServerName("juscvsfx") - .withIsAutoProtectable(true) - .withSubinquireditemcount(1008970730) - .withSubWorkloadItemCount(495815281); - model = BinaryData.fromObject(model).toObject(AzureVmWorkloadSapHanaSystemWorkloadItem.class); - Assertions.assertEquals("upbezqccydrt", model.backupManagementType()); - Assertions.assertEquals("ukdqkkyihztg", model.workloadType()); - Assertions.assertEquals("mgqzgwldoyc", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); - Assertions.assertEquals("mslclblyjxlt", model.parentName()); - Assertions.assertEquals("juscvsfx", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1008970730, model.subinquireditemcount()); - Assertions.assertEquals(495815281, model.subWorkloadItemCount()); + Assertions.assertEquals("ypxiutcxap", model.parentName()); + Assertions.assertEquals("y", model.serverName()); + Assertions.assertFalse(model.isAutoProtectable()); + Assertions.assertEquals(182458575, model.subinquireditemcount()); + Assertions.assertEquals(26791348, model.subWorkloadItemCount()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSqlDatabaseWorkloadItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSqlDatabaseWorkloadItemTests.java index 99ea371ac8b3..8b8dc0f722a0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSqlDatabaseWorkloadItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSqlDatabaseWorkloadItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,40 +13,16 @@ public final class AzureVmWorkloadSqlDatabaseWorkloadItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureVmWorkloadSqlDatabaseWorkloadItem model = BinaryData.fromString( - "{\"workloadItemType\":\"SQLDataBase\",\"parentName\":\"ulrtywikdmh\",\"serverName\":\"kuflgbh\",\"isAutoProtectable\":true,\"subinquireditemcount\":1551296917,\"subWorkloadItemCount\":2111371011,\"backupManagementType\":\"mxu\",\"workloadType\":\"sryjqgdkfno\",\"friendlyName\":\"eoqbvjhvefgwbmqj\",\"protectionState\":\"Protected\"}") + "{\"workloadItemType\":\"SQLDataBase\",\"parentName\":\"brxjjsto\",\"serverName\":\"eitpkxztmo\",\"isAutoProtectable\":false,\"subinquireditemcount\":358908286,\"subWorkloadItemCount\":1257381047,\"backupManagementType\":\"gfcwqmpimaqxzhem\",\"workloadType\":\"h\",\"friendlyName\":\"uj\",\"protectionState\":\"Protecting\"}") .toObject(AzureVmWorkloadSqlDatabaseWorkloadItem.class); - Assertions.assertEquals("mxu", model.backupManagementType()); - Assertions.assertEquals("sryjqgdkfno", model.workloadType()); - Assertions.assertEquals("eoqbvjhvefgwbmqj", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); - Assertions.assertEquals("ulrtywikdmh", model.parentName()); - Assertions.assertEquals("kuflgbh", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1551296917, model.subinquireditemcount()); - Assertions.assertEquals(2111371011, model.subWorkloadItemCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureVmWorkloadSqlDatabaseWorkloadItem model - = new AzureVmWorkloadSqlDatabaseWorkloadItem().withBackupManagementType("mxu") - .withWorkloadType("sryjqgdkfno") - .withFriendlyName("eoqbvjhvefgwbmqj") - .withProtectionState(ProtectionStatus.PROTECTED) - .withParentName("ulrtywikdmh") - .withServerName("kuflgbh") - .withIsAutoProtectable(true) - .withSubinquireditemcount(1551296917) - .withSubWorkloadItemCount(2111371011); - model = BinaryData.fromObject(model).toObject(AzureVmWorkloadSqlDatabaseWorkloadItem.class); - Assertions.assertEquals("mxu", model.backupManagementType()); - Assertions.assertEquals("sryjqgdkfno", model.workloadType()); - Assertions.assertEquals("eoqbvjhvefgwbmqj", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); - Assertions.assertEquals("ulrtywikdmh", model.parentName()); - Assertions.assertEquals("kuflgbh", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1551296917, model.subinquireditemcount()); - Assertions.assertEquals(2111371011, model.subWorkloadItemCount()); + Assertions.assertEquals("gfcwqmpimaqxzhem", model.backupManagementType()); + Assertions.assertEquals("h", model.workloadType()); + Assertions.assertEquals("uj", model.friendlyName()); + Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); + Assertions.assertEquals("brxjjsto", model.parentName()); + Assertions.assertEquals("eitpkxztmo", model.serverName()); + Assertions.assertFalse(model.isAutoProtectable()); + Assertions.assertEquals(358908286, model.subinquireditemcount()); + Assertions.assertEquals(1257381047, model.subWorkloadItemCount()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSqlInstanceWorkloadItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSqlInstanceWorkloadItemTests.java index f3928f394bf0..6cdb48dc2253 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSqlInstanceWorkloadItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSqlInstanceWorkloadItemTests.java @@ -1,64 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSqlInstanceWorkloadItem; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectory; import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryType; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class AzureVmWorkloadSqlInstanceWorkloadItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureVmWorkloadSqlInstanceWorkloadItem model = BinaryData.fromString( - "{\"workloadItemType\":\"SQLInstance\",\"dataDirectoryPaths\":[{\"type\":\"Log\",\"path\":\"pxqwo\",\"logicalName\":\"ffjxcjrmmuabwib\"}],\"parentName\":\"ogjo\",\"serverName\":\"cyefoyzbamwine\",\"isAutoProtectable\":true,\"subinquireditemcount\":693534983,\"subWorkloadItemCount\":1060241392,\"backupManagementType\":\"oldtvevboclzhz\",\"workloadType\":\"n\",\"friendlyName\":\"xgvttxp\",\"protectionState\":\"ProtectionFailed\"}") + "{\"workloadItemType\":\"SQLInstance\",\"dataDirectoryPaths\":[{\"type\":\"Invalid\",\"path\":\"wculkbaw\",\"logicalName\":\"ajnjwltlwtjj\"},{\"type\":\"Invalid\",\"path\":\"alhsnvkc\",\"logicalName\":\"xzrpo\"},{\"type\":\"Invalid\",\"path\":\"nwiaaomyl\",\"logicalName\":\"azul\"}],\"parentName\":\"ethwwnpjhlfz\",\"serverName\":\"pchwa\",\"isAutoProtectable\":false,\"subinquireditemcount\":842880172,\"subWorkloadItemCount\":1497864768,\"backupManagementType\":\"epgfew\",\"workloadType\":\"wlyxgncxyk\",\"friendlyName\":\"djhlimm\",\"protectionState\":\"Protected\"}") .toObject(AzureVmWorkloadSqlInstanceWorkloadItem.class); - Assertions.assertEquals("oldtvevboclzhz", model.backupManagementType()); - Assertions.assertEquals("n", model.workloadType()); - Assertions.assertEquals("xgvttxp", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); - Assertions.assertEquals("ogjo", model.parentName()); - Assertions.assertEquals("cyefoyzbamwine", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(693534983, model.subinquireditemcount()); - Assertions.assertEquals(1060241392, model.subWorkloadItemCount()); - Assertions.assertEquals(SqlDataDirectoryType.LOG, model.dataDirectoryPaths().get(0).type()); - Assertions.assertEquals("pxqwo", model.dataDirectoryPaths().get(0).path()); - Assertions.assertEquals("ffjxcjrmmuabwib", model.dataDirectoryPaths().get(0).logicalName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureVmWorkloadSqlInstanceWorkloadItem model - = new AzureVmWorkloadSqlInstanceWorkloadItem().withBackupManagementType("oldtvevboclzhz") - .withWorkloadType("n") - .withFriendlyName("xgvttxp") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED) - .withParentName("ogjo") - .withServerName("cyefoyzbamwine") - .withIsAutoProtectable(true) - .withSubinquireditemcount(693534983) - .withSubWorkloadItemCount(1060241392) - .withDataDirectoryPaths(Arrays.asList(new SqlDataDirectory().withType(SqlDataDirectoryType.LOG) - .withPath("pxqwo") - .withLogicalName("ffjxcjrmmuabwib"))); - model = BinaryData.fromObject(model).toObject(AzureVmWorkloadSqlInstanceWorkloadItem.class); - Assertions.assertEquals("oldtvevboclzhz", model.backupManagementType()); - Assertions.assertEquals("n", model.workloadType()); - Assertions.assertEquals("xgvttxp", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); - Assertions.assertEquals("ogjo", model.parentName()); - Assertions.assertEquals("cyefoyzbamwine", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(693534983, model.subinquireditemcount()); - Assertions.assertEquals(1060241392, model.subWorkloadItemCount()); - Assertions.assertEquals(SqlDataDirectoryType.LOG, model.dataDirectoryPaths().get(0).type()); - Assertions.assertEquals("pxqwo", model.dataDirectoryPaths().get(0).path()); - Assertions.assertEquals("ffjxcjrmmuabwib", model.dataDirectoryPaths().get(0).logicalName()); + Assertions.assertEquals("epgfew", model.backupManagementType()); + Assertions.assertEquals("wlyxgncxyk", model.workloadType()); + Assertions.assertEquals("djhlimm", model.friendlyName()); + Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); + Assertions.assertEquals("ethwwnpjhlfz", model.parentName()); + Assertions.assertEquals("pchwa", model.serverName()); + Assertions.assertFalse(model.isAutoProtectable()); + Assertions.assertEquals(842880172, model.subinquireditemcount()); + Assertions.assertEquals(1497864768, model.subWorkloadItemCount()); + Assertions.assertEquals(SqlDataDirectoryType.INVALID, model.dataDirectoryPaths().get(0).type()); + Assertions.assertEquals("wculkbaw", model.dataDirectoryPaths().get(0).path()); + Assertions.assertEquals("ajnjwltlwtjj", model.dataDirectoryPaths().get(0).logicalName()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadAutoProtectionIntentTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadAutoProtectionIntentTests.java index 0f8df91ab346..288d47bd1dce 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadAutoProtectionIntentTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadAutoProtectionIntentTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,28 +14,28 @@ public final class AzureWorkloadAutoProtectionIntentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadAutoProtectionIntent model = BinaryData.fromString( - "{\"protectionIntentItemType\":\"AzureWorkloadAutoProtectionIntent\",\"backupManagementType\":\"DefaultBackup\",\"sourceResourceId\":\"jauj\",\"itemId\":\"annggiy\",\"policyId\":\"kdtaaw\",\"protectionState\":\"ProtectionFailed\"}") + "{\"protectionIntentItemType\":\"AzureWorkloadAutoProtectionIntent\",\"backupManagementType\":\"MAB\",\"sourceResourceId\":\"usxivzrrryvei\",\"itemId\":\"pskdyzatvfuzk\",\"policyId\":\"tjvv\",\"protectionState\":\"NotProtected\"}") .toObject(AzureWorkloadAutoProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); - Assertions.assertEquals("jauj", model.sourceResourceId()); - Assertions.assertEquals("annggiy", model.itemId()); - Assertions.assertEquals("kdtaaw", model.policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); + Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); + Assertions.assertEquals("usxivzrrryvei", model.sourceResourceId()); + Assertions.assertEquals("pskdyzatvfuzk", model.itemId()); + Assertions.assertEquals("tjvv", model.policyId()); + Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.protectionState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureWorkloadAutoProtectionIntent model - = new AzureWorkloadAutoProtectionIntent().withBackupManagementType(BackupManagementType.DEFAULT_BACKUP) - .withSourceResourceId("jauj") - .withItemId("annggiy") - .withPolicyId("kdtaaw") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED); + = new AzureWorkloadAutoProtectionIntent().withBackupManagementType(BackupManagementType.MAB) + .withSourceResourceId("usxivzrrryvei") + .withItemId("pskdyzatvfuzk") + .withPolicyId("tjvv") + .withProtectionState(ProtectionStatus.NOT_PROTECTED); model = BinaryData.fromObject(model).toObject(AzureWorkloadAutoProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); - Assertions.assertEquals("jauj", model.sourceResourceId()); - Assertions.assertEquals("annggiy", model.itemId()); - Assertions.assertEquals("kdtaaw", model.policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); + Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); + Assertions.assertEquals("usxivzrrryvei", model.sourceResourceId()); + Assertions.assertEquals("pskdyzatvfuzk", model.itemId()); + Assertions.assertEquals("tjvv", model.policyId()); + Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.protectionState()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadBackupRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadBackupRequestTests.java index e89e308dc699..f5475a034a9a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadBackupRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadBackupRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,21 +14,21 @@ public final class AzureWorkloadBackupRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadBackupRequest model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadBackupRequest\",\"backupType\":\"SnapshotFull\",\"enableCompression\":true,\"recoveryPointExpiryTimeInUTC\":\"2021-08-14T16:58:12Z\"}") + "{\"objectType\":\"AzureWorkloadBackupRequest\",\"backupType\":\"CopyOnlyFull\",\"enableCompression\":true,\"recoveryPointExpiryTimeInUTC\":\"2021-09-06T19:12:22Z\"}") .toObject(AzureWorkloadBackupRequest.class); - Assertions.assertEquals(BackupType.SNAPSHOT_FULL, model.backupType()); - Assertions.assertEquals(true, model.enableCompression()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-14T16:58:12Z"), model.recoveryPointExpiryTimeInUtc()); + Assertions.assertEquals(BackupType.COPY_ONLY_FULL, model.backupType()); + Assertions.assertTrue(model.enableCompression()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T19:12:22Z"), model.recoveryPointExpiryTimeInUtc()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureWorkloadBackupRequest model = new AzureWorkloadBackupRequest().withBackupType(BackupType.SNAPSHOT_FULL) + AzureWorkloadBackupRequest model = new AzureWorkloadBackupRequest().withBackupType(BackupType.COPY_ONLY_FULL) .withEnableCompression(true) - .withRecoveryPointExpiryTimeInUtc(OffsetDateTime.parse("2021-08-14T16:58:12Z")); + .withRecoveryPointExpiryTimeInUtc(OffsetDateTime.parse("2021-09-06T19:12:22Z")); model = BinaryData.fromObject(model).toObject(AzureWorkloadBackupRequest.class); - Assertions.assertEquals(BackupType.SNAPSHOT_FULL, model.backupType()); - Assertions.assertEquals(true, model.enableCompression()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-14T16:58:12Z"), model.recoveryPointExpiryTimeInUtc()); + Assertions.assertEquals(BackupType.COPY_ONLY_FULL, model.backupType()); + Assertions.assertTrue(model.enableCompression()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T19:12:22Z"), model.recoveryPointExpiryTimeInUtc()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadContainerAutoProtectionIntentTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadContainerAutoProtectionIntentTests.java index 2489a19afd56..ed35d1d53c8f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadContainerAutoProtectionIntentTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadContainerAutoProtectionIntentTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,28 +14,28 @@ public final class AzureWorkloadContainerAutoProtectionIntentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadContainerAutoProtectionIntent model = BinaryData.fromString( - "{\"protectionIntentItemType\":\"AzureWorkloadContainerAutoProtectionIntent\",\"backupManagementType\":\"AzureIaasVM\",\"sourceResourceId\":\"nadzyq\",\"itemId\":\"xyivpinbm\",\"policyId\":\"bjijkgqxnh\",\"protectionState\":\"NotProtected\"}") + "{\"protectionIntentItemType\":\"AzureWorkloadContainerAutoProtectionIntent\",\"backupManagementType\":\"DPM\",\"sourceResourceId\":\"ddvjsaqwotmmw\",\"itemId\":\"colsrsxaptefhex\",\"policyId\":\"jokjl\",\"protectionState\":\"Protected\"}") .toObject(AzureWorkloadContainerAutoProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.backupManagementType()); - Assertions.assertEquals("nadzyq", model.sourceResourceId()); - Assertions.assertEquals("xyivpinbm", model.itemId()); - Assertions.assertEquals("bjijkgqxnh", model.policyId()); - Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.protectionState()); + Assertions.assertEquals(BackupManagementType.DPM, model.backupManagementType()); + Assertions.assertEquals("ddvjsaqwotmmw", model.sourceResourceId()); + Assertions.assertEquals("colsrsxaptefhex", model.itemId()); + Assertions.assertEquals("jokjl", model.policyId()); + Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureWorkloadContainerAutoProtectionIntent model = new AzureWorkloadContainerAutoProtectionIntent() - .withBackupManagementType(BackupManagementType.AZURE_IAAS_VM) - .withSourceResourceId("nadzyq") - .withItemId("xyivpinbm") - .withPolicyId("bjijkgqxnh") - .withProtectionState(ProtectionStatus.NOT_PROTECTED); + AzureWorkloadContainerAutoProtectionIntent model + = new AzureWorkloadContainerAutoProtectionIntent().withBackupManagementType(BackupManagementType.DPM) + .withSourceResourceId("ddvjsaqwotmmw") + .withItemId("colsrsxaptefhex") + .withPolicyId("jokjl") + .withProtectionState(ProtectionStatus.PROTECTED); model = BinaryData.fromObject(model).toObject(AzureWorkloadContainerAutoProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.backupManagementType()); - Assertions.assertEquals("nadzyq", model.sourceResourceId()); - Assertions.assertEquals("xyivpinbm", model.itemId()); - Assertions.assertEquals("bjijkgqxnh", model.policyId()); - Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.protectionState()); + Assertions.assertEquals(BackupManagementType.DPM, model.backupManagementType()); + Assertions.assertEquals("ddvjsaqwotmmw", model.sourceResourceId()); + Assertions.assertEquals("colsrsxaptefhex", model.itemId()); + Assertions.assertEquals("jokjl", model.policyId()); + Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadJobExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadJobExtendedInfoTests.java index ef1562e0c70a..6a92e6adfadf 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadJobExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadJobExtendedInfoTests.java @@ -1,54 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadJobExtendedInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadJobTaskDetails; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class AzureWorkloadJobExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadJobExtendedInfo model = BinaryData.fromString( - "{\"tasksList\":[{\"taskId\":\"frbbc\",\"status\":\"qagt\"},{\"taskId\":\"dhlfkqojpykvgt\",\"status\":\"cnifm\"},{\"taskId\":\"sdymbrn\",\"status\":\"u\"}],\"propertyBag\":{\"fwafqrouda\":\"rafwgckhocxvdf\",\"kbunzoz\":\"pavehhr\",\"cdyuibhmfdnbzyd\":\"dhcxgkmoy\"},\"dynamicErrorMessage\":\"vfcjnaeoisrvhmg\"}") + "{\"tasksList\":[{\"taskId\":\"lejchcsr\",\"status\":\"knmzlanrupdwvnp\"},{\"taskId\":\"nzqtpjhmqrhvt\",\"status\":\"aiwdcxsmlzzhz\"}],\"propertyBag\":{\"b\":\"etlgydlhqvlnnpx\",\"gjekglklby\":\"fiqgeaar\",\"hj\":\"lidwcwvmzegjon\"},\"dynamicErrorMessage\":\"wgdnqzbr\"}") .toObject(AzureWorkloadJobExtendedInfo.class); - Assertions.assertEquals("frbbc", model.tasksList().get(0).taskId()); - Assertions.assertEquals("qagt", model.tasksList().get(0).status()); - Assertions.assertEquals("rafwgckhocxvdf", model.propertyBag().get("fwafqrouda")); - Assertions.assertEquals("vfcjnaeoisrvhmg", model.dynamicErrorMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureWorkloadJobExtendedInfo model = new AzureWorkloadJobExtendedInfo() - .withTasksList(Arrays.asList(new AzureWorkloadJobTaskDetails().withTaskId("frbbc").withStatus("qagt"), - new AzureWorkloadJobTaskDetails().withTaskId("dhlfkqojpykvgt").withStatus("cnifm"), - new AzureWorkloadJobTaskDetails().withTaskId("sdymbrn").withStatus("u"))) - .withPropertyBag( - mapOf("fwafqrouda", "rafwgckhocxvdf", "kbunzoz", "pavehhr", "cdyuibhmfdnbzyd", "dhcxgkmoy")) - .withDynamicErrorMessage("vfcjnaeoisrvhmg"); - model = BinaryData.fromObject(model).toObject(AzureWorkloadJobExtendedInfo.class); - Assertions.assertEquals("frbbc", model.tasksList().get(0).taskId()); - Assertions.assertEquals("qagt", model.tasksList().get(0).status()); - Assertions.assertEquals("rafwgckhocxvdf", model.propertyBag().get("fwafqrouda")); - Assertions.assertEquals("vfcjnaeoisrvhmg", model.dynamicErrorMessage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("lejchcsr", model.tasksList().get(0).taskId()); + Assertions.assertEquals("knmzlanrupdwvnp", model.tasksList().get(0).status()); + Assertions.assertEquals("etlgydlhqvlnnpx", model.propertyBag().get("b")); + Assertions.assertEquals("wgdnqzbr", model.dynamicErrorMessage()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadJobTaskDetailsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadJobTaskDetailsTests.java index 267177222e7c..acb1146afd9b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadJobTaskDetailsTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadJobTaskDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,18 +12,9 @@ public final class AzureWorkloadJobTaskDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadJobTaskDetails model - = BinaryData.fromString("{\"taskId\":\"ffukiscvw\",\"status\":\"hwplefaxvx\"}") + = BinaryData.fromString("{\"taskId\":\"spzhzmtksjc\",\"status\":\"digsxcdgl\"}") .toObject(AzureWorkloadJobTaskDetails.class); - Assertions.assertEquals("ffukiscvw", model.taskId()); - Assertions.assertEquals("hwplefaxvx", model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureWorkloadJobTaskDetails model - = new AzureWorkloadJobTaskDetails().withTaskId("ffukiscvw").withStatus("hwplefaxvx"); - model = BinaryData.fromObject(model).toObject(AzureWorkloadJobTaskDetails.class); - Assertions.assertEquals("ffukiscvw", model.taskId()); - Assertions.assertEquals("hwplefaxvx", model.status()); + Assertions.assertEquals("spzhzmtksjc", model.taskId()); + Assertions.assertEquals("digsxcdgl", model.status()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadPointInTimeRecoveryPointTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadPointInTimeRecoveryPointTests.java index 638fee96a68f..31417d5e3bf6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadPointInTimeRecoveryPointTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadPointInTimeRecoveryPointTests.java @@ -1,101 +1,40 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadPointInTimeRecoveryPoint; -import com.azure.resourcemanager.recoveryservicesbackup.models.PointInTimeRange; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointProperties; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierInformationV2; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierStatus; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType; import com.azure.resourcemanager.recoveryservicesbackup.models.RestorePointType; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class AzureWorkloadPointInTimeRecoveryPointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadPointInTimeRecoveryPoint model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadPointInTimeRecoveryPoint\",\"timeRanges\":[{\"startTime\":\"2021-10-23T15:17:09Z\",\"endTime\":\"2021-07-08T19:53:14Z\"},{\"startTime\":\"2021-02-03T00:44:07Z\",\"endTime\":\"2021-09-14T23:20:53Z\"}],\"recoveryPointTimeInUTC\":\"2021-09-18T20:37:44Z\",\"type\":\"Invalid\",\"recoveryPointTierDetails\":[{\"type\":\"InstantRP\",\"status\":\"Rehydrated\",\"extendedInfo\":{\"ieknl\":\"ycavodggxdbees\",\"agy\":\"ariaawi\"}},{\"type\":\"Invalid\",\"status\":\"Valid\",\"extendedInfo\":{\"giagtcojo\":\"yr\"}},{\"type\":\"HardenedRP\",\"status\":\"Valid\",\"extendedInfo\":{\"uxylfsbtkadpy\":\"zjvusfzldmo\",\"tgkbugrjqctojc\":\"own\",\"cuplcplcwkhih\":\"isofieypefojyqd\"}},{\"type\":\"HardenedRP\",\"status\":\"Valid\",\"extendedInfo\":{\"s\":\"qtz\",\"txmwoteyow\":\"gnowcjhfgmveca\"}}],\"recoveryPointMoveReadinessInfo\":{\"mpjw\":{\"isReadyForMove\":true,\"additionalInfo\":\"ekqvgqouwif\"},\"cvhrfsp\":{\"isReadyForMove\":true,\"additionalInfo\":\"ikf\"},\"kvyklxubyjaffmm\":{\"isReadyForMove\":false,\"additionalInfo\":\"rttikteusqc\"},\"metttwgd\":{\"isReadyForMove\":true,\"additionalInfo\":\"qcuubgqibrta\"}},\"recoveryPointProperties\":{\"expiryTime\":\"xih\",\"ruleName\":\"moo\",\"isSoftDeleted\":true}}") + "{\"objectType\":\"AzureWorkloadPointInTimeRecoveryPoint\",\"timeRanges\":[{\"startTime\":\"2021-11-03T10:17:12Z\",\"endTime\":\"2021-07-28T00:53:44Z\"},{\"startTime\":\"2021-09-01T04:33:23Z\",\"endTime\":\"2021-06-19T23:56:56Z\"}],\"recoveryPointTimeInUTC\":\"2021-06-21T23:03:23Z\",\"type\":\"SnapshotCopyOnlyFull\",\"recoveryPointTierDetails\":[{\"type\":\"HardenedRP\",\"status\":\"Valid\",\"extendedInfo\":{\"efyw\":\"zzlvmbmpaxmodfv\",\"yhrfouyftaakcpw\":\"bpfvm\",\"nubexk\":\"yzvqt\",\"quxvypomgkop\":\"zksmondj\"}},{\"type\":\"HardenedRP\",\"status\":\"Rehydrated\",\"extendedInfo\":{\"bq\":\"xysmoc\",\"apvhelxprgly\":\"qvmkcxo\",\"uejrjxgc\":\"tddckcb\",\"i\":\"qibrhosxsdqrhzoy\"}}],\"recoveryPointMoveReadinessInfo\":{\"szdtmhrkwof\":{\"isReadyForMove\":false,\"additionalInfo\":\"bahwfl\"}},\"recoveryPointProperties\":{\"expiryTime\":\"oqac\",\"ruleName\":\"expbtg\",\"isSoftDeleted\":true},\"threatStatus\":\"UnHealthy\",\"threatInfo\":[{\"threatTitle\":\"ashrt\",\"threatDescription\":\"kcnqxwbpo\",\"lastUpdatedTime\":\"2021-09-01T09:08:06Z\",\"threatState\":\"InProgress\",\"threatStartTime\":\"2021-01-28T11:31Z\",\"threatEndTime\":\"2021-10-03T21:01Z\",\"threatURI\":\"sipqii\",\"threatSeverity\":\"Critical\"},{\"threatTitle\":\"qerpqlpqwcc\",\"threatDescription\":\"qgbdbuta\",\"lastUpdatedTime\":\"2021-06-13T06:16:01Z\",\"threatState\":\"Resolved\",\"threatStartTime\":\"2021-11-26T16:59:10Z\",\"threatEndTime\":\"2021-02-06T10:01:30Z\",\"threatURI\":\"mhykojoxafnndl\",\"threatSeverity\":\"Warning\"}]}") .toObject(AzureWorkloadPointInTimeRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T20:37:44Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.INVALID, model.type()); - Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.REHYDRATED, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("ycavodggxdbees", model.recoveryPointTierDetails().get(0).extendedInfo().get("ieknl")); - Assertions.assertEquals(true, model.recoveryPointMoveReadinessInfo().get("mpjw").isReadyForMove()); - Assertions.assertEquals("ekqvgqouwif", model.recoveryPointMoveReadinessInfo().get("mpjw").additionalInfo()); - Assertions.assertEquals("xih", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("moo", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(true, model.recoveryPointProperties().isSoftDeleted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-23T15:17:09Z"), model.timeRanges().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-08T19:53:14Z"), model.timeRanges().get(0).endTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureWorkloadPointInTimeRecoveryPoint model = new AzureWorkloadPointInTimeRecoveryPoint() - .withRecoveryPointTimeInUtc(OffsetDateTime.parse("2021-09-18T20:37:44Z")) - .withType(RestorePointType.INVALID) - .withRecoveryPointTierDetails(Arrays.asList( - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.INSTANT_RP) - .withStatus(RecoveryPointTierStatus.REHYDRATED) - .withExtendedInfo(mapOf("ieknl", "ycavodggxdbees", "agy", "ariaawi")), - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.INVALID) - .withStatus(RecoveryPointTierStatus.VALID) - .withExtendedInfo(mapOf("giagtcojo", "yr")), - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.HARDENED_RP) - .withStatus(RecoveryPointTierStatus.VALID) - .withExtendedInfo(mapOf("uxylfsbtkadpy", "zjvusfzldmo", "tgkbugrjqctojc", "own", "cuplcplcwkhih", - "isofieypefojyqd")), - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.HARDENED_RP) - .withStatus(RecoveryPointTierStatus.VALID) - .withExtendedInfo(mapOf("s", "qtz", "txmwoteyow", "gnowcjhfgmveca")))) - .withRecoveryPointMoveReadinessInfo(mapOf("mpjw", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("ekqvgqouwif"), - "cvhrfsp", new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("ikf"), - "kvyklxubyjaffmm", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(false).withAdditionalInfo("rttikteusqc"), - "metttwgd", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("qcuubgqibrta"))) - .withRecoveryPointProperties( - new RecoveryPointProperties().withExpiryTime("xih").withRuleName("moo").withIsSoftDeleted(true)) - .withTimeRanges(Arrays.asList( - new PointInTimeRange().withStartTime(OffsetDateTime.parse("2021-10-23T15:17:09Z")) - .withEndTime(OffsetDateTime.parse("2021-07-08T19:53:14Z")), - new PointInTimeRange().withStartTime(OffsetDateTime.parse("2021-02-03T00:44:07Z")) - .withEndTime(OffsetDateTime.parse("2021-09-14T23:20:53Z")))); - model = BinaryData.fromObject(model).toObject(AzureWorkloadPointInTimeRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T20:37:44Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.INVALID, model.type()); - Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.REHYDRATED, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("ycavodggxdbees", model.recoveryPointTierDetails().get(0).extendedInfo().get("ieknl")); - Assertions.assertEquals(true, model.recoveryPointMoveReadinessInfo().get("mpjw").isReadyForMove()); - Assertions.assertEquals("ekqvgqouwif", model.recoveryPointMoveReadinessInfo().get("mpjw").additionalInfo()); - Assertions.assertEquals("xih", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("moo", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(true, model.recoveryPointProperties().isSoftDeleted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-23T15:17:09Z"), model.timeRanges().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-08T19:53:14Z"), model.timeRanges().get(0).endTime()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(ThreatStatus.UN_HEALTHY, model.threatStatus()); + Assertions.assertEquals(ThreatState.IN_PROGRESS, model.threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.CRITICAL, model.threatInfo().get(0).threatSeverity()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T23:03:23Z"), model.recoveryPointTimeInUtc()); + Assertions.assertEquals(RestorePointType.SNAPSHOT_COPY_ONLY_FULL, model.type()); + Assertions.assertEquals("zzlvmbmpaxmodfv", model.recoveryPointTierDetails().get(0).extendedInfo().get("efyw")); + Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.recoveryPointTierDetails().get(0).type()); + Assertions.assertEquals(RecoveryPointTierStatus.VALID, model.recoveryPointTierDetails().get(0).status()); + Assertions.assertFalse(model.recoveryPointMoveReadinessInfo().get("szdtmhrkwof").isReadyForMove()); + Assertions.assertEquals("bahwfl", model.recoveryPointMoveReadinessInfo().get("szdtmhrkwof").additionalInfo()); + Assertions.assertEquals("oqac", model.recoveryPointProperties().expiryTime()); + Assertions.assertEquals("expbtg", model.recoveryPointProperties().ruleName()); + Assertions.assertTrue(model.recoveryPointProperties().isSoftDeleted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T10:17:12Z"), model.timeRanges().get(0).startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-28T00:53:44Z"), model.timeRanges().get(0).endTime()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadPointInTimeRestoreRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadPointInTimeRestoreRequestTests.java index ec67dcfe8018..444b70b94e88 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadPointInTimeRestoreRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadPointInTimeRestoreRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -23,73 +23,72 @@ public final class AzureWorkloadPointInTimeRestoreRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadPointInTimeRestoreRequest model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadPointInTimeRestoreRequest\",\"pointInTime\":\"2020-12-24T17:11:07Z\",\"recoveryType\":\"Invalid\",\"sourceResourceId\":\"pijrajcivmmghf\",\"propertyBag\":{\"nzqodfvpg\":\"wrxgkneuvy\",\"zdjtxvzflbqv\":\"hoxgsgbpf\"},\"targetInfo\":{\"overwriteOption\":\"FailOnConflict\",\"containerId\":\"gafcqu\",\"databaseName\":\"dvetnws\",\"targetDirectoryForFileRestore\":\"utnw\"},\"recoveryMode\":\"FileRecovery\",\"targetResourceGroupName\":\"cvuzhyrmewipmve\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"ukuqgsj\",\"identityName\":\"undxgketw\",\"userAssignedIdentityProperties\":{\"clientId\":\"zjhfjmhvv\",\"principalId\":\"vgpmun\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":false,\"logPointInTimeForDBRecovery\":\"mhfbuzjy\"},\"targetVirtualMachineId\":\"sasbhu\",\"resourceGuardOperationRequests\":[\"ohyuemslynsq\",\"rpfoobr\",\"ttymsjny\",\"qdnfwqzdz\"]}") + "{\"objectType\":\"AzureWorkloadPointInTimeRestoreRequest\",\"pointInTime\":\"2021-07-23T06:54:11Z\",\"recoveryType\":\"OriginalLocation\",\"sourceResourceId\":\"ivbkbxgomfaj\",\"propertyBag\":{\"kjsqzhzbezkgi\":\"sqvdaeyygux\",\"vvjskgfmocwahp\":\"sidxasicdd\"},\"targetInfo\":{\"overwriteOption\":\"Overwrite\",\"containerId\":\"eaahhvjhhn\",\"databaseName\":\"zybbj\",\"targetDirectoryForFileRestore\":\"dj\"},\"recoveryMode\":\"RecoveryUsingSnapshot\",\"targetResourceGroupName\":\"kyxvxevblbjedn\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"age\",\"identityName\":\"ulxunsmjbnkpp\",\"userAssignedIdentityProperties\":{\"clientId\":\"enlsvxeizzgwkln\",\"principalId\":\"mffeycxcktpi\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":false,\"logPointInTimeForDBRecovery\":\"eeammxqie\"},\"targetVirtualMachineId\":\"kzddrtkgdojbmxva\",\"resourceGuardOperationRequests\":[\"fdeesvecuijpxtx\",\"uwprtujwsawd\"]}") .toObject(AzureWorkloadPointInTimeRestoreRequest.class); - Assertions.assertEquals("ohyuemslynsq", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.INVALID, model.recoveryType()); - Assertions.assertEquals("pijrajcivmmghf", model.sourceResourceId()); - Assertions.assertEquals("wrxgkneuvy", model.propertyBag().get("nzqodfvpg")); - Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); - Assertions.assertEquals("gafcqu", model.targetInfo().containerId()); - Assertions.assertEquals("dvetnws", model.targetInfo().databaseName()); - Assertions.assertEquals("utnw", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.FILE_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("cvuzhyrmewipmve", model.targetResourceGroupName()); - Assertions.assertEquals("ukuqgsj", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("undxgketw", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("zjhfjmhvv", + Assertions.assertEquals("fdeesvecuijpxtx", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.ORIGINAL_LOCATION, model.recoveryType()); + Assertions.assertEquals("ivbkbxgomfaj", model.sourceResourceId()); + Assertions.assertEquals("sqvdaeyygux", model.propertyBag().get("kjsqzhzbezkgi")); + Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); + Assertions.assertEquals("eaahhvjhhn", model.targetInfo().containerId()); + Assertions.assertEquals("zybbj", model.targetInfo().databaseName()); + Assertions.assertEquals("dj", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.RECOVERY_USING_SNAPSHOT, model.recoveryMode()); + Assertions.assertEquals("kyxvxevblbjedn", model.targetResourceGroupName()); + Assertions.assertEquals("age", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("ulxunsmjbnkpp", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("enlsvxeizzgwkln", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("vgpmun", + Assertions.assertEquals("mffeycxcktpi", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(false, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("mhfbuzjy", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("sasbhu", model.targetVirtualMachineId()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-24T17:11:07Z"), model.pointInTime()); + Assertions.assertFalse(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("eeammxqie", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("kzddrtkgdojbmxva", model.targetVirtualMachineId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T06:54:11Z"), model.pointInTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureWorkloadPointInTimeRestoreRequest model = new AzureWorkloadPointInTimeRestoreRequest() - .withResourceGuardOperationRequests(Arrays.asList("ohyuemslynsq", "rpfoobr", "ttymsjny", "qdnfwqzdz")) - .withRecoveryType(RecoveryType.INVALID) - .withSourceResourceId("pijrajcivmmghf") - .withPropertyBag(mapOf("nzqodfvpg", "wrxgkneuvy", "zdjtxvzflbqv", "hoxgsgbpf")) - .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.FAIL_ON_CONFLICT) - .withContainerId("gafcqu") - .withDatabaseName("dvetnws") - .withTargetDirectoryForFileRestore("utnw")) - .withRecoveryMode(RecoveryMode.FILE_RECOVERY) - .withTargetResourceGroupName("cvuzhyrmewipmve") - .withUserAssignedManagedIdentityDetails( - new UserAssignedManagedIdentityDetails().withIdentityArmId("ukuqgsj") - .withIdentityName("undxgketw") - .withUserAssignedIdentityProperties( - new UserAssignedIdentityProperties().withClientId("zjhfjmhvv").withPrincipalId("vgpmun"))) + .withResourceGuardOperationRequests(Arrays.asList("fdeesvecuijpxtx", "uwprtujwsawd")) + .withRecoveryType(RecoveryType.ORIGINAL_LOCATION) + .withSourceResourceId("ivbkbxgomfaj") + .withPropertyBag(mapOf("kjsqzhzbezkgi", "sqvdaeyygux", "vvjskgfmocwahp", "sidxasicdd")) + .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.OVERWRITE) + .withContainerId("eaahhvjhhn") + .withDatabaseName("zybbj") + .withTargetDirectoryForFileRestore("dj")) + .withRecoveryMode(RecoveryMode.RECOVERY_USING_SNAPSHOT) + .withTargetResourceGroupName("kyxvxevblbjedn") + .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails().withIdentityArmId("age") + .withIdentityName("ulxunsmjbnkpp") + .withUserAssignedIdentityProperties(new UserAssignedIdentityProperties().withClientId("enlsvxeizzgwkln") + .withPrincipalId("mffeycxcktpi"))) .withSnapshotRestoreParameters(new SnapshotRestoreParameters().withSkipAttachAndMount(false) - .withLogPointInTimeForDBRecovery("mhfbuzjy")) - .withTargetVirtualMachineId("sasbhu") - .withPointInTime(OffsetDateTime.parse("2020-12-24T17:11:07Z")); + .withLogPointInTimeForDBRecovery("eeammxqie")) + .withTargetVirtualMachineId("kzddrtkgdojbmxva") + .withPointInTime(OffsetDateTime.parse("2021-07-23T06:54:11Z")); model = BinaryData.fromObject(model).toObject(AzureWorkloadPointInTimeRestoreRequest.class); - Assertions.assertEquals("ohyuemslynsq", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.INVALID, model.recoveryType()); - Assertions.assertEquals("pijrajcivmmghf", model.sourceResourceId()); - Assertions.assertEquals("wrxgkneuvy", model.propertyBag().get("nzqodfvpg")); - Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); - Assertions.assertEquals("gafcqu", model.targetInfo().containerId()); - Assertions.assertEquals("dvetnws", model.targetInfo().databaseName()); - Assertions.assertEquals("utnw", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.FILE_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("cvuzhyrmewipmve", model.targetResourceGroupName()); - Assertions.assertEquals("ukuqgsj", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("undxgketw", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("zjhfjmhvv", + Assertions.assertEquals("fdeesvecuijpxtx", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.ORIGINAL_LOCATION, model.recoveryType()); + Assertions.assertEquals("ivbkbxgomfaj", model.sourceResourceId()); + Assertions.assertEquals("sqvdaeyygux", model.propertyBag().get("kjsqzhzbezkgi")); + Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); + Assertions.assertEquals("eaahhvjhhn", model.targetInfo().containerId()); + Assertions.assertEquals("zybbj", model.targetInfo().databaseName()); + Assertions.assertEquals("dj", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.RECOVERY_USING_SNAPSHOT, model.recoveryMode()); + Assertions.assertEquals("kyxvxevblbjedn", model.targetResourceGroupName()); + Assertions.assertEquals("age", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("ulxunsmjbnkpp", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("enlsvxeizzgwkln", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("vgpmun", + Assertions.assertEquals("mffeycxcktpi", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(false, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("mhfbuzjy", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("sasbhu", model.targetVirtualMachineId()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-24T17:11:07Z"), model.pointInTime()); + Assertions.assertFalse(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("eeammxqie", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("kzddrtkgdojbmxva", model.targetVirtualMachineId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T06:54:11Z"), model.pointInTime()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadRecoveryPointTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadRecoveryPointTests.java index 5b7854410fa1..d08ab6a10c98 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadRecoveryPointTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadRecoveryPointTests.java @@ -1,85 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadRecoveryPoint; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointProperties; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierInformationV2; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierStatus; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType; import com.azure.resourcemanager.recoveryservicesbackup.models.RestorePointType; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class AzureWorkloadRecoveryPointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadRecoveryPoint model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadRecoveryPoint\",\"recoveryPointTimeInUTC\":\"2021-09-06T02:43:55Z\",\"type\":\"Differential\",\"recoveryPointTierDetails\":[{\"type\":\"InstantRP\",\"status\":\"Invalid\",\"extendedInfo\":{\"lhvnhlab\":\"petogebjox\",\"kkzjcjbtrga\":\"q\",\"brxjjsto\":\"hvv\",\"tmo\":\"beitpkx\"}},{\"type\":\"Invalid\",\"status\":\"Deleted\",\"extendedInfo\":{\"maqxzhemjyh\":\"dgfcwqmp\",\"bawpfajnjwltlwt\":\"hujswtwkozzwcul\"}},{\"type\":\"Invalid\",\"status\":\"Valid\",\"extendedInfo\":{\"rpoaimlnwi\":\"lhsnvkcdmx\",\"ulcsethwwnpj\":\"aomylwea\"}}],\"recoveryPointMoveReadinessInfo\":{\"fb\":{\"isReadyForMove\":true,\"additionalInfo\":\"pchwa\"}},\"recoveryPointProperties\":{\"expiryTime\":\"nfepgf\",\"ruleName\":\"etwlyxgncx\",\"isSoftDeleted\":false}}") + "{\"objectType\":\"AzureWorkloadRecoveryPoint\",\"recoveryPointTimeInUTC\":\"2021-11-25T06:11:13Z\",\"type\":\"Invalid\",\"recoveryPointTierDetails\":[{\"type\":\"ArchivedRP\",\"status\":\"Invalid\",\"extendedInfo\":{\"wp\":\"clewyhm\",\"fn\":\"ztzp\",\"fz\":\"ckw\"}}],\"recoveryPointMoveReadinessInfo\":{\"o\":{\"isReadyForMove\":false,\"additionalInfo\":\"uyqaxzfeqztppr\"}},\"recoveryPointProperties\":{\"expiryTime\":\"rjaltolmncw\",\"ruleName\":\"bqwcsdbnwdcf\",\"isSoftDeleted\":false},\"threatStatus\":\"Warning\",\"threatInfo\":[{\"threatTitle\":\"vglsbjjca\",\"threatDescription\":\"xbvtvudu\",\"lastUpdatedTime\":\"2021-06-01T05:14:07Z\",\"threatState\":\"Ignored\",\"threatStartTime\":\"2021-10-18T10:35:02Z\",\"threatEndTime\":\"2021-08-01T05:22:31Z\",\"threatURI\":\"tvcof\",\"threatSeverity\":\"Critical\"},{\"threatTitle\":\"vkg\",\"threatDescription\":\"bgdknnqv\",\"lastUpdatedTime\":\"2021-04-22T07:35:58Z\",\"threatState\":\"Resolved\",\"threatStartTime\":\"2021-05-22T05:07:43Z\",\"threatEndTime\":\"2021-11-22T10:46:24Z\",\"threatURI\":\"dsg\",\"threatSeverity\":\"Critical\"},{\"threatTitle\":\"kycgrauwj\",\"threatDescription\":\"taeburuvdm\",\"lastUpdatedTime\":\"2021-03-10T19:42:31Z\",\"threatState\":\"Resolved\",\"threatStartTime\":\"2020-12-25T04:12:31Z\",\"threatEndTime\":\"2021-04-25T07:43:26Z\",\"threatURI\":\"mqoefkifrvtpuqu\",\"threatSeverity\":\"High\"}]}") .toObject(AzureWorkloadRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T02:43:55Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.DIFFERENTIAL, model.type()); - Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.recoveryPointTierDetails().get(0).type()); + Assertions.assertEquals(ThreatStatus.WARNING, model.threatStatus()); + Assertions.assertEquals(ThreatState.IGNORED, model.threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.CRITICAL, model.threatInfo().get(0).threatSeverity()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-25T06:11:13Z"), model.recoveryPointTimeInUtc()); + Assertions.assertEquals(RestorePointType.INVALID, model.type()); + Assertions.assertEquals("clewyhm", model.recoveryPointTierDetails().get(0).extendedInfo().get("wp")); + Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.recoveryPointTierDetails().get(0).type()); Assertions.assertEquals(RecoveryPointTierStatus.INVALID, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("petogebjox", model.recoveryPointTierDetails().get(0).extendedInfo().get("lhvnhlab")); - Assertions.assertEquals(true, model.recoveryPointMoveReadinessInfo().get("fb").isReadyForMove()); - Assertions.assertEquals("pchwa", model.recoveryPointMoveReadinessInfo().get("fb").additionalInfo()); - Assertions.assertEquals("nfepgf", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("etwlyxgncx", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(false, model.recoveryPointProperties().isSoftDeleted()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureWorkloadRecoveryPoint model - = new AzureWorkloadRecoveryPoint().withRecoveryPointTimeInUtc(OffsetDateTime.parse("2021-09-06T02:43:55Z")) - .withType(RestorePointType.DIFFERENTIAL) - .withRecoveryPointTierDetails( - Arrays.asList( - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.INSTANT_RP) - .withStatus(RecoveryPointTierStatus.INVALID) - .withExtendedInfo(mapOf("lhvnhlab", "petogebjox", "kkzjcjbtrga", "q", "brxjjsto", "hvv", - "tmo", "beitpkx")), - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.INVALID) - .withStatus(RecoveryPointTierStatus.DELETED) - .withExtendedInfo(mapOf("maqxzhemjyh", "dgfcwqmp", "bawpfajnjwltlwt", "hujswtwkozzwcul")), - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.INVALID) - .withStatus(RecoveryPointTierStatus.VALID) - .withExtendedInfo(mapOf("rpoaimlnwi", "lhsnvkcdmx", "ulcsethwwnpj", "aomylwea")))) - .withRecoveryPointMoveReadinessInfo(mapOf("fb", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("pchwa"))) - .withRecoveryPointProperties(new RecoveryPointProperties().withExpiryTime("nfepgf") - .withRuleName("etwlyxgncx") - .withIsSoftDeleted(false)); - model = BinaryData.fromObject(model).toObject(AzureWorkloadRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T02:43:55Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.DIFFERENTIAL, model.type()); - Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.INVALID, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("petogebjox", model.recoveryPointTierDetails().get(0).extendedInfo().get("lhvnhlab")); - Assertions.assertEquals(true, model.recoveryPointMoveReadinessInfo().get("fb").isReadyForMove()); - Assertions.assertEquals("pchwa", model.recoveryPointMoveReadinessInfo().get("fb").additionalInfo()); - Assertions.assertEquals("nfepgf", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("etwlyxgncx", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(false, model.recoveryPointProperties().isSoftDeleted()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertFalse(model.recoveryPointMoveReadinessInfo().get("o").isReadyForMove()); + Assertions.assertEquals("uyqaxzfeqztppr", model.recoveryPointMoveReadinessInfo().get("o").additionalInfo()); + Assertions.assertEquals("rjaltolmncw", model.recoveryPointProperties().expiryTime()); + Assertions.assertEquals("bqwcsdbnwdcf", model.recoveryPointProperties().ruleName()); + Assertions.assertFalse(model.recoveryPointProperties().isSoftDeleted()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadRestoreRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadRestoreRequestTests.java index 7c9bdfed1a3b..79c31ff777ca 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadRestoreRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadRestoreRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -22,70 +22,69 @@ public final class AzureWorkloadRestoreRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadRestoreRequest model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadRestoreRequest\",\"recoveryType\":\"RestoreDisks\",\"sourceResourceId\":\"axhnfh\",\"propertyBag\":{\"ouwivkxoyzunbixx\":\"vi\"},\"targetInfo\":{\"overwriteOption\":\"FailOnConflict\",\"containerId\":\"cpwpg\",\"databaseName\":\"rc\",\"targetDirectoryForFileRestore\":\"tso\"},\"recoveryMode\":\"FileRecovery\",\"targetResourceGroupName\":\"enxpmyyefr\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"dnqqskawaoqvmmb\",\"identityName\":\"qfr\",\"userAssignedIdentityProperties\":{\"clientId\":\"kzmegnitgvkxlz\",\"principalId\":\"drf\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":true,\"logPointInTimeForDBRecovery\":\"lzxwhcansy\"},\"targetVirtualMachineId\":\"yqhlwigdivbkbx\",\"resourceGuardOperationRequests\":[\"fajuwas\"]}") + "{\"objectType\":\"AzureWorkloadRestoreRequest\",\"recoveryType\":\"RestoreDisks\",\"sourceResourceId\":\"abxvi\",\"propertyBag\":{\"zeexavoxtfgle\":\"v\",\"pypqtgsfj\":\"dmdqb\",\"db\":\"cbslhhx\",\"irudh\":\"vodhtn\"},\"targetInfo\":{\"overwriteOption\":\"Invalid\",\"containerId\":\"ckdlpag\",\"databaseName\":\"cxfailcfxwmdboxd\",\"targetDirectoryForFileRestore\":\"sftufqobrjlna\"},\"recoveryMode\":\"Invalid\",\"targetResourceGroupName\":\"kknhxkizvytnrzv\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"r\",\"identityName\":\"eranokqgukkjqnv\",\"userAssignedIdentityProperties\":{\"clientId\":\"ylaxxulcdi\",\"principalId\":\"osfjbjsv\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":true,\"logPointInTimeForDBRecovery\":\"r\"},\"targetVirtualMachineId\":\"ycy\",\"resourceGuardOperationRequests\":[\"lxgccknfnwmbtm\"]}") .toObject(AzureWorkloadRestoreRequest.class); - Assertions.assertEquals("fajuwas", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("lxgccknfnwmbtm", model.resourceGuardOperationRequests().get(0)); Assertions.assertEquals(RecoveryType.RESTORE_DISKS, model.recoveryType()); - Assertions.assertEquals("axhnfh", model.sourceResourceId()); - Assertions.assertEquals("vi", model.propertyBag().get("ouwivkxoyzunbixx")); - Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); - Assertions.assertEquals("cpwpg", model.targetInfo().containerId()); - Assertions.assertEquals("rc", model.targetInfo().databaseName()); - Assertions.assertEquals("tso", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.FILE_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("enxpmyyefr", model.targetResourceGroupName()); - Assertions.assertEquals("dnqqskawaoqvmmb", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("qfr", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("kzmegnitgvkxlz", + Assertions.assertEquals("abxvi", model.sourceResourceId()); + Assertions.assertEquals("v", model.propertyBag().get("zeexavoxtfgle")); + Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); + Assertions.assertEquals("ckdlpag", model.targetInfo().containerId()); + Assertions.assertEquals("cxfailcfxwmdboxd", model.targetInfo().databaseName()); + Assertions.assertEquals("sftufqobrjlna", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); + Assertions.assertEquals("kknhxkizvytnrzv", model.targetResourceGroupName()); + Assertions.assertEquals("r", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("eranokqgukkjqnv", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("ylaxxulcdi", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("drf", + Assertions.assertEquals("osfjbjsv", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(true, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("lzxwhcansy", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("yqhlwigdivbkbx", model.targetVirtualMachineId()); + Assertions.assertTrue(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("r", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("ycy", model.targetVirtualMachineId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureWorkloadRestoreRequest model - = new AzureWorkloadRestoreRequest().withResourceGuardOperationRequests(Arrays.asList("fajuwas")) + = new AzureWorkloadRestoreRequest().withResourceGuardOperationRequests(Arrays.asList("lxgccknfnwmbtm")) .withRecoveryType(RecoveryType.RESTORE_DISKS) - .withSourceResourceId("axhnfh") - .withPropertyBag(mapOf("ouwivkxoyzunbixx", "vi")) - .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.FAIL_ON_CONFLICT) - .withContainerId("cpwpg") - .withDatabaseName("rc") - .withTargetDirectoryForFileRestore("tso")) - .withRecoveryMode(RecoveryMode.FILE_RECOVERY) - .withTargetResourceGroupName("enxpmyyefr") - .withUserAssignedManagedIdentityDetails( - new UserAssignedManagedIdentityDetails().withIdentityArmId("dnqqskawaoqvmmb") - .withIdentityName("qfr") - .withUserAssignedIdentityProperties( - new UserAssignedIdentityProperties().withClientId("kzmegnitgvkxlz").withPrincipalId("drf"))) - .withSnapshotRestoreParameters(new SnapshotRestoreParameters().withSkipAttachAndMount(true) - .withLogPointInTimeForDBRecovery("lzxwhcansy")) - .withTargetVirtualMachineId("yqhlwigdivbkbx"); + .withSourceResourceId("abxvi") + .withPropertyBag(mapOf("zeexavoxtfgle", "v", "pypqtgsfj", "dmdqb", "db", "cbslhhx", "irudh", "vodhtn")) + .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.INVALID) + .withContainerId("ckdlpag") + .withDatabaseName("cxfailcfxwmdboxd") + .withTargetDirectoryForFileRestore("sftufqobrjlna")) + .withRecoveryMode(RecoveryMode.INVALID) + .withTargetResourceGroupName("kknhxkizvytnrzv") + .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails().withIdentityArmId("r") + .withIdentityName("eranokqgukkjqnv") + .withUserAssignedIdentityProperties( + new UserAssignedIdentityProperties().withClientId("ylaxxulcdi").withPrincipalId("osfjbjsv"))) + .withSnapshotRestoreParameters( + new SnapshotRestoreParameters().withSkipAttachAndMount(true).withLogPointInTimeForDBRecovery("r")) + .withTargetVirtualMachineId("ycy"); model = BinaryData.fromObject(model).toObject(AzureWorkloadRestoreRequest.class); - Assertions.assertEquals("fajuwas", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("lxgccknfnwmbtm", model.resourceGuardOperationRequests().get(0)); Assertions.assertEquals(RecoveryType.RESTORE_DISKS, model.recoveryType()); - Assertions.assertEquals("axhnfh", model.sourceResourceId()); - Assertions.assertEquals("vi", model.propertyBag().get("ouwivkxoyzunbixx")); - Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); - Assertions.assertEquals("cpwpg", model.targetInfo().containerId()); - Assertions.assertEquals("rc", model.targetInfo().databaseName()); - Assertions.assertEquals("tso", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.FILE_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("enxpmyyefr", model.targetResourceGroupName()); - Assertions.assertEquals("dnqqskawaoqvmmb", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("qfr", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("kzmegnitgvkxlz", + Assertions.assertEquals("abxvi", model.sourceResourceId()); + Assertions.assertEquals("v", model.propertyBag().get("zeexavoxtfgle")); + Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); + Assertions.assertEquals("ckdlpag", model.targetInfo().containerId()); + Assertions.assertEquals("cxfailcfxwmdboxd", model.targetInfo().databaseName()); + Assertions.assertEquals("sftufqobrjlna", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); + Assertions.assertEquals("kknhxkizvytnrzv", model.targetResourceGroupName()); + Assertions.assertEquals("r", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("eranokqgukkjqnv", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("ylaxxulcdi", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("drf", + Assertions.assertEquals("osfjbjsv", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(true, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("lzxwhcansy", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("yqhlwigdivbkbx", model.targetVirtualMachineId()); + Assertions.assertTrue(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("r", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("ycy", model.targetVirtualMachineId()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapAsePointInTimeRecoveryPointTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapAsePointInTimeRecoveryPointTests.java index 2245bf8fa333..8ec29fc628ed 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapAsePointInTimeRecoveryPointTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapAsePointInTimeRecoveryPointTests.java @@ -1,102 +1,41 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapAsePointInTimeRecoveryPoint; -import com.azure.resourcemanager.recoveryservicesbackup.models.PointInTimeRange; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointProperties; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierInformationV2; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierStatus; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType; import com.azure.resourcemanager.recoveryservicesbackup.models.RestorePointType; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class AzureWorkloadSapAsePointInTimeRecoveryPointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSapAsePointInTimeRecoveryPoint model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadSAPAsePointInTimeRecoveryPoint\",\"timeRanges\":[{\"startTime\":\"2021-06-03T18:41:03Z\",\"endTime\":\"2021-07-13T22:45Z\"},{\"startTime\":\"2021-04-12T08:11:42Z\",\"endTime\":\"2021-10-31T09:17:43Z\"},{\"startTime\":\"2021-02-14T11:03:13Z\",\"endTime\":\"2021-03-20T15:11:50Z\"}],\"recoveryPointTimeInUTC\":\"2021-02-23T18:39:19Z\",\"type\":\"Differential\",\"recoveryPointTierDetails\":[{\"type\":\"HardenedRP\",\"status\":\"Rehydrated\",\"extendedInfo\":{\"zonzlrpiqywnc\":\"gnl\"}},{\"type\":\"ArchivedRP\",\"status\":\"Valid\",\"extendedInfo\":{\"reljeamur\":\"fizehtdhgbjk\",\"xlpm\":\"zmlovuanash\",\"lvidizozs\":\"erbdk\"}},{\"type\":\"InstantRP\",\"status\":\"Invalid\",\"extendedInfo\":{\"dgnwncypuuwwlt\":\"on\",\"tzenk\":\"uqj\",\"zhmkdasvflyh\":\"if\",\"oldforobw\":\"xcudchxgsr\"}},{\"type\":\"InstantRP\",\"status\":\"Disabled\",\"extendedInfo\":{\"dxe\":\"hfovvacqpbtu\",\"elawumu\":\"zab\"}}],\"recoveryPointMoveReadinessInfo\":{\"mdr\":{\"isReadyForMove\":false,\"additionalInfo\":\"rrwoycqucwyhahn\"},\"rutlwexxwlalniex\":{\"isReadyForMove\":true,\"additionalInfo\":\"hpsvfu\"},\"chzyvlixqnrk\":{\"isReadyForMove\":false,\"additionalInfo\":\"pgepqtybbwwpgda\"}},\"recoveryPointProperties\":{\"expiryTime\":\"jibnxmysu\",\"ruleName\":\"wq\",\"isSoftDeleted\":true}}") + "{\"objectType\":\"AzureWorkloadSAPAsePointInTimeRecoveryPoint\",\"timeRanges\":[{\"startTime\":\"2021-10-02T23:42:56Z\",\"endTime\":\"2021-03-18T18:34:05Z\"}],\"recoveryPointTimeInUTC\":\"2021-03-26T20:34:31Z\",\"type\":\"Invalid\",\"recoveryPointTierDetails\":[{\"type\":\"Invalid\",\"status\":\"Rehydrated\",\"extendedInfo\":{\"yfkzik\":\"kkfoqr\"}},{\"type\":\"Invalid\",\"status\":\"Rehydrated\",\"extendedInfo\":{\"feaenwab\":\"czelpcirel\",\"oz\":\"atklddxbjhwuaa\"}},{\"type\":\"InstantRP\",\"status\":\"Deleted\",\"extendedInfo\":{\"xitc\":\"rvxaglrvimjwosy\",\"ekkezzikhlyfjh\":\"kfcktqum\",\"idb\":\"gqggebdunygae\"}},{\"type\":\"HardenedRP\",\"status\":\"Deleted\",\"extendedInfo\":{\"arm\":\"yjmoadsu\",\"rw\":\"wdmjsjqbjhhyx\",\"duhpk\":\"yc\",\"hky\":\"kgymareqnajxqug\"}}],\"recoveryPointMoveReadinessInfo\":{\"zqalkrmnjijpx\":{\"isReadyForMove\":false,\"additionalInfo\":\"gssofwq\"},\"abjy\":{\"isReadyForMove\":false,\"additionalInfo\":\"udfnbyxba\"},\"nevfdnw\":{\"isReadyForMove\":true,\"additionalInfo\":\"fimrzrtuzqogse\"}},\"recoveryPointProperties\":{\"expiryTime\":\"ewzsyyceuzsoib\",\"ruleName\":\"dpfrxtrthzvaytdw\",\"isSoftDeleted\":false},\"threatStatus\":\"UnHealthy\",\"threatInfo\":[{\"threatTitle\":\"axhexiilivp\",\"threatDescription\":\"iirqtd\",\"lastUpdatedTime\":\"2021-04-19T09:17:54Z\",\"threatState\":\"Resolved\",\"threatStartTime\":\"2021-09-27T01:53:27Z\",\"threatEndTime\":\"2021-06-25T23:16:19Z\",\"threatURI\":\"squyfxrxxlep\",\"threatSeverity\":\"Warning\"},{\"threatTitle\":\"xje\",\"threatDescription\":\"lwnwxuqlcvydyp\",\"lastUpdatedTime\":\"2021-03-01T02:46:01Z\",\"threatState\":\"Active\",\"threatStartTime\":\"2021-02-04T04:21:30Z\",\"threatEndTime\":\"2021-07-09T00:51:43Z\",\"threatURI\":\"iodkooebwnujhem\",\"threatSeverity\":\"Warning\"},{\"threatTitle\":\"dkcrodt\",\"threatDescription\":\"nfwjlfltkacjvefk\",\"lastUpdatedTime\":\"2021-05-26T04:23:15Z\",\"threatState\":\"Ignored\",\"threatStartTime\":\"2021-03-28T14:05:44Z\",\"threatEndTime\":\"2021-09-10T17:31:56Z\",\"threatURI\":\"pagao\",\"threatSeverity\":\"Informational\"},{\"threatTitle\":\"pqblylsyxkqjnsj\",\"threatDescription\":\"vti\",\"lastUpdatedTime\":\"2021-03-17T10:58:04Z\",\"threatState\":\"InProgress\",\"threatStartTime\":\"2021-09-29T10:51:16Z\",\"threatEndTime\":\"2021-01-24T23:08:26Z\",\"threatURI\":\"psbzkfzbeyvpn\",\"threatSeverity\":\"Informational\"}]}") .toObject(AzureWorkloadSapAsePointInTimeRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-23T18:39:19Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.DIFFERENTIAL, model.type()); - Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.recoveryPointTierDetails().get(0).type()); + Assertions.assertEquals(ThreatStatus.UN_HEALTHY, model.threatStatus()); + Assertions.assertEquals(ThreatState.RESOLVED, model.threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.WARNING, model.threatInfo().get(0).threatSeverity()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-26T20:34:31Z"), model.recoveryPointTimeInUtc()); + Assertions.assertEquals(RestorePointType.INVALID, model.type()); + Assertions.assertEquals("kkfoqr", model.recoveryPointTierDetails().get(0).extendedInfo().get("yfkzik")); + Assertions.assertEquals(RecoveryPointTierType.INVALID, model.recoveryPointTierDetails().get(0).type()); Assertions.assertEquals(RecoveryPointTierStatus.REHYDRATED, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("gnl", model.recoveryPointTierDetails().get(0).extendedInfo().get("zonzlrpiqywnc")); - Assertions.assertEquals(false, model.recoveryPointMoveReadinessInfo().get("mdr").isReadyForMove()); - Assertions.assertEquals("rrwoycqucwyhahn", model.recoveryPointMoveReadinessInfo().get("mdr").additionalInfo()); - Assertions.assertEquals("jibnxmysu", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("wq", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(true, model.recoveryPointProperties().isSoftDeleted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-03T18:41:03Z"), model.timeRanges().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-13T22:45Z"), model.timeRanges().get(0).endTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureWorkloadSapAsePointInTimeRecoveryPoint model = new AzureWorkloadSapAsePointInTimeRecoveryPoint() - .withRecoveryPointTimeInUtc(OffsetDateTime.parse("2021-02-23T18:39:19Z")) - .withType(RestorePointType.DIFFERENTIAL) - .withRecoveryPointTierDetails(Arrays.asList( - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.HARDENED_RP) - .withStatus(RecoveryPointTierStatus.REHYDRATED) - .withExtendedInfo(mapOf("zonzlrpiqywnc", "gnl")), - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.ARCHIVED_RP) - .withStatus(RecoveryPointTierStatus.VALID) - .withExtendedInfo(mapOf("reljeamur", "fizehtdhgbjk", "xlpm", "zmlovuanash", "lvidizozs", "erbdk")), - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.INSTANT_RP) - .withStatus(RecoveryPointTierStatus.INVALID) - .withExtendedInfo( - mapOf("dgnwncypuuwwlt", "on", "tzenk", "uqj", "zhmkdasvflyh", "if", "oldforobw", "xcudchxgsr")), - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.INSTANT_RP) - .withStatus(RecoveryPointTierStatus.DISABLED) - .withExtendedInfo(mapOf("dxe", "hfovvacqpbtu", "elawumu", "zab")))) - .withRecoveryPointMoveReadinessInfo(mapOf("mdr", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(false).withAdditionalInfo("rrwoycqucwyhahn"), - "rutlwexxwlalniex", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("hpsvfu"), - "chzyvlixqnrk", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(false).withAdditionalInfo("pgepqtybbwwpgda"))) - .withRecoveryPointProperties( - new RecoveryPointProperties().withExpiryTime("jibnxmysu").withRuleName("wq").withIsSoftDeleted(true)) - .withTimeRanges(Arrays.asList( - new PointInTimeRange().withStartTime(OffsetDateTime.parse("2021-06-03T18:41:03Z")) - .withEndTime(OffsetDateTime.parse("2021-07-13T22:45Z")), - new PointInTimeRange().withStartTime(OffsetDateTime.parse("2021-04-12T08:11:42Z")) - .withEndTime(OffsetDateTime.parse("2021-10-31T09:17:43Z")), - new PointInTimeRange().withStartTime(OffsetDateTime.parse("2021-02-14T11:03:13Z")) - .withEndTime(OffsetDateTime.parse("2021-03-20T15:11:50Z")))); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSapAsePointInTimeRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-23T18:39:19Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.DIFFERENTIAL, model.type()); - Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.REHYDRATED, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("gnl", model.recoveryPointTierDetails().get(0).extendedInfo().get("zonzlrpiqywnc")); - Assertions.assertEquals(false, model.recoveryPointMoveReadinessInfo().get("mdr").isReadyForMove()); - Assertions.assertEquals("rrwoycqucwyhahn", model.recoveryPointMoveReadinessInfo().get("mdr").additionalInfo()); - Assertions.assertEquals("jibnxmysu", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("wq", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(true, model.recoveryPointProperties().isSoftDeleted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-03T18:41:03Z"), model.timeRanges().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-13T22:45Z"), model.timeRanges().get(0).endTime()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertFalse(model.recoveryPointMoveReadinessInfo().get("zqalkrmnjijpx").isReadyForMove()); + Assertions.assertEquals("gssofwq", + model.recoveryPointMoveReadinessInfo().get("zqalkrmnjijpx").additionalInfo()); + Assertions.assertEquals("ewzsyyceuzsoib", model.recoveryPointProperties().expiryTime()); + Assertions.assertEquals("dpfrxtrthzvaytdw", model.recoveryPointProperties().ruleName()); + Assertions.assertFalse(model.recoveryPointProperties().isSoftDeleted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-02T23:42:56Z"), model.timeRanges().get(0).startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-18T18:34:05Z"), model.timeRanges().get(0).endTime()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapAsePointInTimeRestoreRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapAsePointInTimeRestoreRequestTests.java index 20e9280006f6..d0063a83da5b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapAsePointInTimeRestoreRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapAsePointInTimeRestoreRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -23,73 +23,72 @@ public final class AzureWorkloadSapAsePointInTimeRestoreRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSapAsePointInTimeRestoreRequest model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadSAPAsePointInTimeRestoreRequest\",\"pointInTime\":\"2021-10-20T20:49:39Z\",\"recoveryType\":\"AlternateLocation\",\"sourceResourceId\":\"psttexoq\",\"propertyBag\":{\"uncuw\":\"cyyufmh\",\"unqndyfpchrqb\":\"qspkcdqzhlctd\",\"boxjumvq\":\"jjrcgegydc\",\"ouau\":\"olihrra\"},\"targetInfo\":{\"overwriteOption\":\"Invalid\",\"containerId\":\"oq\",\"databaseName\":\"uojrngiflr\",\"targetDirectoryForFileRestore\":\"asccbiui\"},\"recoveryMode\":\"SnapshotAttach\",\"targetResourceGroupName\":\"yjdfqwmky\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"fdvruz\",\"identityName\":\"zojhpctfnmd\",\"userAssignedIdentityProperties\":{\"clientId\":\"ngfdgugeyzihgrky\",\"principalId\":\"zabs\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":false,\"logPointInTimeForDBRecovery\":\"hojeevy\"},\"targetVirtualMachineId\":\"hsgz\",\"resourceGuardOperationRequests\":[\"bgomfgbegl\",\"gleohi\",\"etnluankrrfx\"]}") + "{\"objectType\":\"AzureWorkloadSAPAsePointInTimeRestoreRequest\",\"pointInTime\":\"2020-12-24T22:02:25Z\",\"recoveryType\":\"RestoreDisks\",\"sourceResourceId\":\"xotngfdguge\",\"propertyBag\":{\"i\":\"hgrky\"},\"targetInfo\":{\"overwriteOption\":\"FailOnConflict\",\"containerId\":\"mfp\",\"databaseName\":\"ojeevy\",\"targetDirectoryForFileRestore\":\"hsgz\"},\"recoveryMode\":\"WorkloadRecovery\",\"targetResourceGroupName\":\"gomfgbeglq\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"o\",\"identityName\":\"betnluankrrfxee\",\"userAssignedIdentityProperties\":{\"clientId\":\"ij\",\"principalId\":\"cvbmqzb\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":true,\"logPointInTimeForDBRecovery\":\"jrnwxacev\"},\"targetVirtualMachineId\":\"jkuyxoafgaoq\",\"resourceGuardOperationRequests\":[\"aeylinm\"]}") .toObject(AzureWorkloadSapAsePointInTimeRestoreRequest.class); - Assertions.assertEquals("bgomfgbegl", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.ALTERNATE_LOCATION, model.recoveryType()); - Assertions.assertEquals("psttexoq", model.sourceResourceId()); - Assertions.assertEquals("cyyufmh", model.propertyBag().get("uncuw")); - Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); - Assertions.assertEquals("oq", model.targetInfo().containerId()); - Assertions.assertEquals("uojrngiflr", model.targetInfo().databaseName()); - Assertions.assertEquals("asccbiui", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.SNAPSHOT_ATTACH, model.recoveryMode()); - Assertions.assertEquals("yjdfqwmky", model.targetResourceGroupName()); - Assertions.assertEquals("fdvruz", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("zojhpctfnmd", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("ngfdgugeyzihgrky", + Assertions.assertEquals("aeylinm", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.RESTORE_DISKS, model.recoveryType()); + Assertions.assertEquals("xotngfdguge", model.sourceResourceId()); + Assertions.assertEquals("hgrky", model.propertyBag().get("i")); + Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); + Assertions.assertEquals("mfp", model.targetInfo().containerId()); + Assertions.assertEquals("ojeevy", model.targetInfo().databaseName()); + Assertions.assertEquals("hsgz", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.WORKLOAD_RECOVERY, model.recoveryMode()); + Assertions.assertEquals("gomfgbeglq", model.targetResourceGroupName()); + Assertions.assertEquals("o", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("betnluankrrfxee", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("ij", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("zabs", + Assertions.assertEquals("cvbmqzb", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(false, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("hojeevy", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("hsgz", model.targetVirtualMachineId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-20T20:49:39Z"), model.pointInTime()); + Assertions.assertTrue(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("jrnwxacev", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("jkuyxoafgaoq", model.targetVirtualMachineId()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-24T22:02:25Z"), model.pointInTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureWorkloadSapAsePointInTimeRestoreRequest model = new AzureWorkloadSapAsePointInTimeRestoreRequest() - .withResourceGuardOperationRequests(Arrays.asList("bgomfgbegl", "gleohi", "etnluankrrfx")) - .withRecoveryType(RecoveryType.ALTERNATE_LOCATION) - .withSourceResourceId("psttexoq") - .withPropertyBag(mapOf("uncuw", "cyyufmh", "unqndyfpchrqb", "qspkcdqzhlctd", "boxjumvq", "jjrcgegydc", - "ouau", "olihrra")) - .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.INVALID) - .withContainerId("oq") - .withDatabaseName("uojrngiflr") - .withTargetDirectoryForFileRestore("asccbiui")) - .withRecoveryMode(RecoveryMode.SNAPSHOT_ATTACH) - .withTargetResourceGroupName("yjdfqwmky") - .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails().withIdentityArmId("fdvruz") - .withIdentityName("zojhpctfnmd") + .withResourceGuardOperationRequests(Arrays.asList("aeylinm")) + .withRecoveryType(RecoveryType.RESTORE_DISKS) + .withSourceResourceId("xotngfdguge") + .withPropertyBag(mapOf("i", "hgrky")) + .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.FAIL_ON_CONFLICT) + .withContainerId("mfp") + .withDatabaseName("ojeevy") + .withTargetDirectoryForFileRestore("hsgz")) + .withRecoveryMode(RecoveryMode.WORKLOAD_RECOVERY) + .withTargetResourceGroupName("gomfgbeglq") + .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails().withIdentityArmId("o") + .withIdentityName("betnluankrrfxee") .withUserAssignedIdentityProperties( - new UserAssignedIdentityProperties().withClientId("ngfdgugeyzihgrky").withPrincipalId("zabs"))) - .withSnapshotRestoreParameters(new SnapshotRestoreParameters().withSkipAttachAndMount(false) - .withLogPointInTimeForDBRecovery("hojeevy")) - .withTargetVirtualMachineId("hsgz") - .withPointInTime(OffsetDateTime.parse("2021-10-20T20:49:39Z")); + new UserAssignedIdentityProperties().withClientId("ij").withPrincipalId("cvbmqzb"))) + .withSnapshotRestoreParameters(new SnapshotRestoreParameters().withSkipAttachAndMount(true) + .withLogPointInTimeForDBRecovery("jrnwxacev")) + .withTargetVirtualMachineId("jkuyxoafgaoq") + .withPointInTime(OffsetDateTime.parse("2020-12-24T22:02:25Z")); model = BinaryData.fromObject(model).toObject(AzureWorkloadSapAsePointInTimeRestoreRequest.class); - Assertions.assertEquals("bgomfgbegl", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.ALTERNATE_LOCATION, model.recoveryType()); - Assertions.assertEquals("psttexoq", model.sourceResourceId()); - Assertions.assertEquals("cyyufmh", model.propertyBag().get("uncuw")); - Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); - Assertions.assertEquals("oq", model.targetInfo().containerId()); - Assertions.assertEquals("uojrngiflr", model.targetInfo().databaseName()); - Assertions.assertEquals("asccbiui", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.SNAPSHOT_ATTACH, model.recoveryMode()); - Assertions.assertEquals("yjdfqwmky", model.targetResourceGroupName()); - Assertions.assertEquals("fdvruz", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("zojhpctfnmd", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("ngfdgugeyzihgrky", + Assertions.assertEquals("aeylinm", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.RESTORE_DISKS, model.recoveryType()); + Assertions.assertEquals("xotngfdguge", model.sourceResourceId()); + Assertions.assertEquals("hgrky", model.propertyBag().get("i")); + Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); + Assertions.assertEquals("mfp", model.targetInfo().containerId()); + Assertions.assertEquals("ojeevy", model.targetInfo().databaseName()); + Assertions.assertEquals("hsgz", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.WORKLOAD_RECOVERY, model.recoveryMode()); + Assertions.assertEquals("gomfgbeglq", model.targetResourceGroupName()); + Assertions.assertEquals("o", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("betnluankrrfxee", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("ij", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("zabs", + Assertions.assertEquals("cvbmqzb", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(false, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("hojeevy", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("hsgz", model.targetVirtualMachineId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-20T20:49:39Z"), model.pointInTime()); + Assertions.assertTrue(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("jrnwxacev", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("jkuyxoafgaoq", model.targetVirtualMachineId()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-24T22:02:25Z"), model.pointInTime()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapAseRecoveryPointTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapAseRecoveryPointTests.java index 889333ecc668..3bd55dfb3eaa 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapAseRecoveryPointTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapAseRecoveryPointTests.java @@ -1,90 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapAseRecoveryPoint; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointProperties; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierInformationV2; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierStatus; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType; import com.azure.resourcemanager.recoveryservicesbackup.models.RestorePointType; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class AzureWorkloadSapAseRecoveryPointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSapAseRecoveryPoint model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadSAPAseRecoveryPoint\",\"recoveryPointTimeInUTC\":\"2021-10-13T23:00:43Z\",\"type\":\"Invalid\",\"recoveryPointTierDetails\":[{\"type\":\"HardenedRP\",\"status\":\"Disabled\",\"extendedInfo\":{\"qgqqihedsvqwthmk\":\"tpvopvpbdb\"}},{\"type\":\"InstantRP\",\"status\":\"Invalid\",\"extendedInfo\":{\"dhohsdtmcdzsuf\":\"hsgqc\",\"pcvhdbevwqqxeys\":\"ohdxbzlmcmu\"}},{\"type\":\"Invalid\",\"status\":\"Valid\",\"extendedInfo\":{\"mygvkzqkj\":\"kfkbgbzbowxeqocl\",\"ezrxcczurtleipqx\":\"eokbze\",\"gnzvdfbzdixzm\":\"kwv\"}}],\"recoveryPointMoveReadinessInfo\":{\"ostzelndlatu\":{\"isReadyForMove\":false,\"additionalInfo\":\"wopqhewjptmcgs\"}},\"recoveryPointProperties\":{\"expiryTime\":\"lbiojlvfhrb\",\"ruleName\":\"neqvcwwyyurmo\",\"isSoftDeleted\":false}}") + "{\"objectType\":\"AzureWorkloadSAPAseRecoveryPoint\",\"recoveryPointTimeInUTC\":\"2021-06-06T07:58:35Z\",\"type\":\"Incremental\",\"recoveryPointTierDetails\":[{\"type\":\"HardenedRP\",\"status\":\"Deleted\",\"extendedInfo\":{\"n\":\"msweypqwdxggicc\",\"ttlstvlzywemhz\":\"qhuexm\",\"sfgytguslfead\":\"ncsdtclusiyp\"}},{\"type\":\"HardenedRP\",\"status\":\"Invalid\",\"extendedInfo\":{\"gfpelolppvksrpqv\":\"zis\"}},{\"type\":\"ArchivedRP\",\"status\":\"Disabled\",\"extendedInfo\":{\"tswiby\":\"r\"}},{\"type\":\"ArchivedRP\",\"status\":\"Invalid\",\"extendedInfo\":{\"hevxcced\":\"racstwity\"}}],\"recoveryPointMoveReadinessInfo\":{\"zxltjcvn\":{\"isReadyForMove\":true,\"additionalInfo\":\"odn\"},\"byqunyow\":{\"isReadyForMove\":true,\"additionalInfo\":\"ugcxnavvwxq\"},\"odacizs\":{\"isReadyForMove\":true,\"additionalInfo\":\"djrkvfgbvfvpd\"}},\"recoveryPointProperties\":{\"expiryTime\":\"hkr\",\"ruleName\":\"bdeibqipqk\",\"isSoftDeleted\":false},\"threatStatus\":\"NotAvailable\",\"threatInfo\":[{\"threatTitle\":\"mkrefajpjorwkq\",\"threatDescription\":\"hgbijt\",\"lastUpdatedTime\":\"2021-03-13T11:40:42Z\",\"threatState\":\"InProgress\",\"threatStartTime\":\"2021-10-05T15:06:51Z\",\"threatEndTime\":\"2021-08-16T20:44:49Z\",\"threatURI\":\"ibsystawf\",\"threatSeverity\":\"Informational\"}]}") .toObject(AzureWorkloadSapAseRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T23:00:43Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.INVALID, model.type()); + Assertions.assertEquals(ThreatStatus.NOT_AVAILABLE, model.threatStatus()); + Assertions.assertEquals(ThreatState.IN_PROGRESS, model.threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.INFORMATIONAL, model.threatInfo().get(0).threatSeverity()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-06T07:58:35Z"), model.recoveryPointTimeInUtc()); + Assertions.assertEquals(RestorePointType.INCREMENTAL, model.type()); + Assertions.assertEquals("msweypqwdxggicc", model.recoveryPointTierDetails().get(0).extendedInfo().get("n")); Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.DISABLED, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("tpvopvpbdb", - model.recoveryPointTierDetails().get(0).extendedInfo().get("qgqqihedsvqwthmk")); - Assertions.assertEquals(false, model.recoveryPointMoveReadinessInfo().get("ostzelndlatu").isReadyForMove()); - Assertions.assertEquals("wopqhewjptmcgs", - model.recoveryPointMoveReadinessInfo().get("ostzelndlatu").additionalInfo()); - Assertions.assertEquals("lbiojlvfhrb", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("neqvcwwyyurmo", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(false, model.recoveryPointProperties().isSoftDeleted()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureWorkloadSapAseRecoveryPoint model - = new AzureWorkloadSapAseRecoveryPoint() - .withRecoveryPointTimeInUtc(OffsetDateTime.parse("2021-10-13T23:00:43Z")) - .withType(RestorePointType.INVALID) - .withRecoveryPointTierDetails(Arrays.asList( - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.HARDENED_RP) - .withStatus(RecoveryPointTierStatus.DISABLED) - .withExtendedInfo(mapOf("qgqqihedsvqwthmk", "tpvopvpbdb")), - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.INSTANT_RP) - .withStatus(RecoveryPointTierStatus.INVALID) - .withExtendedInfo(mapOf("dhohsdtmcdzsuf", "hsgqc", "pcvhdbevwqqxeys", "ohdxbzlmcmu")), - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.INVALID) - .withStatus(RecoveryPointTierStatus.VALID) - .withExtendedInfo(mapOf("mygvkzqkj", "kfkbgbzbowxeqocl", "ezrxcczurtleipqx", "eokbze", - "gnzvdfbzdixzm", "kwv")))) - .withRecoveryPointMoveReadinessInfo(mapOf("ostzelndlatu", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(false) - .withAdditionalInfo("wopqhewjptmcgs"))) - .withRecoveryPointProperties(new RecoveryPointProperties().withExpiryTime("lbiojlvfhrb") - .withRuleName("neqvcwwyyurmo") - .withIsSoftDeleted(false)); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSapAseRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T23:00:43Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.INVALID, model.type()); - Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.DISABLED, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("tpvopvpbdb", - model.recoveryPointTierDetails().get(0).extendedInfo().get("qgqqihedsvqwthmk")); - Assertions.assertEquals(false, model.recoveryPointMoveReadinessInfo().get("ostzelndlatu").isReadyForMove()); - Assertions.assertEquals("wopqhewjptmcgs", - model.recoveryPointMoveReadinessInfo().get("ostzelndlatu").additionalInfo()); - Assertions.assertEquals("lbiojlvfhrb", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("neqvcwwyyurmo", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(false, model.recoveryPointProperties().isSoftDeleted()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(RecoveryPointTierStatus.DELETED, model.recoveryPointTierDetails().get(0).status()); + Assertions.assertTrue(model.recoveryPointMoveReadinessInfo().get("zxltjcvn").isReadyForMove()); + Assertions.assertEquals("odn", model.recoveryPointMoveReadinessInfo().get("zxltjcvn").additionalInfo()); + Assertions.assertEquals("hkr", model.recoveryPointProperties().expiryTime()); + Assertions.assertEquals("bdeibqipqk", model.recoveryPointProperties().ruleName()); + Assertions.assertFalse(model.recoveryPointProperties().isSoftDeleted()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapAseRestoreRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapAseRestoreRequestTests.java index 5458aca9c869..2e10e27951cc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapAseRestoreRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapAseRestoreRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -22,70 +22,70 @@ public final class AzureWorkloadSapAseRestoreRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSapAseRestoreRequest model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadSAPAseRestoreRequest\",\"recoveryType\":\"Invalid\",\"sourceResourceId\":\"tijv\",\"propertyBag\":{\"cevehjkuyxoafg\":\"bmqzbqqxlajrnwx\",\"linmfgv\":\"oqltfae\"},\"targetInfo\":{\"overwriteOption\":\"FailOnConflict\",\"containerId\":\"hriypoqeyhlqhy\",\"databaseName\":\"rlpyznuciqdsmexi\",\"targetDirectoryForFileRestore\":\"dfuxtya\"},\"recoveryMode\":\"Invalid\",\"targetResourceGroupName\":\"miybnn\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"gnljhnmgixhcm\",\"identityName\":\"mqfoudorh\",\"userAssignedIdentityProperties\":{\"clientId\":\"yprotwyp\",\"principalId\":\"d\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":false,\"logPointInTimeForDBRecovery\":\"gcmjkavl\"},\"targetVirtualMachineId\":\"rb\",\"resourceGuardOperationRequests\":[\"pmdtz\"]}") + "{\"objectType\":\"AzureWorkloadSAPAseRestoreRequest\",\"recoveryType\":\"OriginalLocation\",\"sourceResourceId\":\"irpghriypoqeyh\",\"propertyBag\":{\"iq\":\"ykprlpyznu\"},\"targetInfo\":{\"overwriteOption\":\"Overwrite\",\"containerId\":\"iitdfuxt\",\"databaseName\":\"siibmiybnnustgn\",\"targetDirectoryForFileRestore\":\"hnmgixhcm\"},\"recoveryMode\":\"SnapshotAttachAndRecover\",\"targetResourceGroupName\":\"foudor\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"yyprotwyp\",\"identityName\":\"d\",\"userAssignedIdentityProperties\":{\"clientId\":\"hu\",\"principalId\":\"mjkavlgorbmft\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":false,\"logPointInTimeForDBRecovery\":\"fjltfvnzcyjtotp\"},\"targetVirtualMachineId\":\"pvpbdbzqgqqiheds\",\"resourceGuardOperationRequests\":[\"thmkyib\",\"ysi\"]}") .toObject(AzureWorkloadSapAseRestoreRequest.class); - Assertions.assertEquals("pmdtz", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.INVALID, model.recoveryType()); - Assertions.assertEquals("tijv", model.sourceResourceId()); - Assertions.assertEquals("bmqzbqqxlajrnwx", model.propertyBag().get("cevehjkuyxoafg")); - Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); - Assertions.assertEquals("hriypoqeyhlqhy", model.targetInfo().containerId()); - Assertions.assertEquals("rlpyznuciqdsmexi", model.targetInfo().databaseName()); - Assertions.assertEquals("dfuxtya", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); - Assertions.assertEquals("miybnn", model.targetResourceGroupName()); - Assertions.assertEquals("gnljhnmgixhcm", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("mqfoudorh", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("yprotwyp", + Assertions.assertEquals("thmkyib", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.ORIGINAL_LOCATION, model.recoveryType()); + Assertions.assertEquals("irpghriypoqeyh", model.sourceResourceId()); + Assertions.assertEquals("ykprlpyznu", model.propertyBag().get("iq")); + Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); + Assertions.assertEquals("iitdfuxt", model.targetInfo().containerId()); + Assertions.assertEquals("siibmiybnnustgn", model.targetInfo().databaseName()); + Assertions.assertEquals("hnmgixhcm", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.SNAPSHOT_ATTACH_AND_RECOVER, model.recoveryMode()); + Assertions.assertEquals("foudor", model.targetResourceGroupName()); + Assertions.assertEquals("yyprotwyp", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("d", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("hu", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("d", + Assertions.assertEquals("mjkavlgorbmft", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(false, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("gcmjkavl", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("rb", model.targetVirtualMachineId()); + Assertions.assertFalse(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("fjltfvnzcyjtotp", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("pvpbdbzqgqqiheds", model.targetVirtualMachineId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureWorkloadSapAseRestoreRequest model - = new AzureWorkloadSapAseRestoreRequest().withResourceGuardOperationRequests(Arrays.asList("pmdtz")) - .withRecoveryType(RecoveryType.INVALID) - .withSourceResourceId("tijv") - .withPropertyBag(mapOf("cevehjkuyxoafg", "bmqzbqqxlajrnwx", "linmfgv", "oqltfae")) - .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.FAIL_ON_CONFLICT) - .withContainerId("hriypoqeyhlqhy") - .withDatabaseName("rlpyznuciqdsmexi") - .withTargetDirectoryForFileRestore("dfuxtya")) - .withRecoveryMode(RecoveryMode.INVALID) - .withTargetResourceGroupName("miybnn") - .withUserAssignedManagedIdentityDetails( - new UserAssignedManagedIdentityDetails().withIdentityArmId("gnljhnmgixhcm") - .withIdentityName("mqfoudorh") - .withUserAssignedIdentityProperties( - new UserAssignedIdentityProperties().withClientId("yprotwyp").withPrincipalId("d"))) - .withSnapshotRestoreParameters(new SnapshotRestoreParameters().withSkipAttachAndMount(false) - .withLogPointInTimeForDBRecovery("gcmjkavl")) - .withTargetVirtualMachineId("rb"); + AzureWorkloadSapAseRestoreRequest model = new AzureWorkloadSapAseRestoreRequest() + .withResourceGuardOperationRequests(Arrays.asList("thmkyib", "ysi")) + .withRecoveryType(RecoveryType.ORIGINAL_LOCATION) + .withSourceResourceId("irpghriypoqeyh") + .withPropertyBag(mapOf("iq", "ykprlpyznu")) + .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.OVERWRITE) + .withContainerId("iitdfuxt") + .withDatabaseName("siibmiybnnustgn") + .withTargetDirectoryForFileRestore("hnmgixhcm")) + .withRecoveryMode(RecoveryMode.SNAPSHOT_ATTACH_AND_RECOVER) + .withTargetResourceGroupName("foudor") + .withUserAssignedManagedIdentityDetails( + new UserAssignedManagedIdentityDetails().withIdentityArmId("yyprotwyp") + .withIdentityName("d") + .withUserAssignedIdentityProperties( + new UserAssignedIdentityProperties().withClientId("hu").withPrincipalId("mjkavlgorbmft"))) + .withSnapshotRestoreParameters(new SnapshotRestoreParameters().withSkipAttachAndMount(false) + .withLogPointInTimeForDBRecovery("fjltfvnzcyjtotp")) + .withTargetVirtualMachineId("pvpbdbzqgqqiheds"); model = BinaryData.fromObject(model).toObject(AzureWorkloadSapAseRestoreRequest.class); - Assertions.assertEquals("pmdtz", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.INVALID, model.recoveryType()); - Assertions.assertEquals("tijv", model.sourceResourceId()); - Assertions.assertEquals("bmqzbqqxlajrnwx", model.propertyBag().get("cevehjkuyxoafg")); - Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); - Assertions.assertEquals("hriypoqeyhlqhy", model.targetInfo().containerId()); - Assertions.assertEquals("rlpyznuciqdsmexi", model.targetInfo().databaseName()); - Assertions.assertEquals("dfuxtya", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); - Assertions.assertEquals("miybnn", model.targetResourceGroupName()); - Assertions.assertEquals("gnljhnmgixhcm", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("mqfoudorh", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("yprotwyp", + Assertions.assertEquals("thmkyib", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.ORIGINAL_LOCATION, model.recoveryType()); + Assertions.assertEquals("irpghriypoqeyh", model.sourceResourceId()); + Assertions.assertEquals("ykprlpyznu", model.propertyBag().get("iq")); + Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); + Assertions.assertEquals("iitdfuxt", model.targetInfo().containerId()); + Assertions.assertEquals("siibmiybnnustgn", model.targetInfo().databaseName()); + Assertions.assertEquals("hnmgixhcm", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.SNAPSHOT_ATTACH_AND_RECOVER, model.recoveryMode()); + Assertions.assertEquals("foudor", model.targetResourceGroupName()); + Assertions.assertEquals("yyprotwyp", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("d", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("hu", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("d", + Assertions.assertEquals("mjkavlgorbmft", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(false, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("gcmjkavl", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("rb", model.targetVirtualMachineId()); + Assertions.assertFalse(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("fjltfvnzcyjtotp", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("pvpbdbzqgqqiheds", model.targetVirtualMachineId()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRecoveryPointTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRecoveryPointTests.java index a448c659e492..7bc22c18cb2b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRecoveryPointTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRecoveryPointTests.java @@ -1,95 +1,42 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaPointInTimeRecoveryPoint; -import com.azure.resourcemanager.recoveryservicesbackup.models.PointInTimeRange; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointProperties; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierInformationV2; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierStatus; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType; import com.azure.resourcemanager.recoveryservicesbackup.models.RestorePointType; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class AzureWorkloadSapHanaPointInTimeRecoveryPointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSapHanaPointInTimeRecoveryPoint model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadSAPHanaPointInTimeRecoveryPoint\",\"timeRanges\":[{\"startTime\":\"2021-01-23T20:53:22Z\",\"endTime\":\"2021-09-10T10:22:32Z\"}],\"recoveryPointTimeInUTC\":\"2021-07-27T04:50:29Z\",\"type\":\"Invalid\",\"recoveryPointTierDetails\":[{\"type\":\"Invalid\",\"status\":\"Rehydrated\",\"extendedInfo\":{\"jjidjk\":\"kzyb\"}},{\"type\":\"HardenedRP\",\"status\":\"Invalid\",\"extendedInfo\":{\"jednlj\":\"xevbl\",\"aulx\":\"age\"}},{\"type\":\"HardenedRP\",\"status\":\"Invalid\",\"extendedInfo\":{\"gwklnsr\":\"kppxynenlsvxeiz\",\"ktp\":\"ffeycx\",\"ekkkzd\":\"ymerteeammxq\"}}],\"recoveryPointMoveReadinessInfo\":{\"vrefdeesv\":{\"isReadyForMove\":false,\"additionalInfo\":\"ojbmxv\"},\"sawddjibabxvi\":{\"isReadyForMove\":false,\"additionalInfo\":\"jpxtxsuwprtuj\"},\"xtfglecdmdqb\":{\"isReadyForMove\":true,\"additionalInfo\":\"tzeexav\"}},\"recoveryPointProperties\":{\"expiryTime\":\"pqtgsfjac\",\"ruleName\":\"lhhxudbxvodhtnsi\",\"isSoftDeleted\":true}}") + "{\"objectType\":\"AzureWorkloadSAPHanaPointInTimeRecoveryPoint\",\"timeRanges\":[{\"startTime\":\"2021-11-25T14:07:32Z\",\"endTime\":\"2021-07-02T22:41:48Z\"},{\"startTime\":\"2021-10-22T11:40:28Z\",\"endTime\":\"2021-05-03T07:55:28Z\"}],\"recoveryPointTimeInUTC\":\"2021-06-16T11:50:47Z\",\"type\":\"Incremental\",\"recoveryPointTierDetails\":[{\"type\":\"ArchivedRP\",\"status\":\"Valid\",\"extendedInfo\":{\"syrsndsytgadgvra\":\"ovljxywsu\",\"uu\":\"aeneqnzarrwl\",\"e\":\"jfqka\"}},{\"type\":\"InstantRP\",\"status\":\"Invalid\",\"extendedInfo\":{\"sgplsakn\":\"wwiftohqkvpuv\",\"synljphuopxodl\":\"n\"}},{\"type\":\"Invalid\",\"status\":\"Rehydrated\",\"extendedInfo\":{\"slyzrpzbchckqq\":\"eosjswsr\",\"suiizynkedyat\":\"qioxi\",\"ypyynpcdpumnzg\":\"wyhqmibzyhwits\"}},{\"type\":\"ArchivedRP\",\"status\":\"Rehydrated\",\"extendedInfo\":{\"wwrlkdmtncv\":\"orgjhxbldt\",\"xdy\":\"kotl\"}}],\"recoveryPointMoveReadinessInfo\":{\"ocrkvcikh\":{\"isReadyForMove\":false,\"additionalInfo\":\"ogjltdtbnnhad\"},\"qqu\":{\"isReadyForMove\":false,\"additionalInfo\":\"mqg\"},\"allatmelwuipic\":{\"isReadyForMove\":false,\"additionalInfo\":\"ywggx\"},\"v\":{\"isReadyForMove\":true,\"additionalInfo\":\"z\"}},\"recoveryPointProperties\":{\"expiryTime\":\"c\",\"ruleName\":\"y\",\"isSoftDeleted\":true},\"threatStatus\":\"Unknown\",\"threatInfo\":[{\"threatTitle\":\"ueedndrdvs\",\"threatDescription\":\"wq\",\"lastUpdatedTime\":\"2021-07-08T08:26:13Z\",\"threatState\":\"Resolved\",\"threatStartTime\":\"2021-06-10T11:36:20Z\",\"threatEndTime\":\"2021-05-03T12:58:02Z\",\"threatURI\":\"tdaaygdvwvg\",\"threatSeverity\":\"Informational\"},{\"threatTitle\":\"g\",\"threatDescription\":\"rtfudxepxg\",\"lastUpdatedTime\":\"2020-12-22T18:51:20Z\",\"threatState\":\"Resolved\",\"threatStartTime\":\"2021-07-18T03:12:47Z\",\"threatEndTime\":\"2021-10-23T16:23:36Z\",\"threatURI\":\"k\",\"threatSeverity\":\"High\"}]}") .toObject(AzureWorkloadSapHanaPointInTimeRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-27T04:50:29Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.INVALID, model.type()); - Assertions.assertEquals(RecoveryPointTierType.INVALID, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.REHYDRATED, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("kzyb", model.recoveryPointTierDetails().get(0).extendedInfo().get("jjidjk")); - Assertions.assertEquals(false, model.recoveryPointMoveReadinessInfo().get("vrefdeesv").isReadyForMove()); - Assertions.assertEquals("ojbmxv", model.recoveryPointMoveReadinessInfo().get("vrefdeesv").additionalInfo()); - Assertions.assertEquals("pqtgsfjac", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("lhhxudbxvodhtnsi", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(true, model.recoveryPointProperties().isSoftDeleted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-23T20:53:22Z"), model.timeRanges().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-10T10:22:32Z"), model.timeRanges().get(0).endTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureWorkloadSapHanaPointInTimeRecoveryPoint model = new AzureWorkloadSapHanaPointInTimeRecoveryPoint() - .withRecoveryPointTimeInUtc(OffsetDateTime.parse("2021-07-27T04:50:29Z")) - .withType(RestorePointType.INVALID) - .withRecoveryPointTierDetails(Arrays.asList( - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.INVALID) - .withStatus(RecoveryPointTierStatus.REHYDRATED) - .withExtendedInfo(mapOf("jjidjk", "kzyb")), - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.HARDENED_RP) - .withStatus(RecoveryPointTierStatus.INVALID) - .withExtendedInfo(mapOf("jednlj", "xevbl", "aulx", "age")), - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.HARDENED_RP) - .withStatus(RecoveryPointTierStatus.INVALID) - .withExtendedInfo(mapOf("gwklnsr", "kppxynenlsvxeiz", "ktp", "ffeycx", "ekkkzd", "ymerteeammxq")))) - .withRecoveryPointMoveReadinessInfo(mapOf("vrefdeesv", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(false).withAdditionalInfo("ojbmxv"), - "sawddjibabxvi", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(false).withAdditionalInfo("jpxtxsuwprtuj"), - "xtfglecdmdqb", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("tzeexav"))) - .withRecoveryPointProperties(new RecoveryPointProperties().withExpiryTime("pqtgsfjac") - .withRuleName("lhhxudbxvodhtnsi") - .withIsSoftDeleted(true)) - .withTimeRanges( - Arrays.asList(new PointInTimeRange().withStartTime(OffsetDateTime.parse("2021-01-23T20:53:22Z")) - .withEndTime(OffsetDateTime.parse("2021-09-10T10:22:32Z")))); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSapHanaPointInTimeRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-27T04:50:29Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.INVALID, model.type()); - Assertions.assertEquals(RecoveryPointTierType.INVALID, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.REHYDRATED, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("kzyb", model.recoveryPointTierDetails().get(0).extendedInfo().get("jjidjk")); - Assertions.assertEquals(false, model.recoveryPointMoveReadinessInfo().get("vrefdeesv").isReadyForMove()); - Assertions.assertEquals("ojbmxv", model.recoveryPointMoveReadinessInfo().get("vrefdeesv").additionalInfo()); - Assertions.assertEquals("pqtgsfjac", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("lhhxudbxvodhtnsi", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(true, model.recoveryPointProperties().isSoftDeleted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-23T20:53:22Z"), model.timeRanges().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-10T10:22:32Z"), model.timeRanges().get(0).endTime()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(ThreatStatus.UNKNOWN, model.threatStatus()); + Assertions.assertEquals(ThreatState.RESOLVED, model.threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.INFORMATIONAL, model.threatInfo().get(0).threatSeverity()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-16T11:50:47Z"), model.recoveryPointTimeInUtc()); + Assertions.assertEquals(RestorePointType.INCREMENTAL, model.type()); + Assertions.assertEquals("ovljxywsu", + model.recoveryPointTierDetails().get(0).extendedInfo().get("syrsndsytgadgvra")); + Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.recoveryPointTierDetails().get(0).type()); + Assertions.assertEquals(RecoveryPointTierStatus.VALID, model.recoveryPointTierDetails().get(0).status()); + Assertions.assertFalse(model.recoveryPointMoveReadinessInfo().get("ocrkvcikh").isReadyForMove()); + Assertions.assertEquals("ogjltdtbnnhad", + model.recoveryPointMoveReadinessInfo().get("ocrkvcikh").additionalInfo()); + Assertions.assertEquals("c", model.recoveryPointProperties().expiryTime()); + Assertions.assertEquals("y", model.recoveryPointProperties().ruleName()); + Assertions.assertTrue(model.recoveryPointProperties().isSoftDeleted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-25T14:07:32Z"), model.timeRanges().get(0).startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-02T22:41:48Z"), model.timeRanges().get(0).endTime()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRestoreRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRestoreRequestTests.java index e54d89f60e05..b8ca0ce57da5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRestoreRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRestoreRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -23,74 +23,74 @@ public final class AzureWorkloadSapHanaPointInTimeRestoreRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSapHanaPointInTimeRestoreRequest model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadSAPHanaPointInTimeRestoreRequest\",\"pointInTime\":\"2021-05-10T09:40:25Z\",\"recoveryType\":\"Invalid\",\"sourceResourceId\":\"sckdlp\",\"propertyBag\":{\"xdfgsftufqobr\":\"rcxfailcfxwmdb\",\"knh\":\"lnacgcc\",\"zvulj\":\"kizvytn\",\"qnvb\":\"aaeranokqgukk\"},\"targetInfo\":{\"overwriteOption\":\"FailOnConflict\",\"containerId\":\"xxulcdi\",\"databaseName\":\"osfjbjsv\",\"targetDirectoryForFileRestore\":\"rwhryvycytd\"},\"recoveryMode\":\"FileRecovery\",\"targetResourceGroupName\":\"ccknfnwmbtmvp\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"dhttzaefedxihchr\",\"identityName\":\"k\",\"userAssignedIdentityProperties\":{\"clientId\":\"jdqnsdfzpbgt\",\"principalId\":\"ylkdghrje\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":true,\"logPointInTimeForDBRecovery\":\"xezw\"},\"targetVirtualMachineId\":\"okvbwnhhtqlgehg\",\"resourceGuardOperationRequests\":[\"pifhpfeoajvgcxtx\",\"csheafidltugsr\",\"smkss\",\"h\"]}") + "{\"objectType\":\"AzureWorkloadSAPHanaPointInTimeRestoreRequest\",\"pointInTime\":\"2021-07-25T20:46:33Z\",\"recoveryType\":\"AlternateLocation\",\"sourceResourceId\":\"httz\",\"propertyBag\":{\"qnsdfzpbgtgky\":\"edxihchrphkmcrj\",\"z\":\"kdghrjeuutlwx\",\"qlgehg\":\"zhokvbwnhh\",\"f\":\"pipifh\"},\"targetInfo\":{\"overwriteOption\":\"Invalid\",\"containerId\":\"gcxtxj\",\"databaseName\":\"heafidlt\",\"targetDirectoryForFileRestore\":\"sr\"},\"recoveryMode\":\"Invalid\",\"targetResourceGroupName\":\"ssjhoiftxfkf\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"prhptillu\",\"identityName\":\"iqtgdqoh\",\"userAssignedIdentityProperties\":{\"clientId\":\"sldrizetpwbral\",\"principalId\":\"ibph\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":false,\"logPointInTimeForDBRecovery\":\"zakakankjpdn\"},\"targetVirtualMachineId\":\"ha\",\"resourceGuardOperationRequests\":[\"lhjlmuoyxprimr\",\"opteecj\"]}") .toObject(AzureWorkloadSapHanaPointInTimeRestoreRequest.class); - Assertions.assertEquals("pifhpfeoajvgcxtx", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.INVALID, model.recoveryType()); - Assertions.assertEquals("sckdlp", model.sourceResourceId()); - Assertions.assertEquals("rcxfailcfxwmdb", model.propertyBag().get("xdfgsftufqobr")); - Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); - Assertions.assertEquals("xxulcdi", model.targetInfo().containerId()); - Assertions.assertEquals("osfjbjsv", model.targetInfo().databaseName()); - Assertions.assertEquals("rwhryvycytd", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.FILE_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("ccknfnwmbtmvp", model.targetResourceGroupName()); - Assertions.assertEquals("dhttzaefedxihchr", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("k", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("jdqnsdfzpbgt", + Assertions.assertEquals("lhjlmuoyxprimr", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.ALTERNATE_LOCATION, model.recoveryType()); + Assertions.assertEquals("httz", model.sourceResourceId()); + Assertions.assertEquals("edxihchrphkmcrj", model.propertyBag().get("qnsdfzpbgtgky")); + Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); + Assertions.assertEquals("gcxtxj", model.targetInfo().containerId()); + Assertions.assertEquals("heafidlt", model.targetInfo().databaseName()); + Assertions.assertEquals("sr", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); + Assertions.assertEquals("ssjhoiftxfkf", model.targetResourceGroupName()); + Assertions.assertEquals("prhptillu", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("iqtgdqoh", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("sldrizetpwbral", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("ylkdghrje", + Assertions.assertEquals("ibph", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(true, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("xezw", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("okvbwnhhtqlgehg", model.targetVirtualMachineId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-10T09:40:25Z"), model.pointInTime()); + Assertions.assertFalse(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("zakakankjpdn", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("ha", model.targetVirtualMachineId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-25T20:46:33Z"), model.pointInTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureWorkloadSapHanaPointInTimeRestoreRequest model = new AzureWorkloadSapHanaPointInTimeRestoreRequest() - .withResourceGuardOperationRequests(Arrays.asList("pifhpfeoajvgcxtx", "csheafidltugsr", "smkss", "h")) - .withRecoveryType(RecoveryType.INVALID) - .withSourceResourceId("sckdlp") + .withResourceGuardOperationRequests(Arrays.asList("lhjlmuoyxprimr", "opteecj")) + .withRecoveryType(RecoveryType.ALTERNATE_LOCATION) + .withSourceResourceId("httz") .withPropertyBag( - mapOf("xdfgsftufqobr", "rcxfailcfxwmdb", "knh", "lnacgcc", "zvulj", "kizvytn", "qnvb", "aaeranokqgukk")) - .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.FAIL_ON_CONFLICT) - .withContainerId("xxulcdi") - .withDatabaseName("osfjbjsv") - .withTargetDirectoryForFileRestore("rwhryvycytd")) - .withRecoveryMode(RecoveryMode.FILE_RECOVERY) - .withTargetResourceGroupName("ccknfnwmbtmvp") + mapOf("qnsdfzpbgtgky", "edxihchrphkmcrj", "z", "kdghrjeuutlwx", "qlgehg", "zhokvbwnhh", "f", "pipifh")) + .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.INVALID) + .withContainerId("gcxtxj") + .withDatabaseName("heafidlt") + .withTargetDirectoryForFileRestore("sr")) + .withRecoveryMode(RecoveryMode.INVALID) + .withTargetResourceGroupName("ssjhoiftxfkf") .withUserAssignedManagedIdentityDetails( - new UserAssignedManagedIdentityDetails().withIdentityArmId("dhttzaefedxihchr") - .withIdentityName("k") + new UserAssignedManagedIdentityDetails().withIdentityArmId("prhptillu") + .withIdentityName("iqtgdqoh") .withUserAssignedIdentityProperties( - new UserAssignedIdentityProperties().withClientId("jdqnsdfzpbgt").withPrincipalId("ylkdghrje"))) - .withSnapshotRestoreParameters( - new SnapshotRestoreParameters().withSkipAttachAndMount(true).withLogPointInTimeForDBRecovery("xezw")) - .withTargetVirtualMachineId("okvbwnhhtqlgehg") - .withPointInTime(OffsetDateTime.parse("2021-05-10T09:40:25Z")); + new UserAssignedIdentityProperties().withClientId("sldrizetpwbral").withPrincipalId("ibph"))) + .withSnapshotRestoreParameters(new SnapshotRestoreParameters().withSkipAttachAndMount(false) + .withLogPointInTimeForDBRecovery("zakakankjpdn")) + .withTargetVirtualMachineId("ha") + .withPointInTime(OffsetDateTime.parse("2021-07-25T20:46:33Z")); model = BinaryData.fromObject(model).toObject(AzureWorkloadSapHanaPointInTimeRestoreRequest.class); - Assertions.assertEquals("pifhpfeoajvgcxtx", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.INVALID, model.recoveryType()); - Assertions.assertEquals("sckdlp", model.sourceResourceId()); - Assertions.assertEquals("rcxfailcfxwmdb", model.propertyBag().get("xdfgsftufqobr")); - Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); - Assertions.assertEquals("xxulcdi", model.targetInfo().containerId()); - Assertions.assertEquals("osfjbjsv", model.targetInfo().databaseName()); - Assertions.assertEquals("rwhryvycytd", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.FILE_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("ccknfnwmbtmvp", model.targetResourceGroupName()); - Assertions.assertEquals("dhttzaefedxihchr", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("k", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("jdqnsdfzpbgt", + Assertions.assertEquals("lhjlmuoyxprimr", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.ALTERNATE_LOCATION, model.recoveryType()); + Assertions.assertEquals("httz", model.sourceResourceId()); + Assertions.assertEquals("edxihchrphkmcrj", model.propertyBag().get("qnsdfzpbgtgky")); + Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); + Assertions.assertEquals("gcxtxj", model.targetInfo().containerId()); + Assertions.assertEquals("heafidlt", model.targetInfo().databaseName()); + Assertions.assertEquals("sr", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); + Assertions.assertEquals("ssjhoiftxfkf", model.targetResourceGroupName()); + Assertions.assertEquals("prhptillu", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("iqtgdqoh", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("sldrizetpwbral", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("ylkdghrje", + Assertions.assertEquals("ibph", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(true, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("xezw", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("okvbwnhhtqlgehg", model.targetVirtualMachineId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-10T09:40:25Z"), model.pointInTime()); + Assertions.assertFalse(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("zakakankjpdn", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("ha", model.targetVirtualMachineId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-25T20:46:33Z"), model.pointInTime()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequestTests.java index 2b868622b289..bd502fe7a37b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -25,82 +25,83 @@ public final class AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequestTes @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest\",\"recoveryPointRehydrationInfo\":{\"rehydrationRetentionDuration\":\"pldqqct\",\"rehydrationPriority\":\"High\"},\"pointInTime\":\"2021-11-28T20:48:06Z\",\"recoveryType\":\"Offline\",\"sourceResourceId\":\"tjqvqyvweht\",\"propertyBag\":{\"usxivzrrryvei\":\"xhzzyse\",\"yzatvfuzkaft\":\"ipsk\",\"syeipqd\":\"vvruxwi\"},\"targetInfo\":{\"overwriteOption\":\"Invalid\",\"containerId\":\"rqgdgkkil\",\"databaseName\":\"lkcsmknhwtbbae\",\"targetDirectoryForFileRestore\":\"rvvmqfloygb\"},\"recoveryMode\":\"Invalid\",\"targetResourceGroupName\":\"mgxdgdhpabgd\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"ddvjsaqwotmmw\",\"identityName\":\"colsrsxaptefhex\",\"userAssignedIdentityProperties\":{\"clientId\":\"okjljnhvlqjbekp\",\"principalId\":\"ksnbksdqhjv\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":true,\"logPointInTimeForDBRecovery\":\"sl\"},\"targetVirtualMachineId\":\"hustcpoqmavnwqjw\",\"resourceGuardOperationRequests\":[\"nlejjjkxybwf\",\"bkjbz\",\"ensvkzykjtj\",\"nsxfwu\"]}") + "{\"objectType\":\"AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest\",\"recoveryPointRehydrationInfo\":{\"rehydrationRetentionDuration\":\"slstvasy\",\"rehydrationPriority\":\"Standard\"},\"pointInTime\":\"2021-03-08T01:37:13Z\",\"recoveryType\":\"Invalid\",\"sourceResourceId\":\"weoohguufuzboyj\",\"propertyBag\":{\"jscjpahl\":\"wtzolbaemwmdxmeb\",\"yijddtvqcttad\":\"veabfqxnmwmqtib\"},\"targetInfo\":{\"overwriteOption\":\"Invalid\",\"containerId\":\"kmr\",\"databaseName\":\"eekpndz\",\"targetDirectoryForFileRestore\":\"pmudqmeqwig\"},\"recoveryMode\":\"RecoveryUsingSnapshot\",\"targetResourceGroupName\":\"dqwyxeb\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"pmzznrtffya\",\"identityName\":\"tmhheioqa\",\"userAssignedIdentityProperties\":{\"clientId\":\"seufuqy\",\"principalId\":\"pdlc\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":true,\"logPointInTimeForDBRecovery\":\"smjqfrddgam\"},\"targetVirtualMachineId\":\"hiosrsjuiv\",\"resourceGuardOperationRequests\":[\"is\",\"irnxz\",\"czexrxzbujrtrhqv\"]}") .toObject(AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.class); - Assertions.assertEquals("nlejjjkxybwf", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.OFFLINE, model.recoveryType()); - Assertions.assertEquals("tjqvqyvweht", model.sourceResourceId()); - Assertions.assertEquals("xhzzyse", model.propertyBag().get("usxivzrrryvei")); + Assertions.assertEquals("is", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.INVALID, model.recoveryType()); + Assertions.assertEquals("weoohguufuzboyj", model.sourceResourceId()); + Assertions.assertEquals("wtzolbaemwmdxmeb", model.propertyBag().get("jscjpahl")); Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); - Assertions.assertEquals("rqgdgkkil", model.targetInfo().containerId()); - Assertions.assertEquals("lkcsmknhwtbbae", model.targetInfo().databaseName()); - Assertions.assertEquals("rvvmqfloygb", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); - Assertions.assertEquals("mgxdgdhpabgd", model.targetResourceGroupName()); - Assertions.assertEquals("ddvjsaqwotmmw", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("colsrsxaptefhex", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("okjljnhvlqjbekp", + Assertions.assertEquals("kmr", model.targetInfo().containerId()); + Assertions.assertEquals("eekpndz", model.targetInfo().databaseName()); + Assertions.assertEquals("pmudqmeqwig", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.RECOVERY_USING_SNAPSHOT, model.recoveryMode()); + Assertions.assertEquals("dqwyxeb", model.targetResourceGroupName()); + Assertions.assertEquals("pmzznrtffya", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("tmhheioqa", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("seufuqy", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("ksnbksdqhjv", + Assertions.assertEquals("pdlc", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(true, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("sl", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("hustcpoqmavnwqjw", model.targetVirtualMachineId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-28T20:48:06Z"), model.pointInTime()); - Assertions.assertEquals("pldqqct", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); - Assertions.assertEquals(RehydrationPriority.HIGH, model.recoveryPointRehydrationInfo().rehydrationPriority()); + Assertions.assertTrue(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("smjqfrddgam", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("hiosrsjuiv", model.targetVirtualMachineId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-08T01:37:13Z"), model.pointInTime()); + Assertions.assertEquals("slstvasy", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); + Assertions.assertEquals(RehydrationPriority.STANDARD, + model.recoveryPointRehydrationInfo().rehydrationPriority()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest model = new AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest() - .withResourceGuardOperationRequests(Arrays.asList("nlejjjkxybwf", "bkjbz", "ensvkzykjtj", "nsxfwu")) - .withRecoveryType(RecoveryType.OFFLINE) - .withSourceResourceId("tjqvqyvweht") - .withPropertyBag(mapOf("usxivzrrryvei", "xhzzyse", "yzatvfuzkaft", "ipsk", "syeipqd", "vvruxwi")) + .withResourceGuardOperationRequests(Arrays.asList("is", "irnxz", "czexrxzbujrtrhqv")) + .withRecoveryType(RecoveryType.INVALID) + .withSourceResourceId("weoohguufuzboyj") + .withPropertyBag(mapOf("jscjpahl", "wtzolbaemwmdxmeb", "yijddtvqcttad", "veabfqxnmwmqtib")) .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.INVALID) - .withContainerId("rqgdgkkil") - .withDatabaseName("lkcsmknhwtbbae") - .withTargetDirectoryForFileRestore("rvvmqfloygb")) - .withRecoveryMode(RecoveryMode.INVALID) - .withTargetResourceGroupName("mgxdgdhpabgd") + .withContainerId("kmr") + .withDatabaseName("eekpndz") + .withTargetDirectoryForFileRestore("pmudqmeqwig")) + .withRecoveryMode(RecoveryMode.RECOVERY_USING_SNAPSHOT) + .withTargetResourceGroupName("dqwyxeb") .withUserAssignedManagedIdentityDetails( - new UserAssignedManagedIdentityDetails().withIdentityArmId("ddvjsaqwotmmw") - .withIdentityName("colsrsxaptefhex") + new UserAssignedManagedIdentityDetails().withIdentityArmId("pmzznrtffya") + .withIdentityName("tmhheioqa") .withUserAssignedIdentityProperties( - new UserAssignedIdentityProperties().withClientId("okjljnhvlqjbekp") - .withPrincipalId("ksnbksdqhjv"))) - .withSnapshotRestoreParameters( - new SnapshotRestoreParameters().withSkipAttachAndMount(true).withLogPointInTimeForDBRecovery("sl")) - .withTargetVirtualMachineId("hustcpoqmavnwqjw") - .withPointInTime(OffsetDateTime.parse("2021-11-28T20:48:06Z")) + new UserAssignedIdentityProperties().withClientId("seufuqy").withPrincipalId("pdlc"))) + .withSnapshotRestoreParameters(new SnapshotRestoreParameters().withSkipAttachAndMount(true) + .withLogPointInTimeForDBRecovery("smjqfrddgam")) + .withTargetVirtualMachineId("hiosrsjuiv") + .withPointInTime(OffsetDateTime.parse("2021-03-08T01:37:13Z")) .withRecoveryPointRehydrationInfo( - new RecoveryPointRehydrationInfo().withRehydrationRetentionDuration("pldqqct") - .withRehydrationPriority(RehydrationPriority.HIGH)); + new RecoveryPointRehydrationInfo().withRehydrationRetentionDuration("slstvasy") + .withRehydrationPriority(RehydrationPriority.STANDARD)); model = BinaryData.fromObject(model).toObject(AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.class); - Assertions.assertEquals("nlejjjkxybwf", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.OFFLINE, model.recoveryType()); - Assertions.assertEquals("tjqvqyvweht", model.sourceResourceId()); - Assertions.assertEquals("xhzzyse", model.propertyBag().get("usxivzrrryvei")); + Assertions.assertEquals("is", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.INVALID, model.recoveryType()); + Assertions.assertEquals("weoohguufuzboyj", model.sourceResourceId()); + Assertions.assertEquals("wtzolbaemwmdxmeb", model.propertyBag().get("jscjpahl")); Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); - Assertions.assertEquals("rqgdgkkil", model.targetInfo().containerId()); - Assertions.assertEquals("lkcsmknhwtbbae", model.targetInfo().databaseName()); - Assertions.assertEquals("rvvmqfloygb", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); - Assertions.assertEquals("mgxdgdhpabgd", model.targetResourceGroupName()); - Assertions.assertEquals("ddvjsaqwotmmw", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("colsrsxaptefhex", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("okjljnhvlqjbekp", + Assertions.assertEquals("kmr", model.targetInfo().containerId()); + Assertions.assertEquals("eekpndz", model.targetInfo().databaseName()); + Assertions.assertEquals("pmudqmeqwig", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.RECOVERY_USING_SNAPSHOT, model.recoveryMode()); + Assertions.assertEquals("dqwyxeb", model.targetResourceGroupName()); + Assertions.assertEquals("pmzznrtffya", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("tmhheioqa", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("seufuqy", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("ksnbksdqhjv", + Assertions.assertEquals("pdlc", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(true, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("sl", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("hustcpoqmavnwqjw", model.targetVirtualMachineId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-28T20:48:06Z"), model.pointInTime()); - Assertions.assertEquals("pldqqct", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); - Assertions.assertEquals(RehydrationPriority.HIGH, model.recoveryPointRehydrationInfo().rehydrationPriority()); + Assertions.assertTrue(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("smjqfrddgam", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("hiosrsjuiv", model.targetVirtualMachineId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-08T01:37:13Z"), model.pointInTime()); + Assertions.assertEquals("slstvasy", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); + Assertions.assertEquals(RehydrationPriority.STANDARD, + model.recoveryPointRehydrationInfo().rehydrationPriority()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRecoveryPointTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRecoveryPointTests.java index 02f6d2e058cd..f512955feb1e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRecoveryPointTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRecoveryPointTests.java @@ -1,83 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaRecoveryPoint; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointProperties; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierInformationV2; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierStatus; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType; import com.azure.resourcemanager.recoveryservicesbackup.models.RestorePointType; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class AzureWorkloadSapHanaRecoveryPointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSapHanaRecoveryPoint model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadSAPHanaRecoveryPoint\",\"recoveryPointTimeInUTC\":\"2021-03-03T00:06:25Z\",\"type\":\"SnapshotCopyOnlyFull\",\"recoveryPointTierDetails\":[{\"type\":\"ArchivedRP\",\"status\":\"Invalid\",\"extendedInfo\":{\"igpibud\":\"pndzaapmudqmeq\"}},{\"type\":\"Invalid\",\"status\":\"Rehydrated\",\"extendedInfo\":{\"tmhheioqa\":\"ybpmzznrtffyaq\"}}],\"recoveryPointMoveReadinessInfo\":{\"mjqfrddgamquhio\":{\"isReadyForMove\":true,\"additionalInfo\":\"fuqyrxpdlcgqlsi\"}},\"recoveryPointProperties\":{\"expiryTime\":\"ju\",\"ruleName\":\"fcdis\",\"isSoftDeleted\":false}}") + "{\"objectType\":\"AzureWorkloadSAPHanaRecoveryPoint\",\"recoveryPointTimeInUTC\":\"2021-05-06T22:36:57Z\",\"type\":\"SnapshotCopyOnlyFull\",\"recoveryPointTierDetails\":[{\"type\":\"Invalid\",\"status\":\"Valid\",\"extendedInfo\":{\"c\":\"ntuji\"}},{\"type\":\"HardenedRP\",\"status\":\"Disabled\",\"extendedInfo\":{\"i\":\"ojvdcpzfoqo\",\"oxciqopidoamcio\":\"ybxarzgszu\"}},{\"type\":\"ArchivedRP\",\"status\":\"Valid\",\"extendedInfo\":{\"wntoegokdwbwh\":\"bon\",\"t\":\"szzcmrvexztv\"}}],\"recoveryPointMoveReadinessInfo\":{\"wtl\":{\"isReadyForMove\":false,\"additionalInfo\":\"oyzko\"},\"rqf\":{\"isReadyForMove\":true,\"additionalInfo\":\"xawqaldsyuuxim\"},\"r\":{\"isReadyForMove\":true,\"additionalInfo\":\"znkbykutwpfhpagm\"}},\"recoveryPointProperties\":{\"expiryTime\":\"snfdsdoakgtdl\",\"ruleName\":\"kzevdlhewpusds\",\"isSoftDeleted\":true},\"threatStatus\":\"NotAvailable\",\"threatInfo\":[{\"threatTitle\":\"bejdcn\",\"threatDescription\":\"qmoa\",\"lastUpdatedTime\":\"2021-07-10T00:03:48Z\",\"threatState\":\"Active\",\"threatStartTime\":\"2021-04-18T15:55:11Z\",\"threatEndTime\":\"2021-08-21T00:33:47Z\",\"threatURI\":\"dgrtwaenuuzkopbm\",\"threatSeverity\":\"High\"},{\"threatTitle\":\"dwoyuhhziuiefoz\",\"threatDescription\":\"dmsmlm\",\"lastUpdatedTime\":\"2021-05-05T09:05:40Z\",\"threatState\":\"Active\",\"threatStartTime\":\"2021-11-20T14:37:17Z\",\"threatEndTime\":\"2021-07-15T12:55:36Z\",\"threatURI\":\"qu\",\"threatSeverity\":\"Warning\"},{\"threatTitle\":\"icslfaoq\",\"threatDescription\":\"iyylhalnswhccsp\",\"lastUpdatedTime\":\"2021-06-09T09:48:38Z\",\"threatState\":\"Ignored\",\"threatStartTime\":\"2021-07-22T21:06:28Z\",\"threatEndTime\":\"2021-10-11T23:36:13Z\",\"threatURI\":\"cywuggwol\",\"threatSeverity\":\"Informational\"}]}") .toObject(AzureWorkloadSapHanaRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-03T00:06:25Z"), model.recoveryPointTimeInUtc()); + Assertions.assertEquals(ThreatStatus.NOT_AVAILABLE, model.threatStatus()); + Assertions.assertEquals(ThreatState.ACTIVE, model.threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.HIGH, model.threatInfo().get(0).threatSeverity()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T22:36:57Z"), model.recoveryPointTimeInUtc()); Assertions.assertEquals(RestorePointType.SNAPSHOT_COPY_ONLY_FULL, model.type()); - Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.INVALID, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("pndzaapmudqmeq", - model.recoveryPointTierDetails().get(0).extendedInfo().get("igpibud")); - Assertions.assertEquals(true, model.recoveryPointMoveReadinessInfo().get("mjqfrddgamquhio").isReadyForMove()); - Assertions.assertEquals("fuqyrxpdlcgqlsi", - model.recoveryPointMoveReadinessInfo().get("mjqfrddgamquhio").additionalInfo()); - Assertions.assertEquals("ju", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("fcdis", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(false, model.recoveryPointProperties().isSoftDeleted()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureWorkloadSapHanaRecoveryPoint model = new AzureWorkloadSapHanaRecoveryPoint() - .withRecoveryPointTimeInUtc(OffsetDateTime.parse("2021-03-03T00:06:25Z")) - .withType(RestorePointType.SNAPSHOT_COPY_ONLY_FULL) - .withRecoveryPointTierDetails(Arrays.asList( - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.ARCHIVED_RP) - .withStatus(RecoveryPointTierStatus.INVALID) - .withExtendedInfo(mapOf("igpibud", "pndzaapmudqmeq")), - new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.INVALID) - .withStatus(RecoveryPointTierStatus.REHYDRATED) - .withExtendedInfo(mapOf("tmhheioqa", "ybpmzznrtffyaq")))) - .withRecoveryPointMoveReadinessInfo(mapOf("mjqfrddgamquhio", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("fuqyrxpdlcgqlsi"))) - .withRecoveryPointProperties( - new RecoveryPointProperties().withExpiryTime("ju").withRuleName("fcdis").withIsSoftDeleted(false)); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSapHanaRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-03T00:06:25Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.SNAPSHOT_COPY_ONLY_FULL, model.type()); - Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.INVALID, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("pndzaapmudqmeq", - model.recoveryPointTierDetails().get(0).extendedInfo().get("igpibud")); - Assertions.assertEquals(true, model.recoveryPointMoveReadinessInfo().get("mjqfrddgamquhio").isReadyForMove()); - Assertions.assertEquals("fuqyrxpdlcgqlsi", - model.recoveryPointMoveReadinessInfo().get("mjqfrddgamquhio").additionalInfo()); - Assertions.assertEquals("ju", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("fcdis", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(false, model.recoveryPointProperties().isSoftDeleted()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("ntuji", model.recoveryPointTierDetails().get(0).extendedInfo().get("c")); + Assertions.assertEquals(RecoveryPointTierType.INVALID, model.recoveryPointTierDetails().get(0).type()); + Assertions.assertEquals(RecoveryPointTierStatus.VALID, model.recoveryPointTierDetails().get(0).status()); + Assertions.assertFalse(model.recoveryPointMoveReadinessInfo().get("wtl").isReadyForMove()); + Assertions.assertEquals("oyzko", model.recoveryPointMoveReadinessInfo().get("wtl").additionalInfo()); + Assertions.assertEquals("snfdsdoakgtdl", model.recoveryPointProperties().expiryTime()); + Assertions.assertEquals("kzevdlhewpusds", model.recoveryPointProperties().ruleName()); + Assertions.assertTrue(model.recoveryPointProperties().isSoftDeleted()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRestoreRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRestoreRequestTests.java index 21938cc6b29d..b8bbbea1d13e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRestoreRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRestoreRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -22,70 +22,71 @@ public final class AzureWorkloadSapHanaRestoreRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSapHanaRestoreRequest model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadSAPHanaRestoreRequest\",\"recoveryType\":\"AlternateLocation\",\"sourceResourceId\":\"xfkfwegprhptill\",\"propertyBag\":{\"cwsldri\":\"iqtgdqoh\",\"bphbqzmizakakank\":\"etpwbralll\"},\"targetInfo\":{\"overwriteOption\":\"Overwrite\",\"containerId\":\"zhajoylhjlmuo\",\"databaseName\":\"primr\",\"targetDirectoryForFileRestore\":\"pteecjme\"},\"recoveryMode\":\"RecoveryUsingSnapshot\",\"targetResourceGroupName\":\"tvasy\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"dzaumweooh\",\"identityName\":\"ufuzboy\",\"userAssignedIdentityProperties\":{\"clientId\":\"hwtzolb\",\"principalId\":\"mwmdxmebwjscjpa\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":true,\"logPointInTimeForDBRecovery\":\"a\"},\"targetVirtualMachineId\":\"qxnmwmqt\",\"resourceGuardOperationRequests\":[\"yijddtvqcttad\"]}") + "{\"objectType\":\"AzureWorkloadSAPHanaRestoreRequest\",\"recoveryType\":\"OriginalLocation\",\"sourceResourceId\":\"nzlrpiqywncvjt\",\"propertyBag\":{\"vreljea\":\"ofizehtdhgbj\"},\"targetInfo\":{\"overwriteOption\":\"Overwrite\",\"containerId\":\"mlovuanashcxl\",\"databaseName\":\"jerbdkelvidizozs\",\"targetDirectoryForFileRestore\":\"ccxjm\"},\"recoveryMode\":\"SnapshotAttachAndRecover\",\"targetResourceGroupName\":\"gnwncypuuwwlt\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"jctzenkei\",\"identityName\":\"zhmkdasvflyh\",\"userAssignedIdentityProperties\":{\"clientId\":\"udchxgsrboldforo\",\"principalId\":\"jlvizbfhfovva\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":true,\"logPointInTimeForDBRecovery\":\"uodxesza\"},\"targetVirtualMachineId\":\"elawumu\",\"resourceGuardOperationRequests\":[\"zkwrrwoyc\",\"ucwyhahno\",\"drkywuhps\"]}") .toObject(AzureWorkloadSapHanaRestoreRequest.class); - Assertions.assertEquals("yijddtvqcttad", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.ALTERNATE_LOCATION, model.recoveryType()); - Assertions.assertEquals("xfkfwegprhptill", model.sourceResourceId()); - Assertions.assertEquals("iqtgdqoh", model.propertyBag().get("cwsldri")); + Assertions.assertEquals("zkwrrwoyc", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.ORIGINAL_LOCATION, model.recoveryType()); + Assertions.assertEquals("nzlrpiqywncvjt", model.sourceResourceId()); + Assertions.assertEquals("ofizehtdhgbj", model.propertyBag().get("vreljea")); Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); - Assertions.assertEquals("zhajoylhjlmuo", model.targetInfo().containerId()); - Assertions.assertEquals("primr", model.targetInfo().databaseName()); - Assertions.assertEquals("pteecjme", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.RECOVERY_USING_SNAPSHOT, model.recoveryMode()); - Assertions.assertEquals("tvasy", model.targetResourceGroupName()); - Assertions.assertEquals("dzaumweooh", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("ufuzboy", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("hwtzolb", + Assertions.assertEquals("mlovuanashcxl", model.targetInfo().containerId()); + Assertions.assertEquals("jerbdkelvidizozs", model.targetInfo().databaseName()); + Assertions.assertEquals("ccxjm", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.SNAPSHOT_ATTACH_AND_RECOVER, model.recoveryMode()); + Assertions.assertEquals("gnwncypuuwwlt", model.targetResourceGroupName()); + Assertions.assertEquals("jctzenkei", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("zhmkdasvflyh", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("udchxgsrboldforo", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("mwmdxmebwjscjpa", + Assertions.assertEquals("jlvizbfhfovva", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(true, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("a", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("qxnmwmqt", model.targetVirtualMachineId()); + Assertions.assertTrue(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("uodxesza", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("elawumu", model.targetVirtualMachineId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureWorkloadSapHanaRestoreRequest model = new AzureWorkloadSapHanaRestoreRequest() - .withResourceGuardOperationRequests(Arrays.asList("yijddtvqcttad")) - .withRecoveryType(RecoveryType.ALTERNATE_LOCATION) - .withSourceResourceId("xfkfwegprhptill") - .withPropertyBag(mapOf("cwsldri", "iqtgdqoh", "bphbqzmizakakank", "etpwbralll")) + .withResourceGuardOperationRequests(Arrays.asList("zkwrrwoyc", "ucwyhahno", "drkywuhps")) + .withRecoveryType(RecoveryType.ORIGINAL_LOCATION) + .withSourceResourceId("nzlrpiqywncvjt") + .withPropertyBag(mapOf("vreljea", "ofizehtdhgbj")) .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.OVERWRITE) - .withContainerId("zhajoylhjlmuo") - .withDatabaseName("primr") - .withTargetDirectoryForFileRestore("pteecjme")) - .withRecoveryMode(RecoveryMode.RECOVERY_USING_SNAPSHOT) - .withTargetResourceGroupName("tvasy") + .withContainerId("mlovuanashcxl") + .withDatabaseName("jerbdkelvidizozs") + .withTargetDirectoryForFileRestore("ccxjm")) + .withRecoveryMode(RecoveryMode.SNAPSHOT_ATTACH_AND_RECOVER) + .withTargetResourceGroupName("gnwncypuuwwlt") .withUserAssignedManagedIdentityDetails( - new UserAssignedManagedIdentityDetails().withIdentityArmId("dzaumweooh") - .withIdentityName("ufuzboy") - .withUserAssignedIdentityProperties(new UserAssignedIdentityProperties().withClientId("hwtzolb") - .withPrincipalId("mwmdxmebwjscjpa"))) - .withSnapshotRestoreParameters( - new SnapshotRestoreParameters().withSkipAttachAndMount(true).withLogPointInTimeForDBRecovery("a")) - .withTargetVirtualMachineId("qxnmwmqt"); + new UserAssignedManagedIdentityDetails().withIdentityArmId("jctzenkei") + .withIdentityName("zhmkdasvflyh") + .withUserAssignedIdentityProperties( + new UserAssignedIdentityProperties().withClientId("udchxgsrboldforo") + .withPrincipalId("jlvizbfhfovva"))) + .withSnapshotRestoreParameters(new SnapshotRestoreParameters().withSkipAttachAndMount(true) + .withLogPointInTimeForDBRecovery("uodxesza")) + .withTargetVirtualMachineId("elawumu"); model = BinaryData.fromObject(model).toObject(AzureWorkloadSapHanaRestoreRequest.class); - Assertions.assertEquals("yijddtvqcttad", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.ALTERNATE_LOCATION, model.recoveryType()); - Assertions.assertEquals("xfkfwegprhptill", model.sourceResourceId()); - Assertions.assertEquals("iqtgdqoh", model.propertyBag().get("cwsldri")); + Assertions.assertEquals("zkwrrwoyc", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.ORIGINAL_LOCATION, model.recoveryType()); + Assertions.assertEquals("nzlrpiqywncvjt", model.sourceResourceId()); + Assertions.assertEquals("ofizehtdhgbj", model.propertyBag().get("vreljea")); Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); - Assertions.assertEquals("zhajoylhjlmuo", model.targetInfo().containerId()); - Assertions.assertEquals("primr", model.targetInfo().databaseName()); - Assertions.assertEquals("pteecjme", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.RECOVERY_USING_SNAPSHOT, model.recoveryMode()); - Assertions.assertEquals("tvasy", model.targetResourceGroupName()); - Assertions.assertEquals("dzaumweooh", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("ufuzboy", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("hwtzolb", + Assertions.assertEquals("mlovuanashcxl", model.targetInfo().containerId()); + Assertions.assertEquals("jerbdkelvidizozs", model.targetInfo().databaseName()); + Assertions.assertEquals("ccxjm", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.SNAPSHOT_ATTACH_AND_RECOVER, model.recoveryMode()); + Assertions.assertEquals("gnwncypuuwwlt", model.targetResourceGroupName()); + Assertions.assertEquals("jctzenkei", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("zhmkdasvflyh", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("udchxgsrboldforo", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("mwmdxmebwjscjpa", + Assertions.assertEquals("jlvizbfhfovva", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(true, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("a", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("qxnmwmqt", model.targetVirtualMachineId()); + Assertions.assertTrue(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("uodxesza", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("elawumu", model.targetVirtualMachineId()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRestoreWithRehydrateRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRestoreWithRehydrateRequestTests.java index 480ab3fb8cfb..57d15cdcda12 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRestoreWithRehydrateRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRestoreWithRehydrateRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -24,75 +24,75 @@ public final class AzureWorkloadSapHanaRestoreWithRehydrateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSapHanaRestoreWithRehydrateRequest model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadSAPHanaRestoreWithRehydrateRequest\",\"recoveryPointRehydrationInfo\":{\"rehydrationRetentionDuration\":\"rmgjfbpkuwx\",\"rehydrationPriority\":\"High\"},\"recoveryType\":\"RestoreDisks\",\"sourceResourceId\":\"izfavkjzwf\",\"propertyBag\":{\"sbfwxr\":\"aykmmf\"},\"targetInfo\":{\"overwriteOption\":\"FailOnConflict\",\"containerId\":\"wsrsxkrplbja\",\"databaseName\":\"jwwviy\",\"targetDirectoryForFileRestore\":\"ps\"},\"recoveryMode\":\"FileRecovery\",\"targetResourceGroupName\":\"nnhj\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"wjh\",\"identityName\":\"biwetpo\",\"userAssignedIdentityProperties\":{\"clientId\":\"yqiq\",\"principalId\":\"gfsetzlexbsfled\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":false,\"logPointInTimeForDBRecovery\":\"ziu\"},\"targetVirtualMachineId\":\"bzkkd\",\"resourceGuardOperationRequests\":[\"qsyclj\",\"elpkpbafvafhlbyl\",\"cbevxrhyzdfw\"]}") + "{\"objectType\":\"AzureWorkloadSAPHanaRestoreWithRehydrateRequest\",\"recoveryPointRehydrationInfo\":{\"rehydrationRetentionDuration\":\"urut\",\"rehydrationPriority\":\"High\"},\"recoveryType\":\"Invalid\",\"sourceResourceId\":\"lalniex\",\"propertyBag\":{\"bwwpgdakchzy\":\"zpgepqty\",\"mysu\":\"lixqnrkcxkjibn\"},\"targetInfo\":{\"overwriteOption\":\"Invalid\",\"containerId\":\"ntvlwijpsttexo\",\"databaseName\":\"pwcyyufmhr\",\"targetDirectoryForFileRestore\":\"cuwmqsp\"},\"recoveryMode\":\"RecoveryUsingSnapshot\",\"targetResourceGroupName\":\"zhlctddunqndyfpc\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"bnjj\",\"identityName\":\"gegydcwboxjum\",\"userAssignedIdentityProperties\":{\"clientId\":\"olihrra\",\"principalId\":\"uaubrj\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":true,\"logPointInTimeForDBRecovery\":\"fuojrngif\"},\"targetVirtualMachineId\":\"z\",\"resourceGuardOperationRequests\":[\"ccbiuimzdlyjdfq\",\"mkyoqufdvruzsl\",\"ojhp\"]}") .toObject(AzureWorkloadSapHanaRestoreWithRehydrateRequest.class); - Assertions.assertEquals("qsyclj", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.RESTORE_DISKS, model.recoveryType()); - Assertions.assertEquals("izfavkjzwf", model.sourceResourceId()); - Assertions.assertEquals("aykmmf", model.propertyBag().get("sbfwxr")); - Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); - Assertions.assertEquals("wsrsxkrplbja", model.targetInfo().containerId()); - Assertions.assertEquals("jwwviy", model.targetInfo().databaseName()); - Assertions.assertEquals("ps", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.FILE_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("nnhj", model.targetResourceGroupName()); - Assertions.assertEquals("wjh", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("biwetpo", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("yqiq", + Assertions.assertEquals("ccbiuimzdlyjdfq", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.INVALID, model.recoveryType()); + Assertions.assertEquals("lalniex", model.sourceResourceId()); + Assertions.assertEquals("zpgepqty", model.propertyBag().get("bwwpgdakchzy")); + Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); + Assertions.assertEquals("ntvlwijpsttexo", model.targetInfo().containerId()); + Assertions.assertEquals("pwcyyufmhr", model.targetInfo().databaseName()); + Assertions.assertEquals("cuwmqsp", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.RECOVERY_USING_SNAPSHOT, model.recoveryMode()); + Assertions.assertEquals("zhlctddunqndyfpc", model.targetResourceGroupName()); + Assertions.assertEquals("bnjj", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("gegydcwboxjum", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("olihrra", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("gfsetzlexbsfled", + Assertions.assertEquals("uaubrj", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(false, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("ziu", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("bzkkd", model.targetVirtualMachineId()); - Assertions.assertEquals("rmgjfbpkuwx", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); + Assertions.assertTrue(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("fuojrngif", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("z", model.targetVirtualMachineId()); + Assertions.assertEquals("urut", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); Assertions.assertEquals(RehydrationPriority.HIGH, model.recoveryPointRehydrationInfo().rehydrationPriority()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureWorkloadSapHanaRestoreWithRehydrateRequest model = new AzureWorkloadSapHanaRestoreWithRehydrateRequest() - .withResourceGuardOperationRequests(Arrays.asList("qsyclj", "elpkpbafvafhlbyl", "cbevxrhyzdfw")) - .withRecoveryType(RecoveryType.RESTORE_DISKS) - .withSourceResourceId("izfavkjzwf") - .withPropertyBag(mapOf("sbfwxr", "aykmmf")) - .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.FAIL_ON_CONFLICT) - .withContainerId("wsrsxkrplbja") - .withDatabaseName("jwwviy") - .withTargetDirectoryForFileRestore("ps")) - .withRecoveryMode(RecoveryMode.FILE_RECOVERY) - .withTargetResourceGroupName("nnhj") - .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails().withIdentityArmId("wjh") - .withIdentityName("biwetpo") + .withResourceGuardOperationRequests(Arrays.asList("ccbiuimzdlyjdfq", "mkyoqufdvruzsl", "ojhp")) + .withRecoveryType(RecoveryType.INVALID) + .withSourceResourceId("lalniex") + .withPropertyBag(mapOf("bwwpgdakchzy", "zpgepqty", "mysu", "lixqnrkcxkjibn")) + .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.INVALID) + .withContainerId("ntvlwijpsttexo") + .withDatabaseName("pwcyyufmhr") + .withTargetDirectoryForFileRestore("cuwmqsp")) + .withRecoveryMode(RecoveryMode.RECOVERY_USING_SNAPSHOT) + .withTargetResourceGroupName("zhlctddunqndyfpc") + .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails().withIdentityArmId("bnjj") + .withIdentityName("gegydcwboxjum") .withUserAssignedIdentityProperties( - new UserAssignedIdentityProperties().withClientId("yqiq").withPrincipalId("gfsetzlexbsfled"))) - .withSnapshotRestoreParameters( - new SnapshotRestoreParameters().withSkipAttachAndMount(false).withLogPointInTimeForDBRecovery("ziu")) - .withTargetVirtualMachineId("bzkkd") + new UserAssignedIdentityProperties().withClientId("olihrra").withPrincipalId("uaubrj"))) + .withSnapshotRestoreParameters(new SnapshotRestoreParameters().withSkipAttachAndMount(true) + .withLogPointInTimeForDBRecovery("fuojrngif")) + .withTargetVirtualMachineId("z") .withRecoveryPointRehydrationInfo( - new RecoveryPointRehydrationInfo().withRehydrationRetentionDuration("rmgjfbpkuwx") + new RecoveryPointRehydrationInfo().withRehydrationRetentionDuration("urut") .withRehydrationPriority(RehydrationPriority.HIGH)); model = BinaryData.fromObject(model).toObject(AzureWorkloadSapHanaRestoreWithRehydrateRequest.class); - Assertions.assertEquals("qsyclj", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.RESTORE_DISKS, model.recoveryType()); - Assertions.assertEquals("izfavkjzwf", model.sourceResourceId()); - Assertions.assertEquals("aykmmf", model.propertyBag().get("sbfwxr")); - Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); - Assertions.assertEquals("wsrsxkrplbja", model.targetInfo().containerId()); - Assertions.assertEquals("jwwviy", model.targetInfo().databaseName()); - Assertions.assertEquals("ps", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.FILE_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("nnhj", model.targetResourceGroupName()); - Assertions.assertEquals("wjh", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("biwetpo", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("yqiq", + Assertions.assertEquals("ccbiuimzdlyjdfq", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.INVALID, model.recoveryType()); + Assertions.assertEquals("lalniex", model.sourceResourceId()); + Assertions.assertEquals("zpgepqty", model.propertyBag().get("bwwpgdakchzy")); + Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); + Assertions.assertEquals("ntvlwijpsttexo", model.targetInfo().containerId()); + Assertions.assertEquals("pwcyyufmhr", model.targetInfo().databaseName()); + Assertions.assertEquals("cuwmqsp", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.RECOVERY_USING_SNAPSHOT, model.recoveryMode()); + Assertions.assertEquals("zhlctddunqndyfpc", model.targetResourceGroupName()); + Assertions.assertEquals("bnjj", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("gegydcwboxjum", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("olihrra", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("gfsetzlexbsfled", + Assertions.assertEquals("uaubrj", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(false, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("ziu", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("bzkkd", model.targetVirtualMachineId()); - Assertions.assertEquals("rmgjfbpkuwx", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); + Assertions.assertTrue(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("fuojrngif", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("z", model.targetVirtualMachineId()); + Assertions.assertEquals("urut", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); Assertions.assertEquals(RehydrationPriority.HIGH, model.recoveryPointRehydrationInfo().rehydrationPriority()); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlAutoProtectionIntentTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlAutoProtectionIntentTests.java index 392cf9fefeed..196f960e1d1e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlAutoProtectionIntentTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlAutoProtectionIntentTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -15,31 +15,31 @@ public final class AzureWorkloadSqlAutoProtectionIntentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSqlAutoProtectionIntent model = BinaryData.fromString( - "{\"protectionIntentItemType\":\"AzureWorkloadSQLAutoProtectionIntent\",\"workloadItemType\":\"Invalid\",\"backupManagementType\":\"AzureIaasVM\",\"sourceResourceId\":\"rrqmbzmqk\",\"itemId\":\"tbnxwbjsid\",\"policyId\":\"rkfpks\",\"protectionState\":\"Protecting\"}") + "{\"protectionIntentItemType\":\"AzureWorkloadSQLAutoProtectionIntent\",\"workloadItemType\":\"SAPAseDatabase\",\"backupManagementType\":\"AzureWorkload\",\"sourceResourceId\":\"ei\",\"itemId\":\"dsmjtgr\",\"policyId\":\"dgkkile\",\"protectionState\":\"Protecting\"}") .toObject(AzureWorkloadSqlAutoProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.backupManagementType()); - Assertions.assertEquals("rrqmbzmqk", model.sourceResourceId()); - Assertions.assertEquals("tbnxwbjsid", model.itemId()); - Assertions.assertEquals("rkfpks", model.policyId()); + Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.backupManagementType()); + Assertions.assertEquals("ei", model.sourceResourceId()); + Assertions.assertEquals("dsmjtgr", model.itemId()); + Assertions.assertEquals("dgkkile", model.policyId()); Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - Assertions.assertEquals(WorkloadItemType.INVALID, model.workloadItemType()); + Assertions.assertEquals(WorkloadItemType.SAPASE_DATABASE, model.workloadItemType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureWorkloadSqlAutoProtectionIntent model - = new AzureWorkloadSqlAutoProtectionIntent().withBackupManagementType(BackupManagementType.AZURE_IAAS_VM) - .withSourceResourceId("rrqmbzmqk") - .withItemId("tbnxwbjsid") - .withPolicyId("rkfpks") + = new AzureWorkloadSqlAutoProtectionIntent().withBackupManagementType(BackupManagementType.AZURE_WORKLOAD) + .withSourceResourceId("ei") + .withItemId("dsmjtgr") + .withPolicyId("dgkkile") .withProtectionState(ProtectionStatus.PROTECTING) - .withWorkloadItemType(WorkloadItemType.INVALID); + .withWorkloadItemType(WorkloadItemType.SAPASE_DATABASE); model = BinaryData.fromObject(model).toObject(AzureWorkloadSqlAutoProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.backupManagementType()); - Assertions.assertEquals("rrqmbzmqk", model.sourceResourceId()); - Assertions.assertEquals("tbnxwbjsid", model.itemId()); - Assertions.assertEquals("rkfpks", model.policyId()); + Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.backupManagementType()); + Assertions.assertEquals("ei", model.sourceResourceId()); + Assertions.assertEquals("dsmjtgr", model.itemId()); + Assertions.assertEquals("dgkkile", model.policyId()); Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - Assertions.assertEquals(WorkloadItemType.INVALID, model.workloadItemType()); + Assertions.assertEquals(WorkloadItemType.SAPASE_DATABASE, model.workloadItemType()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlPointInTimeRecoveryPointTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlPointInTimeRecoveryPointTests.java index 5463ca2122bb..ba4524ea822b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlPointInTimeRecoveryPointTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlPointInTimeRecoveryPointTests.java @@ -1,109 +1,49 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlPointInTimeRecoveryPoint; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlRecoveryPointExtendedInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.PointInTimeRange; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointProperties; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierInformationV2; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierStatus; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType; import com.azure.resourcemanager.recoveryservicesbackup.models.RestorePointType; -import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectory; import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryType; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class AzureWorkloadSqlPointInTimeRecoveryPointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSqlPointInTimeRecoveryPoint model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadSQLPointInTimeRecoveryPoint\",\"timeRanges\":[{\"startTime\":\"2021-03-24T07:32:19Z\",\"endTime\":\"2021-02-03T01:21:36Z\"},{\"startTime\":\"2021-04-27T07:05:12Z\",\"endTime\":\"2021-07-18T02:05:58Z\"}],\"extendedInfo\":{\"dataDirectoryTimeInUTC\":\"2021-02-19T22:42:25Z\",\"dataDirectoryPaths\":[{\"type\":\"Invalid\",\"path\":\"kpbz\",\"logicalName\":\"piljhahzvech\"}]},\"recoveryPointTimeInUTC\":\"2021-11-07T12:28:01Z\",\"type\":\"Incremental\",\"recoveryPointTierDetails\":[{\"type\":\"InstantRP\",\"status\":\"Disabled\",\"extendedInfo\":{\"efqsfapaqtferrqw\":\"wiuub\",\"kmfx\":\"x\",\"pud\":\"pjwogqqno\",\"yawbzasqbu\":\"dabtqwp\"}}],\"recoveryPointMoveReadinessInfo\":{\"p\":{\"isReadyForMove\":true,\"additionalInfo\":\"exaoguya\"}},\"recoveryPointProperties\":{\"expiryTime\":\"daultxijjumfq\",\"ruleName\":\"z\",\"isSoftDeleted\":true}}") + "{\"objectType\":\"AzureWorkloadSQLPointInTimeRecoveryPoint\",\"timeRanges\":[{\"startTime\":\"2021-04-06T11:14:12Z\",\"endTime\":\"2021-12-06T03:48:21Z\"}],\"extendedInfo\":{\"dataDirectoryTimeInUTC\":\"2021-02-08T06:34:01Z\",\"dataDirectoryPaths\":[{\"type\":\"Log\",\"path\":\"dvncjabudurgk\",\"logicalName\":\"mokzhjjklf\"},{\"type\":\"Invalid\",\"path\":\"uwqlgzrfzeey\",\"logicalName\":\"izikayuhq\"},{\"type\":\"Log\",\"path\":\"sybbqwr\",\"logicalName\":\"ldgmfpgvmpip\"},{\"type\":\"Invalid\",\"path\":\"haq\",\"logicalName\":\"ss\"}],\"includedDatabases\":[{\"datasourceId\":\"wbdsr\",\"datasourceName\":\"pdrhne\"}]},\"recoveryPointTimeInUTC\":\"2020-12-25T00:27:30Z\",\"type\":\"Incremental\",\"recoveryPointTierDetails\":[{\"type\":\"Invalid\",\"status\":\"Invalid\",\"extendedInfo\":{\"lfzxiavrmbzonoki\":\"gpikpzimejza\",\"rgz\":\"rjqc\"}}],\"recoveryPointMoveReadinessInfo\":{\"indfpwpjyl\":{\"isReadyForMove\":true,\"additionalInfo\":\"szrnwo\"},\"lsj\":{\"isReadyForMove\":true,\"additionalInfo\":\"h\"},\"jagrqmqhldvr\":{\"isReadyForMove\":false,\"additionalInfo\":\"zfjvfbgofe\"}},\"recoveryPointProperties\":{\"expiryTime\":\"ojnal\",\"ruleName\":\"fk\",\"isSoftDeleted\":true},\"threatStatus\":\"NotAvailable\",\"threatInfo\":[{\"threatTitle\":\"wueluqhhahhxv\",\"threatDescription\":\"mzkwpjg\",\"lastUpdatedTime\":\"2021-10-11T18:28:46Z\",\"threatState\":\"InProgress\",\"threatStartTime\":\"2021-03-26T20:29:02Z\",\"threatEndTime\":\"2021-10-04T11:20:51Z\",\"threatURI\":\"sxhqxujx\",\"threatSeverity\":\"Informational\"},{\"threatTitle\":\"xdigrjg\",\"threatDescription\":\"fzdm\",\"lastUpdatedTime\":\"2021-03-22T22:43:26Z\",\"threatState\":\"Active\",\"threatStartTime\":\"2021-07-11T17:45Z\",\"threatEndTime\":\"2020-12-25T23:20:44Z\",\"threatURI\":\"otzi\",\"threatSeverity\":\"Informational\"},{\"threatTitle\":\"vppho\",\"threatDescription\":\"qzudphq\",\"lastUpdatedTime\":\"2021-03-24T10:30:38Z\",\"threatState\":\"InProgress\",\"threatStartTime\":\"2021-04-05T06:12:39Z\",\"threatEndTime\":\"2021-09-19T17:28Z\",\"threatURI\":\"cvtbv\",\"threatSeverity\":\"Warning\"},{\"threatTitle\":\"mtnvyq\",\"threatDescription\":\"tkzwpcnpwzc\",\"lastUpdatedTime\":\"2021-05-22T23:16:36Z\",\"threatState\":\"Active\",\"threatStartTime\":\"2021-09-24T01:03:33Z\",\"threatEndTime\":\"2021-02-07T07:30:38Z\",\"threatURI\":\"yajguqfhwygzlv\",\"threatSeverity\":\"Critical\"}]}") .toObject(AzureWorkloadSqlPointInTimeRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T12:28:01Z"), model.recoveryPointTimeInUtc()); + Assertions.assertEquals(ThreatStatus.NOT_AVAILABLE, model.threatStatus()); + Assertions.assertEquals(ThreatState.IN_PROGRESS, model.threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.INFORMATIONAL, model.threatInfo().get(0).threatSeverity()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-25T00:27:30Z"), model.recoveryPointTimeInUtc()); Assertions.assertEquals(RestorePointType.INCREMENTAL, model.type()); - Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.DISABLED, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("wiuub", - model.recoveryPointTierDetails().get(0).extendedInfo().get("efqsfapaqtferrqw")); - Assertions.assertEquals(true, model.recoveryPointMoveReadinessInfo().get("p").isReadyForMove()); - Assertions.assertEquals("exaoguya", model.recoveryPointMoveReadinessInfo().get("p").additionalInfo()); - Assertions.assertEquals("daultxijjumfq", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("z", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(true, model.recoveryPointProperties().isSoftDeleted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-19T22:42:25Z"), + Assertions.assertEquals("gpikpzimejza", + model.recoveryPointTierDetails().get(0).extendedInfo().get("lfzxiavrmbzonoki")); + Assertions.assertEquals(RecoveryPointTierType.INVALID, model.recoveryPointTierDetails().get(0).type()); + Assertions.assertEquals(RecoveryPointTierStatus.INVALID, model.recoveryPointTierDetails().get(0).status()); + Assertions.assertTrue(model.recoveryPointMoveReadinessInfo().get("indfpwpjyl").isReadyForMove()); + Assertions.assertEquals("szrnwo", model.recoveryPointMoveReadinessInfo().get("indfpwpjyl").additionalInfo()); + Assertions.assertEquals("ojnal", model.recoveryPointProperties().expiryTime()); + Assertions.assertEquals("fk", model.recoveryPointProperties().ruleName()); + Assertions.assertTrue(model.recoveryPointProperties().isSoftDeleted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T06:34:01Z"), model.extendedInfo().dataDirectoryTimeInUtc()); - Assertions.assertEquals(SqlDataDirectoryType.INVALID, model.extendedInfo().dataDirectoryPaths().get(0).type()); - Assertions.assertEquals("kpbz", model.extendedInfo().dataDirectoryPaths().get(0).path()); - Assertions.assertEquals("piljhahzvech", model.extendedInfo().dataDirectoryPaths().get(0).logicalName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-24T07:32:19Z"), model.timeRanges().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-03T01:21:36Z"), model.timeRanges().get(0).endTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureWorkloadSqlPointInTimeRecoveryPoint model - = new AzureWorkloadSqlPointInTimeRecoveryPoint() - .withRecoveryPointTimeInUtc(OffsetDateTime.parse("2021-11-07T12:28:01Z")) - .withType(RestorePointType.INCREMENTAL) - .withRecoveryPointTierDetails( - Arrays.asList(new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.INSTANT_RP) - .withStatus(RecoveryPointTierStatus.DISABLED) - .withExtendedInfo(mapOf("efqsfapaqtferrqw", "wiuub", "kmfx", "x", "pud", "pjwogqqno", - "yawbzasqbu", "dabtqwp")))) - .withRecoveryPointMoveReadinessInfo(mapOf("p", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("exaoguya"))) - .withRecoveryPointProperties(new RecoveryPointProperties().withExpiryTime("daultxijjumfq") - .withRuleName("z") - .withIsSoftDeleted(true)) - .withExtendedInfo(new AzureWorkloadSqlRecoveryPointExtendedInfo() - .withDataDirectoryTimeInUtc(OffsetDateTime.parse("2021-02-19T22:42:25Z")) - .withDataDirectoryPaths(Arrays.asList(new SqlDataDirectory().withType(SqlDataDirectoryType.INVALID) - .withPath("kpbz") - .withLogicalName("piljhahzvech")))) - .withTimeRanges(Arrays.asList( - new PointInTimeRange().withStartTime(OffsetDateTime.parse("2021-03-24T07:32:19Z")) - .withEndTime(OffsetDateTime.parse("2021-02-03T01:21:36Z")), - new PointInTimeRange().withStartTime(OffsetDateTime.parse("2021-04-27T07:05:12Z")) - .withEndTime(OffsetDateTime.parse("2021-07-18T02:05:58Z")))); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSqlPointInTimeRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T12:28:01Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.INCREMENTAL, model.type()); - Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.DISABLED, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("wiuub", - model.recoveryPointTierDetails().get(0).extendedInfo().get("efqsfapaqtferrqw")); - Assertions.assertEquals(true, model.recoveryPointMoveReadinessInfo().get("p").isReadyForMove()); - Assertions.assertEquals("exaoguya", model.recoveryPointMoveReadinessInfo().get("p").additionalInfo()); - Assertions.assertEquals("daultxijjumfq", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("z", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(true, model.recoveryPointProperties().isSoftDeleted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-19T22:42:25Z"), - model.extendedInfo().dataDirectoryTimeInUtc()); - Assertions.assertEquals(SqlDataDirectoryType.INVALID, model.extendedInfo().dataDirectoryPaths().get(0).type()); - Assertions.assertEquals("kpbz", model.extendedInfo().dataDirectoryPaths().get(0).path()); - Assertions.assertEquals("piljhahzvech", model.extendedInfo().dataDirectoryPaths().get(0).logicalName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-24T07:32:19Z"), model.timeRanges().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-03T01:21:36Z"), model.timeRanges().get(0).endTime()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(SqlDataDirectoryType.LOG, model.extendedInfo().dataDirectoryPaths().get(0).type()); + Assertions.assertEquals("dvncjabudurgk", model.extendedInfo().dataDirectoryPaths().get(0).path()); + Assertions.assertEquals("mokzhjjklf", model.extendedInfo().dataDirectoryPaths().get(0).logicalName()); + Assertions.assertEquals("wbdsr", model.extendedInfo().includedDatabases().get(0).datasourceId()); + Assertions.assertEquals("pdrhne", model.extendedInfo().includedDatabases().get(0).datasourceName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T11:14:12Z"), model.timeRanges().get(0).startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-06T03:48:21Z"), model.timeRanges().get(0).endTime()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlPointInTimeRestoreRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlPointInTimeRestoreRequestTests.java index 4ddeab5cd165..108b4351936d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlPointInTimeRestoreRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlPointInTimeRestoreRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -25,96 +25,96 @@ public final class AzureWorkloadSqlPointInTimeRestoreRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSqlPointInTimeRestoreRequest model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadSQLPointInTimeRestoreRequest\",\"pointInTime\":\"2021-03-19T19:23:29Z\",\"shouldUseAlternateTargetLocation\":true,\"isNonRecoverable\":false,\"alternateDirectoryPaths\":[{\"mappingType\":\"Data\",\"sourceLogicalName\":\"oi\",\"sourcePath\":\"nsmjbl\",\"targetPath\":\"jhlnymzotqyryu\"},{\"mappingType\":\"Data\",\"sourceLogicalName\":\"qqvxmvwfgtayxons\",\"sourcePath\":\"e\",\"targetPath\":\"lzqnhcvs\"}],\"recoveryType\":\"Invalid\",\"sourceResourceId\":\"zoibgsxg\",\"propertyBag\":{\"mpqoxw\":\"yqo\"},\"targetInfo\":{\"overwriteOption\":\"Invalid\",\"containerId\":\"xiqxeiiqbimh\",\"databaseName\":\"wwinhehf\",\"targetDirectoryForFileRestore\":\"ofvwbcb\"},\"recoveryMode\":\"WorkloadRecovery\",\"targetResourceGroupName\":\"nkbwvqv\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"ivqiheb\",\"identityName\":\"swbzuwfmdurage\",\"userAssignedIdentityProperties\":{\"clientId\":\"vcjfelisdjubggb\",\"principalId\":\"gkxkbsazgakg\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":true,\"logPointInTimeForDBRecovery\":\"m\"},\"targetVirtualMachineId\":\"mspofapvuhryl\",\"resourceGuardOperationRequests\":[\"frzgbzjed\",\"st\"]}") + "{\"objectType\":\"AzureWorkloadSQLPointInTimeRestoreRequest\",\"pointInTime\":\"2021-11-07T03:46:32Z\",\"shouldUseAlternateTargetLocation\":false,\"isNonRecoverable\":true,\"alternateDirectoryPaths\":[{\"mappingType\":\"Log\",\"sourceLogicalName\":\"tmcdzsufcohd\",\"sourcePath\":\"zlmcmuapcvhdb\",\"targetPath\":\"wqqxeysko\"},{\"mappingType\":\"Log\",\"sourceLogicalName\":\"nkfkbgbzb\",\"sourcePath\":\"xeqoc\",\"targetPath\":\"mygvkzqkj\"}],\"recoveryType\":\"RestoreDisks\",\"sourceResourceId\":\"bzefezr\",\"propertyBag\":{\"nzvdfbzdixzmq\":\"zurtleipqxbkwvz\",\"opqhewjptmc\":\"noda\"},\"targetInfo\":{\"overwriteOption\":\"FailOnConflict\",\"containerId\":\"t\",\"databaseName\":\"lnd\",\"targetDirectoryForFileRestore\":\"tutmzl\"},\"recoveryMode\":\"RecoveryUsingSnapshot\",\"targetResourceGroupName\":\"lvfhrbbp\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"vcwwyyurmochppr\",\"identityName\":\"snmokayzej\",\"userAssignedIdentityProperties\":{\"clientId\":\"bkpbzpcpiljh\",\"principalId\":\"zv\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":false,\"logPointInTimeForDBRecovery\":\"bnwieholew\"},\"targetVirtualMachineId\":\"iuubwefqsf\",\"resourceGuardOperationRequests\":[\"qtferrqwexjkmf\",\"apjwogqqnobpudcd\"]}") .toObject(AzureWorkloadSqlPointInTimeRestoreRequest.class); - Assertions.assertEquals("frzgbzjed", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.INVALID, model.recoveryType()); - Assertions.assertEquals("zoibgsxg", model.sourceResourceId()); - Assertions.assertEquals("yqo", model.propertyBag().get("mpqoxw")); - Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); - Assertions.assertEquals("xiqxeiiqbimh", model.targetInfo().containerId()); - Assertions.assertEquals("wwinhehf", model.targetInfo().databaseName()); - Assertions.assertEquals("ofvwbcb", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.WORKLOAD_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("nkbwvqv", model.targetResourceGroupName()); - Assertions.assertEquals("ivqiheb", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("swbzuwfmdurage", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("vcjfelisdjubggb", + Assertions.assertEquals("qtferrqwexjkmf", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.RESTORE_DISKS, model.recoveryType()); + Assertions.assertEquals("bzefezr", model.sourceResourceId()); + Assertions.assertEquals("zurtleipqxbkwvz", model.propertyBag().get("nzvdfbzdixzmq")); + Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); + Assertions.assertEquals("t", model.targetInfo().containerId()); + Assertions.assertEquals("lnd", model.targetInfo().databaseName()); + Assertions.assertEquals("tutmzl", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.RECOVERY_USING_SNAPSHOT, model.recoveryMode()); + Assertions.assertEquals("lvfhrbbp", model.targetResourceGroupName()); + Assertions.assertEquals("vcwwyyurmochppr", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("snmokayzej", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("bkpbzpcpiljh", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("gkxkbsazgakg", + Assertions.assertEquals("zv", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(true, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("m", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("mspofapvuhryl", model.targetVirtualMachineId()); - Assertions.assertEquals(true, model.shouldUseAlternateTargetLocation()); - Assertions.assertEquals(false, model.isNonRecoverable()); - Assertions.assertEquals(SqlDataDirectoryType.DATA, model.alternateDirectoryPaths().get(0).mappingType()); - Assertions.assertEquals("oi", model.alternateDirectoryPaths().get(0).sourceLogicalName()); - Assertions.assertEquals("nsmjbl", model.alternateDirectoryPaths().get(0).sourcePath()); - Assertions.assertEquals("jhlnymzotqyryu", model.alternateDirectoryPaths().get(0).targetPath()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-19T19:23:29Z"), model.pointInTime()); + Assertions.assertFalse(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("bnwieholew", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("iuubwefqsf", model.targetVirtualMachineId()); + Assertions.assertFalse(model.shouldUseAlternateTargetLocation()); + Assertions.assertTrue(model.isNonRecoverable()); + Assertions.assertEquals(SqlDataDirectoryType.LOG, model.alternateDirectoryPaths().get(0).mappingType()); + Assertions.assertEquals("tmcdzsufcohd", model.alternateDirectoryPaths().get(0).sourceLogicalName()); + Assertions.assertEquals("zlmcmuapcvhdb", model.alternateDirectoryPaths().get(0).sourcePath()); + Assertions.assertEquals("wqqxeysko", model.alternateDirectoryPaths().get(0).targetPath()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T03:46:32Z"), model.pointInTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureWorkloadSqlPointInTimeRestoreRequest model = new AzureWorkloadSqlPointInTimeRestoreRequest() - .withResourceGuardOperationRequests(Arrays.asList("frzgbzjed", "st")) - .withRecoveryType(RecoveryType.INVALID) - .withSourceResourceId("zoibgsxg") - .withPropertyBag(mapOf("mpqoxw", "yqo")) - .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.INVALID) - .withContainerId("xiqxeiiqbimh") - .withDatabaseName("wwinhehf") - .withTargetDirectoryForFileRestore("ofvwbcb")) - .withRecoveryMode(RecoveryMode.WORKLOAD_RECOVERY) - .withTargetResourceGroupName("nkbwvqv") - .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails() - .withIdentityArmId("ivqiheb") - .withIdentityName("swbzuwfmdurage") - .withUserAssignedIdentityProperties(new UserAssignedIdentityProperties().withClientId("vcjfelisdjubggb") - .withPrincipalId("gkxkbsazgakg"))) - .withSnapshotRestoreParameters( - new SnapshotRestoreParameters().withSkipAttachAndMount(true).withLogPointInTimeForDBRecovery("m")) - .withTargetVirtualMachineId("mspofapvuhryl") - .withShouldUseAlternateTargetLocation(true) - .withIsNonRecoverable(false) + .withResourceGuardOperationRequests(Arrays.asList("qtferrqwexjkmf", "apjwogqqnobpudcd")) + .withRecoveryType(RecoveryType.RESTORE_DISKS) + .withSourceResourceId("bzefezr") + .withPropertyBag(mapOf("nzvdfbzdixzmq", "zurtleipqxbkwvz", "opqhewjptmc", "noda")) + .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.FAIL_ON_CONFLICT) + .withContainerId("t") + .withDatabaseName("lnd") + .withTargetDirectoryForFileRestore("tutmzl")) + .withRecoveryMode(RecoveryMode.RECOVERY_USING_SNAPSHOT) + .withTargetResourceGroupName("lvfhrbbp") + .withUserAssignedManagedIdentityDetails( + new UserAssignedManagedIdentityDetails().withIdentityArmId("vcwwyyurmochppr") + .withIdentityName("snmokayzej") + .withUserAssignedIdentityProperties( + new UserAssignedIdentityProperties().withClientId("bkpbzpcpiljh").withPrincipalId("zv"))) + .withSnapshotRestoreParameters(new SnapshotRestoreParameters().withSkipAttachAndMount(false) + .withLogPointInTimeForDBRecovery("bnwieholew")) + .withTargetVirtualMachineId("iuubwefqsf") + .withShouldUseAlternateTargetLocation(false) + .withIsNonRecoverable(true) .withAlternateDirectoryPaths(Arrays.asList( - new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.DATA) - .withSourceLogicalName("oi") - .withSourcePath("nsmjbl") - .withTargetPath("jhlnymzotqyryu"), - new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.DATA) - .withSourceLogicalName("qqvxmvwfgtayxons") - .withSourcePath("e") - .withTargetPath("lzqnhcvs"))) - .withPointInTime(OffsetDateTime.parse("2021-03-19T19:23:29Z")); + new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.LOG) + .withSourceLogicalName("tmcdzsufcohd") + .withSourcePath("zlmcmuapcvhdb") + .withTargetPath("wqqxeysko"), + new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.LOG) + .withSourceLogicalName("nkfkbgbzb") + .withSourcePath("xeqoc") + .withTargetPath("mygvkzqkj"))) + .withPointInTime(OffsetDateTime.parse("2021-11-07T03:46:32Z")); model = BinaryData.fromObject(model).toObject(AzureWorkloadSqlPointInTimeRestoreRequest.class); - Assertions.assertEquals("frzgbzjed", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.INVALID, model.recoveryType()); - Assertions.assertEquals("zoibgsxg", model.sourceResourceId()); - Assertions.assertEquals("yqo", model.propertyBag().get("mpqoxw")); - Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); - Assertions.assertEquals("xiqxeiiqbimh", model.targetInfo().containerId()); - Assertions.assertEquals("wwinhehf", model.targetInfo().databaseName()); - Assertions.assertEquals("ofvwbcb", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.WORKLOAD_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("nkbwvqv", model.targetResourceGroupName()); - Assertions.assertEquals("ivqiheb", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("swbzuwfmdurage", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("vcjfelisdjubggb", + Assertions.assertEquals("qtferrqwexjkmf", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.RESTORE_DISKS, model.recoveryType()); + Assertions.assertEquals("bzefezr", model.sourceResourceId()); + Assertions.assertEquals("zurtleipqxbkwvz", model.propertyBag().get("nzvdfbzdixzmq")); + Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); + Assertions.assertEquals("t", model.targetInfo().containerId()); + Assertions.assertEquals("lnd", model.targetInfo().databaseName()); + Assertions.assertEquals("tutmzl", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.RECOVERY_USING_SNAPSHOT, model.recoveryMode()); + Assertions.assertEquals("lvfhrbbp", model.targetResourceGroupName()); + Assertions.assertEquals("vcwwyyurmochppr", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("snmokayzej", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("bkpbzpcpiljh", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("gkxkbsazgakg", + Assertions.assertEquals("zv", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(true, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("m", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("mspofapvuhryl", model.targetVirtualMachineId()); - Assertions.assertEquals(true, model.shouldUseAlternateTargetLocation()); - Assertions.assertEquals(false, model.isNonRecoverable()); - Assertions.assertEquals(SqlDataDirectoryType.DATA, model.alternateDirectoryPaths().get(0).mappingType()); - Assertions.assertEquals("oi", model.alternateDirectoryPaths().get(0).sourceLogicalName()); - Assertions.assertEquals("nsmjbl", model.alternateDirectoryPaths().get(0).sourcePath()); - Assertions.assertEquals("jhlnymzotqyryu", model.alternateDirectoryPaths().get(0).targetPath()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-19T19:23:29Z"), model.pointInTime()); + Assertions.assertFalse(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("bnwieholew", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("iuubwefqsf", model.targetVirtualMachineId()); + Assertions.assertFalse(model.shouldUseAlternateTargetLocation()); + Assertions.assertTrue(model.isNonRecoverable()); + Assertions.assertEquals(SqlDataDirectoryType.LOG, model.alternateDirectoryPaths().get(0).mappingType()); + Assertions.assertEquals("tmcdzsufcohd", model.alternateDirectoryPaths().get(0).sourceLogicalName()); + Assertions.assertEquals("zlmcmuapcvhdb", model.alternateDirectoryPaths().get(0).sourcePath()); + Assertions.assertEquals("wqqxeysko", model.alternateDirectoryPaths().get(0).targetPath()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T03:46:32Z"), model.pointInTime()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequestTests.java index 2f91b638eb31..9b8b3823fe34 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -27,107 +27,100 @@ public final class AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest\",\"recoveryPointRehydrationInfo\":{\"rehydrationRetentionDuration\":\"fplt\",\"rehydrationPriority\":\"Standard\"},\"pointInTime\":\"2021-08-25T12:25:16Z\",\"shouldUseAlternateTargetLocation\":true,\"isNonRecoverable\":false,\"alternateDirectoryPaths\":[{\"mappingType\":\"Log\",\"sourceLogicalName\":\"cwnpqigtuujwouhd\",\"sourcePath\":\"s\",\"targetPath\":\"rb\"},{\"mappingType\":\"Data\",\"sourceLogicalName\":\"jybvit\",\"sourcePath\":\"kjyaznumtg\",\"targetPath\":\"uwdchozf\"}],\"recoveryType\":\"Invalid\",\"sourceResourceId\":\"xlvxnoakiz\",\"propertyBag\":{\"yxl\":\"iknaqlnuwig\"},\"targetInfo\":{\"overwriteOption\":\"FailOnConflict\",\"containerId\":\"vx\",\"databaseName\":\"wxh\",\"targetDirectoryForFileRestore\":\"ejtlk\"},\"recoveryMode\":\"FileRecovery\",\"targetResourceGroupName\":\"nwivkcqhrxh\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"lccrmmkyupi\",\"identityName\":\"byqjfkakfqfrkem\",\"userAssignedIdentityProperties\":{\"clientId\":\"dudxjascowvfdjk\",\"principalId\":\"xphlkksnmg\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":false,\"logPointInTimeForDBRecovery\":\"jd\"},\"targetVirtualMachineId\":\"uqnwsithu\",\"resourceGuardOperationRequests\":[\"yahluqwqulsutr\"]}") + "{\"objectType\":\"AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest\",\"recoveryPointRehydrationInfo\":{\"rehydrationRetentionDuration\":\"qwpwyawbzasqbuc\",\"rehydrationPriority\":\"High\"},\"pointInTime\":\"2021-03-09T16:27:44Z\",\"shouldUseAlternateTargetLocation\":false,\"isNonRecoverable\":false,\"alternateDirectoryPaths\":[{\"mappingType\":\"Data\",\"sourceLogicalName\":\"p\",\"sourcePath\":\"sdaultxij\",\"targetPath\":\"mfqwa\"}],\"recoveryType\":\"Offline\",\"sourceResourceId\":\"nm\",\"propertyBag\":{\"fusfzsvtuikzhajq\":\"gzqdqxtbjwgn\"},\"targetInfo\":{\"overwriteOption\":\"FailOnConflict\",\"containerId\":\"mlrqryxynqnz\",\"databaseName\":\"p\",\"targetDirectoryForFileRestore\":\"vwxzn\"},\"recoveryMode\":\"FileRecovery\",\"targetResourceGroupName\":\"eiybbabpfhvfsl\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"tjlrigjksky\",\"identityName\":\"oov\",\"userAssignedIdentityProperties\":{\"clientId\":\"sxwaabzm\",\"principalId\":\"rygznmmaxriz\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":true,\"logPointInTimeForDBRecovery\":\"opxlhslnelxieixy\"},\"targetVirtualMachineId\":\"lxecwcrojphslh\",\"resourceGuardOperationRequests\":[\"jutifdwfmvigorqj\",\"ttzhra\",\"lkafhonqjuje\"]}") .toObject(AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.class); - Assertions.assertEquals("yahluqwqulsutr", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.INVALID, model.recoveryType()); - Assertions.assertEquals("xlvxnoakiz", model.sourceResourceId()); - Assertions.assertEquals("iknaqlnuwig", model.propertyBag().get("yxl")); + Assertions.assertEquals("jutifdwfmvigorqj", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.OFFLINE, model.recoveryType()); + Assertions.assertEquals("nm", model.sourceResourceId()); + Assertions.assertEquals("gzqdqxtbjwgn", model.propertyBag().get("fusfzsvtuikzhajq")); Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); - Assertions.assertEquals("vx", model.targetInfo().containerId()); - Assertions.assertEquals("wxh", model.targetInfo().databaseName()); - Assertions.assertEquals("ejtlk", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals("mlrqryxynqnz", model.targetInfo().containerId()); + Assertions.assertEquals("p", model.targetInfo().databaseName()); + Assertions.assertEquals("vwxzn", model.targetInfo().targetDirectoryForFileRestore()); Assertions.assertEquals(RecoveryMode.FILE_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("nwivkcqhrxh", model.targetResourceGroupName()); - Assertions.assertEquals("lccrmmkyupi", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("byqjfkakfqfrkem", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("dudxjascowvfdjk", + Assertions.assertEquals("eiybbabpfhvfsl", model.targetResourceGroupName()); + Assertions.assertEquals("tjlrigjksky", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("oov", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("sxwaabzm", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("xphlkksnmg", + Assertions.assertEquals("rygznmmaxriz", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(false, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("jd", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("uqnwsithu", model.targetVirtualMachineId()); - Assertions.assertEquals(true, model.shouldUseAlternateTargetLocation()); - Assertions.assertEquals(false, model.isNonRecoverable()); - Assertions.assertEquals(SqlDataDirectoryType.LOG, model.alternateDirectoryPaths().get(0).mappingType()); - Assertions.assertEquals("cwnpqigtuujwouhd", model.alternateDirectoryPaths().get(0).sourceLogicalName()); - Assertions.assertEquals("s", model.alternateDirectoryPaths().get(0).sourcePath()); - Assertions.assertEquals("rb", model.alternateDirectoryPaths().get(0).targetPath()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-25T12:25:16Z"), model.pointInTime()); - Assertions.assertEquals("fplt", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); - Assertions.assertEquals(RehydrationPriority.STANDARD, - model.recoveryPointRehydrationInfo().rehydrationPriority()); + Assertions.assertTrue(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("opxlhslnelxieixy", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("lxecwcrojphslh", model.targetVirtualMachineId()); + Assertions.assertFalse(model.shouldUseAlternateTargetLocation()); + Assertions.assertFalse(model.isNonRecoverable()); + Assertions.assertEquals(SqlDataDirectoryType.DATA, model.alternateDirectoryPaths().get(0).mappingType()); + Assertions.assertEquals("p", model.alternateDirectoryPaths().get(0).sourceLogicalName()); + Assertions.assertEquals("sdaultxij", model.alternateDirectoryPaths().get(0).sourcePath()); + Assertions.assertEquals("mfqwa", model.alternateDirectoryPaths().get(0).targetPath()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-09T16:27:44Z"), model.pointInTime()); + Assertions.assertEquals("qwpwyawbzasqbuc", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); + Assertions.assertEquals(RehydrationPriority.HIGH, model.recoveryPointRehydrationInfo().rehydrationPriority()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest model = new AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest() - .withResourceGuardOperationRequests(Arrays.asList("yahluqwqulsutr")) - .withRecoveryType(RecoveryType.INVALID) - .withSourceResourceId("xlvxnoakiz") - .withPropertyBag(mapOf("yxl", "iknaqlnuwig")) + .withResourceGuardOperationRequests(Arrays.asList("jutifdwfmvigorqj", "ttzhra", "lkafhonqjuje")) + .withRecoveryType(RecoveryType.OFFLINE) + .withSourceResourceId("nm") + .withPropertyBag(mapOf("fusfzsvtuikzhajq", "gzqdqxtbjwgn")) .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.FAIL_ON_CONFLICT) - .withContainerId("vx") - .withDatabaseName("wxh") - .withTargetDirectoryForFileRestore("ejtlk")) + .withContainerId("mlrqryxynqnz") + .withDatabaseName("p") + .withTargetDirectoryForFileRestore("vwxzn")) .withRecoveryMode(RecoveryMode.FILE_RECOVERY) - .withTargetResourceGroupName("nwivkcqhrxh") - .withUserAssignedManagedIdentityDetails( - new UserAssignedManagedIdentityDetails().withIdentityArmId("lccrmmkyupi") - .withIdentityName("byqjfkakfqfrkem") - .withUserAssignedIdentityProperties( - new UserAssignedIdentityProperties().withClientId("dudxjascowvfdjk") - .withPrincipalId("xphlkksnmg"))) - .withSnapshotRestoreParameters( - new SnapshotRestoreParameters().withSkipAttachAndMount(false).withLogPointInTimeForDBRecovery("jd")) - .withTargetVirtualMachineId("uqnwsithu") - .withShouldUseAlternateTargetLocation(true) + .withTargetResourceGroupName("eiybbabpfhvfsl") + .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails() + .withIdentityArmId("tjlrigjksky") + .withIdentityName("oov") + .withUserAssignedIdentityProperties( + new UserAssignedIdentityProperties().withClientId("sxwaabzm").withPrincipalId("rygznmmaxriz"))) + .withSnapshotRestoreParameters(new SnapshotRestoreParameters().withSkipAttachAndMount(true) + .withLogPointInTimeForDBRecovery("opxlhslnelxieixy")) + .withTargetVirtualMachineId("lxecwcrojphslh") + .withShouldUseAlternateTargetLocation(false) .withIsNonRecoverable(false) - .withAlternateDirectoryPaths(Arrays.asList( - new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.LOG) - .withSourceLogicalName("cwnpqigtuujwouhd") - .withSourcePath("s") - .withTargetPath("rb"), - new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.DATA) - .withSourceLogicalName("jybvit") - .withSourcePath("kjyaznumtg") - .withTargetPath("uwdchozf"))) - .withPointInTime(OffsetDateTime.parse("2021-08-25T12:25:16Z")) + .withAlternateDirectoryPaths( + Arrays.asList(new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.DATA) + .withSourceLogicalName("p") + .withSourcePath("sdaultxij") + .withTargetPath("mfqwa"))) + .withPointInTime(OffsetDateTime.parse("2021-03-09T16:27:44Z")) .withRecoveryPointRehydrationInfo( - new RecoveryPointRehydrationInfo().withRehydrationRetentionDuration("fplt") - .withRehydrationPriority(RehydrationPriority.STANDARD)); + new RecoveryPointRehydrationInfo().withRehydrationRetentionDuration("qwpwyawbzasqbuc") + .withRehydrationPriority(RehydrationPriority.HIGH)); model = BinaryData.fromObject(model).toObject(AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.class); - Assertions.assertEquals("yahluqwqulsutr", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.INVALID, model.recoveryType()); - Assertions.assertEquals("xlvxnoakiz", model.sourceResourceId()); - Assertions.assertEquals("iknaqlnuwig", model.propertyBag().get("yxl")); + Assertions.assertEquals("jutifdwfmvigorqj", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.OFFLINE, model.recoveryType()); + Assertions.assertEquals("nm", model.sourceResourceId()); + Assertions.assertEquals("gzqdqxtbjwgn", model.propertyBag().get("fusfzsvtuikzhajq")); Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); - Assertions.assertEquals("vx", model.targetInfo().containerId()); - Assertions.assertEquals("wxh", model.targetInfo().databaseName()); - Assertions.assertEquals("ejtlk", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals("mlrqryxynqnz", model.targetInfo().containerId()); + Assertions.assertEquals("p", model.targetInfo().databaseName()); + Assertions.assertEquals("vwxzn", model.targetInfo().targetDirectoryForFileRestore()); Assertions.assertEquals(RecoveryMode.FILE_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("nwivkcqhrxh", model.targetResourceGroupName()); - Assertions.assertEquals("lccrmmkyupi", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("byqjfkakfqfrkem", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("dudxjascowvfdjk", + Assertions.assertEquals("eiybbabpfhvfsl", model.targetResourceGroupName()); + Assertions.assertEquals("tjlrigjksky", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("oov", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("sxwaabzm", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("xphlkksnmg", + Assertions.assertEquals("rygznmmaxriz", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(false, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("jd", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("uqnwsithu", model.targetVirtualMachineId()); - Assertions.assertEquals(true, model.shouldUseAlternateTargetLocation()); - Assertions.assertEquals(false, model.isNonRecoverable()); - Assertions.assertEquals(SqlDataDirectoryType.LOG, model.alternateDirectoryPaths().get(0).mappingType()); - Assertions.assertEquals("cwnpqigtuujwouhd", model.alternateDirectoryPaths().get(0).sourceLogicalName()); - Assertions.assertEquals("s", model.alternateDirectoryPaths().get(0).sourcePath()); - Assertions.assertEquals("rb", model.alternateDirectoryPaths().get(0).targetPath()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-25T12:25:16Z"), model.pointInTime()); - Assertions.assertEquals("fplt", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); - Assertions.assertEquals(RehydrationPriority.STANDARD, - model.recoveryPointRehydrationInfo().rehydrationPriority()); + Assertions.assertTrue(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("opxlhslnelxieixy", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("lxecwcrojphslh", model.targetVirtualMachineId()); + Assertions.assertFalse(model.shouldUseAlternateTargetLocation()); + Assertions.assertFalse(model.isNonRecoverable()); + Assertions.assertEquals(SqlDataDirectoryType.DATA, model.alternateDirectoryPaths().get(0).mappingType()); + Assertions.assertEquals("p", model.alternateDirectoryPaths().get(0).sourceLogicalName()); + Assertions.assertEquals("sdaultxij", model.alternateDirectoryPaths().get(0).sourcePath()); + Assertions.assertEquals("mfqwa", model.alternateDirectoryPaths().get(0).targetPath()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-09T16:27:44Z"), model.pointInTime()); + Assertions.assertEquals("qwpwyawbzasqbuc", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); + Assertions.assertEquals(RehydrationPriority.HIGH, model.recoveryPointRehydrationInfo().rehydrationPriority()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRecoveryPointExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRecoveryPointExtendedInfoTests.java index dd5e7df58c56..77728b7c0421 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRecoveryPointExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRecoveryPointExtendedInfoTests.java @@ -1,45 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlRecoveryPointExtendedInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectory; import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryType; import java.time.OffsetDateTime; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class AzureWorkloadSqlRecoveryPointExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSqlRecoveryPointExtendedInfo model = BinaryData.fromString( - "{\"dataDirectoryTimeInUTC\":\"2021-11-01T10:21:35Z\",\"dataDirectoryPaths\":[{\"type\":\"Data\",\"path\":\"vigorqjbttzhragl\",\"logicalName\":\"fhonqjujeickpzvc\"},{\"type\":\"Log\",\"path\":\"xelnwc\",\"logicalName\":\"yjede\"},{\"type\":\"Log\",\"path\":\"f\",\"logicalName\":\"qscazuawxtz\"}]}") + "{\"dataDirectoryTimeInUTC\":\"2021-06-03T07:07:15Z\",\"dataDirectoryPaths\":[{\"type\":\"Log\",\"path\":\"qupevzh\",\"logicalName\":\"totxhojujb\"}],\"includedDatabases\":[{\"datasourceId\":\"mc\",\"datasourceName\":\"hixbjxyfwnyl\"},{\"datasourceId\":\"ool\",\"datasourceName\":\"tpkiwkkbnujry\"},{\"datasourceId\":\"tylbfpncurdoiw\",\"datasourceName\":\"thtywub\"},{\"datasourceId\":\"bihwqknfdnt\",\"datasourceName\":\"chrdgoihxumwcto\"}]}") .toObject(AzureWorkloadSqlRecoveryPointExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T10:21:35Z"), model.dataDirectoryTimeInUtc()); - Assertions.assertEquals(SqlDataDirectoryType.DATA, model.dataDirectoryPaths().get(0).type()); - Assertions.assertEquals("vigorqjbttzhragl", model.dataDirectoryPaths().get(0).path()); - Assertions.assertEquals("fhonqjujeickpzvc", model.dataDirectoryPaths().get(0).logicalName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureWorkloadSqlRecoveryPointExtendedInfo model = new AzureWorkloadSqlRecoveryPointExtendedInfo() - .withDataDirectoryTimeInUtc(OffsetDateTime.parse("2021-11-01T10:21:35Z")) - .withDataDirectoryPaths(Arrays.asList( - new SqlDataDirectory().withType(SqlDataDirectoryType.DATA) - .withPath("vigorqjbttzhragl") - .withLogicalName("fhonqjujeickpzvc"), - new SqlDataDirectory().withType(SqlDataDirectoryType.LOG).withPath("xelnwc").withLogicalName("yjede"), - new SqlDataDirectory().withType(SqlDataDirectoryType.LOG) - .withPath("f") - .withLogicalName("qscazuawxtz"))); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSqlRecoveryPointExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T10:21:35Z"), model.dataDirectoryTimeInUtc()); - Assertions.assertEquals(SqlDataDirectoryType.DATA, model.dataDirectoryPaths().get(0).type()); - Assertions.assertEquals("vigorqjbttzhragl", model.dataDirectoryPaths().get(0).path()); - Assertions.assertEquals("fhonqjujeickpzvc", model.dataDirectoryPaths().get(0).logicalName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-03T07:07:15Z"), model.dataDirectoryTimeInUtc()); + Assertions.assertEquals(SqlDataDirectoryType.LOG, model.dataDirectoryPaths().get(0).type()); + Assertions.assertEquals("qupevzh", model.dataDirectoryPaths().get(0).path()); + Assertions.assertEquals("totxhojujb", model.dataDirectoryPaths().get(0).logicalName()); + Assertions.assertEquals("mc", model.includedDatabases().get(0).datasourceId()); + Assertions.assertEquals("hixbjxyfwnyl", model.includedDatabases().get(0).datasourceName()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRecoveryPointTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRecoveryPointTests.java index 2a1fa8494cdd..16906b760fd6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRecoveryPointTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRecoveryPointTests.java @@ -1,97 +1,48 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlRecoveryPoint; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlRecoveryPointExtendedInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointProperties; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierInformationV2; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierStatus; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType; import com.azure.resourcemanager.recoveryservicesbackup.models.RestorePointType; -import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectory; import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryType; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class AzureWorkloadSqlRecoveryPointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSqlRecoveryPoint model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadSQLRecoveryPoint\",\"extendedInfo\":{\"dataDirectoryTimeInUTC\":\"2021-02-15T20:04:06Z\",\"dataDirectoryPaths\":[{\"type\":\"Data\",\"path\":\"dqxtbjwgnyf\",\"logicalName\":\"fzsvtuikzh\"}]},\"recoveryPointTimeInUTC\":\"2021-02-02T06:21:41Z\",\"type\":\"Invalid\",\"recoveryPointTierDetails\":[{\"type\":\"HardenedRP\",\"status\":\"Invalid\",\"extendedInfo\":{\"zrdpsovwxznptgoe\":\"yxynq\",\"vntjlrigjk\":\"ybbabpfhvfsl\",\"xwaabzmifrygznmm\":\"kyrioovzid\"}}],\"recoveryPointMoveReadinessInfo\":{\"opxlhslnelxieixy\":{\"isReadyForMove\":true,\"additionalInfo\":\"zob\"}},\"recoveryPointProperties\":{\"expiryTime\":\"xecwcro\",\"ruleName\":\"hslhca\",\"isSoftDeleted\":false}}") + "{\"objectType\":\"AzureWorkloadSQLRecoveryPoint\",\"extendedInfo\":{\"dataDirectoryTimeInUTC\":\"2021-11-11T11:12:33Z\",\"dataDirectoryPaths\":[{\"type\":\"Log\",\"path\":\"zrmuhapfcqdps\",\"logicalName\":\"qvpsvuoymg\"},{\"type\":\"Invalid\",\"path\":\"vezrypqlmfeo\",\"logicalName\":\"rqwky\"},{\"type\":\"Invalid\",\"path\":\"opgxedkowepb\",\"logicalName\":\"cr\"},{\"type\":\"Log\",\"path\":\"ccsnjvcdwxlpq\",\"logicalName\":\"ftnkhtj\"}],\"includedDatabases\":[{\"datasourceId\":\"gwfqatmt\",\"datasourceName\":\"tmdvypgikdgs\"}]},\"recoveryPointTimeInUTC\":\"2021-07-11T10:33:14Z\",\"type\":\"Invalid\",\"recoveryPointTierDetails\":[{\"type\":\"HardenedRP\",\"status\":\"Disabled\",\"extendedInfo\":{\"atjinrvgoupmfiib\":\"qrvqq\",\"x\":\"ggjioolvr\",\"kkgll\":\"v\"}},{\"type\":\"HardenedRP\",\"status\":\"Valid\",\"extendedInfo\":{\"yhgsopbyrqufe\":\"lmhvkzuhbxv\",\"fbn\":\"xuvw\",\"gitvg\":\"lmctlpd\"}},{\"type\":\"Invalid\",\"status\":\"Deleted\",\"extendedInfo\":{\"hbpnaixexccbd\":\"jejveg\",\"htpwij\":\"eaxhcexdrrvqahqk\",\"bfvoowvrv\":\"hyjsvfycx\"}}],\"recoveryPointMoveReadinessInfo\":{\"nsxkmcwaekrrjr\":{\"isReadyForMove\":false,\"additionalInfo\":\"pyostronzmyhgfi\"},\"lik\":{\"isReadyForMove\":false,\"additionalInfo\":\"tsgumhj\"}},\"recoveryPointProperties\":{\"expiryTime\":\"slol\",\"ruleName\":\"pvuzlmv\",\"isSoftDeleted\":true},\"threatStatus\":\"Healthy\",\"threatInfo\":[{\"threatTitle\":\"lcrpw\",\"threatDescription\":\"eznoig\",\"lastUpdatedTime\":\"2021-05-13T00:39:55Z\",\"threatState\":\"Active\",\"threatStartTime\":\"2021-07-10T07:09:22Z\",\"threatEndTime\":\"2021-12-02T18:41:28Z\",\"threatURI\":\"bsazejjoqka\",\"threatSeverity\":\"Warning\"},{\"threatTitle\":\"xttaugzxnfaaz\",\"threatDescription\":\"dtnkdmkq\",\"lastUpdatedTime\":\"2021-01-29T06:17:27Z\",\"threatState\":\"InProgress\",\"threatStartTime\":\"2021-06-14T14:36:08Z\",\"threatEndTime\":\"2021-07-12T10:16:15Z\",\"threatURI\":\"pyouaibrebqaays\",\"threatSeverity\":\"High\"},{\"threatTitle\":\"qtnqtt\",\"threatDescription\":\"lwfffi\",\"lastUpdatedTime\":\"2021-04-04T17:22:28Z\",\"threatState\":\"InProgress\",\"threatStartTime\":\"2021-08-27T06:54:30Z\",\"threatEndTime\":\"2021-10-12T22:21:14Z\",\"threatURI\":\"d\",\"threatSeverity\":\"Critical\"},{\"threatTitle\":\"jihy\",\"threatDescription\":\"zphv\",\"lastUpdatedTime\":\"2021-06-27T09:23:26Z\",\"threatState\":\"Ignored\",\"threatStartTime\":\"2021-05-03T13:45:25Z\",\"threatEndTime\":\"2021-05-24T13:16:56Z\",\"threatURI\":\"p\",\"threatSeverity\":\"High\"}]}") .toObject(AzureWorkloadSqlRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-02T06:21:41Z"), model.recoveryPointTimeInUtc()); + Assertions.assertEquals(ThreatStatus.HEALTHY, model.threatStatus()); + Assertions.assertEquals(ThreatState.ACTIVE, model.threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.WARNING, model.threatInfo().get(0).threatSeverity()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-11T10:33:14Z"), model.recoveryPointTimeInUtc()); Assertions.assertEquals(RestorePointType.INVALID, model.type()); + Assertions.assertEquals("qrvqq", + model.recoveryPointTierDetails().get(0).extendedInfo().get("atjinrvgoupmfiib")); Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.INVALID, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("yxynq", - model.recoveryPointTierDetails().get(0).extendedInfo().get("zrdpsovwxznptgoe")); - Assertions.assertEquals(true, model.recoveryPointMoveReadinessInfo().get("opxlhslnelxieixy").isReadyForMove()); - Assertions.assertEquals("zob", model.recoveryPointMoveReadinessInfo().get("opxlhslnelxieixy").additionalInfo()); - Assertions.assertEquals("xecwcro", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("hslhca", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(false, model.recoveryPointProperties().isSoftDeleted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-15T20:04:06Z"), + Assertions.assertEquals(RecoveryPointTierStatus.DISABLED, model.recoveryPointTierDetails().get(0).status()); + Assertions.assertFalse(model.recoveryPointMoveReadinessInfo().get("nsxkmcwaekrrjr").isReadyForMove()); + Assertions.assertEquals("pyostronzmyhgfi", + model.recoveryPointMoveReadinessInfo().get("nsxkmcwaekrrjr").additionalInfo()); + Assertions.assertEquals("slol", model.recoveryPointProperties().expiryTime()); + Assertions.assertEquals("pvuzlmv", model.recoveryPointProperties().ruleName()); + Assertions.assertTrue(model.recoveryPointProperties().isSoftDeleted()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-11T11:12:33Z"), model.extendedInfo().dataDirectoryTimeInUtc()); - Assertions.assertEquals(SqlDataDirectoryType.DATA, model.extendedInfo().dataDirectoryPaths().get(0).type()); - Assertions.assertEquals("dqxtbjwgnyf", model.extendedInfo().dataDirectoryPaths().get(0).path()); - Assertions.assertEquals("fzsvtuikzh", model.extendedInfo().dataDirectoryPaths().get(0).logicalName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureWorkloadSqlRecoveryPoint model = new AzureWorkloadSqlRecoveryPoint() - .withRecoveryPointTimeInUtc(OffsetDateTime.parse("2021-02-02T06:21:41Z")) - .withType(RestorePointType.INVALID) - .withRecoveryPointTierDetails( - Arrays.asList(new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.HARDENED_RP) - .withStatus(RecoveryPointTierStatus.INVALID) - .withExtendedInfo(mapOf("zrdpsovwxznptgoe", "yxynq", "vntjlrigjk", "ybbabpfhvfsl", - "xwaabzmifrygznmm", "kyrioovzid")))) - .withRecoveryPointMoveReadinessInfo(mapOf("opxlhslnelxieixy", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("zob"))) - .withRecoveryPointProperties( - new RecoveryPointProperties().withExpiryTime("xecwcro").withRuleName("hslhca").withIsSoftDeleted(false)) - .withExtendedInfo(new AzureWorkloadSqlRecoveryPointExtendedInfo() - .withDataDirectoryTimeInUtc(OffsetDateTime.parse("2021-02-15T20:04:06Z")) - .withDataDirectoryPaths(Arrays.asList(new SqlDataDirectory().withType(SqlDataDirectoryType.DATA) - .withPath("dqxtbjwgnyf") - .withLogicalName("fzsvtuikzh")))); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSqlRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-02T06:21:41Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.INVALID, model.type()); - Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.INVALID, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("yxynq", - model.recoveryPointTierDetails().get(0).extendedInfo().get("zrdpsovwxznptgoe")); - Assertions.assertEquals(true, model.recoveryPointMoveReadinessInfo().get("opxlhslnelxieixy").isReadyForMove()); - Assertions.assertEquals("zob", model.recoveryPointMoveReadinessInfo().get("opxlhslnelxieixy").additionalInfo()); - Assertions.assertEquals("xecwcro", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("hslhca", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(false, model.recoveryPointProperties().isSoftDeleted()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-15T20:04:06Z"), - model.extendedInfo().dataDirectoryTimeInUtc()); - Assertions.assertEquals(SqlDataDirectoryType.DATA, model.extendedInfo().dataDirectoryPaths().get(0).type()); - Assertions.assertEquals("dqxtbjwgnyf", model.extendedInfo().dataDirectoryPaths().get(0).path()); - Assertions.assertEquals("fzsvtuikzh", model.extendedInfo().dataDirectoryPaths().get(0).logicalName()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(SqlDataDirectoryType.LOG, model.extendedInfo().dataDirectoryPaths().get(0).type()); + Assertions.assertEquals("zrmuhapfcqdps", model.extendedInfo().dataDirectoryPaths().get(0).path()); + Assertions.assertEquals("qvpsvuoymg", model.extendedInfo().dataDirectoryPaths().get(0).logicalName()); + Assertions.assertEquals("gwfqatmt", model.extendedInfo().includedDatabases().get(0).datasourceId()); + Assertions.assertEquals("tmdvypgikdgs", model.extendedInfo().includedDatabases().get(0).datasourceName()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRestoreRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRestoreRequestTests.java index 469b7f683fcf..151784251495 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRestoreRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRestoreRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -24,94 +24,93 @@ public final class AzureWorkloadSqlRestoreRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSqlRestoreRequest model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadSQLRestoreRequest\",\"shouldUseAlternateTargetLocation\":true,\"isNonRecoverable\":false,\"alternateDirectoryPaths\":[{\"mappingType\":\"Log\",\"sourceLogicalName\":\"iznk\",\"sourcePath\":\"f\",\"targetPath\":\"snvpdibmi\"},{\"mappingType\":\"Invalid\",\"sourceLogicalName\":\"bzbkiw\",\"sourcePath\":\"qnyophzfyls\",\"targetPath\":\"rpfbcunezz\"}],\"recoveryType\":\"Offline\",\"sourceResourceId\":\"lfwyfwlwxjwetn\",\"propertyBag\":{\"qwztcmwqkc\":\"hclafzvaylptrs\",\"kjexfdeqvhp\":\"cxwaxfewz\"},\"targetInfo\":{\"overwriteOption\":\"FailOnConflict\",\"containerId\":\"shk\",\"databaseName\":\"f\",\"targetDirectoryForFileRestore\":\"mxzjrgywwpgjx\"},\"recoveryMode\":\"SnapshotAttach\",\"targetResourceGroupName\":\"fujg\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"aaoepttaqut\",\"identityName\":\"wemxswvruunzz\",\"userAssignedIdentityProperties\":{\"clientId\":\"hkfkimrtixokf\",\"principalId\":\"yinljqe\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":false,\"logPointInTimeForDBRecovery\":\"xmonstshi\"},\"targetVirtualMachineId\":\"gvelfc\",\"resourceGuardOperationRequests\":[\"ccbi\",\"ds\",\"uwc\"]}") + "{\"objectType\":\"AzureWorkloadSQLRestoreRequest\",\"shouldUseAlternateTargetLocation\":true,\"isNonRecoverable\":false,\"alternateDirectoryPaths\":[{\"mappingType\":\"Log\",\"sourceLogicalName\":\"mxelnwcltyjed\",\"sourcePath\":\"xm\",\"targetPath\":\"mkqscaz\"},{\"mappingType\":\"Invalid\",\"sourceLogicalName\":\"tzxpuamwabzxrv\",\"sourcePath\":\"ushsp\",\"targetPath\":\"ivmxyasfl\"}],\"recoveryType\":\"RestoreDisks\",\"sourceResourceId\":\"zwywako\",\"propertyBag\":{\"ljhlnymzotq\":\"nsmjbl\",\"mv\":\"ryuzcbmqqv\",\"ujlzqnhcvsqltn\":\"fgtayxonsup\",\"xfyqonmpqoxwdo\":\"oibgsxg\"},\"targetInfo\":{\"overwriteOption\":\"Invalid\",\"containerId\":\"qxeiiqbimhtmwwi\",\"databaseName\":\"ehfqpofvwbc\",\"targetDirectoryForFileRestore\":\"embnkbw\"},\"recoveryMode\":\"RecoveryUsingSnapshot\",\"targetResourceGroupName\":\"kdi\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"heb\",\"identityName\":\"swbzuwfmdurage\",\"userAssignedIdentityProperties\":{\"clientId\":\"vcjfelisdjubggb\",\"principalId\":\"gkxkbsazgakg\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":true,\"logPointInTimeForDBRecovery\":\"m\"},\"targetVirtualMachineId\":\"mspofapvuhryl\",\"resourceGuardOperationRequests\":[\"frzgbzjed\",\"st\"]}") .toObject(AzureWorkloadSqlRestoreRequest.class); - Assertions.assertEquals("ccbi", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.OFFLINE, model.recoveryType()); - Assertions.assertEquals("lfwyfwlwxjwetn", model.sourceResourceId()); - Assertions.assertEquals("hclafzvaylptrs", model.propertyBag().get("qwztcmwqkc")); - Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); - Assertions.assertEquals("shk", model.targetInfo().containerId()); - Assertions.assertEquals("f", model.targetInfo().databaseName()); - Assertions.assertEquals("mxzjrgywwpgjx", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.SNAPSHOT_ATTACH, model.recoveryMode()); - Assertions.assertEquals("fujg", model.targetResourceGroupName()); - Assertions.assertEquals("aaoepttaqut", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("wemxswvruunzz", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("hkfkimrtixokf", + Assertions.assertEquals("frzgbzjed", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.RESTORE_DISKS, model.recoveryType()); + Assertions.assertEquals("zwywako", model.sourceResourceId()); + Assertions.assertEquals("nsmjbl", model.propertyBag().get("ljhlnymzotq")); + Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); + Assertions.assertEquals("qxeiiqbimhtmwwi", model.targetInfo().containerId()); + Assertions.assertEquals("ehfqpofvwbc", model.targetInfo().databaseName()); + Assertions.assertEquals("embnkbw", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.RECOVERY_USING_SNAPSHOT, model.recoveryMode()); + Assertions.assertEquals("kdi", model.targetResourceGroupName()); + Assertions.assertEquals("heb", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("swbzuwfmdurage", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("vcjfelisdjubggb", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("yinljqe", + Assertions.assertEquals("gkxkbsazgakg", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(false, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("xmonstshi", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("gvelfc", model.targetVirtualMachineId()); - Assertions.assertEquals(true, model.shouldUseAlternateTargetLocation()); - Assertions.assertEquals(false, model.isNonRecoverable()); + Assertions.assertTrue(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("m", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("mspofapvuhryl", model.targetVirtualMachineId()); + Assertions.assertTrue(model.shouldUseAlternateTargetLocation()); + Assertions.assertFalse(model.isNonRecoverable()); Assertions.assertEquals(SqlDataDirectoryType.LOG, model.alternateDirectoryPaths().get(0).mappingType()); - Assertions.assertEquals("iznk", model.alternateDirectoryPaths().get(0).sourceLogicalName()); - Assertions.assertEquals("f", model.alternateDirectoryPaths().get(0).sourcePath()); - Assertions.assertEquals("snvpdibmi", model.alternateDirectoryPaths().get(0).targetPath()); + Assertions.assertEquals("mxelnwcltyjed", model.alternateDirectoryPaths().get(0).sourceLogicalName()); + Assertions.assertEquals("xm", model.alternateDirectoryPaths().get(0).sourcePath()); + Assertions.assertEquals("mkqscaz", model.alternateDirectoryPaths().get(0).targetPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureWorkloadSqlRestoreRequest model - = new AzureWorkloadSqlRestoreRequest() - .withResourceGuardOperationRequests(Arrays.asList("ccbi", "ds", "uwc")) - .withRecoveryType(RecoveryType.OFFLINE) - .withSourceResourceId("lfwyfwlwxjwetn") - .withPropertyBag(mapOf("qwztcmwqkc", "hclafzvaylptrs", "kjexfdeqvhp", "cxwaxfewz")) - .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.FAIL_ON_CONFLICT) - .withContainerId("shk") - .withDatabaseName("f") - .withTargetDirectoryForFileRestore("mxzjrgywwpgjx")) - .withRecoveryMode(RecoveryMode.SNAPSHOT_ATTACH) - .withTargetResourceGroupName("fujg") - .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails() - .withIdentityArmId("aaoepttaqut") - .withIdentityName("wemxswvruunzz") - .withUserAssignedIdentityProperties( - new UserAssignedIdentityProperties().withClientId("hkfkimrtixokf").withPrincipalId("yinljqe"))) - .withSnapshotRestoreParameters(new SnapshotRestoreParameters().withSkipAttachAndMount(false) - .withLogPointInTimeForDBRecovery("xmonstshi")) - .withTargetVirtualMachineId("gvelfc") - .withShouldUseAlternateTargetLocation(true) - .withIsNonRecoverable(false) - .withAlternateDirectoryPaths(Arrays.asList( - new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.LOG) - .withSourceLogicalName("iznk") - .withSourcePath("f") - .withTargetPath("snvpdibmi"), - new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.INVALID) - .withSourceLogicalName("bzbkiw") - .withSourcePath("qnyophzfyls") - .withTargetPath("rpfbcunezz"))); + AzureWorkloadSqlRestoreRequest model = new AzureWorkloadSqlRestoreRequest() + .withResourceGuardOperationRequests(Arrays.asList("frzgbzjed", "st")) + .withRecoveryType(RecoveryType.RESTORE_DISKS) + .withSourceResourceId("zwywako") + .withPropertyBag(mapOf("ljhlnymzotq", "nsmjbl", "mv", "ryuzcbmqqv", "ujlzqnhcvsqltn", "fgtayxonsup", + "xfyqonmpqoxwdo", "oibgsxg")) + .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.INVALID) + .withContainerId("qxeiiqbimhtmwwi") + .withDatabaseName("ehfqpofvwbc") + .withTargetDirectoryForFileRestore("embnkbw")) + .withRecoveryMode(RecoveryMode.RECOVERY_USING_SNAPSHOT) + .withTargetResourceGroupName("kdi") + .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails().withIdentityArmId("heb") + .withIdentityName("swbzuwfmdurage") + .withUserAssignedIdentityProperties(new UserAssignedIdentityProperties().withClientId("vcjfelisdjubggb") + .withPrincipalId("gkxkbsazgakg"))) + .withSnapshotRestoreParameters( + new SnapshotRestoreParameters().withSkipAttachAndMount(true).withLogPointInTimeForDBRecovery("m")) + .withTargetVirtualMachineId("mspofapvuhryl") + .withShouldUseAlternateTargetLocation(true) + .withIsNonRecoverable(false) + .withAlternateDirectoryPaths(Arrays.asList( + new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.LOG) + .withSourceLogicalName("mxelnwcltyjed") + .withSourcePath("xm") + .withTargetPath("mkqscaz"), + new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.INVALID) + .withSourceLogicalName("tzxpuamwabzxrv") + .withSourcePath("ushsp") + .withTargetPath("ivmxyasfl"))); model = BinaryData.fromObject(model).toObject(AzureWorkloadSqlRestoreRequest.class); - Assertions.assertEquals("ccbi", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(RecoveryType.OFFLINE, model.recoveryType()); - Assertions.assertEquals("lfwyfwlwxjwetn", model.sourceResourceId()); - Assertions.assertEquals("hclafzvaylptrs", model.propertyBag().get("qwztcmwqkc")); - Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); - Assertions.assertEquals("shk", model.targetInfo().containerId()); - Assertions.assertEquals("f", model.targetInfo().databaseName()); - Assertions.assertEquals("mxzjrgywwpgjx", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.SNAPSHOT_ATTACH, model.recoveryMode()); - Assertions.assertEquals("fujg", model.targetResourceGroupName()); - Assertions.assertEquals("aaoepttaqut", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("wemxswvruunzz", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("hkfkimrtixokf", + Assertions.assertEquals("frzgbzjed", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(RecoveryType.RESTORE_DISKS, model.recoveryType()); + Assertions.assertEquals("zwywako", model.sourceResourceId()); + Assertions.assertEquals("nsmjbl", model.propertyBag().get("ljhlnymzotq")); + Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); + Assertions.assertEquals("qxeiiqbimhtmwwi", model.targetInfo().containerId()); + Assertions.assertEquals("ehfqpofvwbc", model.targetInfo().databaseName()); + Assertions.assertEquals("embnkbw", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.RECOVERY_USING_SNAPSHOT, model.recoveryMode()); + Assertions.assertEquals("kdi", model.targetResourceGroupName()); + Assertions.assertEquals("heb", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("swbzuwfmdurage", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("vcjfelisdjubggb", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("yinljqe", + Assertions.assertEquals("gkxkbsazgakg", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(false, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("xmonstshi", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("gvelfc", model.targetVirtualMachineId()); - Assertions.assertEquals(true, model.shouldUseAlternateTargetLocation()); - Assertions.assertEquals(false, model.isNonRecoverable()); + Assertions.assertTrue(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("m", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("mspofapvuhryl", model.targetVirtualMachineId()); + Assertions.assertTrue(model.shouldUseAlternateTargetLocation()); + Assertions.assertFalse(model.isNonRecoverable()); Assertions.assertEquals(SqlDataDirectoryType.LOG, model.alternateDirectoryPaths().get(0).mappingType()); - Assertions.assertEquals("iznk", model.alternateDirectoryPaths().get(0).sourceLogicalName()); - Assertions.assertEquals("f", model.alternateDirectoryPaths().get(0).sourcePath()); - Assertions.assertEquals("snvpdibmi", model.alternateDirectoryPaths().get(0).targetPath()); + Assertions.assertEquals("mxelnwcltyjed", model.alternateDirectoryPaths().get(0).sourceLogicalName()); + Assertions.assertEquals("xm", model.alternateDirectoryPaths().get(0).sourcePath()); + Assertions.assertEquals("mkqscaz", model.alternateDirectoryPaths().get(0).targetPath()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRestoreWithRehydrateRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRestoreWithRehydrateRequestTests.java index e1d2e6439cad..85a534be957f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRestoreWithRehydrateRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRestoreWithRehydrateRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -26,95 +26,109 @@ public final class AzureWorkloadSqlRestoreWithRehydrateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureWorkloadSqlRestoreWithRehydrateRequest model = BinaryData.fromString( - "{\"objectType\":\"AzureWorkloadSQLRestoreWithRehydrateRequest\",\"recoveryPointRehydrationInfo\":{\"rehydrationRetentionDuration\":\"xykfhyq\",\"rehydrationPriority\":\"High\"},\"shouldUseAlternateTargetLocation\":true,\"isNonRecoverable\":false,\"alternateDirectoryPaths\":[{\"mappingType\":\"Invalid\",\"sourceLogicalName\":\"cvexreuqu\",\"sourcePath\":\"tljvfwhreagkhyx\",\"targetPath\":\"qtvbczsu\"}],\"recoveryType\":\"OriginalLocation\",\"sourceResourceId\":\"glmep\",\"propertyBag\":{\"ykgsangpszng\":\"s\"},\"targetInfo\":{\"overwriteOption\":\"Overwrite\",\"containerId\":\"lkvec\",\"databaseName\":\"jcngoadyed\",\"targetDirectoryForFileRestore\":\"rgjfoknubnoi\"},\"recoveryMode\":\"FileRecovery\",\"targetResourceGroupName\":\"ztrgdgxvcoq\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"wugyx\",\"identityName\":\"itweialwvskbuh\",\"userAssignedIdentityProperties\":{\"clientId\":\"aq\",\"principalId\":\"ltcoqc\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":true,\"logPointInTimeForDBRecovery\":\"xzak\"},\"targetVirtualMachineId\":\"jkmvbi\",\"resourceGuardOperationRequests\":[\"ofqcvovjufycsjm\",\"bemyeji\",\"iuxegth\",\"rtudawlpjfel\"]}") + "{\"objectType\":\"AzureWorkloadSQLRestoreWithRehydrateRequest\",\"recoveryPointRehydrationInfo\":{\"rehydrationRetentionDuration\":\"l\",\"rehydrationPriority\":\"Standard\"},\"shouldUseAlternateTargetLocation\":true,\"isNonRecoverable\":false,\"alternateDirectoryPaths\":[{\"mappingType\":\"Log\",\"sourceLogicalName\":\"f\",\"sourcePath\":\"snvpdibmi\",\"targetPath\":\"stbz\"},{\"mappingType\":\"Invalid\",\"sourceLogicalName\":\"buqny\",\"sourcePath\":\"hzfylsgcrpfbc\",\"targetPath\":\"ezzcez\"},{\"mappingType\":\"Invalid\",\"sourceLogicalName\":\"yfwlwxjwet\",\"sourcePath\":\"sihclafzvaylp\",\"targetPath\":\"sqqw\"},{\"mappingType\":\"Invalid\",\"sourceLogicalName\":\"w\",\"sourcePath\":\"chcxwaxfewzj\",\"targetPath\":\"exfdeqvhpsylk\"}],\"recoveryType\":\"OriginalLocation\",\"sourceResourceId\":\"bffmbmxz\",\"propertyBag\":{\"icgaao\":\"ywwpgjxsnptfuj\",\"wemxswvruunzz\":\"pttaqutd\",\"yinljqe\":\"gehkfkimrtixokff\"},\"targetInfo\":{\"overwriteOption\":\"Overwrite\",\"containerId\":\"xmonstshi\",\"databaseName\":\"gvelfc\",\"targetDirectoryForFileRestore\":\"uccbirdsvuw\"},\"recoveryMode\":\"RecoveryUsingSnapshot\",\"targetResourceGroupName\":\"egstmninwjizci\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"hgshe\",\"identityName\":\"tbxqmuluxlxq\",\"userAssignedIdentityProperties\":{\"clientId\":\"ers\",\"principalId\":\"cucrwnamikze\"}},\"snapshotRestoreParameters\":{\"skipAttachAndMount\":true,\"logPointInTimeForDBRecovery\":\"mswziq\"},\"targetVirtualMachineId\":\"uhok\",\"resourceGuardOperationRequests\":[\"swhvhczznvfbycj\",\"xjww\",\"xzv\",\"mwmxqhndvnoamld\"]}") .toObject(AzureWorkloadSqlRestoreWithRehydrateRequest.class); - Assertions.assertEquals("ofqcvovjufycsjm", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("swhvhczznvfbycj", model.resourceGuardOperationRequests().get(0)); Assertions.assertEquals(RecoveryType.ORIGINAL_LOCATION, model.recoveryType()); - Assertions.assertEquals("glmep", model.sourceResourceId()); - Assertions.assertEquals("s", model.propertyBag().get("ykgsangpszng")); + Assertions.assertEquals("bffmbmxz", model.sourceResourceId()); + Assertions.assertEquals("ywwpgjxsnptfuj", model.propertyBag().get("icgaao")); Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); - Assertions.assertEquals("lkvec", model.targetInfo().containerId()); - Assertions.assertEquals("jcngoadyed", model.targetInfo().databaseName()); - Assertions.assertEquals("rgjfoknubnoi", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.FILE_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("ztrgdgxvcoq", model.targetResourceGroupName()); - Assertions.assertEquals("wugyx", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("itweialwvskbuh", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("aq", + Assertions.assertEquals("xmonstshi", model.targetInfo().containerId()); + Assertions.assertEquals("gvelfc", model.targetInfo().databaseName()); + Assertions.assertEquals("uccbirdsvuw", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.RECOVERY_USING_SNAPSHOT, model.recoveryMode()); + Assertions.assertEquals("egstmninwjizci", model.targetResourceGroupName()); + Assertions.assertEquals("hgshe", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("tbxqmuluxlxq", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("ers", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("ltcoqc", + Assertions.assertEquals("cucrwnamikze", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(true, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("xzak", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("jkmvbi", model.targetVirtualMachineId()); - Assertions.assertEquals(true, model.shouldUseAlternateTargetLocation()); - Assertions.assertEquals(false, model.isNonRecoverable()); - Assertions.assertEquals(SqlDataDirectoryType.INVALID, model.alternateDirectoryPaths().get(0).mappingType()); - Assertions.assertEquals("cvexreuqu", model.alternateDirectoryPaths().get(0).sourceLogicalName()); - Assertions.assertEquals("tljvfwhreagkhyx", model.alternateDirectoryPaths().get(0).sourcePath()); - Assertions.assertEquals("qtvbczsu", model.alternateDirectoryPaths().get(0).targetPath()); - Assertions.assertEquals("xykfhyq", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); - Assertions.assertEquals(RehydrationPriority.HIGH, model.recoveryPointRehydrationInfo().rehydrationPriority()); + Assertions.assertTrue(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("mswziq", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("uhok", model.targetVirtualMachineId()); + Assertions.assertTrue(model.shouldUseAlternateTargetLocation()); + Assertions.assertFalse(model.isNonRecoverable()); + Assertions.assertEquals(SqlDataDirectoryType.LOG, model.alternateDirectoryPaths().get(0).mappingType()); + Assertions.assertEquals("f", model.alternateDirectoryPaths().get(0).sourceLogicalName()); + Assertions.assertEquals("snvpdibmi", model.alternateDirectoryPaths().get(0).sourcePath()); + Assertions.assertEquals("stbz", model.alternateDirectoryPaths().get(0).targetPath()); + Assertions.assertEquals("l", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); + Assertions.assertEquals(RehydrationPriority.STANDARD, + model.recoveryPointRehydrationInfo().rehydrationPriority()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureWorkloadSqlRestoreWithRehydrateRequest model = new AzureWorkloadSqlRestoreWithRehydrateRequest() - .withResourceGuardOperationRequests(Arrays.asList("ofqcvovjufycsjm", "bemyeji", "iuxegth", "rtudawlpjfel")) + .withResourceGuardOperationRequests(Arrays.asList("swhvhczznvfbycj", "xjww", "xzv", "mwmxqhndvnoamld")) .withRecoveryType(RecoveryType.ORIGINAL_LOCATION) - .withSourceResourceId("glmep") - .withPropertyBag(mapOf("ykgsangpszng", "s")) + .withSourceResourceId("bffmbmxz") + .withPropertyBag( + mapOf("icgaao", "ywwpgjxsnptfuj", "wemxswvruunzz", "pttaqutd", "yinljqe", "gehkfkimrtixokff")) .withTargetInfo(new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.OVERWRITE) - .withContainerId("lkvec") - .withDatabaseName("jcngoadyed") - .withTargetDirectoryForFileRestore("rgjfoknubnoi")) - .withRecoveryMode(RecoveryMode.FILE_RECOVERY) - .withTargetResourceGroupName("ztrgdgxvcoq") - .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails().withIdentityArmId("wugyx") - .withIdentityName("itweialwvskbuh") + .withContainerId("xmonstshi") + .withDatabaseName("gvelfc") + .withTargetDirectoryForFileRestore("uccbirdsvuw")) + .withRecoveryMode(RecoveryMode.RECOVERY_USING_SNAPSHOT) + .withTargetResourceGroupName("egstmninwjizci") + .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails().withIdentityArmId("hgshe") + .withIdentityName("tbxqmuluxlxq") .withUserAssignedIdentityProperties( - new UserAssignedIdentityProperties().withClientId("aq").withPrincipalId("ltcoqc"))) + new UserAssignedIdentityProperties().withClientId("ers").withPrincipalId("cucrwnamikze"))) .withSnapshotRestoreParameters( - new SnapshotRestoreParameters().withSkipAttachAndMount(true).withLogPointInTimeForDBRecovery("xzak")) - .withTargetVirtualMachineId("jkmvbi") + new SnapshotRestoreParameters().withSkipAttachAndMount(true).withLogPointInTimeForDBRecovery("mswziq")) + .withTargetVirtualMachineId("uhok") .withShouldUseAlternateTargetLocation(true) .withIsNonRecoverable(false) - .withAlternateDirectoryPaths( - Arrays.asList(new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.INVALID) - .withSourceLogicalName("cvexreuqu") - .withSourcePath("tljvfwhreagkhyx") - .withTargetPath("qtvbczsu"))) - .withRecoveryPointRehydrationInfo( - new RecoveryPointRehydrationInfo().withRehydrationRetentionDuration("xykfhyq") - .withRehydrationPriority(RehydrationPriority.HIGH)); + .withAlternateDirectoryPaths(Arrays.asList( + new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.LOG) + .withSourceLogicalName("f") + .withSourcePath("snvpdibmi") + .withTargetPath("stbz"), + new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.INVALID) + .withSourceLogicalName("buqny") + .withSourcePath("hzfylsgcrpfbc") + .withTargetPath("ezzcez"), + new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.INVALID) + .withSourceLogicalName("yfwlwxjwet") + .withSourcePath("sihclafzvaylp") + .withTargetPath("sqqw"), + new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.INVALID) + .withSourceLogicalName("w") + .withSourcePath("chcxwaxfewzj") + .withTargetPath("exfdeqvhpsylk"))) + .withRecoveryPointRehydrationInfo(new RecoveryPointRehydrationInfo().withRehydrationRetentionDuration("l") + .withRehydrationPriority(RehydrationPriority.STANDARD)); model = BinaryData.fromObject(model).toObject(AzureWorkloadSqlRestoreWithRehydrateRequest.class); - Assertions.assertEquals("ofqcvovjufycsjm", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("swhvhczznvfbycj", model.resourceGuardOperationRequests().get(0)); Assertions.assertEquals(RecoveryType.ORIGINAL_LOCATION, model.recoveryType()); - Assertions.assertEquals("glmep", model.sourceResourceId()); - Assertions.assertEquals("s", model.propertyBag().get("ykgsangpszng")); + Assertions.assertEquals("bffmbmxz", model.sourceResourceId()); + Assertions.assertEquals("ywwpgjxsnptfuj", model.propertyBag().get("icgaao")); Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); - Assertions.assertEquals("lkvec", model.targetInfo().containerId()); - Assertions.assertEquals("jcngoadyed", model.targetInfo().databaseName()); - Assertions.assertEquals("rgjfoknubnoi", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.FILE_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("ztrgdgxvcoq", model.targetResourceGroupName()); - Assertions.assertEquals("wugyx", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("itweialwvskbuh", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("aq", + Assertions.assertEquals("xmonstshi", model.targetInfo().containerId()); + Assertions.assertEquals("gvelfc", model.targetInfo().databaseName()); + Assertions.assertEquals("uccbirdsvuw", model.targetInfo().targetDirectoryForFileRestore()); + Assertions.assertEquals(RecoveryMode.RECOVERY_USING_SNAPSHOT, model.recoveryMode()); + Assertions.assertEquals("egstmninwjizci", model.targetResourceGroupName()); + Assertions.assertEquals("hgshe", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("tbxqmuluxlxq", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("ers", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("ltcoqc", + Assertions.assertEquals("cucrwnamikze", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); - Assertions.assertEquals(true, model.snapshotRestoreParameters().skipAttachAndMount()); - Assertions.assertEquals("xzak", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); - Assertions.assertEquals("jkmvbi", model.targetVirtualMachineId()); - Assertions.assertEquals(true, model.shouldUseAlternateTargetLocation()); - Assertions.assertEquals(false, model.isNonRecoverable()); - Assertions.assertEquals(SqlDataDirectoryType.INVALID, model.alternateDirectoryPaths().get(0).mappingType()); - Assertions.assertEquals("cvexreuqu", model.alternateDirectoryPaths().get(0).sourceLogicalName()); - Assertions.assertEquals("tljvfwhreagkhyx", model.alternateDirectoryPaths().get(0).sourcePath()); - Assertions.assertEquals("qtvbczsu", model.alternateDirectoryPaths().get(0).targetPath()); - Assertions.assertEquals("xykfhyq", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); - Assertions.assertEquals(RehydrationPriority.HIGH, model.recoveryPointRehydrationInfo().rehydrationPriority()); + Assertions.assertTrue(model.snapshotRestoreParameters().skipAttachAndMount()); + Assertions.assertEquals("mswziq", model.snapshotRestoreParameters().logPointInTimeForDBRecovery()); + Assertions.assertEquals("uhok", model.targetVirtualMachineId()); + Assertions.assertTrue(model.shouldUseAlternateTargetLocation()); + Assertions.assertFalse(model.isNonRecoverable()); + Assertions.assertEquals(SqlDataDirectoryType.LOG, model.alternateDirectoryPaths().get(0).mappingType()); + Assertions.assertEquals("f", model.alternateDirectoryPaths().get(0).sourceLogicalName()); + Assertions.assertEquals("snvpdibmi", model.alternateDirectoryPaths().get(0).sourcePath()); + Assertions.assertEquals("stbz", model.alternateDirectoryPaths().get(0).targetPath()); + Assertions.assertEquals("l", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); + Assertions.assertEquals(RehydrationPriority.STANDARD, + model.recoveryPointRehydrationInfo().rehydrationPriority()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineBaseResourceInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineBaseResourceInnerTests.java index 217beaf5dbcb..c265aeddbea9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineBaseResourceInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineBaseResourceInnerTests.java @@ -1,109 +1,43 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupEngineBaseResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineBase; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineExtendedInfo; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class BackupEngineBaseResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupEngineBaseResourceInner model = BinaryData.fromString( - "{\"properties\":{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"kfgohdneue\",\"backupManagementType\":\"DPM\",\"registrationStatus\":\"sdyhtozfikdowwq\",\"backupEngineState\":\"v\",\"healthStatus\":\"xclvit\",\"canReRegister\":true,\"backupEngineId\":\"o\",\"dpmVersion\":\"sg\",\"azureBackupAgentVersion\":\"hcohfwdsjnk\",\"isAzureBackupAgentUpgradeAvailable\":true,\"isDpmUpgradeAvailable\":true,\"extendedInfo\":{\"databaseName\":\"swacffgdkzz\",\"protectedItemsCount\":1258640156,\"protectedServersCount\":2137392775,\"diskCount\":1769895546,\"usedDiskSpace\":70.37932285828938,\"availableDiskSpace\":37.34096330096411,\"refreshedAt\":\"2021-02-08T12:34:09Z\",\"azureProtectedInstances\":1681889122}},\"eTag\":\"uflrwd\",\"location\":\"hdlxyjrxsagafcn\",\"tags\":{\"vq\":\"wqapnedgfbcvk\"},\"id\":\"pkeqdcvdrhvoo\",\"name\":\"sotbob\",\"type\":\"dopcjwvnh\"}") + "{\"properties\":{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"wvajq\",\"backupManagementType\":\"AzureIaasVM\",\"registrationStatus\":\"x\",\"backupEngineState\":\"qzasunwqrjzfrgqh\",\"healthStatus\":\"hcmbuocnjrohmbp\",\"canReRegister\":false,\"backupEngineId\":\"ameb\",\"dpmVersion\":\"dyvkfkmr\",\"azureBackupAgentVersion\":\"xne\",\"isAzureBackupAgentUpgradeAvailable\":false,\"isDpmUpgradeAvailable\":false,\"extendedInfo\":{\"databaseName\":\"lfpya\",\"protectedItemsCount\":1196975120,\"protectedServersCount\":1496889185,\"diskCount\":1583292923,\"usedDiskSpace\":29.454838250465354,\"availableDiskSpace\":38.68549131508181,\"refreshedAt\":\"2021-05-24T10:00:40Z\",\"azureProtectedInstances\":1206233622}},\"tags\":{\"jlgvvpase\":\"ee\",\"xantuygdhg\":\"sgb\"},\"location\":\"i\",\"eTag\":\"rpiwrqofulo\",\"id\":\"jnlex\",\"name\":\"hcbjpibk\",\"type\":\"phuuuerctato\"}") .toObject(BackupEngineBaseResourceInner.class); - Assertions.assertEquals("hdlxyjrxsagafcn", model.location()); - Assertions.assertEquals("wqapnedgfbcvk", model.tags().get("vq")); - Assertions.assertEquals("kfgohdneue", model.properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.DPM, model.properties().backupManagementType()); - Assertions.assertEquals("sdyhtozfikdowwq", model.properties().registrationStatus()); - Assertions.assertEquals("v", model.properties().backupEngineState()); - Assertions.assertEquals("xclvit", model.properties().healthStatus()); - Assertions.assertEquals(true, model.properties().canReRegister()); - Assertions.assertEquals("o", model.properties().backupEngineId()); - Assertions.assertEquals("sg", model.properties().dpmVersion()); - Assertions.assertEquals("hcohfwdsjnk", model.properties().azureBackupAgentVersion()); - Assertions.assertEquals(true, model.properties().isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(true, model.properties().isDpmUpgradeAvailable()); - Assertions.assertEquals("swacffgdkzz", model.properties().extendedInfo().databaseName()); - Assertions.assertEquals(1258640156, model.properties().extendedInfo().protectedItemsCount()); - Assertions.assertEquals(2137392775, model.properties().extendedInfo().protectedServersCount()); - Assertions.assertEquals(1769895546, model.properties().extendedInfo().diskCount()); - Assertions.assertEquals(70.37932285828938D, model.properties().extendedInfo().usedDiskSpace()); - Assertions.assertEquals(37.34096330096411D, model.properties().extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T12:34:09Z"), + Assertions.assertEquals("wvajq", model.properties().friendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.properties().backupManagementType()); + Assertions.assertEquals("x", model.properties().registrationStatus()); + Assertions.assertEquals("qzasunwqrjzfrgqh", model.properties().backupEngineState()); + Assertions.assertEquals("hcmbuocnjrohmbp", model.properties().healthStatus()); + Assertions.assertFalse(model.properties().canReRegister()); + Assertions.assertEquals("ameb", model.properties().backupEngineId()); + Assertions.assertEquals("dyvkfkmr", model.properties().dpmVersion()); + Assertions.assertEquals("xne", model.properties().azureBackupAgentVersion()); + Assertions.assertFalse(model.properties().isAzureBackupAgentUpgradeAvailable()); + Assertions.assertFalse(model.properties().isDpmUpgradeAvailable()); + Assertions.assertEquals("lfpya", model.properties().extendedInfo().databaseName()); + Assertions.assertEquals(1196975120, model.properties().extendedInfo().protectedItemsCount()); + Assertions.assertEquals(1496889185, model.properties().extendedInfo().protectedServersCount()); + Assertions.assertEquals(1583292923, model.properties().extendedInfo().diskCount()); + Assertions.assertEquals(29.454838250465354D, model.properties().extendedInfo().usedDiskSpace()); + Assertions.assertEquals(38.68549131508181D, model.properties().extendedInfo().availableDiskSpace()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T10:00:40Z"), model.properties().extendedInfo().refreshedAt()); - Assertions.assertEquals(1681889122, model.properties().extendedInfo().azureProtectedInstances()); - Assertions.assertEquals("uflrwd", model.etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupEngineBaseResourceInner model = new BackupEngineBaseResourceInner().withLocation("hdlxyjrxsagafcn") - .withTags(mapOf("vq", "wqapnedgfbcvk")) - .withProperties(new BackupEngineBase().withFriendlyName("kfgohdneue") - .withBackupManagementType(BackupManagementType.DPM) - .withRegistrationStatus("sdyhtozfikdowwq") - .withBackupEngineState("v") - .withHealthStatus("xclvit") - .withCanReRegister(true) - .withBackupEngineId("o") - .withDpmVersion("sg") - .withAzureBackupAgentVersion("hcohfwdsjnk") - .withIsAzureBackupAgentUpgradeAvailable(true) - .withIsDpmUpgradeAvailable(true) - .withExtendedInfo(new BackupEngineExtendedInfo().withDatabaseName("swacffgdkzz") - .withProtectedItemsCount(1258640156) - .withProtectedServersCount(2137392775) - .withDiskCount(1769895546) - .withUsedDiskSpace(70.37932285828938D) - .withAvailableDiskSpace(37.34096330096411D) - .withRefreshedAt(OffsetDateTime.parse("2021-02-08T12:34:09Z")) - .withAzureProtectedInstances(1681889122))) - .withEtag("uflrwd"); - model = BinaryData.fromObject(model).toObject(BackupEngineBaseResourceInner.class); - Assertions.assertEquals("hdlxyjrxsagafcn", model.location()); - Assertions.assertEquals("wqapnedgfbcvk", model.tags().get("vq")); - Assertions.assertEquals("kfgohdneue", model.properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.DPM, model.properties().backupManagementType()); - Assertions.assertEquals("sdyhtozfikdowwq", model.properties().registrationStatus()); - Assertions.assertEquals("v", model.properties().backupEngineState()); - Assertions.assertEquals("xclvit", model.properties().healthStatus()); - Assertions.assertEquals(true, model.properties().canReRegister()); - Assertions.assertEquals("o", model.properties().backupEngineId()); - Assertions.assertEquals("sg", model.properties().dpmVersion()); - Assertions.assertEquals("hcohfwdsjnk", model.properties().azureBackupAgentVersion()); - Assertions.assertEquals(true, model.properties().isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(true, model.properties().isDpmUpgradeAvailable()); - Assertions.assertEquals("swacffgdkzz", model.properties().extendedInfo().databaseName()); - Assertions.assertEquals(1258640156, model.properties().extendedInfo().protectedItemsCount()); - Assertions.assertEquals(2137392775, model.properties().extendedInfo().protectedServersCount()); - Assertions.assertEquals(1769895546, model.properties().extendedInfo().diskCount()); - Assertions.assertEquals(70.37932285828938D, model.properties().extendedInfo().usedDiskSpace()); - Assertions.assertEquals(37.34096330096411D, model.properties().extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T12:34:09Z"), - model.properties().extendedInfo().refreshedAt()); - Assertions.assertEquals(1681889122, model.properties().extendedInfo().azureProtectedInstances()); - Assertions.assertEquals("uflrwd", model.etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(1206233622, model.properties().extendedInfo().azureProtectedInstances()); + Assertions.assertEquals("ee", model.tags().get("jlgvvpase")); + Assertions.assertEquals("i", model.location()); + Assertions.assertEquals("rpiwrqofulo", model.etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineBaseResourceListTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineBaseResourceListTests.java index 69e197d2133a..1ebfeee33a81 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineBaseResourceListTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineBaseResourceListTests.java @@ -1,142 +1,46 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupEngineBaseResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineBase; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineBaseResourceList; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineExtendedInfo; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.BackupEngineBaseResourceList; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class BackupEngineBaseResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupEngineBaseResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"q\",\"backupManagementType\":\"AzureIaasVM\",\"registrationStatus\":\"mqtaruoujmkcjh\",\"backupEngineState\":\"ytjrybnwjewgdr\",\"healthStatus\":\"rvnaenqpeh\",\"canReRegister\":false,\"backupEngineId\":\"ygmi\",\"dpmVersion\":\"hnzdndslgnayqi\",\"azureBackupAgentVersion\":\"nduhavhqlkthum\",\"isAzureBackupAgentUpgradeAvailable\":true,\"isDpmUpgradeAvailable\":true,\"extendedInfo\":{\"databaseName\":\"cdui\",\"protectedItemsCount\":1108910411,\"protectedServersCount\":1393187057,\"diskCount\":178925296,\"usedDiskSpace\":63.86816695634684,\"availableDiskSpace\":0.14011937036747524,\"refreshedAt\":\"2021-01-19T21:06:36Z\",\"azureProtectedInstances\":245335843}},\"eTag\":\"fmmdnbbg\",\"location\":\"zpswiydmc\",\"tags\":{\"dbzm\":\"zdxss\",\"cblylpstdbhhxsr\":\"vdfznudaodvxzb\",\"erscdntne\":\"dzu\"},\"id\":\"fiwjmygtdssls\",\"name\":\"tmweriofzpyq\",\"type\":\"emwabnet\"},{\"properties\":{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"szhedplvw\",\"backupManagementType\":\"Invalid\",\"registrationStatus\":\"mwmbes\",\"backupEngineState\":\"nkww\",\"healthStatus\":\"pjflcxogao\",\"canReRegister\":true,\"backupEngineId\":\"m\",\"dpmVersion\":\"ikvmkqzeqqk\",\"azureBackupAgentVersion\":\"tfz\",\"isAzureBackupAgentUpgradeAvailable\":false,\"isDpmUpgradeAvailable\":false,\"extendedInfo\":{\"databaseName\":\"ur\",\"protectedItemsCount\":191107441,\"protectedServersCount\":1245356368,\"diskCount\":1368192153,\"usedDiskSpace\":29.50996555933806,\"availableDiskSpace\":71.73574705933942,\"refreshedAt\":\"2021-02-24T08:44:41Z\",\"azureProtectedInstances\":1120938995}},\"eTag\":\"xwak\",\"location\":\"ogqxndlkzgxhuri\",\"tags\":{\"bxmubyynt\":\"podxunkb\",\"tkoievseotgq\":\"lrb\",\"tmuwlauwzi\":\"l\",\"cjefuzmu\":\"xbmp\"},\"id\":\"pbttdum\",\"name\":\"rp\",\"type\":\"xe\"}],\"nextLink\":\"nzbtbhj\"}") + "{\"value\":[{\"properties\":{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"ezq\",\"backupManagementType\":\"AzureIaasVM\",\"registrationStatus\":\"rtceukdqkkyihzt\",\"backupEngineState\":\"qm\",\"healthStatus\":\"zgwldoychillcec\",\"canReRegister\":true,\"backupEngineId\":\"waoaguhi\",\"dpmVersion\":\"llizs\",\"azureBackupAgentVersion\":\"csjvhrwef\",\"isAzureBackupAgentUpgradeAvailable\":true,\"isDpmUpgradeAvailable\":true,\"extendedInfo\":{\"databaseName\":\"mvss\",\"protectedItemsCount\":588995306,\"protectedServersCount\":1794560856,\"diskCount\":18531700,\"usedDiskSpace\":73.43274632913787,\"availableDiskSpace\":57.44183945714427,\"refreshedAt\":\"2021-06-25T02:41:25Z\",\"azureProtectedInstances\":865949194}},\"tags\":{\"ocyvhhulrtywikdm\":\"nijduyyespydjf\",\"xmxufrsryjqgdk\":\"lakuflgbhgauacd\",\"vjhvefgwbm\":\"nozoeoq\"},\"location\":\"c\",\"eTag\":\"tasfaymxbulpzeal\",\"id\":\"qkyojwyvf\",\"name\":\"mbtsuahxsg\",\"type\":\"jcmmzrrscub\"},{\"properties\":{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"drnpxqwodiff\",\"backupManagementType\":\"AzureSql\",\"registrationStatus\":\"rmmuabwibvjo\",\"backupEngineState\":\"onmcyefoyzb\",\"healthStatus\":\"wine\",\"canReRegister\":true,\"backupEngineId\":\"kak\",\"dpmVersion\":\"ldtve\",\"azureBackupAgentVersion\":\"oclzhz\",\"isAzureBackupAgentUpgradeAvailable\":false,\"isDpmUpgradeAvailable\":true,\"extendedInfo\":{\"databaseName\":\"vt\",\"protectedItemsCount\":923079375,\"protectedServersCount\":1426734975,\"diskCount\":1465139797,\"usedDiskSpace\":1.5023842320189607,\"availableDiskSpace\":25.305464111639974,\"refreshedAt\":\"2021-08-12T18:40:24Z\",\"azureProtectedInstances\":334873151}},\"tags\":{\"yskbruff\":\"ids\",\"ukkutvl\":\"l\"},\"location\":\"rpq\",\"eTag\":\"mblcouqehbhbcds\",\"id\":\"ryrando\",\"name\":\"pmbltoormkfql\",\"type\":\"xldykalsygaolnjp\"},{\"properties\":{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"m\",\"backupManagementType\":\"DefaultBackup\",\"registrationStatus\":\"bjgsjjxxahmrn\",\"backupEngineState\":\"zyqegxyiv\",\"healthStatus\":\"nbm\",\"canReRegister\":true,\"backupEngineId\":\"ijkgqxnhm\",\"dpmVersion\":\"eznjaujv\",\"azureBackupAgentVersion\":\"nnggiycwkdtaawxw\",\"isAzureBackupAgentUpgradeAvailable\":false,\"isDpmUpgradeAvailable\":true,\"extendedInfo\":{\"databaseName\":\"rq\",\"protectedItemsCount\":1549937823,\"protectedServersCount\":1603761068,\"diskCount\":330516260,\"usedDiskSpace\":56.8599489624235,\"availableDiskSpace\":30.355189246094316,\"refreshedAt\":\"2021-06-21T18:23:35Z\",\"azureProtectedInstances\":660278904}},\"tags\":{\"ewijymrhbguz\":\"irkfpksokdgo\",\"nfnzhhh\":\"zkye\",\"mffjkutycyarn\":\"o\"},\"location\":\"ohguabz\",\"eTag\":\"hkt\",\"id\":\"yczhco\",\"name\":\"ocnhzqrottjzcfyj\",\"type\":\"pt\"}],\"nextLink\":\"lohap\"}") .toObject(BackupEngineBaseResourceList.class); - Assertions.assertEquals("nzbtbhj", model.nextLink()); - Assertions.assertEquals("zpswiydmc", model.value().get(0).location()); - Assertions.assertEquals("zdxss", model.value().get(0).tags().get("dbzm")); - Assertions.assertEquals("q", model.value().get(0).properties().friendlyName()); + Assertions.assertEquals("lohap", model.nextLink()); + Assertions.assertEquals("ezq", model.value().get(0).properties().friendlyName()); Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("mqtaruoujmkcjh", model.value().get(0).properties().registrationStatus()); - Assertions.assertEquals("ytjrybnwjewgdr", model.value().get(0).properties().backupEngineState()); - Assertions.assertEquals("rvnaenqpeh", model.value().get(0).properties().healthStatus()); - Assertions.assertEquals(false, model.value().get(0).properties().canReRegister()); - Assertions.assertEquals("ygmi", model.value().get(0).properties().backupEngineId()); - Assertions.assertEquals("hnzdndslgnayqi", model.value().get(0).properties().dpmVersion()); - Assertions.assertEquals("nduhavhqlkthum", model.value().get(0).properties().azureBackupAgentVersion()); - Assertions.assertEquals(true, model.value().get(0).properties().isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(true, model.value().get(0).properties().isDpmUpgradeAvailable()); - Assertions.assertEquals("cdui", model.value().get(0).properties().extendedInfo().databaseName()); - Assertions.assertEquals(1108910411, model.value().get(0).properties().extendedInfo().protectedItemsCount()); - Assertions.assertEquals(1393187057, model.value().get(0).properties().extendedInfo().protectedServersCount()); - Assertions.assertEquals(178925296, model.value().get(0).properties().extendedInfo().diskCount()); - Assertions.assertEquals(63.86816695634684D, model.value().get(0).properties().extendedInfo().usedDiskSpace()); - Assertions.assertEquals(0.14011937036747524D, + Assertions.assertEquals("rtceukdqkkyihzt", model.value().get(0).properties().registrationStatus()); + Assertions.assertEquals("qm", model.value().get(0).properties().backupEngineState()); + Assertions.assertEquals("zgwldoychillcec", model.value().get(0).properties().healthStatus()); + Assertions.assertTrue(model.value().get(0).properties().canReRegister()); + Assertions.assertEquals("waoaguhi", model.value().get(0).properties().backupEngineId()); + Assertions.assertEquals("llizs", model.value().get(0).properties().dpmVersion()); + Assertions.assertEquals("csjvhrwef", model.value().get(0).properties().azureBackupAgentVersion()); + Assertions.assertTrue(model.value().get(0).properties().isAzureBackupAgentUpgradeAvailable()); + Assertions.assertTrue(model.value().get(0).properties().isDpmUpgradeAvailable()); + Assertions.assertEquals("mvss", model.value().get(0).properties().extendedInfo().databaseName()); + Assertions.assertEquals(588995306, model.value().get(0).properties().extendedInfo().protectedItemsCount()); + Assertions.assertEquals(1794560856, model.value().get(0).properties().extendedInfo().protectedServersCount()); + Assertions.assertEquals(18531700, model.value().get(0).properties().extendedInfo().diskCount()); + Assertions.assertEquals(73.43274632913787D, model.value().get(0).properties().extendedInfo().usedDiskSpace()); + Assertions.assertEquals(57.44183945714427D, model.value().get(0).properties().extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-19T21:06:36Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-06-25T02:41:25Z"), model.value().get(0).properties().extendedInfo().refreshedAt()); - Assertions.assertEquals(245335843, model.value().get(0).properties().extendedInfo().azureProtectedInstances()); - Assertions.assertEquals("fmmdnbbg", model.value().get(0).etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupEngineBaseResourceList model = new BackupEngineBaseResourceList().withNextLink("nzbtbhj") - .withValue(Arrays.asList( - new BackupEngineBaseResourceInner().withLocation("zpswiydmc") - .withTags(mapOf("dbzm", "zdxss", "cblylpstdbhhxsr", "vdfznudaodvxzb", "erscdntne", "dzu")) - .withProperties(new BackupEngineBase().withFriendlyName("q") - .withBackupManagementType(BackupManagementType.AZURE_IAAS_VM) - .withRegistrationStatus("mqtaruoujmkcjh") - .withBackupEngineState("ytjrybnwjewgdr") - .withHealthStatus("rvnaenqpeh") - .withCanReRegister(false) - .withBackupEngineId("ygmi") - .withDpmVersion("hnzdndslgnayqi") - .withAzureBackupAgentVersion("nduhavhqlkthum") - .withIsAzureBackupAgentUpgradeAvailable(true) - .withIsDpmUpgradeAvailable(true) - .withExtendedInfo(new BackupEngineExtendedInfo().withDatabaseName("cdui") - .withProtectedItemsCount(1108910411) - .withProtectedServersCount(1393187057) - .withDiskCount(178925296) - .withUsedDiskSpace(63.86816695634684D) - .withAvailableDiskSpace(0.14011937036747524D) - .withRefreshedAt(OffsetDateTime.parse("2021-01-19T21:06:36Z")) - .withAzureProtectedInstances(245335843))) - .withEtag("fmmdnbbg"), - new BackupEngineBaseResourceInner().withLocation("ogqxndlkzgxhuri") - .withTags( - mapOf("bxmubyynt", "podxunkb", "tkoievseotgq", "lrb", "tmuwlauwzi", "l", "cjefuzmu", "xbmp")) - .withProperties(new BackupEngineBase().withFriendlyName("szhedplvw") - .withBackupManagementType(BackupManagementType.INVALID) - .withRegistrationStatus("mwmbes") - .withBackupEngineState("nkww") - .withHealthStatus("pjflcxogao") - .withCanReRegister(true) - .withBackupEngineId("m") - .withDpmVersion("ikvmkqzeqqk") - .withAzureBackupAgentVersion("tfz") - .withIsAzureBackupAgentUpgradeAvailable(false) - .withIsDpmUpgradeAvailable(false) - .withExtendedInfo(new BackupEngineExtendedInfo().withDatabaseName("ur") - .withProtectedItemsCount(191107441) - .withProtectedServersCount(1245356368) - .withDiskCount(1368192153) - .withUsedDiskSpace(29.50996555933806D) - .withAvailableDiskSpace(71.73574705933942D) - .withRefreshedAt(OffsetDateTime.parse("2021-02-24T08:44:41Z")) - .withAzureProtectedInstances(1120938995))) - .withEtag("xwak"))); - model = BinaryData.fromObject(model).toObject(BackupEngineBaseResourceList.class); - Assertions.assertEquals("nzbtbhj", model.nextLink()); - Assertions.assertEquals("zpswiydmc", model.value().get(0).location()); - Assertions.assertEquals("zdxss", model.value().get(0).tags().get("dbzm")); - Assertions.assertEquals("q", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, - model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("mqtaruoujmkcjh", model.value().get(0).properties().registrationStatus()); - Assertions.assertEquals("ytjrybnwjewgdr", model.value().get(0).properties().backupEngineState()); - Assertions.assertEquals("rvnaenqpeh", model.value().get(0).properties().healthStatus()); - Assertions.assertEquals(false, model.value().get(0).properties().canReRegister()); - Assertions.assertEquals("ygmi", model.value().get(0).properties().backupEngineId()); - Assertions.assertEquals("hnzdndslgnayqi", model.value().get(0).properties().dpmVersion()); - Assertions.assertEquals("nduhavhqlkthum", model.value().get(0).properties().azureBackupAgentVersion()); - Assertions.assertEquals(true, model.value().get(0).properties().isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(true, model.value().get(0).properties().isDpmUpgradeAvailable()); - Assertions.assertEquals("cdui", model.value().get(0).properties().extendedInfo().databaseName()); - Assertions.assertEquals(1108910411, model.value().get(0).properties().extendedInfo().protectedItemsCount()); - Assertions.assertEquals(1393187057, model.value().get(0).properties().extendedInfo().protectedServersCount()); - Assertions.assertEquals(178925296, model.value().get(0).properties().extendedInfo().diskCount()); - Assertions.assertEquals(63.86816695634684D, model.value().get(0).properties().extendedInfo().usedDiskSpace()); - Assertions.assertEquals(0.14011937036747524D, - model.value().get(0).properties().extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-19T21:06:36Z"), - model.value().get(0).properties().extendedInfo().refreshedAt()); - Assertions.assertEquals(245335843, model.value().get(0).properties().extendedInfo().azureProtectedInstances()); - Assertions.assertEquals("fmmdnbbg", model.value().get(0).etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(865949194, model.value().get(0).properties().extendedInfo().azureProtectedInstances()); + Assertions.assertEquals("nijduyyespydjf", model.value().get(0).tags().get("ocyvhhulrtywikdm")); + Assertions.assertEquals("c", model.value().get(0).location()); + Assertions.assertEquals("tasfaymxbulpzeal", model.value().get(0).etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineBaseTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineBaseTests.java index 66909cc0446a..4cd24f8407d6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineBaseTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineBaseTests.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineBase; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineExtendedInfo; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -15,69 +14,26 @@ public final class BackupEngineBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupEngineBase model = BinaryData.fromString( - "{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"d\",\"backupManagementType\":\"DPM\",\"registrationStatus\":\"cxrslpmutwuoe\",\"backupEngineState\":\"pkhjwni\",\"healthStatus\":\"sluicpdggkzz\",\"canReRegister\":true,\"backupEngineId\":\"mpaxmodfvuefywsb\",\"dpmVersion\":\"vmwy\",\"azureBackupAgentVersion\":\"fouyf\",\"isAzureBackupAgentUpgradeAvailable\":false,\"isDpmUpgradeAvailable\":false,\"extendedInfo\":{\"databaseName\":\"iyzvqtmnub\",\"protectedItemsCount\":908407782,\"protectedServersCount\":1989438546,\"diskCount\":1254452597,\"usedDiskSpace\":36.0989535057045,\"availableDiskSpace\":69.75703157384325,\"refreshedAt\":\"2021-10-31T06:50:30Z\",\"azureProtectedInstances\":1083170526}}") + "{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"ntqpbr\",\"backupManagementType\":\"DPM\",\"registrationStatus\":\"duczkgof\",\"backupEngineState\":\"fsrucv\",\"healthStatus\":\"rpcjttbstvjeaqnr\",\"canReRegister\":false,\"backupEngineId\":\"koxmlghk\",\"dpmVersion\":\"idvrmaz\",\"azureBackupAgentVersion\":\"dwwexymz\",\"isAzureBackupAgentUpgradeAvailable\":true,\"isDpmUpgradeAvailable\":false,\"extendedInfo\":{\"databaseName\":\"hpwvqsgnyyuu\",\"protectedItemsCount\":1792217092,\"protectedServersCount\":2008029409,\"diskCount\":1210376320,\"usedDiskSpace\":69.34686837100008,\"availableDiskSpace\":94.80602066940861,\"refreshedAt\":\"2021-11-19T13:53:23Z\",\"azureProtectedInstances\":829766839}}") .toObject(BackupEngineBase.class); - Assertions.assertEquals("d", model.friendlyName()); + Assertions.assertEquals("ntqpbr", model.friendlyName()); Assertions.assertEquals(BackupManagementType.DPM, model.backupManagementType()); - Assertions.assertEquals("cxrslpmutwuoe", model.registrationStatus()); - Assertions.assertEquals("pkhjwni", model.backupEngineState()); - Assertions.assertEquals("sluicpdggkzz", model.healthStatus()); - Assertions.assertEquals(true, model.canReRegister()); - Assertions.assertEquals("mpaxmodfvuefywsb", model.backupEngineId()); - Assertions.assertEquals("vmwy", model.dpmVersion()); - Assertions.assertEquals("fouyf", model.azureBackupAgentVersion()); - Assertions.assertEquals(false, model.isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(false, model.isDpmUpgradeAvailable()); - Assertions.assertEquals("iyzvqtmnub", model.extendedInfo().databaseName()); - Assertions.assertEquals(908407782, model.extendedInfo().protectedItemsCount()); - Assertions.assertEquals(1989438546, model.extendedInfo().protectedServersCount()); - Assertions.assertEquals(1254452597, model.extendedInfo().diskCount()); - Assertions.assertEquals(36.0989535057045D, model.extendedInfo().usedDiskSpace()); - Assertions.assertEquals(69.75703157384325D, model.extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-31T06:50:30Z"), model.extendedInfo().refreshedAt()); - Assertions.assertEquals(1083170526, model.extendedInfo().azureProtectedInstances()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupEngineBase model = new BackupEngineBase().withFriendlyName("d") - .withBackupManagementType(BackupManagementType.DPM) - .withRegistrationStatus("cxrslpmutwuoe") - .withBackupEngineState("pkhjwni") - .withHealthStatus("sluicpdggkzz") - .withCanReRegister(true) - .withBackupEngineId("mpaxmodfvuefywsb") - .withDpmVersion("vmwy") - .withAzureBackupAgentVersion("fouyf") - .withIsAzureBackupAgentUpgradeAvailable(false) - .withIsDpmUpgradeAvailable(false) - .withExtendedInfo(new BackupEngineExtendedInfo().withDatabaseName("iyzvqtmnub") - .withProtectedItemsCount(908407782) - .withProtectedServersCount(1989438546) - .withDiskCount(1254452597) - .withUsedDiskSpace(36.0989535057045D) - .withAvailableDiskSpace(69.75703157384325D) - .withRefreshedAt(OffsetDateTime.parse("2021-10-31T06:50:30Z")) - .withAzureProtectedInstances(1083170526)); - model = BinaryData.fromObject(model).toObject(BackupEngineBase.class); - Assertions.assertEquals("d", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.DPM, model.backupManagementType()); - Assertions.assertEquals("cxrslpmutwuoe", model.registrationStatus()); - Assertions.assertEquals("pkhjwni", model.backupEngineState()); - Assertions.assertEquals("sluicpdggkzz", model.healthStatus()); - Assertions.assertEquals(true, model.canReRegister()); - Assertions.assertEquals("mpaxmodfvuefywsb", model.backupEngineId()); - Assertions.assertEquals("vmwy", model.dpmVersion()); - Assertions.assertEquals("fouyf", model.azureBackupAgentVersion()); - Assertions.assertEquals(false, model.isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(false, model.isDpmUpgradeAvailable()); - Assertions.assertEquals("iyzvqtmnub", model.extendedInfo().databaseName()); - Assertions.assertEquals(908407782, model.extendedInfo().protectedItemsCount()); - Assertions.assertEquals(1989438546, model.extendedInfo().protectedServersCount()); - Assertions.assertEquals(1254452597, model.extendedInfo().diskCount()); - Assertions.assertEquals(36.0989535057045D, model.extendedInfo().usedDiskSpace()); - Assertions.assertEquals(69.75703157384325D, model.extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-31T06:50:30Z"), model.extendedInfo().refreshedAt()); - Assertions.assertEquals(1083170526, model.extendedInfo().azureProtectedInstances()); + Assertions.assertEquals("duczkgof", model.registrationStatus()); + Assertions.assertEquals("fsrucv", model.backupEngineState()); + Assertions.assertEquals("rpcjttbstvjeaqnr", model.healthStatus()); + Assertions.assertFalse(model.canReRegister()); + Assertions.assertEquals("koxmlghk", model.backupEngineId()); + Assertions.assertEquals("idvrmaz", model.dpmVersion()); + Assertions.assertEquals("dwwexymz", model.azureBackupAgentVersion()); + Assertions.assertTrue(model.isAzureBackupAgentUpgradeAvailable()); + Assertions.assertFalse(model.isDpmUpgradeAvailable()); + Assertions.assertEquals("hpwvqsgnyyuu", model.extendedInfo().databaseName()); + Assertions.assertEquals(1792217092, model.extendedInfo().protectedItemsCount()); + Assertions.assertEquals(2008029409, model.extendedInfo().protectedServersCount()); + Assertions.assertEquals(1210376320, model.extendedInfo().diskCount()); + Assertions.assertEquals(69.34686837100008D, model.extendedInfo().usedDiskSpace()); + Assertions.assertEquals(94.80602066940861D, model.extendedInfo().availableDiskSpace()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-19T13:53:23Z"), model.extendedInfo().refreshedAt()); + Assertions.assertEquals(829766839, model.extendedInfo().azureProtectedInstances()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineExtendedInfoTests.java index 25fd9db6fb5e..2c1fa70799d8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineExtendedInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,36 +13,15 @@ public final class BackupEngineExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupEngineExtendedInfo model = BinaryData.fromString( - "{\"databaseName\":\"pomgkopkwhojvp\",\"protectedItemsCount\":996289807,\"protectedServersCount\":1448079009,\"diskCount\":1647253865,\"usedDiskSpace\":90.65906932086332,\"availableDiskSpace\":11.146404494926331,\"refreshedAt\":\"2021-01-31T00:19:35Z\",\"azureProtectedInstances\":484454898}") + "{\"databaseName\":\"lt\",\"protectedItemsCount\":2014703272,\"protectedServersCount\":727856496,\"diskCount\":2065272697,\"usedDiskSpace\":3.1509477622720605,\"availableDiskSpace\":78.63524984778307,\"refreshedAt\":\"2021-04-09T12:26:29Z\",\"azureProtectedInstances\":495815281}") .toObject(BackupEngineExtendedInfo.class); - Assertions.assertEquals("pomgkopkwhojvp", model.databaseName()); - Assertions.assertEquals(996289807, model.protectedItemsCount()); - Assertions.assertEquals(1448079009, model.protectedServersCount()); - Assertions.assertEquals(1647253865, model.diskCount()); - Assertions.assertEquals(90.65906932086332D, model.usedDiskSpace()); - Assertions.assertEquals(11.146404494926331D, model.availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-31T00:19:35Z"), model.refreshedAt()); - Assertions.assertEquals(484454898, model.azureProtectedInstances()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupEngineExtendedInfo model = new BackupEngineExtendedInfo().withDatabaseName("pomgkopkwhojvp") - .withProtectedItemsCount(996289807) - .withProtectedServersCount(1448079009) - .withDiskCount(1647253865) - .withUsedDiskSpace(90.65906932086332D) - .withAvailableDiskSpace(11.146404494926331D) - .withRefreshedAt(OffsetDateTime.parse("2021-01-31T00:19:35Z")) - .withAzureProtectedInstances(484454898); - model = BinaryData.fromObject(model).toObject(BackupEngineExtendedInfo.class); - Assertions.assertEquals("pomgkopkwhojvp", model.databaseName()); - Assertions.assertEquals(996289807, model.protectedItemsCount()); - Assertions.assertEquals(1448079009, model.protectedServersCount()); - Assertions.assertEquals(1647253865, model.diskCount()); - Assertions.assertEquals(90.65906932086332D, model.usedDiskSpace()); - Assertions.assertEquals(11.146404494926331D, model.availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-31T00:19:35Z"), model.refreshedAt()); - Assertions.assertEquals(484454898, model.azureProtectedInstances()); + Assertions.assertEquals("lt", model.databaseName()); + Assertions.assertEquals(2014703272, model.protectedItemsCount()); + Assertions.assertEquals(727856496, model.protectedServersCount()); + Assertions.assertEquals(2065272697, model.diskCount()); + Assertions.assertEquals(3.1509477622720605D, model.usedDiskSpace()); + Assertions.assertEquals(78.63524984778307D, model.availableDiskSpace()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-09T12:26:29Z"), model.refreshedAt()); + Assertions.assertEquals(495815281, model.azureProtectedInstances()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesGetWithResponseMockTests.java index 57ab48e127d1..d04ddf8cf654 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -22,7 +22,7 @@ public final class BackupEnginesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"eyowmndcovd\",\"backupManagementType\":\"AzureStorage\",\"registrationStatus\":\"uxza\",\"backupEngineState\":\"mk\",\"healthStatus\":\"ruw\",\"canReRegister\":false,\"backupEngineId\":\"bcpftxudqyemebun\",\"dpmVersion\":\"cmcir\",\"azureBackupAgentVersion\":\"eemmjauwcgx\",\"isAzureBackupAgentUpgradeAvailable\":false,\"isDpmUpgradeAvailable\":true,\"extendedInfo\":{\"databaseName\":\"tranizerwgu\",\"protectedItemsCount\":1827615921,\"protectedServersCount\":1177263124,\"diskCount\":2102963892,\"usedDiskSpace\":59.55416383016519,\"availableDiskSpace\":25.91979133659811,\"refreshedAt\":\"2021-07-15T09:04:24Z\",\"azureProtectedInstances\":435710969}},\"eTag\":\"hpriylfm\",\"location\":\"ztraud\",\"tags\":{\"moj\":\"lcdculregpq\",\"tnvgyshqrdgrt\":\"vr\"},\"id\":\"mewjzlpyk\",\"name\":\"fa\",\"type\":\"zwjcaye\"}"; + = "{\"properties\":{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"qgrvg\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"p\",\"backupEngineState\":\"dtsdfjy\",\"healthStatus\":\"socwiqbuout\",\"canReRegister\":true,\"backupEngineId\":\"gleofjsbgbw\",\"dpmVersion\":\"vdajfwn\",\"azureBackupAgentVersion\":\"fmaciqgjjrlhiq\",\"isAzureBackupAgentUpgradeAvailable\":false,\"isDpmUpgradeAvailable\":true,\"extendedInfo\":{\"databaseName\":\"ougu\",\"protectedItemsCount\":124766447,\"protectedServersCount\":1917543946,\"diskCount\":2004089002,\"usedDiskSpace\":27.704443453218765,\"availableDiskSpace\":86.57088869686356,\"refreshedAt\":\"2021-02-07T04:07:32Z\",\"azureProtectedInstances\":437555374}},\"tags\":{\"lwynpbbfqvzfj\":\"lndbeaqbkixv\"},\"location\":\"pu\",\"eTag\":\"feuzjljmphfkye\",\"id\":\"lgjzmi\",\"name\":\"uydoccnx\",\"type\":\"hanzbuiad\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,31 +32,31 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupEngineBaseResource response = manager.backupEngines() - .getWithResponse("sqgpewqcfu", "mdpv", "zgl", "jbkn", "zcl", com.azure.core.util.Context.NONE) + .getWithResponse("qha", "yntacihnco", "mip", "mliqmvlb", "i", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ztraud", response.location()); - Assertions.assertEquals("lcdculregpq", response.tags().get("moj")); - Assertions.assertEquals("eyowmndcovd", response.properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_STORAGE, response.properties().backupManagementType()); - Assertions.assertEquals("uxza", response.properties().registrationStatus()); - Assertions.assertEquals("mk", response.properties().backupEngineState()); - Assertions.assertEquals("ruw", response.properties().healthStatus()); - Assertions.assertEquals(false, response.properties().canReRegister()); - Assertions.assertEquals("bcpftxudqyemebun", response.properties().backupEngineId()); - Assertions.assertEquals("cmcir", response.properties().dpmVersion()); - Assertions.assertEquals("eemmjauwcgx", response.properties().azureBackupAgentVersion()); - Assertions.assertEquals(false, response.properties().isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(true, response.properties().isDpmUpgradeAvailable()); - Assertions.assertEquals("tranizerwgu", response.properties().extendedInfo().databaseName()); - Assertions.assertEquals(1827615921, response.properties().extendedInfo().protectedItemsCount()); - Assertions.assertEquals(1177263124, response.properties().extendedInfo().protectedServersCount()); - Assertions.assertEquals(2102963892, response.properties().extendedInfo().diskCount()); - Assertions.assertEquals(59.55416383016519D, response.properties().extendedInfo().usedDiskSpace()); - Assertions.assertEquals(25.91979133659811D, response.properties().extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-15T09:04:24Z"), + Assertions.assertEquals("qgrvg", response.properties().friendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, response.properties().backupManagementType()); + Assertions.assertEquals("p", response.properties().registrationStatus()); + Assertions.assertEquals("dtsdfjy", response.properties().backupEngineState()); + Assertions.assertEquals("socwiqbuout", response.properties().healthStatus()); + Assertions.assertTrue(response.properties().canReRegister()); + Assertions.assertEquals("gleofjsbgbw", response.properties().backupEngineId()); + Assertions.assertEquals("vdajfwn", response.properties().dpmVersion()); + Assertions.assertEquals("fmaciqgjjrlhiq", response.properties().azureBackupAgentVersion()); + Assertions.assertFalse(response.properties().isAzureBackupAgentUpgradeAvailable()); + Assertions.assertTrue(response.properties().isDpmUpgradeAvailable()); + Assertions.assertEquals("ougu", response.properties().extendedInfo().databaseName()); + Assertions.assertEquals(124766447, response.properties().extendedInfo().protectedItemsCount()); + Assertions.assertEquals(1917543946, response.properties().extendedInfo().protectedServersCount()); + Assertions.assertEquals(2004089002, response.properties().extendedInfo().diskCount()); + Assertions.assertEquals(27.704443453218765D, response.properties().extendedInfo().usedDiskSpace()); + Assertions.assertEquals(86.57088869686356D, response.properties().extendedInfo().availableDiskSpace()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-07T04:07:32Z"), response.properties().extendedInfo().refreshedAt()); - Assertions.assertEquals(435710969, response.properties().extendedInfo().azureProtectedInstances()); - Assertions.assertEquals("hpriylfm", response.etag()); + Assertions.assertEquals(437555374, response.properties().extendedInfo().azureProtectedInstances()); + Assertions.assertEquals("lndbeaqbkixv", response.tags().get("lwynpbbfqvzfj")); + Assertions.assertEquals("pu", response.location()); + Assertions.assertEquals("feuzjljmphfkye", response.etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesListMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesListMockTests.java index ca8dd5e2e632..f60d53f0204b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesListMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -23,7 +23,7 @@ public final class BackupEnginesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"wxwjyofgwhnkb\",\"backupManagementType\":\"DefaultBackup\",\"registrationStatus\":\"jssmctsnldkpwo\",\"backupEngineState\":\"isubxbteog\",\"healthStatus\":\"fiijrykwlefksxqc\",\"canReRegister\":true,\"backupEngineId\":\"pxgnmqvzvluyqq\",\"dpmVersion\":\"ossscyva\",\"azureBackupAgentVersion\":\"ppuacvfyeowp\",\"isAzureBackupAgentUpgradeAvailable\":false,\"isDpmUpgradeAvailable\":false,\"extendedInfo\":{\"databaseName\":\"soy\",\"protectedItemsCount\":1900787139,\"protectedServersCount\":1322271071,\"diskCount\":1267233525,\"usedDiskSpace\":35.69199529736735,\"availableDiskSpace\":29.881511721660658,\"refreshedAt\":\"2021-10-30T08:29:43Z\",\"azureProtectedInstances\":1172847496}},\"eTag\":\"stkfvvdshxcdeds\",\"location\":\"enygnxcgjtfrnquk\",\"tags\":{\"mtbgwjdxwna\":\"nslnlrxsmyltrwnt\",\"etw\":\"kurrdreyzjwh\",\"kykcyqhyqqzz\":\"jwzzqseuzu\"},\"id\":\"c\",\"name\":\"keys\",\"type\":\"ewfopazdazg\"}]}"; + = "{\"value\":[{\"properties\":{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"cqwulynkgfcfd\",\"backupManagementType\":\"Invalid\",\"registrationStatus\":\"i\",\"backupEngineState\":\"xtclhuulriqbyok\",\"healthStatus\":\"gbzsxebrslt\",\"canReRegister\":true,\"backupEngineId\":\"cdjwsu\",\"dpmVersion\":\"r\",\"azureBackupAgentVersion\":\"agttpufpb\",\"isAzureBackupAgentUpgradeAvailable\":true,\"isDpmUpgradeAvailable\":true,\"extendedInfo\":{\"databaseName\":\"hujbfwxiplk\",\"protectedItemsCount\":411525724,\"protectedServersCount\":1637733291,\"diskCount\":255470380,\"usedDiskSpace\":61.106162249196096,\"availableDiskSpace\":65.33893746809161,\"refreshedAt\":\"2021-04-22T11:02:13Z\",\"azureProtectedInstances\":985533381}},\"tags\":{\"f\":\"tbbzj\",\"otjecohmxvvl\":\"huwzbxpcqzgi\"},\"location\":\"skapbxwie\",\"eTag\":\"uyader\",\"id\":\"fokyks\",\"name\":\"imyc\",\"type\":\"grvkcxzznnuif\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,36 +33,36 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.backupEngines() - .list("hilzzdzzq", "mueza", "ovribq", "otokhtvwtaznk", com.azure.core.util.Context.NONE); + .list("batecaat", "dohzniucbdaombwi", "njdllwktlepowavv", "xu", com.azure.core.util.Context.NONE); - Assertions.assertEquals("enygnxcgjtfrnquk", response.iterator().next().location()); - Assertions.assertEquals("nslnlrxsmyltrwnt", response.iterator().next().tags().get("mtbgwjdxwna")); - Assertions.assertEquals("wxwjyofgwhnkb", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, + Assertions.assertEquals("cqwulynkgfcfd", response.iterator().next().properties().friendlyName()); + Assertions.assertEquals(BackupManagementType.INVALID, response.iterator().next().properties().backupManagementType()); - Assertions.assertEquals("jssmctsnldkpwo", response.iterator().next().properties().registrationStatus()); - Assertions.assertEquals("isubxbteog", response.iterator().next().properties().backupEngineState()); - Assertions.assertEquals("fiijrykwlefksxqc", response.iterator().next().properties().healthStatus()); - Assertions.assertEquals(true, response.iterator().next().properties().canReRegister()); - Assertions.assertEquals("pxgnmqvzvluyqq", response.iterator().next().properties().backupEngineId()); - Assertions.assertEquals("ossscyva", response.iterator().next().properties().dpmVersion()); - Assertions.assertEquals("ppuacvfyeowp", response.iterator().next().properties().azureBackupAgentVersion()); - Assertions.assertEquals(false, response.iterator().next().properties().isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(false, response.iterator().next().properties().isDpmUpgradeAvailable()); - Assertions.assertEquals("soy", response.iterator().next().properties().extendedInfo().databaseName()); - Assertions.assertEquals(1900787139, + Assertions.assertEquals("i", response.iterator().next().properties().registrationStatus()); + Assertions.assertEquals("xtclhuulriqbyok", response.iterator().next().properties().backupEngineState()); + Assertions.assertEquals("gbzsxebrslt", response.iterator().next().properties().healthStatus()); + Assertions.assertTrue(response.iterator().next().properties().canReRegister()); + Assertions.assertEquals("cdjwsu", response.iterator().next().properties().backupEngineId()); + Assertions.assertEquals("r", response.iterator().next().properties().dpmVersion()); + Assertions.assertEquals("agttpufpb", response.iterator().next().properties().azureBackupAgentVersion()); + Assertions.assertTrue(response.iterator().next().properties().isAzureBackupAgentUpgradeAvailable()); + Assertions.assertTrue(response.iterator().next().properties().isDpmUpgradeAvailable()); + Assertions.assertEquals("hujbfwxiplk", response.iterator().next().properties().extendedInfo().databaseName()); + Assertions.assertEquals(411525724, response.iterator().next().properties().extendedInfo().protectedItemsCount()); - Assertions.assertEquals(1322271071, + Assertions.assertEquals(1637733291, response.iterator().next().properties().extendedInfo().protectedServersCount()); - Assertions.assertEquals(1267233525, response.iterator().next().properties().extendedInfo().diskCount()); - Assertions.assertEquals(35.69199529736735D, + Assertions.assertEquals(255470380, response.iterator().next().properties().extendedInfo().diskCount()); + Assertions.assertEquals(61.106162249196096D, response.iterator().next().properties().extendedInfo().usedDiskSpace()); - Assertions.assertEquals(29.881511721660658D, + Assertions.assertEquals(65.33893746809161D, response.iterator().next().properties().extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-30T08:29:43Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-04-22T11:02:13Z"), response.iterator().next().properties().extendedInfo().refreshedAt()); - Assertions.assertEquals(1172847496, + Assertions.assertEquals(985533381, response.iterator().next().properties().extendedInfo().azureProtectedInstances()); - Assertions.assertEquals("stkfvvdshxcdeds", response.iterator().next().etag()); + Assertions.assertEquals("tbbzj", response.iterator().next().tags().get("f")); + Assertions.assertEquals("skapbxwie", response.iterator().next().location()); + Assertions.assertEquals("uyader", response.iterator().next().etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupJobsListMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupJobsListMockTests.java index b575ac3af3dc..8d35e2f01686 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupJobsListMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupJobsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -23,7 +23,7 @@ public final class BackupJobsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"jobType\":\"Job\",\"entityFriendlyName\":\"falkzazm\",\"backupManagementType\":\"MAB\",\"operation\":\"dgjqafkmkro\",\"status\":\"rthqe\",\"startTime\":\"2021-05-02T21:02:12Z\",\"endTime\":\"2021-04-15T13:05:20Z\",\"activityId\":\"vaozn\"},\"eTag\":\"ixiezeag\",\"location\":\"ceituuge\",\"tags\":{\"tlzm\":\"pj\",\"eolctaebf\":\"lsyj\",\"jcustbvtq\":\"yrle\"},\"id\":\"gdxzvsgeafgfoseh\",\"name\":\"lzsxezppkk\",\"type\":\"aaeskyfjlpze\"}]}"; + = "{\"value\":[{\"properties\":{\"jobType\":\"Job\",\"entityFriendlyName\":\"jzgc\",\"backupManagementType\":\"MAB\",\"operation\":\"fpfbodetres\",\"status\":\"vtshuvf\",\"startTime\":\"2021-09-24T15:16:02Z\",\"endTime\":\"2021-01-07T02:46:58Z\",\"activityId\":\"uqk\"},\"tags\":{\"wwzjwotnxlkfhglh\":\"gjypanhxmpdxxze\",\"pcs\":\"foxqwecrsn\",\"pqibukklv\":\"lqxov\",\"mlccmetjscz\":\"rl\"},\"location\":\"fqbqnasd\",\"eTag\":\"enz\",\"id\":\"euscplhyv\",\"name\":\"gxlyzkxitdshezs\",\"type\":\"kol\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,20 +33,20 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.backupJobs().list("wljuxlkbectvt", "j", "skdchmaiubavl", "wp", com.azure.core.util.Context.NONE); + = manager.backupJobs().list("tezuug", "gzlf", "grdcgubsrtmdy", "perpi", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ceituuge", response.iterator().next().location()); - Assertions.assertEquals("pj", response.iterator().next().tags().get("tlzm")); - Assertions.assertEquals("falkzazm", response.iterator().next().properties().entityFriendlyName()); + Assertions.assertEquals("jzgc", response.iterator().next().properties().entityFriendlyName()); Assertions.assertEquals(BackupManagementType.MAB, response.iterator().next().properties().backupManagementType()); - Assertions.assertEquals("dgjqafkmkro", response.iterator().next().properties().operation()); - Assertions.assertEquals("rthqe", response.iterator().next().properties().status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-02T21:02:12Z"), + Assertions.assertEquals("fpfbodetres", response.iterator().next().properties().operation()); + Assertions.assertEquals("vtshuvf", response.iterator().next().properties().status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-24T15:16:02Z"), response.iterator().next().properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-15T13:05:20Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-01-07T02:46:58Z"), response.iterator().next().properties().endTime()); - Assertions.assertEquals("vaozn", response.iterator().next().properties().activityId()); - Assertions.assertEquals("ixiezeag", response.iterator().next().etag()); + Assertions.assertEquals("uqk", response.iterator().next().properties().activityId()); + Assertions.assertEquals("gjypanhxmpdxxze", response.iterator().next().tags().get("wwzjwotnxlkfhglh")); + Assertions.assertEquals("fqbqnasd", response.iterator().next().location()); + Assertions.assertEquals("enz", response.iterator().next().etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupManagementUsageInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupManagementUsageInnerTests.java index c5097447961c..d82c8af1c8a5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupManagementUsageInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupManagementUsageInnerTests.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupManagementUsageInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.NameInfo; import com.azure.resourcemanager.recoveryservicesbackup.models.UsagesUnit; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -15,32 +14,14 @@ public final class BackupManagementUsageInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupManagementUsageInner model = BinaryData.fromString( - "{\"unit\":\"Count\",\"quotaPeriod\":\"dvkaozw\",\"nextResetTime\":\"2021-02-22T11:39:16Z\",\"currentValue\":4625530429549295340,\"limit\":4205096906528038378,\"name\":{\"value\":\"k\",\"localizedValue\":\"yxolniwp\"}}") + "{\"unit\":\"Count\",\"quotaPeriod\":\"zs\",\"nextResetTime\":\"2021-02-27T19:41:03Z\",\"currentValue\":2697008716276129011,\"limit\":4088709833204487864,\"name\":{\"value\":\"srsx\",\"localizedValue\":\"plbjaze\"}}") .toObject(BackupManagementUsageInner.class); Assertions.assertEquals(UsagesUnit.COUNT, model.unit()); - Assertions.assertEquals("dvkaozw", model.quotaPeriod()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-22T11:39:16Z"), model.nextResetTime()); - Assertions.assertEquals(4625530429549295340L, model.currentValue()); - Assertions.assertEquals(4205096906528038378L, model.limit()); - Assertions.assertEquals("k", model.name().value()); - Assertions.assertEquals("yxolniwp", model.name().localizedValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupManagementUsageInner model = new BackupManagementUsageInner().withUnit(UsagesUnit.COUNT) - .withQuotaPeriod("dvkaozw") - .withNextResetTime(OffsetDateTime.parse("2021-02-22T11:39:16Z")) - .withCurrentValue(4625530429549295340L) - .withLimit(4205096906528038378L) - .withName(new NameInfo().withValue("k").withLocalizedValue("yxolniwp")); - model = BinaryData.fromObject(model).toObject(BackupManagementUsageInner.class); - Assertions.assertEquals(UsagesUnit.COUNT, model.unit()); - Assertions.assertEquals("dvkaozw", model.quotaPeriod()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-22T11:39:16Z"), model.nextResetTime()); - Assertions.assertEquals(4625530429549295340L, model.currentValue()); - Assertions.assertEquals(4205096906528038378L, model.limit()); - Assertions.assertEquals("k", model.name().value()); - Assertions.assertEquals("yxolniwp", model.name().localizedValue()); + Assertions.assertEquals("zs", model.quotaPeriod()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-27T19:41:03Z"), model.nextResetTime()); + Assertions.assertEquals(2697008716276129011L, model.currentValue()); + Assertions.assertEquals(4088709833204487864L, model.limit()); + Assertions.assertEquals("srsx", model.name().value()); + Assertions.assertEquals("plbjaze", model.name().localizedValue()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupManagementUsageListTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupManagementUsageListTests.java index ddb8075a7c0a..986d4c89b5e4 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupManagementUsageListTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupManagementUsageListTests.java @@ -1,61 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupManagementUsageInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementUsageList; -import com.azure.resourcemanager.recoveryservicesbackup.models.NameInfo; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.BackupManagementUsageList; import com.azure.resourcemanager.recoveryservicesbackup.models.UsagesUnit; import java.time.OffsetDateTime; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class BackupManagementUsageListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupManagementUsageList model = BinaryData.fromString( - "{\"value\":[{\"unit\":\"Percent\",\"quotaPeriod\":\"ouskcqvkocrc\",\"nextResetTime\":\"2021-02-11T18:18:15Z\",\"currentValue\":5768373522529510794,\"limit\":104740040232311726,\"name\":{\"value\":\"biksq\",\"localizedValue\":\"lssai\"}},{\"unit\":\"CountPerSecond\",\"quotaPeriod\":\"wnzlljfmppeeb\",\"nextResetTime\":\"2021-11-23T16:03:48Z\",\"currentValue\":8457329254467091392,\"limit\":1088287690642884629,\"name\":{\"value\":\"uujitcjc\",\"localizedValue\":\"zevndhkrwpdappds\"}},{\"unit\":\"Percent\",\"quotaPeriod\":\"wrwjfeu\",\"nextResetTime\":\"2021-11-14T12:39:29Z\",\"currentValue\":5558562364469410639,\"limit\":7488631932267615574,\"name\":{\"value\":\"ldhugjzzdatqxh\",\"localizedValue\":\"dgeablgphu\"}}]}") + "{\"value\":[{\"unit\":\"Count\",\"quotaPeriod\":\"ek\",\"nextResetTime\":\"2021-01-20T04:18:54Z\",\"currentValue\":1114182945151696420,\"limit\":8589009432918484089,\"name\":{\"value\":\"hjvyklxeslkhhus\",\"localizedValue\":\"poq\"}},{\"unit\":\"Count\",\"quotaPeriod\":\"wqjwgok\",\"nextResetTime\":\"2021-03-20T05:15:41Z\",\"currentValue\":1870976257481605246,\"limit\":5973852593865294798,\"name\":{\"value\":\"fdb\",\"localizedValue\":\"bztensvkzykjtj\"}},{\"unit\":\"Bytes\",\"quotaPeriod\":\"fwushcdpkupn\",\"nextResetTime\":\"2021-07-09T13:07:25Z\",\"currentValue\":3933432846103872714,\"limit\":2070672237916629742,\"name\":{\"value\":\"xeoio\",\"localizedValue\":\"izfavkjzwf\"}}],\"nextLink\":\"yay\"}") .toObject(BackupManagementUsageList.class); - Assertions.assertEquals(UsagesUnit.PERCENT, model.value().get(0).unit()); - Assertions.assertEquals("ouskcqvkocrc", model.value().get(0).quotaPeriod()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-11T18:18:15Z"), model.value().get(0).nextResetTime()); - Assertions.assertEquals(5768373522529510794L, model.value().get(0).currentValue()); - Assertions.assertEquals(104740040232311726L, model.value().get(0).limit()); - Assertions.assertEquals("biksq", model.value().get(0).name().value()); - Assertions.assertEquals("lssai", model.value().get(0).name().localizedValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupManagementUsageList model = new BackupManagementUsageList().withValue(Arrays.asList( - new BackupManagementUsageInner().withUnit(UsagesUnit.PERCENT) - .withQuotaPeriod("ouskcqvkocrc") - .withNextResetTime(OffsetDateTime.parse("2021-02-11T18:18:15Z")) - .withCurrentValue(5768373522529510794L) - .withLimit(104740040232311726L) - .withName(new NameInfo().withValue("biksq").withLocalizedValue("lssai")), - new BackupManagementUsageInner().withUnit(UsagesUnit.COUNT_PER_SECOND) - .withQuotaPeriod("wnzlljfmppeeb") - .withNextResetTime(OffsetDateTime.parse("2021-11-23T16:03:48Z")) - .withCurrentValue(8457329254467091392L) - .withLimit(1088287690642884629L) - .withName(new NameInfo().withValue("uujitcjc").withLocalizedValue("zevndhkrwpdappds")), - new BackupManagementUsageInner().withUnit(UsagesUnit.PERCENT) - .withQuotaPeriod("wrwjfeu") - .withNextResetTime(OffsetDateTime.parse("2021-11-14T12:39:29Z")) - .withCurrentValue(5558562364469410639L) - .withLimit(7488631932267615574L) - .withName(new NameInfo().withValue("ldhugjzzdatqxh").withLocalizedValue("dgeablgphu")))); - model = BinaryData.fromObject(model).toObject(BackupManagementUsageList.class); - Assertions.assertEquals(UsagesUnit.PERCENT, model.value().get(0).unit()); - Assertions.assertEquals("ouskcqvkocrc", model.value().get(0).quotaPeriod()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-11T18:18:15Z"), model.value().get(0).nextResetTime()); - Assertions.assertEquals(5768373522529510794L, model.value().get(0).currentValue()); - Assertions.assertEquals(104740040232311726L, model.value().get(0).limit()); - Assertions.assertEquals("biksq", model.value().get(0).name().value()); - Assertions.assertEquals("lssai", model.value().get(0).name().localizedValue()); + Assertions.assertEquals("yay", model.nextLink()); + Assertions.assertEquals(UsagesUnit.COUNT, model.value().get(0).unit()); + Assertions.assertEquals("ek", model.value().get(0).quotaPeriod()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T04:18:54Z"), model.value().get(0).nextResetTime()); + Assertions.assertEquals(1114182945151696420L, model.value().get(0).currentValue()); + Assertions.assertEquals(8589009432918484089L, model.value().get(0).limit()); + Assertions.assertEquals("hjvyklxeslkhhus", model.value().get(0).name().value()); + Assertions.assertEquals("poq", model.value().get(0).name().localizedValue()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupOperationResultsGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupOperationResultsGetWithResponseMockTests.java index adfe06637860..0408fbd4c5ec 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupOperationResultsGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupOperationResultsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -27,8 +27,7 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.backupOperationResults() - .getWithResponse("bfokxkhu", "ze", "ufgjblcdr", com.azure.core.util.Context.NONE); + manager.backupOperationResults().getWithResponse("tnp", "facqo", "cqrq", com.azure.core.util.Context.NONE); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupPoliciesListMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupPoliciesListMockTests.java index 1527883b8a5d..d231f31a524e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupPoliciesListMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupPoliciesListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -22,7 +22,7 @@ public final class BackupPoliciesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":940682362,\"resourceGuardOperationRequests\":[\"vyoanfbcswqagywv\",\"xigvjrktpgaeuk\"]},\"eTag\":\"wohpmwhqnucs\",\"location\":\"lhsidsjtdl\",\"tags\":{\"e\":\"injgazlsvbzfcpuo\",\"krdre\":\"wjcciklhsy\",\"h\":\"xolriy\"},\"id\":\"beivdlhydwbdbfg\",\"name\":\"lpu\",\"type\":\"ytjlkesmmpath\"}]}"; + = "{\"value\":[{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":1498510573,\"resourceGuardOperationRequests\":[\"ibz\",\"ihweeb\"]},\"tags\":{\"jw\":\"ryv\",\"qsratjhd\":\"w\",\"gv\":\"zybspijhfrzgdkk\",\"zhwilzzh\":\"ukhsusmmorf\"},\"location\":\"jmriprlkdneyttlr\",\"eTag\":\"ivcbkutpumltwj\",\"id\":\"uxynb\",\"name\":\"vzlqywa\",\"type\":\"y\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,14 +31,13 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.backupPolicies().list("leqioulndh", "yoeojhtollhs", "idmytzln", com.azure.core.util.Context.NONE); + PagedIterable response = manager.backupPolicies() + .list("vsi", "ieswhddzydisn", "epywyjlnldpxottd", com.azure.core.util.Context.NONE); - Assertions.assertEquals("lhsidsjtdl", response.iterator().next().location()); - Assertions.assertEquals("injgazlsvbzfcpuo", response.iterator().next().tags().get("e")); - Assertions.assertEquals(940682362, response.iterator().next().properties().protectedItemsCount()); - Assertions.assertEquals("vyoanfbcswqagywv", - response.iterator().next().properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("wohpmwhqnucs", response.iterator().next().etag()); + Assertions.assertEquals(1498510573, response.iterator().next().properties().protectedItemsCount()); + Assertions.assertEquals("ibz", response.iterator().next().properties().resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("ryv", response.iterator().next().tags().get("jw")); + Assertions.assertEquals("jmriprlkdneyttlr", response.iterator().next().location()); + Assertions.assertEquals("ivcbkutpumltwj", response.iterator().next().etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectableItemsListMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectableItemsListMockTests.java index 0b3bde94e9cb..8484a7fd8f32 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectableItemsListMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectableItemsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -23,7 +23,7 @@ public final class BackupProtectableItemsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"ektm\",\"workloadType\":\"z\",\"friendlyName\":\"tzamicbig\",\"protectionState\":\"ProtectionFailed\"},\"eTag\":\"zseznuxkeuairaa\",\"location\":\"m\",\"tags\":{\"z\":\"jbedpfixlhupmomi\",\"yxelyicghflr\":\"dnpxpkcdpr\",\"yghsf\":\"fss\"},\"id\":\"rkbhammgmqfm\",\"name\":\"fgvqcpdw\",\"type\":\"gquxweysland\"}]}"; + = "{\"value\":[{\"location\":\"sfzjuegrhrhtsle\",\"tags\":{\"vgjbfio\":\"xjn\",\"odfcbjq\":\"pn\"},\"eTag\":\"mtqsmoxsazu\",\"properties\":{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"gwecywnfysz\",\"workloadType\":\"czs\",\"friendlyName\":\"q\",\"protectionState\":\"Protected\"},\"id\":\"dbbo\",\"name\":\"syvrmkjmyitr\",\"type\":\"hwudlxeei\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,14 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.backupProtectableItems() - .list("gejkbvhh", "aurghooxa", "xb", "hxjxjoezlqxrkdkn", com.azure.core.util.Context.NONE); + .list("dsaidjanormovdxx", "rntu", "moil", "nwemhdeeljslkyo", com.azure.core.util.Context.NONE); - Assertions.assertEquals("m", response.iterator().next().location()); - Assertions.assertEquals("jbedpfixlhupmomi", response.iterator().next().tags().get("z")); - Assertions.assertEquals("ektm", response.iterator().next().properties().backupManagementType()); - Assertions.assertEquals("z", response.iterator().next().properties().workloadType()); - Assertions.assertEquals("tzamicbig", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, - response.iterator().next().properties().protectionState()); - Assertions.assertEquals("zseznuxkeuairaa", response.iterator().next().etag()); + Assertions.assertEquals("sfzjuegrhrhtsle", response.iterator().next().location()); + Assertions.assertEquals("xjn", response.iterator().next().tags().get("vgjbfio")); + Assertions.assertEquals("mtqsmoxsazu", response.iterator().next().eTag()); + Assertions.assertEquals("gwecywnfysz", response.iterator().next().properties().backupManagementType()); + Assertions.assertEquals("czs", response.iterator().next().properties().workloadType()); + Assertions.assertEquals("q", response.iterator().next().properties().friendlyName()); + Assertions.assertEquals(ProtectionStatus.PROTECTED, response.iterator().next().properties().protectionState()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectedItemsListMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectedItemsListMockTests.java index e379b2ad92f8..8e55b82ff328 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectedItemsListMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectedItemsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,6 +13,8 @@ import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; import com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItemResource; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanStatus; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanSummary; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -23,7 +25,7 @@ public final class BackupProtectedItemsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"AzureSql\",\"workloadType\":\"SAPHanaDatabase\",\"containerName\":\"zigjsugswhgsaodk\",\"sourceResourceId\":\"nbafoctohzhaquvw\",\"policyId\":\"bgnvkervqchoadh\",\"lastRecoveryPoint\":\"2021-08-01T05:25:40Z\",\"backupSetName\":\"vzvsp\",\"createMode\":\"Invalid\",\"deferredDeleteTimeInUTC\":\"2021-05-04T06:55:22Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"jglzrsubklrxhjnl\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"qyd\"],\"isArchiveEnabled\":false,\"policyName\":\"kw\",\"softDeleteRetentionPeriodInDays\":1514056295,\"vaultId\":\"dxvqzxoe\"},\"eTag\":\"gjxb\",\"location\":\"banbaupwtzv\",\"tags\":{\"jplssan\":\"lozkxbzrp\",\"s\":\"tttk\"},\"id\":\"xunrswgkpjhboy\",\"name\":\"kebhuhkslgw\",\"type\":\"okhu\"}]}"; + = "{\"value\":[{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"Invalid\",\"workloadType\":\"GenericDataSource\",\"containerName\":\"obygoo\",\"sourceResourceId\":\"qa\",\"policyId\":\"xv\",\"lastRecoveryPoint\":\"2021-10-26T16:17:33Z\",\"backupSetName\":\"fucsaodjnosdkvi\",\"createMode\":\"Recover\",\"deferredDeleteTimeInUTC\":\"2021-06-08T21:08:28Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"rnzpducdaak\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"oimyfpqd\"],\"isArchiveEnabled\":false,\"policyName\":\"pnw\",\"softDeleteRetentionPeriodInDays\":907870780,\"vaultId\":\"vpctfj\",\"sourceSideScanInfo\":{\"sourceSideScanStatus\":\"Configured\",\"sourceSideScanSummary\":\"NotApplicable\"}},\"tags\":{\"ejjk\":\"uhznwhvuldbk\",\"azmxjqi\":\"igaw\",\"jjsbcmlzaahzbhur\":\"h\",\"lirh\":\"olk\"},\"location\":\"ojusuzgfjzcva\",\"eTag\":\"oialahfxwccokdx\",\"id\":\"kmkcz\",\"name\":\"nuhhoqeqshav\",\"type\":\"jqkx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,29 +34,33 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.backupProtectedItems().list("eivbvz", "pbwxgoooxz", "rad", "s", com.azure.core.util.Context.NONE); + PagedIterable response = manager.backupProtectedItems() + .list("dcvxodkrvfsxxby", "e", "qlvge", "pwgoljt", com.azure.core.util.Context.NONE); - Assertions.assertEquals("banbaupwtzv", response.iterator().next().location()); - Assertions.assertEquals("lozkxbzrp", response.iterator().next().tags().get("jplssan")); - Assertions.assertEquals("zigjsugswhgsaodk", response.iterator().next().properties().containerName()); - Assertions.assertEquals("nbafoctohzhaquvw", response.iterator().next().properties().sourceResourceId()); - Assertions.assertEquals("bgnvkervqchoadh", response.iterator().next().properties().policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-01T05:25:40Z"), + Assertions.assertEquals("obygoo", response.iterator().next().properties().containerName()); + Assertions.assertEquals("qa", response.iterator().next().properties().sourceResourceId()); + Assertions.assertEquals("xv", response.iterator().next().properties().policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-26T16:17:33Z"), response.iterator().next().properties().lastRecoveryPoint()); - Assertions.assertEquals("vzvsp", response.iterator().next().properties().backupSetName()); - Assertions.assertEquals(CreateMode.INVALID, response.iterator().next().properties().createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-04T06:55:22Z"), + Assertions.assertEquals("fucsaodjnosdkvi", response.iterator().next().properties().backupSetName()); + Assertions.assertEquals(CreateMode.RECOVER, response.iterator().next().properties().createMode()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-08T21:08:28Z"), response.iterator().next().properties().deferredDeleteTimeInUtc()); - Assertions.assertEquals(true, response.iterator().next().properties().isScheduledForDeferredDelete()); - Assertions.assertEquals("jglzrsubklrxhjnl", - response.iterator().next().properties().deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, response.iterator().next().properties().isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, response.iterator().next().properties().isRehydrate()); - Assertions.assertEquals("qyd", response.iterator().next().properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, response.iterator().next().properties().isArchiveEnabled()); - Assertions.assertEquals("kw", response.iterator().next().properties().policyName()); - Assertions.assertEquals(1514056295, response.iterator().next().properties().softDeleteRetentionPeriod()); - Assertions.assertEquals("gjxb", response.iterator().next().etag()); + Assertions.assertTrue(response.iterator().next().properties().isScheduledForDeferredDelete()); + Assertions.assertEquals("rnzpducdaak", response.iterator().next().properties().deferredDeleteTimeRemaining()); + Assertions.assertTrue(response.iterator().next().properties().isDeferredDeleteScheduleUpcoming()); + Assertions.assertFalse(response.iterator().next().properties().isRehydrate()); + Assertions.assertEquals("oimyfpqd", + response.iterator().next().properties().resourceGuardOperationRequests().get(0)); + Assertions.assertFalse(response.iterator().next().properties().isArchiveEnabled()); + Assertions.assertEquals("pnw", response.iterator().next().properties().policyName()); + Assertions.assertEquals(907870780, response.iterator().next().properties().softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.CONFIGURED, + response.iterator().next().properties().sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.NOT_APPLICABLE, + response.iterator().next().properties().sourceSideScanInfo().sourceSideScanSummary()); + Assertions.assertEquals("uhznwhvuldbk", response.iterator().next().tags().get("ejjk")); + Assertions.assertEquals("ojusuzgfjzcva", response.iterator().next().location()); + Assertions.assertEquals("oialahfxwccokdx", response.iterator().next().etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionContainersListMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionContainersListMockTests.java index 0947a501a345..c05c562685cf 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionContainersListMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionContainersListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -23,7 +23,7 @@ public final class BackupProtectionContainersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"eimseobfsxstcyil\",\"backupManagementType\":\"AzureSql\",\"registrationStatus\":\"mxcjzlquzexokjx\",\"healthStatus\":\"jvbzinzabwmvog\",\"protectableObjectType\":\"svlpgidn\"},\"eTag\":\"ehaqidoyzltgio\",\"location\":\"qoqpepiaeap\",\"tags\":{\"pqqncju\":\"rgdtpeqnacyheqw\",\"ymc\":\"khjoz\",\"upyvqyvliq\":\"m\"},\"id\":\"ipsejbsvsia\",\"name\":\"eswhd\",\"type\":\"zydisnuep\"}]}"; + = "{\"value\":[{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"mypgfqvmty\",\"backupManagementType\":\"AzureStorage\",\"registrationStatus\":\"kxp\",\"healthStatus\":\"pewpyj\",\"protectableObjectType\":\"xampqcr\"},\"tags\":{\"qdtadrakgdd\":\"uqxbpiatwfauje\",\"txqfpjbq\":\"jkrukizyhgsqtnqs\",\"dmncgbf\":\"gweeiwd\"},\"location\":\"scstunmlhxd\",\"eTag\":\"klciichgjsysm\",\"id\":\"o\",\"name\":\"gwxfkzsi\",\"type\":\"cuvbdujgcwxvec\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,16 +33,16 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.backupProtectionContainers() - .list("dcdjhunh", "hcgawn", "rnquoxso", com.azure.core.util.Context.NONE); + .list("tpmnoe", "hqlfmsib", "oyrfgxk", com.azure.core.util.Context.NONE); - Assertions.assertEquals("qoqpepiaeap", response.iterator().next().location()); - Assertions.assertEquals("rgdtpeqnacyheqw", response.iterator().next().tags().get("pqqncju")); - Assertions.assertEquals("eimseobfsxstcyil", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_SQL, + Assertions.assertEquals("mypgfqvmty", response.iterator().next().properties().friendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_STORAGE, response.iterator().next().properties().backupManagementType()); - Assertions.assertEquals("mxcjzlquzexokjx", response.iterator().next().properties().registrationStatus()); - Assertions.assertEquals("jvbzinzabwmvog", response.iterator().next().properties().healthStatus()); - Assertions.assertEquals("svlpgidn", response.iterator().next().properties().protectableObjectType()); - Assertions.assertEquals("ehaqidoyzltgio", response.iterator().next().etag()); + Assertions.assertEquals("kxp", response.iterator().next().properties().registrationStatus()); + Assertions.assertEquals("pewpyj", response.iterator().next().properties().healthStatus()); + Assertions.assertEquals("xampqcr", response.iterator().next().properties().protectableObjectType()); + Assertions.assertEquals("uqxbpiatwfauje", response.iterator().next().tags().get("qdtadrakgdd")); + Assertions.assertEquals("scstunmlhxd", response.iterator().next().location()); + Assertions.assertEquals("klciichgjsysm", response.iterator().next().etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionIntentsListMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionIntentsListMockTests.java index d795d0c058f5..14d317985d16 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionIntentsListMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionIntentsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -24,7 +24,7 @@ public final class BackupProtectionIntentsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"MAB\",\"sourceResourceId\":\"hykinc\",\"itemId\":\"emehllizh\",\"policyId\":\"umoqodkad\",\"protectionState\":\"Protected\"},\"eTag\":\"bngqladywrx\",\"location\":\"hydt\",\"tags\":{\"uyem\":\"vadswzs\",\"xlnwyrmouvblgmo\":\"owuowh\"},\"id\":\"zkltrfowtdvrfmv\",\"name\":\"ih\",\"type\":\"vjdrqcrjidhftuk\"}]}"; + = "{\"value\":[{\"properties\":{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"AzureWorkload\",\"sourceResourceId\":\"fmuad\",\"itemId\":\"fsn\",\"policyId\":\"kiioshj\",\"protectionState\":\"Invalid\"},\"tags\":{\"j\":\"ybnxgztlcgc\",\"ywjzebecuvlbefvw\":\"hfjv\",\"wpsyxjij\":\"ljkxpylrwoxz\",\"qwjxi\":\"ypdvrbkerdkdkga\"},\"location\":\"fkcefeygz\",\"eTag\":\"jo\",\"id\":\"fmn\",\"name\":\"ybdjnxumentq\",\"type\":\"ntwhymxymulwiv\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,17 +34,16 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.backupProtectionIntents() - .list("ydkygywezskieca", "ygzmxieqvdsmak", "ixqcahyhxalybxaw", "ijpodtblxpkkwj", - com.azure.core.util.Context.NONE); + .list("bccwkqmtxapeqi", "crpilgftrq", "ejdaahuqimld", "hlf", com.azure.core.util.Context.NONE); - Assertions.assertEquals("hydt", response.iterator().next().location()); - Assertions.assertEquals("vadswzs", response.iterator().next().tags().get("uyem")); - Assertions.assertEquals(BackupManagementType.MAB, + Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, response.iterator().next().properties().backupManagementType()); - Assertions.assertEquals("hykinc", response.iterator().next().properties().sourceResourceId()); - Assertions.assertEquals("emehllizh", response.iterator().next().properties().itemId()); - Assertions.assertEquals("umoqodkad", response.iterator().next().properties().policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, response.iterator().next().properties().protectionState()); - Assertions.assertEquals("bngqladywrx", response.iterator().next().etag()); + Assertions.assertEquals("fmuad", response.iterator().next().properties().sourceResourceId()); + Assertions.assertEquals("fsn", response.iterator().next().properties().itemId()); + Assertions.assertEquals("kiioshj", response.iterator().next().properties().policyId()); + Assertions.assertEquals(ProtectionStatus.INVALID, response.iterator().next().properties().protectionState()); + Assertions.assertEquals("ybnxgztlcgc", response.iterator().next().tags().get("j")); + Assertions.assertEquals("fkcefeygz", response.iterator().next().location()); + Assertions.assertEquals("jo", response.iterator().next().etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupRequestResourceTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupRequestResourceTests.java index 12b4d623cb58..9787dd341bc5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupRequestResourceTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupRequestResourceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -15,23 +15,23 @@ public final class BackupRequestResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupRequestResource model = BinaryData.fromString( - "{\"properties\":{\"objectType\":\"BackupRequest\"},\"eTag\":\"pnqi\",\"location\":\"vinvkj\",\"tags\":{\"hmlwpaztzpo\":\"xrbuukzclew\",\"fz\":\"ncckw\",\"feqztppriol\":\"whxxbuyqax\"},\"id\":\"or\",\"name\":\"altol\",\"type\":\"ncwsob\"}") + "{\"location\":\"crpab\",\"tags\":{\"qugxywpmueefjzwf\":\"psbjta\",\"glaocq\":\"kqujidsuyono\",\"g\":\"tcc\"},\"eTag\":\"dxyt\",\"properties\":{\"objectType\":\"BackupRequest\"},\"id\":\"yrxvwfudwpznt\",\"name\":\"hdzhlrqj\",\"type\":\"hckfrlhrx\"}") .toObject(BackupRequestResource.class); - Assertions.assertEquals("vinvkj", model.location()); - Assertions.assertEquals("xrbuukzclew", model.tags().get("hmlwpaztzpo")); - Assertions.assertEquals("pnqi", model.etag()); + Assertions.assertEquals("crpab", model.location()); + Assertions.assertEquals("psbjta", model.tags().get("qugxywpmueefjzwf")); + Assertions.assertEquals("dxyt", model.eTag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupRequestResource model = new BackupRequestResource().withLocation("vinvkj") - .withTags(mapOf("hmlwpaztzpo", "xrbuukzclew", "fz", "ncckw", "feqztppriol", "whxxbuyqax")) - .withProperties(new BackupRequest()) - .withEtag("pnqi"); + BackupRequestResource model = new BackupRequestResource().withLocation("crpab") + .withTags(mapOf("qugxywpmueefjzwf", "psbjta", "glaocq", "kqujidsuyono", "g", "tcc")) + .withETag("dxyt") + .withProperties(new BackupRequest()); model = BinaryData.fromObject(model).toObject(BackupRequestResource.class); - Assertions.assertEquals("vinvkj", model.location()); - Assertions.assertEquals("xrbuukzclew", model.tags().get("hmlwpaztzpo")); - Assertions.assertEquals("pnqi", model.etag()); + Assertions.assertEquals("crpab", model.location()); + Assertions.assertEquals("psbjta", model.tags().get("qugxywpmueefjzwf")); + Assertions.assertEquals("dxyt", model.eTag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupRequestTests.java index a6d9e486f899..f75a8c8db8da 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceConfigResourceInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceConfigResourceInnerTests.java index b7144283bc81..ee7ded605ce6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceConfigResourceInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceConfigResourceInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -19,40 +19,41 @@ public final class BackupResourceConfigResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupResourceConfigResourceInner model = BinaryData.fromString( - "{\"properties\":{\"storageModelType\":\"Invalid\",\"storageType\":\"ZoneRedundant\",\"storageTypeState\":\"Invalid\",\"crossRegionRestoreFlag\":false,\"dedupState\":\"Invalid\",\"xcoolState\":\"Disabled\"},\"eTag\":\"m\",\"location\":\"hmtzopbsphrup\",\"tags\":{\"ycm\":\"sybbejhph\",\"htbmuf\":\"xaobhdxbmtqioqjz\",\"rxybqsoq\":\"ownoizhw\"},\"id\":\"jgkdmbpazlobcu\",\"name\":\"pdznrbtcqqjnqgl\",\"type\":\"qgn\"}") + "{\"properties\":{\"storageModelType\":\"ReadAccessGeoZoneRedundant\",\"storageType\":\"Invalid\",\"storageTypeState\":\"Invalid\",\"crossRegionRestoreFlag\":false,\"dedupState\":\"Invalid\",\"xcoolState\":\"Invalid\"},\"tags\":{\"l\":\"erkujys\"},\"location\":\"uvfqawrlyxwj\",\"eTag\":\"prbnwbxgjvtbv\",\"id\":\"sszdnru\",\"name\":\"qguhmuo\",\"type\":\"qfprwzwbn\"}") .toObject(BackupResourceConfigResourceInner.class); - Assertions.assertEquals("hmtzopbsphrup", model.location()); - Assertions.assertEquals("sybbejhph", model.tags().get("ycm")); - Assertions.assertEquals(StorageType.INVALID, model.properties().storageModelType()); - Assertions.assertEquals(StorageType.ZONE_REDUNDANT, model.properties().storageType()); + Assertions.assertEquals(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT, model.properties().storageModelType()); + Assertions.assertEquals(StorageType.INVALID, model.properties().storageType()); Assertions.assertEquals(StorageTypeState.INVALID, model.properties().storageTypeState()); - Assertions.assertEquals(false, model.properties().crossRegionRestoreFlag()); + Assertions.assertFalse(model.properties().crossRegionRestoreFlag()); Assertions.assertEquals(DedupState.INVALID, model.properties().dedupState()); - Assertions.assertEquals(XcoolState.DISABLED, model.properties().xcoolState()); - Assertions.assertEquals("m", model.etag()); + Assertions.assertEquals(XcoolState.INVALID, model.properties().xcoolState()); + Assertions.assertEquals("erkujys", model.tags().get("l")); + Assertions.assertEquals("uvfqawrlyxwj", model.location()); + Assertions.assertEquals("prbnwbxgjvtbv", model.etag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupResourceConfigResourceInner model = new BackupResourceConfigResourceInner().withLocation("hmtzopbsphrup") - .withTags(mapOf("ycm", "sybbejhph", "htbmuf", "xaobhdxbmtqioqjz", "rxybqsoq", "ownoizhw")) - .withProperties(new BackupResourceConfig().withStorageModelType(StorageType.INVALID) - .withStorageType(StorageType.ZONE_REDUNDANT) + BackupResourceConfigResourceInner model = new BackupResourceConfigResourceInner() + .withProperties(new BackupResourceConfig().withStorageModelType(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT) + .withStorageType(StorageType.INVALID) .withStorageTypeState(StorageTypeState.INVALID) .withCrossRegionRestoreFlag(false) .withDedupState(DedupState.INVALID) - .withXcoolState(XcoolState.DISABLED)) - .withEtag("m"); + .withXcoolState(XcoolState.INVALID)) + .withTags(mapOf("l", "erkujys")) + .withLocation("uvfqawrlyxwj") + .withEtag("prbnwbxgjvtbv"); model = BinaryData.fromObject(model).toObject(BackupResourceConfigResourceInner.class); - Assertions.assertEquals("hmtzopbsphrup", model.location()); - Assertions.assertEquals("sybbejhph", model.tags().get("ycm")); - Assertions.assertEquals(StorageType.INVALID, model.properties().storageModelType()); - Assertions.assertEquals(StorageType.ZONE_REDUNDANT, model.properties().storageType()); + Assertions.assertEquals(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT, model.properties().storageModelType()); + Assertions.assertEquals(StorageType.INVALID, model.properties().storageType()); Assertions.assertEquals(StorageTypeState.INVALID, model.properties().storageTypeState()); - Assertions.assertEquals(false, model.properties().crossRegionRestoreFlag()); + Assertions.assertFalse(model.properties().crossRegionRestoreFlag()); Assertions.assertEquals(DedupState.INVALID, model.properties().dedupState()); - Assertions.assertEquals(XcoolState.DISABLED, model.properties().xcoolState()); - Assertions.assertEquals("m", model.etag()); + Assertions.assertEquals(XcoolState.INVALID, model.properties().xcoolState()); + Assertions.assertEquals("erkujys", model.tags().get("l")); + Assertions.assertEquals("uvfqawrlyxwj", model.location()); + Assertions.assertEquals("prbnwbxgjvtbv", model.etag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceConfigTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceConfigTests.java index f034d00b3eb3..2f6b7e87189c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceConfigTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceConfigTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -16,30 +16,30 @@ public final class BackupResourceConfigTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupResourceConfig model = BinaryData.fromString( - "{\"storageModelType\":\"Invalid\",\"storageType\":\"GeoRedundant\",\"storageTypeState\":\"Unlocked\",\"crossRegionRestoreFlag\":true,\"dedupState\":\"Enabled\",\"xcoolState\":\"Invalid\"}") + "{\"storageModelType\":\"LocallyRedundant\",\"storageType\":\"ReadAccessGeoZoneRedundant\",\"storageTypeState\":\"Invalid\",\"crossRegionRestoreFlag\":false,\"dedupState\":\"Invalid\",\"xcoolState\":\"Disabled\"}") .toObject(BackupResourceConfig.class); - Assertions.assertEquals(StorageType.INVALID, model.storageModelType()); - Assertions.assertEquals(StorageType.GEO_REDUNDANT, model.storageType()); - Assertions.assertEquals(StorageTypeState.UNLOCKED, model.storageTypeState()); - Assertions.assertEquals(true, model.crossRegionRestoreFlag()); - Assertions.assertEquals(DedupState.ENABLED, model.dedupState()); - Assertions.assertEquals(XcoolState.INVALID, model.xcoolState()); + Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, model.storageModelType()); + Assertions.assertEquals(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT, model.storageType()); + Assertions.assertEquals(StorageTypeState.INVALID, model.storageTypeState()); + Assertions.assertFalse(model.crossRegionRestoreFlag()); + Assertions.assertEquals(DedupState.INVALID, model.dedupState()); + Assertions.assertEquals(XcoolState.DISABLED, model.xcoolState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupResourceConfig model = new BackupResourceConfig().withStorageModelType(StorageType.INVALID) - .withStorageType(StorageType.GEO_REDUNDANT) - .withStorageTypeState(StorageTypeState.UNLOCKED) - .withCrossRegionRestoreFlag(true) - .withDedupState(DedupState.ENABLED) - .withXcoolState(XcoolState.INVALID); + BackupResourceConfig model = new BackupResourceConfig().withStorageModelType(StorageType.LOCALLY_REDUNDANT) + .withStorageType(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT) + .withStorageTypeState(StorageTypeState.INVALID) + .withCrossRegionRestoreFlag(false) + .withDedupState(DedupState.INVALID) + .withXcoolState(XcoolState.DISABLED); model = BinaryData.fromObject(model).toObject(BackupResourceConfig.class); - Assertions.assertEquals(StorageType.INVALID, model.storageModelType()); - Assertions.assertEquals(StorageType.GEO_REDUNDANT, model.storageType()); - Assertions.assertEquals(StorageTypeState.UNLOCKED, model.storageTypeState()); - Assertions.assertEquals(true, model.crossRegionRestoreFlag()); - Assertions.assertEquals(DedupState.ENABLED, model.dedupState()); - Assertions.assertEquals(XcoolState.INVALID, model.xcoolState()); + Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, model.storageModelType()); + Assertions.assertEquals(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT, model.storageType()); + Assertions.assertEquals(StorageTypeState.INVALID, model.storageTypeState()); + Assertions.assertFalse(model.crossRegionRestoreFlag()); + Assertions.assertEquals(DedupState.INVALID, model.dedupState()); + Assertions.assertEquals(XcoolState.DISABLED, model.xcoolState()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrsGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrsGetWithResponseMockTests.java index e6412d2e926e..aff1359780a3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrsGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -25,7 +25,7 @@ public final class BackupResourceStorageConfigsNonCrrsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"storageModelType\":\"ReadAccessGeoZoneRedundant\",\"storageType\":\"Invalid\",\"storageTypeState\":\"Locked\",\"crossRegionRestoreFlag\":false,\"dedupState\":\"Enabled\",\"xcoolState\":\"Disabled\"},\"eTag\":\"oclxiut\",\"location\":\"jc\",\"tags\":{\"r\":\"zjd\",\"xjeaoqaqbzgyh\":\"jb\",\"v\":\"w\"},\"id\":\"atbwbqam\",\"name\":\"e\",\"type\":\"liys\"}"; + = "{\"properties\":{\"storageModelType\":\"ReadAccessGeoZoneRedundant\",\"storageType\":\"LocallyRedundant\",\"storageTypeState\":\"Locked\",\"crossRegionRestoreFlag\":false,\"dedupState\":\"Invalid\",\"xcoolState\":\"Invalid\"},\"tags\":{\"tsghpbcbcp\":\"phrgfnzhctm\"},\"location\":\"rpzeqac\",\"eTag\":\"dtzmpype\",\"id\":\"pc\",\"name\":\"shnuqnd\",\"type\":\"izupfkhu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,17 +35,17 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupResourceConfigResource response = manager.backupResourceStorageConfigsNonCrrs() - .getWithResponse("yujlfyoumpckyecl", "digp", com.azure.core.util.Context.NONE) + .getWithResponse("odacpunettepdjxq", "skoynuiylpc", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jc", response.location()); - Assertions.assertEquals("zjd", response.tags().get("r")); Assertions.assertEquals(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT, response.properties().storageModelType()); - Assertions.assertEquals(StorageType.INVALID, response.properties().storageType()); + Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, response.properties().storageType()); Assertions.assertEquals(StorageTypeState.LOCKED, response.properties().storageTypeState()); - Assertions.assertEquals(false, response.properties().crossRegionRestoreFlag()); - Assertions.assertEquals(DedupState.ENABLED, response.properties().dedupState()); - Assertions.assertEquals(XcoolState.DISABLED, response.properties().xcoolState()); - Assertions.assertEquals("oclxiut", response.etag()); + Assertions.assertFalse(response.properties().crossRegionRestoreFlag()); + Assertions.assertEquals(DedupState.INVALID, response.properties().dedupState()); + Assertions.assertEquals(XcoolState.INVALID, response.properties().xcoolState()); + Assertions.assertEquals("phrgfnzhctm", response.tags().get("tsghpbcbcp")); + Assertions.assertEquals("rpzeqac", response.location()); + Assertions.assertEquals("dtzmpype", response.etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrsPatchWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrsPatchWithResponseMockTests.java index 4abfe95d54a6..d5814e28b2e8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrsPatchWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrsPatchWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -36,16 +36,18 @@ public void testPatchWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.backupResourceStorageConfigsNonCrrs() - .patchWithResponse("dsajrednwyysh", "uwg", - new BackupResourceConfigResourceInner().withLocation("ayorprav") - .withTags(mapOf("wynqxaekqsykvwj", "geslabnsmj")) - .withProperties(new BackupResourceConfig().withStorageModelType(StorageType.ZONE_REDUNDANT) - .withStorageType(StorageType.INVALID) - .withStorageTypeState(StorageTypeState.UNLOCKED) + .patchWithResponse("xv", "nzdpvoco", + new BackupResourceConfigResourceInner() + .withProperties(new BackupResourceConfig().withStorageModelType(StorageType.INVALID) + .withStorageType(StorageType.GEO_REDUNDANT) + .withStorageTypeState(StorageTypeState.LOCKED) .withCrossRegionRestoreFlag(true) .withDedupState(DedupState.DISABLED) .withXcoolState(XcoolState.DISABLED)) - .withEtag("wltxeqipxgzdyims"), + .withTags(mapOf("vzilmhiv", "e", "zdajlskzptjxu", "kwwwnckn", "qlehmcgcjeinu", "weucyrth", + "qnttmbq", "hokamvfej")) + .withLocation("bzfivfok") + .withEtag("sthhzagjfwy"), com.azure.core.util.Context.NONE); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrsUpdateWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrsUpdateWithResponseMockTests.java index 57e67c937b2d..c5f73eddb42a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrsUpdateWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceStorageConfigsNonCrrsUpdateWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -29,7 +29,7 @@ public final class BackupResourceStorageConfigsNonCrrsUpdateWithResponseMockTest @Test public void testUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"storageModelType\":\"LocallyRedundant\",\"storageType\":\"Invalid\",\"storageTypeState\":\"Invalid\",\"crossRegionRestoreFlag\":true,\"dedupState\":\"Enabled\",\"xcoolState\":\"Invalid\"},\"eTag\":\"vpndp\",\"location\":\"i\",\"tags\":{\"l\":\"nwynudq\"},\"id\":\"sauzpjlx\",\"name\":\"ehuxiqhzlraym\",\"type\":\"zxlskihmxr\"}"; + = "{\"properties\":{\"storageModelType\":\"ZoneRedundant\",\"storageType\":\"ZoneRedundant\",\"storageTypeState\":\"Invalid\",\"crossRegionRestoreFlag\":true,\"dedupState\":\"Disabled\",\"xcoolState\":\"Disabled\"},\"tags\":{\"loozrvt\":\"ocjxw\",\"nlcpxxviry\":\"vcmuf\",\"crdcueljti\":\"yngjgvrquvpygglp\",\"lcjkayspthzodub\":\"hxmfqryarvsxzqb\"},\"location\":\"mjtgblioskkfmkm\",\"eTag\":\"jxyxgb\",\"id\":\"qvjcteoe\",\"name\":\"l\",\"type\":\"slskkz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -39,28 +39,30 @@ public void testUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupResourceConfigResource response = manager.backupResourceStorageConfigsNonCrrs() - .updateWithResponse("pkcvmwf", "uxx", - new BackupResourceConfigResourceInner().withLocation("yqwixvcpwnkwywzw") - .withTags(mapOf("tamtyv", "lickduoi", "rwzawnvs", "kn", "imwrzregzgyufu", "cfhzagxnvhycv")) - .withProperties(new BackupResourceConfig().withStorageModelType(StorageType.ZONE_REDUNDANT) - .withStorageType(StorageType.INVALID) - .withStorageTypeState(StorageTypeState.LOCKED) - .withCrossRegionRestoreFlag(false) - .withDedupState(DedupState.INVALID) - .withXcoolState(XcoolState.DISABLED)) - .withEtag("ijqpkzfbojxjmcs"), + .updateWithResponse("tu", "zx", + new BackupResourceConfigResourceInner() + .withProperties( + new BackupResourceConfig().withStorageModelType(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT) + .withStorageType(StorageType.LOCALLY_REDUNDANT) + .withStorageTypeState(StorageTypeState.INVALID) + .withCrossRegionRestoreFlag(true) + .withDedupState(DedupState.DISABLED) + .withXcoolState(XcoolState.ENABLED)) + .withTags(mapOf("gkskjivbss", "ydwtthao", "u", "ajq", "dexyionofninbdb", "peexpgeumilhwuit")) + .withLocation("xcwqqrsmpc") + .withEtag("prtug"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("i", response.location()); - Assertions.assertEquals("nwynudq", response.tags().get("l")); - Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, response.properties().storageModelType()); - Assertions.assertEquals(StorageType.INVALID, response.properties().storageType()); + Assertions.assertEquals(StorageType.ZONE_REDUNDANT, response.properties().storageModelType()); + Assertions.assertEquals(StorageType.ZONE_REDUNDANT, response.properties().storageType()); Assertions.assertEquals(StorageTypeState.INVALID, response.properties().storageTypeState()); - Assertions.assertEquals(true, response.properties().crossRegionRestoreFlag()); - Assertions.assertEquals(DedupState.ENABLED, response.properties().dedupState()); - Assertions.assertEquals(XcoolState.INVALID, response.properties().xcoolState()); - Assertions.assertEquals("vpndp", response.etag()); + Assertions.assertTrue(response.properties().crossRegionRestoreFlag()); + Assertions.assertEquals(DedupState.DISABLED, response.properties().dedupState()); + Assertions.assertEquals(XcoolState.DISABLED, response.properties().xcoolState()); + Assertions.assertEquals("ocjxw", response.tags().get("loozrvt")); + Assertions.assertEquals("mjtgblioskkfmkm", response.location()); + Assertions.assertEquals("jxyxgb", response.etag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigResourceInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigResourceInnerTests.java index ff6a059f26d3..b086c222386d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigResourceInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigResourceInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -20,46 +20,47 @@ public final class BackupResourceVaultConfigResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupResourceVaultConfigResourceInner model = BinaryData.fromString( - "{\"properties\":{\"storageModelType\":\"Invalid\",\"storageType\":\"ReadAccessGeoZoneRedundant\",\"storageTypeState\":\"Invalid\",\"enhancedSecurityState\":\"Invalid\",\"softDeleteFeatureState\":\"AlwaysON\",\"softDeleteRetentionPeriodInDays\":1491222167,\"resourceGuardOperationRequests\":[\"zaqsqsycbkbfk\",\"ukdkexxppofmxa\",\"c\",\"jpgd\"],\"isSoftDeleteFeatureStateEditable\":true},\"eTag\":\"jjxhvpmo\",\"location\":\"exhd\",\"tags\":{\"jnxqbzvddntwn\":\"bqe\"},\"id\":\"eic\",\"name\":\"twnpzaoqvuhrhcf\",\"type\":\"cyddglmjthjqk\"}") + "{\"properties\":{\"storageModelType\":\"LocallyRedundant\",\"storageType\":\"LocallyRedundant\",\"storageTypeState\":\"Locked\",\"enhancedSecurityState\":\"Disabled\",\"softDeleteFeatureState\":\"Invalid\",\"softDeleteRetentionPeriodInDays\":40095957,\"resourceGuardOperationRequests\":[\"osfln\",\"osfqpteehzzv\"],\"isSoftDeleteFeatureStateEditable\":false},\"tags\":{\"z\":\"i\"},\"location\":\"pvswjdkirso\",\"eTag\":\"qxhcrmn\",\"id\":\"jtckwhdso\",\"name\":\"fiyipjxsqwpgrj\",\"type\":\"znorcj\"}") .toObject(BackupResourceVaultConfigResourceInner.class); - Assertions.assertEquals("exhd", model.location()); - Assertions.assertEquals("bqe", model.tags().get("jnxqbzvddntwn")); - Assertions.assertEquals(StorageType.INVALID, model.properties().storageModelType()); - Assertions.assertEquals(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT, model.properties().storageType()); - Assertions.assertEquals(StorageTypeState.INVALID, model.properties().storageTypeState()); - Assertions.assertEquals(EnhancedSecurityState.INVALID, model.properties().enhancedSecurityState()); - Assertions.assertEquals(SoftDeleteFeatureState.ALWAYS_ON, model.properties().softDeleteFeatureState()); - Assertions.assertEquals(1491222167, model.properties().softDeleteRetentionPeriodInDays()); - Assertions.assertEquals("zaqsqsycbkbfk", model.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.properties().isSoftDeleteFeatureStateEditable()); - Assertions.assertEquals("jjxhvpmo", model.etag()); + Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, model.properties().storageModelType()); + Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, model.properties().storageType()); + Assertions.assertEquals(StorageTypeState.LOCKED, model.properties().storageTypeState()); + Assertions.assertEquals(EnhancedSecurityState.DISABLED, model.properties().enhancedSecurityState()); + Assertions.assertEquals(SoftDeleteFeatureState.INVALID, model.properties().softDeleteFeatureState()); + Assertions.assertEquals(40095957, model.properties().softDeleteRetentionPeriodInDays()); + Assertions.assertEquals("osfln", model.properties().resourceGuardOperationRequests().get(0)); + Assertions.assertFalse(model.properties().isSoftDeleteFeatureStateEditable()); + Assertions.assertEquals("i", model.tags().get("z")); + Assertions.assertEquals("pvswjdkirso", model.location()); + Assertions.assertEquals("qxhcrmn", model.etag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupResourceVaultConfigResourceInner model = new BackupResourceVaultConfigResourceInner().withLocation("exhd") - .withTags(mapOf("jnxqbzvddntwn", "bqe")) - .withProperties(new BackupResourceVaultConfig().withStorageModelType(StorageType.INVALID) - .withStorageType(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT) - .withStorageTypeState(StorageTypeState.INVALID) - .withEnhancedSecurityState(EnhancedSecurityState.INVALID) - .withSoftDeleteFeatureState(SoftDeleteFeatureState.ALWAYS_ON) - .withSoftDeleteRetentionPeriodInDays(1491222167) - .withResourceGuardOperationRequests(Arrays.asList("zaqsqsycbkbfk", "ukdkexxppofmxa", "c", "jpgd")) - .withIsSoftDeleteFeatureStateEditable(true)) - .withEtag("jjxhvpmo"); + BackupResourceVaultConfigResourceInner model = new BackupResourceVaultConfigResourceInner() + .withProperties(new BackupResourceVaultConfig().withStorageModelType(StorageType.LOCALLY_REDUNDANT) + .withStorageType(StorageType.LOCALLY_REDUNDANT) + .withStorageTypeState(StorageTypeState.LOCKED) + .withEnhancedSecurityState(EnhancedSecurityState.DISABLED) + .withSoftDeleteFeatureState(SoftDeleteFeatureState.INVALID) + .withSoftDeleteRetentionPeriodInDays(40095957) + .withResourceGuardOperationRequests(Arrays.asList("osfln", "osfqpteehzzv")) + .withIsSoftDeleteFeatureStateEditable(false)) + .withTags(mapOf("z", "i")) + .withLocation("pvswjdkirso") + .withEtag("qxhcrmn"); model = BinaryData.fromObject(model).toObject(BackupResourceVaultConfigResourceInner.class); - Assertions.assertEquals("exhd", model.location()); - Assertions.assertEquals("bqe", model.tags().get("jnxqbzvddntwn")); - Assertions.assertEquals(StorageType.INVALID, model.properties().storageModelType()); - Assertions.assertEquals(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT, model.properties().storageType()); - Assertions.assertEquals(StorageTypeState.INVALID, model.properties().storageTypeState()); - Assertions.assertEquals(EnhancedSecurityState.INVALID, model.properties().enhancedSecurityState()); - Assertions.assertEquals(SoftDeleteFeatureState.ALWAYS_ON, model.properties().softDeleteFeatureState()); - Assertions.assertEquals(1491222167, model.properties().softDeleteRetentionPeriodInDays()); - Assertions.assertEquals("zaqsqsycbkbfk", model.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.properties().isSoftDeleteFeatureStateEditable()); - Assertions.assertEquals("jjxhvpmo", model.etag()); + Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, model.properties().storageModelType()); + Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, model.properties().storageType()); + Assertions.assertEquals(StorageTypeState.LOCKED, model.properties().storageTypeState()); + Assertions.assertEquals(EnhancedSecurityState.DISABLED, model.properties().enhancedSecurityState()); + Assertions.assertEquals(SoftDeleteFeatureState.INVALID, model.properties().softDeleteFeatureState()); + Assertions.assertEquals(40095957, model.properties().softDeleteRetentionPeriodInDays()); + Assertions.assertEquals("osfln", model.properties().resourceGuardOperationRequests().get(0)); + Assertions.assertFalse(model.properties().isSoftDeleteFeatureStateEditable()); + Assertions.assertEquals("i", model.tags().get("z")); + Assertions.assertEquals("pvswjdkirso", model.location()); + Assertions.assertEquals("qxhcrmn", model.etag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigTests.java index 87c3d5430772..5a2e6d0a05b5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -17,36 +17,37 @@ public final class BackupResourceVaultConfigTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupResourceVaultConfig model = BinaryData.fromString( - "{\"storageModelType\":\"Invalid\",\"storageType\":\"ReadAccessGeoZoneRedundant\",\"storageTypeState\":\"Invalid\",\"enhancedSecurityState\":\"Invalid\",\"softDeleteFeatureState\":\"Enabled\",\"softDeleteRetentionPeriodInDays\":102046613,\"resourceGuardOperationRequests\":[\"khixuigdtopbo\"],\"isSoftDeleteFeatureStateEditable\":false}") + "{\"storageModelType\":\"LocallyRedundant\",\"storageType\":\"LocallyRedundant\",\"storageTypeState\":\"Unlocked\",\"enhancedSecurityState\":\"Disabled\",\"softDeleteFeatureState\":\"Invalid\",\"softDeleteRetentionPeriodInDays\":1299140464,\"resourceGuardOperationRequests\":[\"cyshurzafbljjgp\",\"toqcjmklja\"],\"isSoftDeleteFeatureStateEditable\":true}") .toObject(BackupResourceVaultConfig.class); - Assertions.assertEquals(StorageType.INVALID, model.storageModelType()); - Assertions.assertEquals(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT, model.storageType()); - Assertions.assertEquals(StorageTypeState.INVALID, model.storageTypeState()); - Assertions.assertEquals(EnhancedSecurityState.INVALID, model.enhancedSecurityState()); - Assertions.assertEquals(SoftDeleteFeatureState.ENABLED, model.softDeleteFeatureState()); - Assertions.assertEquals(102046613, model.softDeleteRetentionPeriodInDays()); - Assertions.assertEquals("khixuigdtopbo", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.isSoftDeleteFeatureStateEditable()); + Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, model.storageModelType()); + Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, model.storageType()); + Assertions.assertEquals(StorageTypeState.UNLOCKED, model.storageTypeState()); + Assertions.assertEquals(EnhancedSecurityState.DISABLED, model.enhancedSecurityState()); + Assertions.assertEquals(SoftDeleteFeatureState.INVALID, model.softDeleteFeatureState()); + Assertions.assertEquals(1299140464, model.softDeleteRetentionPeriodInDays()); + Assertions.assertEquals("cyshurzafbljjgp", model.resourceGuardOperationRequests().get(0)); + Assertions.assertTrue(model.isSoftDeleteFeatureStateEditable()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupResourceVaultConfig model = new BackupResourceVaultConfig().withStorageModelType(StorageType.INVALID) - .withStorageType(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT) - .withStorageTypeState(StorageTypeState.INVALID) - .withEnhancedSecurityState(EnhancedSecurityState.INVALID) - .withSoftDeleteFeatureState(SoftDeleteFeatureState.ENABLED) - .withSoftDeleteRetentionPeriodInDays(102046613) - .withResourceGuardOperationRequests(Arrays.asList("khixuigdtopbo")) - .withIsSoftDeleteFeatureStateEditable(false); + BackupResourceVaultConfig model + = new BackupResourceVaultConfig().withStorageModelType(StorageType.LOCALLY_REDUNDANT) + .withStorageType(StorageType.LOCALLY_REDUNDANT) + .withStorageTypeState(StorageTypeState.UNLOCKED) + .withEnhancedSecurityState(EnhancedSecurityState.DISABLED) + .withSoftDeleteFeatureState(SoftDeleteFeatureState.INVALID) + .withSoftDeleteRetentionPeriodInDays(1299140464) + .withResourceGuardOperationRequests(Arrays.asList("cyshurzafbljjgp", "toqcjmklja")) + .withIsSoftDeleteFeatureStateEditable(true); model = BinaryData.fromObject(model).toObject(BackupResourceVaultConfig.class); - Assertions.assertEquals(StorageType.INVALID, model.storageModelType()); - Assertions.assertEquals(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT, model.storageType()); - Assertions.assertEquals(StorageTypeState.INVALID, model.storageTypeState()); - Assertions.assertEquals(EnhancedSecurityState.INVALID, model.enhancedSecurityState()); - Assertions.assertEquals(SoftDeleteFeatureState.ENABLED, model.softDeleteFeatureState()); - Assertions.assertEquals(102046613, model.softDeleteRetentionPeriodInDays()); - Assertions.assertEquals("khixuigdtopbo", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.isSoftDeleteFeatureStateEditable()); + Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, model.storageModelType()); + Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, model.storageType()); + Assertions.assertEquals(StorageTypeState.UNLOCKED, model.storageTypeState()); + Assertions.assertEquals(EnhancedSecurityState.DISABLED, model.enhancedSecurityState()); + Assertions.assertEquals(SoftDeleteFeatureState.INVALID, model.softDeleteFeatureState()); + Assertions.assertEquals(1299140464, model.softDeleteRetentionPeriodInDays()); + Assertions.assertEquals("cyshurzafbljjgp", model.resourceGuardOperationRequests().get(0)); + Assertions.assertTrue(model.isSoftDeleteFeatureStateEditable()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsGetWithResponseMockTests.java index ad5ec11d938b..616b079dc4fb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -25,7 +25,7 @@ public final class BackupResourceVaultConfigsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"storageModelType\":\"LocallyRedundant\",\"storageType\":\"LocallyRedundant\",\"storageTypeState\":\"Unlocked\",\"enhancedSecurityState\":\"Enabled\",\"softDeleteFeatureState\":\"Invalid\",\"softDeleteRetentionPeriodInDays\":194219254,\"resourceGuardOperationRequests\":[\"xhmtfhocnxzc\",\"jhngxnoq\",\"xtdisnjevhd\",\"mydidwhepfw\"],\"isSoftDeleteFeatureStateEditable\":true},\"eTag\":\"doesxxhmwcdb\",\"location\":\"ky\",\"tags\":{\"plvukaobrlbpg\":\"xkxhnegknjzrbhtm\",\"g\":\"nbagnchj\",\"xcgqtagdrclsso\":\"muowakywalhjy\"},\"id\":\"jomevtfycnlb\",\"name\":\"gjco\",\"type\":\"kk\"}"; + = "{\"properties\":{\"storageModelType\":\"Invalid\",\"storageType\":\"GeoRedundant\",\"storageTypeState\":\"Locked\",\"enhancedSecurityState\":\"Invalid\",\"softDeleteFeatureState\":\"AlwaysON\",\"softDeleteRetentionPeriodInDays\":783211000,\"resourceGuardOperationRequests\":[\"fuvq\",\"rwzxuqrebluimm\",\"wxs\",\"gtdmbvx\"],\"isSoftDeleteFeatureStateEditable\":true},\"tags\":{\"kbudbtwaokb\":\"k\",\"sm\":\"vlyttaaknwfrke\",\"ujd\":\"p\"},\"location\":\"atolekscbc\",\"eTag\":\"anqimwbzxpdcl\",\"id\":\"ka\",\"name\":\"n\",\"type\":\"nlaimouxwksqmudm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,19 +35,19 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupResourceVaultConfigResource response = manager.backupResourceVaultConfigs() - .getWithResponse("vlm", "jwcolbm", com.azure.core.util.Context.NONE) + .getWithResponse("bjwzzos", "pkybtgl", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ky", response.location()); - Assertions.assertEquals("xkxhnegknjzrbhtm", response.tags().get("plvukaobrlbpg")); - Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, response.properties().storageModelType()); - Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, response.properties().storageType()); - Assertions.assertEquals(StorageTypeState.UNLOCKED, response.properties().storageTypeState()); - Assertions.assertEquals(EnhancedSecurityState.ENABLED, response.properties().enhancedSecurityState()); - Assertions.assertEquals(SoftDeleteFeatureState.INVALID, response.properties().softDeleteFeatureState()); - Assertions.assertEquals(194219254, response.properties().softDeleteRetentionPeriodInDays()); - Assertions.assertEquals("xhmtfhocnxzc", response.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, response.properties().isSoftDeleteFeatureStateEditable()); - Assertions.assertEquals("doesxxhmwcdb", response.etag()); + Assertions.assertEquals(StorageType.INVALID, response.properties().storageModelType()); + Assertions.assertEquals(StorageType.GEO_REDUNDANT, response.properties().storageType()); + Assertions.assertEquals(StorageTypeState.LOCKED, response.properties().storageTypeState()); + Assertions.assertEquals(EnhancedSecurityState.INVALID, response.properties().enhancedSecurityState()); + Assertions.assertEquals(SoftDeleteFeatureState.ALWAYS_ON, response.properties().softDeleteFeatureState()); + Assertions.assertEquals(783211000, response.properties().softDeleteRetentionPeriodInDays()); + Assertions.assertEquals("fuvq", response.properties().resourceGuardOperationRequests().get(0)); + Assertions.assertTrue(response.properties().isSoftDeleteFeatureStateEditable()); + Assertions.assertEquals("k", response.tags().get("kbudbtwaokb")); + Assertions.assertEquals("atolekscbc", response.location()); + Assertions.assertEquals("anqimwbzxpdcl", response.etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsPutWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsPutWithResponseMockTests.java index a198fbc23a90..ae9051bb0df8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsPutWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsPutWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -30,7 +30,7 @@ public final class BackupResourceVaultConfigsPutWithResponseMockTests { @Test public void testPutWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"storageModelType\":\"GeoRedundant\",\"storageType\":\"GeoRedundant\",\"storageTypeState\":\"Locked\",\"enhancedSecurityState\":\"Disabled\",\"softDeleteFeatureState\":\"Enabled\",\"softDeleteRetentionPeriodInDays\":2122137016,\"resourceGuardOperationRequests\":[\"ikkgqo\"],\"isSoftDeleteFeatureStateEditable\":false},\"eTag\":\"indedvabbx\",\"location\":\"hmedeilbjywfcfxz\",\"tags\":{\"vwypusuvjsl\":\"zi\",\"djsllfr\":\"zwci\"},\"id\":\"vdmvxadqa\",\"name\":\"frgnawbabgfbktyj\",\"type\":\"fczlfsyqkfrbzgow\"}"; + = "{\"properties\":{\"storageModelType\":\"ReadAccessGeoZoneRedundant\",\"storageType\":\"ReadAccessGeoZoneRedundant\",\"storageTypeState\":\"Unlocked\",\"enhancedSecurityState\":\"Invalid\",\"softDeleteFeatureState\":\"Invalid\",\"softDeleteRetentionPeriodInDays\":1415414821,\"resourceGuardOperationRequests\":[\"fcmfcn\",\"jajqmatxjt\"],\"isSoftDeleteFeatureStateEditable\":false},\"tags\":{\"tlpqagynoi\":\"qgxxgfbb\",\"yqxzxaqzibmqim\":\"rnzcalinc\"},\"location\":\"mqruqguhfupe\",\"eTag\":\"svvoqsbpkflanfk\",\"id\":\"syaowuzowp\",\"name\":\"ohdkcprgukx\",\"type\":\"ztiochluti\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -40,32 +40,33 @@ public void testPutWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupResourceVaultConfigResource response = manager.backupResourceVaultConfigs() - .putWithResponse("xrtuicds", "wdfmmpzhzzwvywr", - new BackupResourceVaultConfigResourceInner().withLocation("xhqf") - .withTags(mapOf("iucijjcea", "ayejsxtlgflwfgz")) + .putWithResponse("coibicziuswswjrk", "qsj", + new BackupResourceVaultConfigResourceInner() .withProperties(new BackupResourceVaultConfig().withStorageModelType(StorageType.GEO_REDUNDANT) - .withStorageType(StorageType.GEO_REDUNDANT) - .withStorageTypeState(StorageTypeState.INVALID) - .withEnhancedSecurityState(EnhancedSecurityState.INVALID) - .withSoftDeleteFeatureState(SoftDeleteFeatureState.ENABLED) - .withSoftDeleteRetentionPeriodInDays(84373044) - .withResourceGuardOperationRequests(Arrays.asList("aondjrkclamgg")) - .withIsSoftDeleteFeatureStateEditable(false)) - .withEtag("fejdoqeykglty"), + .withStorageType(StorageType.LOCALLY_REDUNDANT) + .withStorageTypeState(StorageTypeState.UNLOCKED) + .withEnhancedSecurityState(EnhancedSecurityState.ENABLED) + .withSoftDeleteFeatureState(SoftDeleteFeatureState.INVALID) + .withSoftDeleteRetentionPeriodInDays(1893099039) + .withResourceGuardOperationRequests(Arrays.asList("vqvogf")) + .withIsSoftDeleteFeatureStateEditable(true)) + .withTags(mapOf("byqecroo", "bhli", "asaxxo", "likcdrd", "kwiy", "sm", "ukosrn", "v")) + .withLocation("nvzmlnkoywsx") + .withEtag("abjqqaxuyvymcnud"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hmedeilbjywfcfxz", response.location()); - Assertions.assertEquals("zi", response.tags().get("vwypusuvjsl")); - Assertions.assertEquals(StorageType.GEO_REDUNDANT, response.properties().storageModelType()); - Assertions.assertEquals(StorageType.GEO_REDUNDANT, response.properties().storageType()); - Assertions.assertEquals(StorageTypeState.LOCKED, response.properties().storageTypeState()); - Assertions.assertEquals(EnhancedSecurityState.DISABLED, response.properties().enhancedSecurityState()); - Assertions.assertEquals(SoftDeleteFeatureState.ENABLED, response.properties().softDeleteFeatureState()); - Assertions.assertEquals(2122137016, response.properties().softDeleteRetentionPeriodInDays()); - Assertions.assertEquals("ikkgqo", response.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, response.properties().isSoftDeleteFeatureStateEditable()); - Assertions.assertEquals("indedvabbx", response.etag()); + Assertions.assertEquals(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT, response.properties().storageModelType()); + Assertions.assertEquals(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT, response.properties().storageType()); + Assertions.assertEquals(StorageTypeState.UNLOCKED, response.properties().storageTypeState()); + Assertions.assertEquals(EnhancedSecurityState.INVALID, response.properties().enhancedSecurityState()); + Assertions.assertEquals(SoftDeleteFeatureState.INVALID, response.properties().softDeleteFeatureState()); + Assertions.assertEquals(1415414821, response.properties().softDeleteRetentionPeriodInDays()); + Assertions.assertEquals("fcmfcn", response.properties().resourceGuardOperationRequests().get(0)); + Assertions.assertFalse(response.properties().isSoftDeleteFeatureStateEditable()); + Assertions.assertEquals("qgxxgfbb", response.tags().get("tlpqagynoi")); + Assertions.assertEquals("mqruqguhfupe", response.location()); + Assertions.assertEquals("svvoqsbpkflanfk", response.etag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsUpdateWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsUpdateWithResponseMockTests.java index 79138d1c2dec..8a7990b50b58 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsUpdateWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigsUpdateWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -30,7 +30,7 @@ public final class BackupResourceVaultConfigsUpdateWithResponseMockTests { @Test public void testUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"storageModelType\":\"ZoneRedundant\",\"storageType\":\"GeoRedundant\",\"storageTypeState\":\"Invalid\",\"enhancedSecurityState\":\"Disabled\",\"softDeleteFeatureState\":\"Invalid\",\"softDeleteRetentionPeriodInDays\":47378560,\"resourceGuardOperationRequests\":[\"xoqeintxwalj\",\"lzoblqwaafr\"],\"isSoftDeleteFeatureStateEditable\":false},\"eTag\":\"mz\",\"location\":\"qb\",\"tags\":{\"xwmzwdfkbnrz\":\"afjrqpjiyrqjcrg\",\"tqjfgxxsaet\":\"rpdltbq\",\"cduwjoedx\":\"zdgvpyigdaqqilz\",\"aurwwgilfjq\":\"gucaif\"},\"id\":\"a\",\"name\":\"dmkxwxdcvjwcy\",\"type\":\"iakeciqc\"}"; + = "{\"properties\":{\"storageModelType\":\"LocallyRedundant\",\"storageType\":\"Invalid\",\"storageTypeState\":\"Locked\",\"enhancedSecurityState\":\"Enabled\",\"softDeleteFeatureState\":\"Invalid\",\"softDeleteRetentionPeriodInDays\":652596420,\"resourceGuardOperationRequests\":[\"lndh\",\"yoeojhtollhs\",\"idmytzln\"],\"isSoftDeleteFeatureStateEditable\":false},\"tags\":{\"cswqa\":\"ovyoanf\",\"xigvjrktpgaeuk\":\"ywv\",\"qnucs\":\"awohpmw\"},\"location\":\"hsidsjtdlpbnin\",\"eTag\":\"azlsvbzfcpuo\",\"id\":\"dwjcciklhs\",\"name\":\"ekrdr\",\"type\":\"nxolriyehqb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -39,33 +39,33 @@ public void testUpdateWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - BackupResourceVaultConfigResource response = manager.backupResourceVaultConfigs() - .updateWithResponse("ji", "ytssikiz", - new BackupResourceVaultConfigResourceInner().withLocation("lwxlboncqbazq") - .withTags(mapOf("ubdpkxyqvgxi", "chygtvxbyjane", "tvo", "od")) - .withProperties(new BackupResourceVaultConfig().withStorageModelType(StorageType.GEO_REDUNDANT) + BackupResourceVaultConfigResource response + = manager.backupResourceVaultConfigs() + .updateWithResponse("mqrud", "izcbfzmcrunfhiuc", new BackupResourceVaultConfigResourceInner() + .withProperties(new BackupResourceVaultConfig().withStorageModelType(StorageType.LOCALLY_REDUNDANT) .withStorageType(StorageType.LOCALLY_REDUNDANT) .withStorageTypeState(StorageTypeState.INVALID) .withEnhancedSecurityState(EnhancedSecurityState.ENABLED) - .withSoftDeleteFeatureState(SoftDeleteFeatureState.DISABLED) - .withSoftDeleteRetentionPeriodInDays(1101568024) - .withResourceGuardOperationRequests(Arrays.asList("rhcekxgnly")) + .withSoftDeleteFeatureState(SoftDeleteFeatureState.ENABLED) + .withSoftDeleteRetentionPeriodInDays(1718076740) + .withResourceGuardOperationRequests(Arrays.asList("ed")) .withIsSoftDeleteFeatureStateEditable(true)) - .withEtag("pwzvmdoksqdti"), - com.azure.core.util.Context.NONE) - .getValue(); + .withTags(mapOf("kxiuxqggvqr", "vxov")) + .withLocation("yhlwcjsqg") + .withEtag("hffbxrq"), com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals("qb", response.location()); - Assertions.assertEquals("afjrqpjiyrqjcrg", response.tags().get("xwmzwdfkbnrz")); - Assertions.assertEquals(StorageType.ZONE_REDUNDANT, response.properties().storageModelType()); - Assertions.assertEquals(StorageType.GEO_REDUNDANT, response.properties().storageType()); - Assertions.assertEquals(StorageTypeState.INVALID, response.properties().storageTypeState()); - Assertions.assertEquals(EnhancedSecurityState.DISABLED, response.properties().enhancedSecurityState()); + Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, response.properties().storageModelType()); + Assertions.assertEquals(StorageType.INVALID, response.properties().storageType()); + Assertions.assertEquals(StorageTypeState.LOCKED, response.properties().storageTypeState()); + Assertions.assertEquals(EnhancedSecurityState.ENABLED, response.properties().enhancedSecurityState()); Assertions.assertEquals(SoftDeleteFeatureState.INVALID, response.properties().softDeleteFeatureState()); - Assertions.assertEquals(47378560, response.properties().softDeleteRetentionPeriodInDays()); - Assertions.assertEquals("xoqeintxwalj", response.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, response.properties().isSoftDeleteFeatureStateEditable()); - Assertions.assertEquals("mz", response.etag()); + Assertions.assertEquals(652596420, response.properties().softDeleteRetentionPeriodInDays()); + Assertions.assertEquals("lndh", response.properties().resourceGuardOperationRequests().get(0)); + Assertions.assertFalse(response.properties().isSoftDeleteFeatureStateEditable()); + Assertions.assertEquals("ovyoanf", response.tags().get("cswqa")); + Assertions.assertEquals("hsidsjtdlpbnin", response.location()); + Assertions.assertEquals("azlsvbzfcpuo", response.etag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupStatusRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupStatusRequestTests.java index ac0f6f61d73e..3c648ed15ce8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupStatusRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupStatusRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,22 +12,22 @@ public final class BackupStatusRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BackupStatusRequest model - = BinaryData.fromString("{\"resourceType\":\"VM\",\"resourceId\":\"dkfo\",\"poLogicalName\":\"nygj\"}") - .toObject(BackupStatusRequest.class); - Assertions.assertEquals(DataSourceType.VM, model.resourceType()); - Assertions.assertEquals("dkfo", model.resourceId()); - Assertions.assertEquals("nygj", model.poLogicalName()); + BackupStatusRequest model = BinaryData.fromString( + "{\"resourceType\":\"SAPAseDatabase\",\"resourceId\":\"szpyglqdhmr\",\"poLogicalName\":\"ralcxpjbyypsj\"}") + .toObject(BackupStatusRequest.class); + Assertions.assertEquals(DataSourceType.SAPASE_DATABASE, model.resourceType()); + Assertions.assertEquals("szpyglqdhmr", model.resourceId()); + Assertions.assertEquals("ralcxpjbyypsj", model.poLogicalName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupStatusRequest model = new BackupStatusRequest().withResourceType(DataSourceType.VM) - .withResourceId("dkfo") - .withPoLogicalName("nygj"); + BackupStatusRequest model = new BackupStatusRequest().withResourceType(DataSourceType.SAPASE_DATABASE) + .withResourceId("szpyglqdhmr") + .withPoLogicalName("ralcxpjbyypsj"); model = BinaryData.fromObject(model).toObject(BackupStatusRequest.class); - Assertions.assertEquals(DataSourceType.VM, model.resourceType()); - Assertions.assertEquals("dkfo", model.resourceId()); - Assertions.assertEquals("nygj", model.poLogicalName()); + Assertions.assertEquals(DataSourceType.SAPASE_DATABASE, model.resourceType()); + Assertions.assertEquals("szpyglqdhmr", model.resourceId()); + Assertions.assertEquals("ralcxpjbyypsj", model.poLogicalName()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupUsageSummariesListMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupUsageSummariesListMockTests.java index a395b41ce738..f347ec057bb3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupUsageSummariesListMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupUsageSummariesListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -23,7 +23,7 @@ public final class BackupUsageSummariesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"unit\":\"CountPerSecond\",\"quotaPeriod\":\"atqxmbjroumzzn\",\"nextResetTime\":\"2020-12-30T11:20:16Z\",\"currentValue\":7934901934803337359,\"limit\":4839026448793785641,\"name\":{\"value\":\"xonjtpusl\",\"localizedValue\":\"wpvtiotzbpdbol\"}}]}"; + = "{\"value\":[{\"unit\":\"Bytes\",\"quotaPeriod\":\"xcpup\",\"nextResetTime\":\"2021-05-22T03:49:36Z\",\"currentValue\":6203743087104098984,\"limit\":8623731598952044574,\"name\":{\"value\":\"vwtiwsmosa\",\"localizedValue\":\"hq\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,16 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.backupUsageSummaries().list("hdxlw", "ojbf", "zd", "fnjyix", com.azure.core.util.Context.NONE); + PagedIterable response = manager.backupUsageSummaries() + .list("towlhlsycoyb", "jasqubf", "j", "ywhjqwmchq", com.azure.core.util.Context.NONE); - Assertions.assertEquals(UsagesUnit.COUNT_PER_SECOND, response.iterator().next().unit()); - Assertions.assertEquals("atqxmbjroumzzn", response.iterator().next().quotaPeriod()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-30T11:20:16Z"), + Assertions.assertEquals(UsagesUnit.BYTES, response.iterator().next().unit()); + Assertions.assertEquals("xcpup", response.iterator().next().quotaPeriod()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-22T03:49:36Z"), response.iterator().next().nextResetTime()); - Assertions.assertEquals(7934901934803337359L, response.iterator().next().currentValue()); - Assertions.assertEquals(4839026448793785641L, response.iterator().next().limit()); - Assertions.assertEquals("xonjtpusl", response.iterator().next().name().value()); - Assertions.assertEquals("wpvtiotzbpdbol", response.iterator().next().name().localizedValue()); + Assertions.assertEquals(6203743087104098984L, response.iterator().next().currentValue()); + Assertions.assertEquals(8623731598952044574L, response.iterator().next().limit()); + Assertions.assertEquals("vwtiwsmosa", response.iterator().next().name().value()); + Assertions.assertEquals("hq", response.iterator().next().name().localizedValue()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupWorkloadItemsListMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupWorkloadItemsListMockTests.java index 276b3d8140d5..be3ccd0fec7c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupWorkloadItemsListMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupWorkloadItemsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -23,7 +23,7 @@ public final class BackupWorkloadItemsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"workloadItemType\":\"WorkloadItem\",\"backupManagementType\":\"vjb\",\"workloadType\":\"hdiqayfl\",\"friendlyName\":\"yu\",\"protectionState\":\"ProtectionFailed\"},\"eTag\":\"u\",\"location\":\"t\",\"tags\":{\"uubpyrow\":\"hyibdrqrswh\",\"nnctagfyvrt\":\"joxztfwfqchvczev\",\"cgkrepdqhqy\":\"qpemh\"},\"id\":\"wqwemvxqabckmze\",\"name\":\"xin\",\"type\":\"greohtwhlpuzjp\"}]}"; + = "{\"value\":[{\"location\":\"t\",\"tags\":{\"mv\":\"sxnsrqorcge\",\"etqujxcxxq\":\"ebx\",\"ojmrvvxwjongzse\":\"dcqjkedwqurc\"},\"eTag\":\"q\",\"properties\":{\"workloadItemType\":\"WorkloadItem\",\"backupManagementType\":\"lcchskxxkansbvri\",\"workloadType\":\"gv\",\"friendlyName\":\"jrulfucte\",\"protectionState\":\"NotProtected\"},\"id\":\"cfjzhxl\",\"name\":\"ubqjro\",\"type\":\"tvrjeqmtz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,16 +33,16 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.backupWorkloadItems() - .list("efgmwdhcebuv", "zldbglzoutbaaqg", "ekaj", "lyzgsnor", "jgmn", "jotvmrxkhl", + .list("qgo", "sxpwwztjfmkkh", "gfredmlscg", "ll", "cnaovjo", "azhpabacoml", com.azure.core.util.Context.NONE); Assertions.assertEquals("t", response.iterator().next().location()); - Assertions.assertEquals("hyibdrqrswh", response.iterator().next().tags().get("uubpyrow")); - Assertions.assertEquals("vjb", response.iterator().next().properties().backupManagementType()); - Assertions.assertEquals("hdiqayfl", response.iterator().next().properties().workloadType()); - Assertions.assertEquals("yu", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, + Assertions.assertEquals("sxnsrqorcge", response.iterator().next().tags().get("mv")); + Assertions.assertEquals("q", response.iterator().next().eTag()); + Assertions.assertEquals("lcchskxxkansbvri", response.iterator().next().properties().backupManagementType()); + Assertions.assertEquals("gv", response.iterator().next().properties().workloadType()); + Assertions.assertEquals("jrulfucte", response.iterator().next().properties().friendlyName()); + Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, response.iterator().next().properties().protectionState()); - Assertions.assertEquals("u", response.iterator().next().etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupsTriggerWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupsTriggerWithResponseMockTests.java index e9304e698297..919e1b231808 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupsTriggerWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupsTriggerWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -32,11 +32,11 @@ public void testTriggerWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.backups() - .triggerWithResponse("mvpsimioyo", "glkmiqwnnr", "clibbfqpsp", "ladydgnhautwu", "exzgpmnmabedd", - new BackupRequestResource().withLocation("fpfqf") - .withTags(mapOf("qrvwerfwxbsm", "stcl", "ifkwdvbtbrekqhs", "bljjehh")) - .withProperties(new BackupRequest()) - .withEtag("wg"), + .triggerWithResponse("jfowxwy", "vcxjsgbipcukdvek", "buhoduchv", "scrdp", "bfdyjduss", + new BackupRequestResource().withLocation("szekbh") + .withTags(mapOf("bfrnuybffljfii", "aaggkre", "e", "reoagsqtaadus", "i", "xfavsqwudoh")) + .withETag("mnlikpsi") + .withProperties(new BackupRequest()), com.azure.core.util.Context.NONE); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BmsPrepareDataMoveOperationResultsGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BmsPrepareDataMoveOperationResultsGetWithResponseMockTests.java index 669b114e6d6c..950f6f51999e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BmsPrepareDataMoveOperationResultsGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BmsPrepareDataMoveOperationResultsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -29,7 +29,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VaultStorageConfigOperationResultResponse response = manager.bmsPrepareDataMoveOperationResults() - .getWithResponse("qnrxtmbpjptn", "wjhrsidqpxlbtpa", "f", com.azure.core.util.Context.NONE) + .getWithResponse("nxtminklog", "svtzarhzv", "nsqktc", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryDisplayTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryDisplayTests.java index aecb58c197fa..b3edfd6f53e6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryDisplayTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryDisplayTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,24 +12,11 @@ public final class ClientDiscoveryDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClientDiscoveryDisplay model = BinaryData.fromString( - "{\"provider\":\"srp\",\"resource\":\"zidnsezcxtbzsgfy\",\"operation\":\"sne\",\"description\":\"dwzjeiach\"}") + "{\"provider\":\"nzl\",\"resource\":\"fmppe\",\"operation\":\"vmgxsab\",\"description\":\"qduujitcjczdz\"}") .toObject(ClientDiscoveryDisplay.class); - Assertions.assertEquals("srp", model.provider()); - Assertions.assertEquals("zidnsezcxtbzsgfy", model.resource()); - Assertions.assertEquals("sne", model.operation()); - Assertions.assertEquals("dwzjeiach", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientDiscoveryDisplay model = new ClientDiscoveryDisplay().withProvider("srp") - .withResource("zidnsezcxtbzsgfy") - .withOperation("sne") - .withDescription("dwzjeiach"); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryDisplay.class); - Assertions.assertEquals("srp", model.provider()); - Assertions.assertEquals("zidnsezcxtbzsgfy", model.resource()); - Assertions.assertEquals("sne", model.operation()); - Assertions.assertEquals("dwzjeiach", model.description()); + Assertions.assertEquals("nzl", model.provider()); + Assertions.assertEquals("fmppe", model.resource()); + Assertions.assertEquals("vmgxsab", model.operation()); + Assertions.assertEquals("qduujitcjczdz", model.description()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryForLogSpecificationTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryForLogSpecificationTests.java index 79a444aa7083..dc74e5c1009b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryForLogSpecificationTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryForLogSpecificationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,21 +12,10 @@ public final class ClientDiscoveryForLogSpecificationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClientDiscoveryForLogSpecification model - = BinaryData.fromString("{\"name\":\"mexgstxgcp\",\"displayName\":\"gmaajrm\",\"blobDuration\":\"jwzrl\"}") + = BinaryData.fromString("{\"name\":\"htqqrolfp\",\"displayName\":\"s\",\"blobDuration\":\"gbquxigj\"}") .toObject(ClientDiscoveryForLogSpecification.class); - Assertions.assertEquals("mexgstxgcp", model.name()); - Assertions.assertEquals("gmaajrm", model.displayName()); - Assertions.assertEquals("jwzrl", model.blobDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientDiscoveryForLogSpecification model = new ClientDiscoveryForLogSpecification().withName("mexgstxgcp") - .withDisplayName("gmaajrm") - .withBlobDuration("jwzrl"); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryForLogSpecification.class); - Assertions.assertEquals("mexgstxgcp", model.name()); - Assertions.assertEquals("gmaajrm", model.displayName()); - Assertions.assertEquals("jwzrl", model.blobDuration()); + Assertions.assertEquals("htqqrolfp", model.name()); + Assertions.assertEquals("s", model.displayName()); + Assertions.assertEquals("gbquxigj", model.blobDuration()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryForPropertiesTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryForPropertiesTests.java index a5de4eabc45a..3de9459a0cd2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryForPropertiesTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryForPropertiesTests.java @@ -1,43 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification; import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForProperties; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ClientDiscoveryForPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClientDiscoveryForProperties model = BinaryData.fromString( - "{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"lnrosfqp\",\"displayName\":\"ehzzvypyqrim\",\"blobDuration\":\"npvswjdkirso\"},{\"name\":\"qxhcrmn\",\"displayName\":\"jtckwhdso\",\"blobDuration\":\"iy\"},{\"name\":\"jxsqwpgrjbz\",\"displayName\":\"rcjxvsnbyxqabn\",\"blobDuration\":\"cpc\"}]}}") + "{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"krwpdap\",\"displayName\":\"sbdkvwr\",\"blobDuration\":\"feusnhut\"},{\"name\":\"ltmrldh\",\"displayName\":\"jzzd\",\"blobDuration\":\"qxhocdgeablgphut\"},{\"name\":\"ndv\",\"displayName\":\"ozwyiftyhxhuro\",\"blobDuration\":\"tyxolniwpwc\"},{\"name\":\"jfkgiawxk\",\"displayName\":\"ypl\",\"blobDuration\":\"kbasyypn\"}]}}") .toObject(ClientDiscoveryForProperties.class); - Assertions.assertEquals("lnrosfqp", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("ehzzvypyqrim", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("npvswjdkirso", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientDiscoveryForProperties model = new ClientDiscoveryForProperties() - .withServiceSpecification(new ClientDiscoveryForServiceSpecification().withLogSpecifications(Arrays.asList( - new ClientDiscoveryForLogSpecification().withName("lnrosfqp") - .withDisplayName("ehzzvypyqrim") - .withBlobDuration("npvswjdkirso"), - new ClientDiscoveryForLogSpecification().withName("qxhcrmn") - .withDisplayName("jtckwhdso") - .withBlobDuration("iy"), - new ClientDiscoveryForLogSpecification().withName("jxsqwpgrjbz") - .withDisplayName("rcjxvsnbyxqabn") - .withBlobDuration("cpc")))); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryForProperties.class); - Assertions.assertEquals("lnrosfqp", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("ehzzvypyqrim", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("npvswjdkirso", model.serviceSpecification().logSpecifications().get(0).blobDuration()); + Assertions.assertEquals("krwpdap", model.serviceSpecification().logSpecifications().get(0).name()); + Assertions.assertEquals("sbdkvwr", model.serviceSpecification().logSpecifications().get(0).displayName()); + Assertions.assertEquals("feusnhut", model.serviceSpecification().logSpecifications().get(0).blobDuration()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryForServiceSpecificationTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryForServiceSpecificationTests.java index 9afd9c680ff1..aa3320815ad9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryForServiceSpecificationTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryForServiceSpecificationTests.java @@ -1,42 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification; import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ClientDiscoveryForServiceSpecificationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClientDiscoveryForServiceSpecification model = BinaryData.fromString( - "{\"logSpecifications\":[{\"name\":\"rzafbljjgpbtoqcj\",\"displayName\":\"ljavbqid\",\"blobDuration\":\"ajzyul\"},{\"name\":\"u\",\"displayName\":\"krlkhbzhfepg\",\"blobDuration\":\"qex\"},{\"name\":\"ocxscpaierhhbcs\",\"displayName\":\"ummajtjaod\",\"blobDuration\":\"bnbdxkqpxokajion\"}]}") + "{\"logSpecifications\":[{\"name\":\"gcbacphejkot\",\"displayName\":\"qgoulznd\",\"blobDuration\":\"kwy\"},{\"name\":\"gfgibm\",\"displayName\":\"gakeqsr\",\"blobDuration\":\"bzqqedqytbciq\"},{\"name\":\"uflmm\",\"displayName\":\"zsm\",\"blobDuration\":\"mglougpbkw\"},{\"name\":\"utduqktapspwgcu\",\"displayName\":\"tumkdosvqwhbm\",\"blobDuration\":\"bbjfddgmbmbexp\"}]}") .toObject(ClientDiscoveryForServiceSpecification.class); - Assertions.assertEquals("rzafbljjgpbtoqcj", model.logSpecifications().get(0).name()); - Assertions.assertEquals("ljavbqid", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("ajzyul", model.logSpecifications().get(0).blobDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientDiscoveryForServiceSpecification model - = new ClientDiscoveryForServiceSpecification().withLogSpecifications(Arrays.asList( - new ClientDiscoveryForLogSpecification().withName("rzafbljjgpbtoqcj") - .withDisplayName("ljavbqid") - .withBlobDuration("ajzyul"), - new ClientDiscoveryForLogSpecification().withName("u") - .withDisplayName("krlkhbzhfepg") - .withBlobDuration("qex"), - new ClientDiscoveryForLogSpecification().withName("ocxscpaierhhbcs") - .withDisplayName("ummajtjaod") - .withBlobDuration("bnbdxkqpxokajion"))); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryForServiceSpecification.class); - Assertions.assertEquals("rzafbljjgpbtoqcj", model.logSpecifications().get(0).name()); - Assertions.assertEquals("ljavbqid", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("ajzyul", model.logSpecifications().get(0).blobDuration()); + Assertions.assertEquals("gcbacphejkot", model.logSpecifications().get(0).name()); + Assertions.assertEquals("qgoulznd", model.logSpecifications().get(0).displayName()); + Assertions.assertEquals("kwy", model.logSpecifications().get(0).blobDuration()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryResponseTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryResponseTests.java index 06c6fb049dfe..05986653c4c8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryResponseTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryResponseTests.java @@ -1,80 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ClientDiscoveryValueForSingleApiInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryDisplay; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForProperties; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryResponse; -import java.util.Arrays; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ClientDiscoveryResponse; import org.junit.jupiter.api.Assertions; public final class ClientDiscoveryResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClientDiscoveryResponse model = BinaryData.fromString( - "{\"value\":[{\"name\":\"cph\",\"display\":{\"provider\":\"ot\",\"resource\":\"qgoulznd\",\"operation\":\"kwy\",\"description\":\"gfgibm\"},\"origin\":\"gakeqsr\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{},{},{}]}}},{\"name\":\"e\",\"display\":{\"provider\":\"tbciqfouflmm\",\"resource\":\"zsm\",\"operation\":\"mglougpbkw\",\"description\":\"utduqktapspwgcu\"},\"origin\":\"tumkdosvqwhbm\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{},{}]}}},{\"name\":\"ddgmb\",\"display\":{\"provider\":\"xppbhtqqro\",\"resource\":\"p\",\"operation\":\"s\",\"description\":\"gbquxigj\"},\"origin\":\"gzjaoyfhrtxilne\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{},{}]}}}],\"nextLink\":\"vlejuvfqa\"}") + "{\"value\":[{\"name\":\"scmdvpjhulsuu\",\"display\":{\"provider\":\"jozkrwfndiod\",\"resource\":\"slwejdpvw\",\"operation\":\"oqpsoa\",\"description\":\"tazak\"},\"origin\":\"lahbcryff\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{}]}}},{\"name\":\"gexpaojakhmsbz\",\"display\":{\"provider\":\"rzevdphlxaol\",\"resource\":\"qtrgqjbpfzfsinzg\",\"operation\":\"cjrwzoxxjtfellu\",\"description\":\"zitonpeqfpjkjl\"},\"origin\":\"fpdvhpfxxypi\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}]}}}],\"nextLink\":\"huyb\"}") .toObject(ClientDiscoveryResponse.class); - Assertions.assertEquals("cph", model.value().get(0).name()); - Assertions.assertEquals("ot", model.value().get(0).display().provider()); - Assertions.assertEquals("qgoulznd", model.value().get(0).display().resource()); - Assertions.assertEquals("kwy", model.value().get(0).display().operation()); - Assertions.assertEquals("gfgibm", model.value().get(0).display().description()); - Assertions.assertEquals("gakeqsr", model.value().get(0).origin()); - Assertions.assertEquals("vlejuvfqa", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientDiscoveryResponse model = new ClientDiscoveryResponse() - .withValue(Arrays - .asList( - new ClientDiscoveryValueForSingleApiInner() - .withName("cph") - .withDisplay(new ClientDiscoveryDisplay().withProvider("ot") - .withResource("qgoulznd") - .withOperation("kwy") - .withDescription("gfgibm")) - .withOrigin("gakeqsr") - .withProperties(new ClientDiscoveryForProperties() - .withServiceSpecification(new ClientDiscoveryForServiceSpecification() - .withLogSpecifications(Arrays.asList(new ClientDiscoveryForLogSpecification(), - new ClientDiscoveryForLogSpecification(), new ClientDiscoveryForLogSpecification(), - new ClientDiscoveryForLogSpecification())))), - new ClientDiscoveryValueForSingleApiInner().withName("e") - .withDisplay(new ClientDiscoveryDisplay().withProvider("tbciqfouflmm") - .withResource("zsm") - .withOperation("mglougpbkw") - .withDescription("utduqktapspwgcu")) - .withOrigin("tumkdosvqwhbm") - .withProperties(new ClientDiscoveryForProperties() - .withServiceSpecification(new ClientDiscoveryForServiceSpecification() - .withLogSpecifications(Arrays.asList(new ClientDiscoveryForLogSpecification(), - new ClientDiscoveryForLogSpecification(), - new ClientDiscoveryForLogSpecification())))), - new ClientDiscoveryValueForSingleApiInner().withName("ddgmb") - .withDisplay(new ClientDiscoveryDisplay().withProvider("xppbhtqqro") - .withResource("p") - .withOperation("s") - .withDescription("gbquxigj")) - .withOrigin("gzjaoyfhrtxilne") - .withProperties(new ClientDiscoveryForProperties().withServiceSpecification( - new ClientDiscoveryForServiceSpecification().withLogSpecifications(Arrays.asList( - new ClientDiscoveryForLogSpecification(), new ClientDiscoveryForLogSpecification(), - new ClientDiscoveryForLogSpecification())))))) - .withNextLink("vlejuvfqa"); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryResponse.class); - Assertions.assertEquals("cph", model.value().get(0).name()); - Assertions.assertEquals("ot", model.value().get(0).display().provider()); - Assertions.assertEquals("qgoulznd", model.value().get(0).display().resource()); - Assertions.assertEquals("kwy", model.value().get(0).display().operation()); - Assertions.assertEquals("gfgibm", model.value().get(0).display().description()); - Assertions.assertEquals("gakeqsr", model.value().get(0).origin()); - Assertions.assertEquals("vlejuvfqa", model.nextLink()); + Assertions.assertEquals("scmdvpjhulsuu", model.value().get(0).name()); + Assertions.assertEquals("jozkrwfndiod", model.value().get(0).display().provider()); + Assertions.assertEquals("slwejdpvw", model.value().get(0).display().resource()); + Assertions.assertEquals("oqpsoa", model.value().get(0).display().operation()); + Assertions.assertEquals("tazak", model.value().get(0).display().description()); + Assertions.assertEquals("lahbcryff", model.value().get(0).origin()); + Assertions.assertEquals("huyb", model.nextLink()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryValueForSingleApiInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryValueForSingleApiInnerTests.java index 94baf0672b06..f3916cfb687d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryValueForSingleApiInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryValueForSingleApiInnerTests.java @@ -1,64 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ClientDiscoveryValueForSingleApiInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryDisplay; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForProperties; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ClientDiscoveryValueForSingleApiInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClientDiscoveryValueForSingleApiInner model = BinaryData.fromString( - "{\"name\":\"lyxwjkcprbnwbx\",\"display\":{\"provider\":\"tbvpysszdnru\",\"resource\":\"guhmuouqfpr\",\"operation\":\"wbnguitnwui\",\"description\":\"a\"},\"origin\":\"ufizuckyf\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"fvzwdzuhty\",\"displayName\":\"isdkfthwxmnteiw\",\"blobDuration\":\"pvkmijcmmxdcuf\"}]}}}") + "{\"name\":\"podepoo\",\"display\":{\"provider\":\"uvamiheognarxzxt\",\"resource\":\"o\",\"operation\":\"si\",\"description\":\"evcciqihnhun\"},\"origin\":\"wjzrnfygxgisp\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"kufubljo\",\"displayName\":\"qeof\",\"blobDuration\":\"e\"},{\"name\":\"hqjbasvmsmj\",\"displayName\":\"lngsntnbybkzgcwr\",\"blobDuration\":\"lxxwrljdouskc\"},{\"name\":\"kocrcjdkwtnhx\",\"displayName\":\"jbiksqrglssai\",\"blobDuration\":\"p\"}]}}}") .toObject(ClientDiscoveryValueForSingleApiInner.class); - Assertions.assertEquals("lyxwjkcprbnwbx", model.name()); - Assertions.assertEquals("tbvpysszdnru", model.display().provider()); - Assertions.assertEquals("guhmuouqfpr", model.display().resource()); - Assertions.assertEquals("wbnguitnwui", model.display().operation()); - Assertions.assertEquals("a", model.display().description()); - Assertions.assertEquals("ufizuckyf", model.origin()); - Assertions.assertEquals("fvzwdzuhty", + Assertions.assertEquals("podepoo", model.name()); + Assertions.assertEquals("uvamiheognarxzxt", model.display().provider()); + Assertions.assertEquals("o", model.display().resource()); + Assertions.assertEquals("si", model.display().operation()); + Assertions.assertEquals("evcciqihnhun", model.display().description()); + Assertions.assertEquals("wjzrnfygxgisp", model.origin()); + Assertions.assertEquals("kufubljo", model.properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("isdkfthwxmnteiw", + Assertions.assertEquals("qeof", model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("pvkmijcmmxdcuf", - model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientDiscoveryValueForSingleApiInner model - = new ClientDiscoveryValueForSingleApiInner().withName("lyxwjkcprbnwbx") - .withDisplay(new ClientDiscoveryDisplay().withProvider("tbvpysszdnru") - .withResource("guhmuouqfpr") - .withOperation("wbnguitnwui") - .withDescription("a")) - .withOrigin("ufizuckyf") - .withProperties(new ClientDiscoveryForProperties() - .withServiceSpecification(new ClientDiscoveryForServiceSpecification().withLogSpecifications( - Arrays.asList(new ClientDiscoveryForLogSpecification().withName("fvzwdzuhty") - .withDisplayName("isdkfthwxmnteiw") - .withBlobDuration("pvkmijcmmxdcuf"))))); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryValueForSingleApiInner.class); - Assertions.assertEquals("lyxwjkcprbnwbx", model.name()); - Assertions.assertEquals("tbvpysszdnru", model.display().provider()); - Assertions.assertEquals("guhmuouqfpr", model.display().resource()); - Assertions.assertEquals("wbnguitnwui", model.display().operation()); - Assertions.assertEquals("a", model.display().description()); - Assertions.assertEquals("ufizuckyf", model.origin()); - Assertions.assertEquals("fvzwdzuhty", - model.properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("isdkfthwxmnteiw", - model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("pvkmijcmmxdcuf", + Assertions.assertEquals("e", model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientScriptForConnectTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientScriptForConnectTests.java index 6b7892dbbdfe..9b980135667d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientScriptForConnectTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientScriptForConnectTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,27 +12,12 @@ public final class ClientScriptForConnectTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClientScriptForConnect model = BinaryData.fromString( - "{\"scriptContent\":\"ogewij\",\"scriptExtension\":\"rhbguzozkyewnfn\",\"osType\":\"hhqosmffjku\",\"url\":\"cyar\",\"scriptNameSuffix\":\"oohguabzoghkt\"}") + "{\"scriptContent\":\"fwvuk\",\"scriptExtension\":\"audccsnhs\",\"osType\":\"nyejhkryhtnap\",\"url\":\"wlokjyem\",\"scriptNameSuffix\":\"vnipjox\"}") .toObject(ClientScriptForConnect.class); - Assertions.assertEquals("ogewij", model.scriptContent()); - Assertions.assertEquals("rhbguzozkyewnfn", model.scriptExtension()); - Assertions.assertEquals("hhqosmffjku", model.osType()); - Assertions.assertEquals("cyar", model.url()); - Assertions.assertEquals("oohguabzoghkt", model.scriptNameSuffix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientScriptForConnect model = new ClientScriptForConnect().withScriptContent("ogewij") - .withScriptExtension("rhbguzozkyewnfn") - .withOsType("hhqosmffjku") - .withUrl("cyar") - .withScriptNameSuffix("oohguabzoghkt"); - model = BinaryData.fromObject(model).toObject(ClientScriptForConnect.class); - Assertions.assertEquals("ogewij", model.scriptContent()); - Assertions.assertEquals("rhbguzozkyewnfn", model.scriptExtension()); - Assertions.assertEquals("hhqosmffjku", model.osType()); - Assertions.assertEquals("cyar", model.url()); - Assertions.assertEquals("oohguabzoghkt", model.scriptNameSuffix()); + Assertions.assertEquals("fwvuk", model.scriptContent()); + Assertions.assertEquals("audccsnhs", model.scriptExtension()); + Assertions.assertEquals("nyejhkryhtnap", model.osType()); + Assertions.assertEquals("wlokjyem", model.url()); + Assertions.assertEquals("vnipjox", model.scriptNameSuffix()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ContainerIdentityInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ContainerIdentityInfoTests.java index 856057ab6e72..0b668f3a5ca4 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ContainerIdentityInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ContainerIdentityInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,24 +12,24 @@ public final class ContainerIdentityInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ContainerIdentityInfo model = BinaryData.fromString( - "{\"uniqueName\":\"yczhco\",\"aadTenantId\":\"cnhz\",\"servicePrincipalClientId\":\"ot\",\"audience\":\"zcfyjzptwrl\"}") + "{\"uniqueName\":\"rchpqbmfpjbabwid\",\"aadTenantId\":\"xsspuunnoxyhk\",\"servicePrincipalClientId\":\"qddrihpfhoqcaae\",\"audience\":\"aomdjvlpjxx\"}") .toObject(ContainerIdentityInfo.class); - Assertions.assertEquals("yczhco", model.uniqueName()); - Assertions.assertEquals("cnhz", model.aadTenantId()); - Assertions.assertEquals("ot", model.servicePrincipalClientId()); - Assertions.assertEquals("zcfyjzptwrl", model.audience()); + Assertions.assertEquals("rchpqbmfpjbabwid", model.uniqueName()); + Assertions.assertEquals("xsspuunnoxyhk", model.aadTenantId()); + Assertions.assertEquals("qddrihpfhoqcaae", model.servicePrincipalClientId()); + Assertions.assertEquals("aomdjvlpjxx", model.audience()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ContainerIdentityInfo model = new ContainerIdentityInfo().withUniqueName("yczhco") - .withAadTenantId("cnhz") - .withServicePrincipalClientId("ot") - .withAudience("zcfyjzptwrl"); + ContainerIdentityInfo model = new ContainerIdentityInfo().withUniqueName("rchpqbmfpjbabwid") + .withAadTenantId("xsspuunnoxyhk") + .withServicePrincipalClientId("qddrihpfhoqcaae") + .withAudience("aomdjvlpjxx"); model = BinaryData.fromObject(model).toObject(ContainerIdentityInfo.class); - Assertions.assertEquals("yczhco", model.uniqueName()); - Assertions.assertEquals("cnhz", model.aadTenantId()); - Assertions.assertEquals("ot", model.servicePrincipalClientId()); - Assertions.assertEquals("zcfyjzptwrl", model.audience()); + Assertions.assertEquals("rchpqbmfpjbabwid", model.uniqueName()); + Assertions.assertEquals("xsspuunnoxyhk", model.aadTenantId()); + Assertions.assertEquals("qddrihpfhoqcaae", model.servicePrincipalClientId()); + Assertions.assertEquals("aomdjvlpjxx", model.audience()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DailyRetentionFormatTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DailyRetentionFormatTests.java index ffa0073aeaa3..a680f3c6dafc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DailyRetentionFormatTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DailyRetentionFormatTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,20 +13,20 @@ public final class DailyRetentionFormatTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DailyRetentionFormat model = BinaryData - .fromString( - "{\"daysOfTheMonth\":[{\"date\":1877932879,\"isLast\":false},{\"date\":77607139,\"isLast\":false}]}") + DailyRetentionFormat model = BinaryData.fromString( + "{\"daysOfTheMonth\":[{\"date\":17564719,\"isLast\":false},{\"date\":884050511,\"isLast\":true},{\"date\":627294033,\"isLast\":false},{\"date\":1755554048,\"isLast\":true}]}") .toObject(DailyRetentionFormat.class); - Assertions.assertEquals(1877932879, model.daysOfTheMonth().get(0).date()); - Assertions.assertEquals(false, model.daysOfTheMonth().get(0).isLast()); + Assertions.assertEquals(17564719, model.daysOfTheMonth().get(0).date()); + Assertions.assertFalse(model.daysOfTheMonth().get(0).isLast()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DailyRetentionFormat model = new DailyRetentionFormat().withDaysOfTheMonth(Arrays - .asList(new Day().withDate(1877932879).withIsLast(false), new Day().withDate(77607139).withIsLast(false))); + DailyRetentionFormat model = new DailyRetentionFormat().withDaysOfTheMonth(Arrays.asList( + new Day().withDate(17564719).withIsLast(false), new Day().withDate(884050511).withIsLast(true), + new Day().withDate(627294033).withIsLast(false), new Day().withDate(1755554048).withIsLast(true))); model = BinaryData.fromObject(model).toObject(DailyRetentionFormat.class); - Assertions.assertEquals(1877932879, model.daysOfTheMonth().get(0).date()); - Assertions.assertEquals(false, model.daysOfTheMonth().get(0).isLast()); + Assertions.assertEquals(17564719, model.daysOfTheMonth().get(0).date()); + Assertions.assertFalse(model.daysOfTheMonth().get(0).isLast()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DailyRetentionScheduleTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DailyRetentionScheduleTests.java index ab966c8510f9..7a853c461803 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DailyRetentionScheduleTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DailyRetentionScheduleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -16,22 +16,23 @@ public final class DailyRetentionScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DailyRetentionSchedule model = BinaryData.fromString( - "{\"retentionTimes\":[\"2021-10-14T17:32:27Z\"],\"retentionDuration\":{\"count\":139843072,\"durationType\":\"Invalid\"}}") + "{\"retentionTimes\":[\"2021-01-20T09:58:03Z\",\"2021-06-20T07:48:50Z\"],\"retentionDuration\":{\"count\":1463731684,\"durationType\":\"Invalid\"}}") .toObject(DailyRetentionSchedule.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-14T17:32:27Z"), model.retentionTimes().get(0)); - Assertions.assertEquals(139843072, model.retentionDuration().count()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T09:58:03Z"), model.retentionTimes().get(0)); + Assertions.assertEquals(1463731684, model.retentionDuration().count()); Assertions.assertEquals(RetentionDurationType.INVALID, model.retentionDuration().durationType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DailyRetentionSchedule model = new DailyRetentionSchedule() - .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-10-14T17:32:27Z"))) + .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-01-20T09:58:03Z"), + OffsetDateTime.parse("2021-06-20T07:48:50Z"))) .withRetentionDuration( - new RetentionDuration().withCount(139843072).withDurationType(RetentionDurationType.INVALID)); + new RetentionDuration().withCount(1463731684).withDurationType(RetentionDurationType.INVALID)); model = BinaryData.fromObject(model).toObject(DailyRetentionSchedule.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-14T17:32:27Z"), model.retentionTimes().get(0)); - Assertions.assertEquals(139843072, model.retentionDuration().count()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T09:58:03Z"), model.retentionTimes().get(0)); + Assertions.assertEquals(1463731684, model.retentionDuration().count()); Assertions.assertEquals(RetentionDurationType.INVALID, model.retentionDuration().durationType()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DailyScheduleTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DailyScheduleTests.java index 94787955d754..49de31c0baab 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DailyScheduleTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DailyScheduleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,17 +13,19 @@ public final class DailyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DailySchedule model - = BinaryData.fromString("{\"scheduleRunTimes\":[\"2021-04-23T03:49:20Z\",\"2021-04-13T14:08:06Z\"]}") - .toObject(DailySchedule.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-23T03:49:20Z"), model.scheduleRunTimes().get(0)); + DailySchedule model = BinaryData + .fromString( + "{\"scheduleRunTimes\":[\"2020-12-31T13:20:30Z\",\"2021-06-01T23:54:49Z\",\"2021-05-14T14:41:19Z\"]}") + .toObject(DailySchedule.class); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-31T13:20:30Z"), model.scheduleRunTimes().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DailySchedule model = new DailySchedule().withScheduleRunTimes( - Arrays.asList(OffsetDateTime.parse("2021-04-23T03:49:20Z"), OffsetDateTime.parse("2021-04-13T14:08:06Z"))); + DailySchedule model + = new DailySchedule().withScheduleRunTimes(Arrays.asList(OffsetDateTime.parse("2020-12-31T13:20:30Z"), + OffsetDateTime.parse("2021-06-01T23:54:49Z"), OffsetDateTime.parse("2021-05-14T14:41:19Z"))); model = BinaryData.fromObject(model).toObject(DailySchedule.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-23T03:49:20Z"), model.scheduleRunTimes().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-31T13:20:30Z"), model.scheduleRunTimes().get(0)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DatabaseInRPTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DatabaseInRPTests.java new file mode 100644 index 000000000000..3aa186f4d762 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DatabaseInRPTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.recoveryservicesbackup.models.DatabaseInRP; +import org.junit.jupiter.api.Assertions; + +public final class DatabaseInRPTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DatabaseInRP model = BinaryData.fromString("{\"datasourceId\":\"qknp\",\"datasourceName\":\"gnepttwqmsni\"}") + .toObject(DatabaseInRP.class); + Assertions.assertEquals("qknp", model.datasourceId()); + Assertions.assertEquals("gnepttwqmsni", model.datasourceName()); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DayTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DayTests.java index 44ff268a0b07..ca4f9ce6cf80 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DayTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DayTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,16 +11,16 @@ public final class DayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Day model = BinaryData.fromString("{\"date\":1235050131,\"isLast\":false}").toObject(Day.class); - Assertions.assertEquals(1235050131, model.date()); - Assertions.assertEquals(false, model.isLast()); + Day model = BinaryData.fromString("{\"date\":1510144840,\"isLast\":false}").toObject(Day.class); + Assertions.assertEquals(1510144840, model.date()); + Assertions.assertFalse(model.isLast()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Day model = new Day().withDate(1235050131).withIsLast(false); + Day model = new Day().withDate(1510144840).withIsLast(false); model = BinaryData.fromObject(model).toObject(Day.class); - Assertions.assertEquals(1235050131, model.date()); - Assertions.assertEquals(false, model.isLast()); + Assertions.assertEquals(1510144840, model.date()); + Assertions.assertFalse(model.isLast()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DeletedProtectionContainersListMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DeletedProtectionContainersListMockTests.java index 0a3c2dc02f3a..67106de63208 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DeletedProtectionContainersListMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DeletedProtectionContainersListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -23,7 +23,7 @@ public final class DeletedProtectionContainersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"qibzji\",\"backupManagementType\":\"Invalid\",\"registrationStatus\":\"biphryvcjwqwoqs\",\"healthStatus\":\"tjhdhzy\",\"protectableObjectType\":\"pijhfrzgdkk\"},\"eTag\":\"v\",\"location\":\"ukhsusmmorf\",\"tags\":{\"neyttl\":\"wilzzhnijmriprlk\",\"bkut\":\"cxiv\"},\"id\":\"umltwjflu\",\"name\":\"ynbpvzlqywauy\",\"type\":\"njc\"}]}"; + = "{\"value\":[{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"dqxwabzrwiqrxhac\",\"backupManagementType\":\"Invalid\",\"registrationStatus\":\"sqkptjqgkifm\",\"healthStatus\":\"inwhed\",\"protectableObjectType\":\"pbqwuntobu\"},\"tags\":{\"lw\":\"zz\"},\"location\":\"ydjufbnklbl\",\"eTag\":\"peg\",\"id\":\"dabalfdxaglzfytl\",\"name\":\"tlqh\",\"type\":\"pxouvmr\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,17 +32,17 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.deletedProtectionContainers().list("wyj", "nldpxottd", "i", com.azure.core.util.Context.NONE); + PagedIterable response = manager.deletedProtectionContainers() + .list("bwjtrdx", "izagbbgiar", "sy", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ukhsusmmorf", response.iterator().next().location()); - Assertions.assertEquals("wilzzhnijmriprlk", response.iterator().next().tags().get("neyttl")); - Assertions.assertEquals("qibzji", response.iterator().next().properties().friendlyName()); + Assertions.assertEquals("dqxwabzrwiqrxhac", response.iterator().next().properties().friendlyName()); Assertions.assertEquals(BackupManagementType.INVALID, response.iterator().next().properties().backupManagementType()); - Assertions.assertEquals("biphryvcjwqwoqs", response.iterator().next().properties().registrationStatus()); - Assertions.assertEquals("tjhdhzy", response.iterator().next().properties().healthStatus()); - Assertions.assertEquals("pijhfrzgdkk", response.iterator().next().properties().protectableObjectType()); - Assertions.assertEquals("v", response.iterator().next().etag()); + Assertions.assertEquals("sqkptjqgkifm", response.iterator().next().properties().registrationStatus()); + Assertions.assertEquals("inwhed", response.iterator().next().properties().healthStatus()); + Assertions.assertEquals("pbqwuntobu", response.iterator().next().properties().protectableObjectType()); + Assertions.assertEquals("zz", response.iterator().next().tags().get("lw")); + Assertions.assertEquals("ydjufbnklbl", response.iterator().next().location()); + Assertions.assertEquals("peg", response.iterator().next().etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DiskExclusionPropertiesTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DiskExclusionPropertiesTests.java index c51c87a36e37..2a8893a56196 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DiskExclusionPropertiesTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DiskExclusionPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,20 +12,20 @@ public final class DiskExclusionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DiskExclusionProperties model - = BinaryData.fromString("{\"diskLunList\":[1782711093,389915828],\"isInclusionList\":true}") - .toObject(DiskExclusionProperties.class); - Assertions.assertEquals(1782711093, model.diskLunList().get(0)); - Assertions.assertEquals(true, model.isInclusionList()); + DiskExclusionProperties model = BinaryData + .fromString("{\"diskLunList\":[1625524147,1348050771,1405360141,587661863],\"isInclusionList\":true}") + .toObject(DiskExclusionProperties.class); + Assertions.assertEquals(1625524147, model.diskLunList().get(0)); + Assertions.assertTrue(model.isInclusionList()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DiskExclusionProperties model - = new DiskExclusionProperties().withDiskLunList(Arrays.asList(1782711093, 389915828)) - .withIsInclusionList(true); + DiskExclusionProperties model = new DiskExclusionProperties() + .withDiskLunList(Arrays.asList(1625524147, 1348050771, 1405360141, 587661863)) + .withIsInclusionList(true); model = BinaryData.fromObject(model).toObject(DiskExclusionProperties.class); - Assertions.assertEquals(1782711093, model.diskLunList().get(0)); - Assertions.assertEquals(true, model.isInclusionList()); + Assertions.assertEquals(1625524147, model.diskLunList().get(0)); + Assertions.assertTrue(model.isInclusionList()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DiskInformationTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DiskInformationTests.java index 5463e4297f42..7fbed63e25cc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DiskInformationTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DiskInformationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,16 +12,8 @@ public final class DiskInformationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DiskInformation model - = BinaryData.fromString("{\"lun\":1700673148,\"name\":\"qgfuhokzru\"}").toObject(DiskInformation.class); - Assertions.assertEquals(1700673148, model.lun()); - Assertions.assertEquals("qgfuhokzru", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiskInformation model = new DiskInformation().withLun(1700673148).withName("qgfuhokzru"); - model = BinaryData.fromObject(model).toObject(DiskInformation.class); - Assertions.assertEquals(1700673148, model.lun()); - Assertions.assertEquals("qgfuhokzru", model.name()); + = BinaryData.fromString("{\"lun\":1678964850,\"name\":\"yczuhxacpq\"}").toObject(DiskInformation.class); + Assertions.assertEquals(1678964850, model.lun()); + Assertions.assertEquals("yczuhxacpq", model.name()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmBackupEngineTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmBackupEngineTests.java index f86af9ed8b0c..522374f414d7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmBackupEngineTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmBackupEngineTests.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineExtendedInfo; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; import com.azure.resourcemanager.recoveryservicesbackup.models.DpmBackupEngine; import java.time.OffsetDateTime; @@ -15,69 +14,26 @@ public final class DpmBackupEngineTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DpmBackupEngine model = BinaryData.fromString( - "{\"backupEngineType\":\"DpmBackupEngine\",\"friendlyName\":\"apqinf\",\"backupManagementType\":\"AzureStorage\",\"registrationStatus\":\"glqdhm\",\"backupEngineState\":\"zralcxpjbyyps\",\"healthStatus\":\"qcjenkyhf\",\"canReRegister\":true,\"backupEngineId\":\"qxfx\",\"dpmVersion\":\"l\",\"azureBackupAgentVersion\":\"mpzqjhhhq\",\"isAzureBackupAgentUpgradeAvailable\":false,\"isDpmUpgradeAvailable\":false,\"extendedInfo\":{\"databaseName\":\"co\",\"protectedItemsCount\":154545602,\"protectedServersCount\":1355684710,\"diskCount\":841869792,\"usedDiskSpace\":57.681034844527524,\"availableDiskSpace\":40.39066692044149,\"refreshedAt\":\"2021-10-05T18:21:11Z\",\"azureProtectedInstances\":1323201789}}") + "{\"backupEngineType\":\"DpmBackupEngine\",\"friendlyName\":\"rkjjjavfqnvhnq\",\"backupManagementType\":\"DefaultBackup\",\"registrationStatus\":\"ogiyetes\",\"backupEngineState\":\"vidbztjhqtfb\",\"healthStatus\":\"nynkbwet\",\"canReRegister\":true,\"backupEngineId\":\"p\",\"dpmVersion\":\"rkzyaupia\",\"azureBackupAgentVersion\":\"xnafbw\",\"isAzureBackupAgentUpgradeAvailable\":true,\"isDpmUpgradeAvailable\":false,\"extendedInfo\":{\"databaseName\":\"ovmaonurjtum\",\"protectedItemsCount\":1804037238,\"protectedServersCount\":511669770,\"diskCount\":118637187,\"usedDiskSpace\":71.56485154222464,\"availableDiskSpace\":23.364593282801437,\"refreshedAt\":\"2021-02-17T00:08:51Z\",\"azureProtectedInstances\":767967508}}") .toObject(DpmBackupEngine.class); - Assertions.assertEquals("apqinf", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_STORAGE, model.backupManagementType()); - Assertions.assertEquals("glqdhm", model.registrationStatus()); - Assertions.assertEquals("zralcxpjbyyps", model.backupEngineState()); - Assertions.assertEquals("qcjenkyhf", model.healthStatus()); - Assertions.assertEquals(true, model.canReRegister()); - Assertions.assertEquals("qxfx", model.backupEngineId()); - Assertions.assertEquals("l", model.dpmVersion()); - Assertions.assertEquals("mpzqjhhhq", model.azureBackupAgentVersion()); - Assertions.assertEquals(false, model.isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(false, model.isDpmUpgradeAvailable()); - Assertions.assertEquals("co", model.extendedInfo().databaseName()); - Assertions.assertEquals(154545602, model.extendedInfo().protectedItemsCount()); - Assertions.assertEquals(1355684710, model.extendedInfo().protectedServersCount()); - Assertions.assertEquals(841869792, model.extendedInfo().diskCount()); - Assertions.assertEquals(57.681034844527524D, model.extendedInfo().usedDiskSpace()); - Assertions.assertEquals(40.39066692044149D, model.extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-05T18:21:11Z"), model.extendedInfo().refreshedAt()); - Assertions.assertEquals(1323201789, model.extendedInfo().azureProtectedInstances()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DpmBackupEngine model = new DpmBackupEngine().withFriendlyName("apqinf") - .withBackupManagementType(BackupManagementType.AZURE_STORAGE) - .withRegistrationStatus("glqdhm") - .withBackupEngineState("zralcxpjbyyps") - .withHealthStatus("qcjenkyhf") - .withCanReRegister(true) - .withBackupEngineId("qxfx") - .withDpmVersion("l") - .withAzureBackupAgentVersion("mpzqjhhhq") - .withIsAzureBackupAgentUpgradeAvailable(false) - .withIsDpmUpgradeAvailable(false) - .withExtendedInfo(new BackupEngineExtendedInfo().withDatabaseName("co") - .withProtectedItemsCount(154545602) - .withProtectedServersCount(1355684710) - .withDiskCount(841869792) - .withUsedDiskSpace(57.681034844527524D) - .withAvailableDiskSpace(40.39066692044149D) - .withRefreshedAt(OffsetDateTime.parse("2021-10-05T18:21:11Z")) - .withAzureProtectedInstances(1323201789)); - model = BinaryData.fromObject(model).toObject(DpmBackupEngine.class); - Assertions.assertEquals("apqinf", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_STORAGE, model.backupManagementType()); - Assertions.assertEquals("glqdhm", model.registrationStatus()); - Assertions.assertEquals("zralcxpjbyyps", model.backupEngineState()); - Assertions.assertEquals("qcjenkyhf", model.healthStatus()); - Assertions.assertEquals(true, model.canReRegister()); - Assertions.assertEquals("qxfx", model.backupEngineId()); - Assertions.assertEquals("l", model.dpmVersion()); - Assertions.assertEquals("mpzqjhhhq", model.azureBackupAgentVersion()); - Assertions.assertEquals(false, model.isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(false, model.isDpmUpgradeAvailable()); - Assertions.assertEquals("co", model.extendedInfo().databaseName()); - Assertions.assertEquals(154545602, model.extendedInfo().protectedItemsCount()); - Assertions.assertEquals(1355684710, model.extendedInfo().protectedServersCount()); - Assertions.assertEquals(841869792, model.extendedInfo().diskCount()); - Assertions.assertEquals(57.681034844527524D, model.extendedInfo().usedDiskSpace()); - Assertions.assertEquals(40.39066692044149D, model.extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-05T18:21:11Z"), model.extendedInfo().refreshedAt()); - Assertions.assertEquals(1323201789, model.extendedInfo().azureProtectedInstances()); + Assertions.assertEquals("rkjjjavfqnvhnq", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); + Assertions.assertEquals("ogiyetes", model.registrationStatus()); + Assertions.assertEquals("vidbztjhqtfb", model.backupEngineState()); + Assertions.assertEquals("nynkbwet", model.healthStatus()); + Assertions.assertTrue(model.canReRegister()); + Assertions.assertEquals("p", model.backupEngineId()); + Assertions.assertEquals("rkzyaupia", model.dpmVersion()); + Assertions.assertEquals("xnafbw", model.azureBackupAgentVersion()); + Assertions.assertTrue(model.isAzureBackupAgentUpgradeAvailable()); + Assertions.assertFalse(model.isDpmUpgradeAvailable()); + Assertions.assertEquals("ovmaonurjtum", model.extendedInfo().databaseName()); + Assertions.assertEquals(1804037238, model.extendedInfo().protectedItemsCount()); + Assertions.assertEquals(511669770, model.extendedInfo().protectedServersCount()); + Assertions.assertEquals(118637187, model.extendedInfo().diskCount()); + Assertions.assertEquals(71.56485154222464D, model.extendedInfo().usedDiskSpace()); + Assertions.assertEquals(23.364593282801437D, model.extendedInfo().availableDiskSpace()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-17T00:08:51Z"), model.extendedInfo().refreshedAt()); + Assertions.assertEquals(767967508, model.extendedInfo().azureProtectedInstances()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmContainerExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmContainerExtendedInfoTests.java index 05ef1e71776e..513f1361989c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmContainerExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmContainerExtendedInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,16 +12,16 @@ public final class DpmContainerExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DpmContainerExtendedInfo model = BinaryData.fromString("{\"lastRefreshedAt\":\"2021-01-30T08:36:14Z\"}") + DpmContainerExtendedInfo model = BinaryData.fromString("{\"lastRefreshedAt\":\"2020-12-31T22:39:11Z\"}") .toObject(DpmContainerExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-30T08:36:14Z"), model.lastRefreshedAt()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-31T22:39:11Z"), model.lastRefreshedAt()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DpmContainerExtendedInfo model - = new DpmContainerExtendedInfo().withLastRefreshedAt(OffsetDateTime.parse("2021-01-30T08:36:14Z")); + = new DpmContainerExtendedInfo().withLastRefreshedAt(OffsetDateTime.parse("2020-12-31T22:39:11Z")); model = BinaryData.fromObject(model).toObject(DpmContainerExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-30T08:36:14Z"), model.lastRefreshedAt()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-31T22:39:11Z"), model.lastRefreshedAt()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmContainerTests.java index 6d3b1eadcc0b..58244af909ae 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmContainerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmContainerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -16,52 +16,52 @@ public final class DpmContainerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DpmContainer model = BinaryData.fromString( - "{\"containerType\":\"DPMContainer\",\"canReRegister\":true,\"containerId\":\"jqo\",\"protectedItemCount\":7574679234591637663,\"dpmAgentVersion\":\"ehcecyb\",\"dpmServers\":[\"brjbbmpxdlvy\"],\"upgradeAvailable\":true,\"protectionStatus\":\"xcrseqwjksgh\",\"extendedInfo\":{\"lastRefreshedAt\":\"2021-01-02T16:20Z\"},\"friendlyName\":\"xog\",\"backupManagementType\":\"AzureIaasVM\",\"registrationStatus\":\"voujkxibdafhrk\",\"healthStatus\":\"yomkxfbvfbhdy\",\"protectableObjectType\":\"hpwpgddeimawzovg\"}") + "{\"containerType\":\"DPMContainer\",\"canReRegister\":true,\"containerId\":\"eclze\",\"protectedItemCount\":358295639817715571,\"dpmAgentVersion\":\"hzlhplodqkdlww\",\"dpmServers\":[\"u\"],\"upgradeAvailable\":false,\"protectionStatus\":\"trqjfsmlmbtx\",\"extendedInfo\":{\"lastRefreshedAt\":\"2021-01-27T14:19:26Z\"},\"friendlyName\":\"srtawcoezbr\",\"backupManagementType\":\"DefaultBackup\",\"registrationStatus\":\"kh\",\"healthStatus\":\"ygo\",\"protectableObjectType\":\"kkqfqjbvle\"}") .toObject(DpmContainer.class); - Assertions.assertEquals("xog", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.backupManagementType()); - Assertions.assertEquals("voujkxibdafhrk", model.registrationStatus()); - Assertions.assertEquals("yomkxfbvfbhdy", model.healthStatus()); - Assertions.assertEquals("hpwpgddeimawzovg", model.protectableObjectType()); - Assertions.assertEquals(true, model.canReRegister()); - Assertions.assertEquals("jqo", model.containerId()); - Assertions.assertEquals(7574679234591637663L, model.protectedItemCount()); - Assertions.assertEquals("ehcecyb", model.dpmAgentVersion()); - Assertions.assertEquals("brjbbmpxdlvy", model.dpmServers().get(0)); - Assertions.assertEquals(true, model.upgradeAvailable()); - Assertions.assertEquals("xcrseqwjksgh", model.protectionStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-02T16:20Z"), model.extendedInfo().lastRefreshedAt()); + Assertions.assertEquals("srtawcoezbr", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); + Assertions.assertEquals("kh", model.registrationStatus()); + Assertions.assertEquals("ygo", model.healthStatus()); + Assertions.assertEquals("kkqfqjbvle", model.protectableObjectType()); + Assertions.assertTrue(model.canReRegister()); + Assertions.assertEquals("eclze", model.containerId()); + Assertions.assertEquals(358295639817715571L, model.protectedItemCount()); + Assertions.assertEquals("hzlhplodqkdlww", model.dpmAgentVersion()); + Assertions.assertEquals("u", model.dpmServers().get(0)); + Assertions.assertFalse(model.upgradeAvailable()); + Assertions.assertEquals("trqjfsmlmbtx", model.protectionStatus()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-27T14:19:26Z"), model.extendedInfo().lastRefreshedAt()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DpmContainer model = new DpmContainer().withFriendlyName("xog") - .withBackupManagementType(BackupManagementType.AZURE_IAAS_VM) - .withRegistrationStatus("voujkxibdafhrk") - .withHealthStatus("yomkxfbvfbhdy") - .withProtectableObjectType("hpwpgddeimawzovg") + DpmContainer model = new DpmContainer().withFriendlyName("srtawcoezbr") + .withBackupManagementType(BackupManagementType.DEFAULT_BACKUP) + .withRegistrationStatus("kh") + .withHealthStatus("ygo") + .withProtectableObjectType("kkqfqjbvle") .withCanReRegister(true) - .withContainerId("jqo") - .withProtectedItemCount(7574679234591637663L) - .withDpmAgentVersion("ehcecyb") - .withDpmServers(Arrays.asList("brjbbmpxdlvy")) - .withUpgradeAvailable(true) - .withProtectionStatus("xcrseqwjksgh") + .withContainerId("eclze") + .withProtectedItemCount(358295639817715571L) + .withDpmAgentVersion("hzlhplodqkdlww") + .withDpmServers(Arrays.asList("u")) + .withUpgradeAvailable(false) + .withProtectionStatus("trqjfsmlmbtx") .withExtendedInfo( - new DpmContainerExtendedInfo().withLastRefreshedAt(OffsetDateTime.parse("2021-01-02T16:20Z"))); + new DpmContainerExtendedInfo().withLastRefreshedAt(OffsetDateTime.parse("2021-01-27T14:19:26Z"))); model = BinaryData.fromObject(model).toObject(DpmContainer.class); - Assertions.assertEquals("xog", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.backupManagementType()); - Assertions.assertEquals("voujkxibdafhrk", model.registrationStatus()); - Assertions.assertEquals("yomkxfbvfbhdy", model.healthStatus()); - Assertions.assertEquals("hpwpgddeimawzovg", model.protectableObjectType()); - Assertions.assertEquals(true, model.canReRegister()); - Assertions.assertEquals("jqo", model.containerId()); - Assertions.assertEquals(7574679234591637663L, model.protectedItemCount()); - Assertions.assertEquals("ehcecyb", model.dpmAgentVersion()); - Assertions.assertEquals("brjbbmpxdlvy", model.dpmServers().get(0)); - Assertions.assertEquals(true, model.upgradeAvailable()); - Assertions.assertEquals("xcrseqwjksgh", model.protectionStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-02T16:20Z"), model.extendedInfo().lastRefreshedAt()); + Assertions.assertEquals("srtawcoezbr", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); + Assertions.assertEquals("kh", model.registrationStatus()); + Assertions.assertEquals("ygo", model.healthStatus()); + Assertions.assertEquals("kkqfqjbvle", model.protectableObjectType()); + Assertions.assertTrue(model.canReRegister()); + Assertions.assertEquals("eclze", model.containerId()); + Assertions.assertEquals(358295639817715571L, model.protectedItemCount()); + Assertions.assertEquals("hzlhplodqkdlww", model.dpmAgentVersion()); + Assertions.assertEquals("u", model.dpmServers().get(0)); + Assertions.assertFalse(model.upgradeAvailable()); + Assertions.assertEquals("trqjfsmlmbtx", model.protectionStatus()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-27T14:19:26Z"), model.extendedInfo().lastRefreshedAt()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmErrorInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmErrorInfoTests.java index 0eae4713e1fd..2fa546ab2203 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmErrorInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmErrorInfoTests.java @@ -1,30 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.DpmErrorInfo; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class DpmErrorInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DpmErrorInfo model = BinaryData - .fromString("{\"errorString\":\"xqhndvnoamlds\",\"recommendations\":[\"ohdjhhflzok\",\"coxpelnjeta\"]}") + DpmErrorInfo model = BinaryData.fromString( + "{\"errorString\":\"nabaobnslujd\",\"recommendations\":[\"ymkmvguihyw\",\"rtspphkixkykxds\",\"j\",\"emmucfxh\"]}") .toObject(DpmErrorInfo.class); - Assertions.assertEquals("xqhndvnoamlds", model.errorString()); - Assertions.assertEquals("ohdjhhflzok", model.recommendations().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DpmErrorInfo model = new DpmErrorInfo().withErrorString("xqhndvnoamlds") - .withRecommendations(Arrays.asList("ohdjhhflzok", "coxpelnjeta")); - model = BinaryData.fromObject(model).toObject(DpmErrorInfo.class); - Assertions.assertEquals("xqhndvnoamlds", model.errorString()); - Assertions.assertEquals("ohdjhhflzok", model.recommendations().get(0)); + Assertions.assertEquals("nabaobnslujd", model.errorString()); + Assertions.assertEquals("ymkmvguihyw", model.recommendations().get(0)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmJobExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmJobExtendedInfoTests.java index f1c2d1fa9598..bd9b12e2d340 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmJobExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmJobExtendedInfoTests.java @@ -1,69 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.DpmJobExtendedInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.DpmJobTaskDetails; import java.time.Duration; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class DpmJobExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DpmJobExtendedInfo model = BinaryData.fromString( - "{\"tasksList\":[{\"taskId\":\"nxaulk\",\"startTime\":\"2021-05-04T10:50:30Z\",\"endTime\":\"2021-07-31T21:19:31Z\",\"duration\":\"PT117H14M50S\",\"status\":\"jnnawtqa\"},{\"taskId\":\"xuckpggqoweyir\",\"startTime\":\"2021-10-13T06:42:41Z\",\"endTime\":\"2021-03-03T15:45:16Z\",\"duration\":\"PT61H45M7S\",\"status\":\"fl\"}],\"propertyBag\":{\"cng\":\"pizruwnpqxpxiw\",\"kv\":\"saasiixtmkzj\"},\"dynamicErrorMessage\":\"rhgfgrwsdpgrat\"}") + "{\"tasksList\":[{\"taskId\":\"lrmymyincqlhri\",\"startTime\":\"2021-10-10T16:10:58Z\",\"endTime\":\"2021-07-05T12:47:55Z\",\"duration\":\"PT120H6M36S\",\"status\":\"ovgqcgxuugqkctot\"},{\"taskId\":\"wlxte\",\"startTime\":\"2021-04-15T08:31:11Z\",\"endTime\":\"2021-04-05T19:15:27Z\",\"duration\":\"PT23H51M32S\",\"status\":\"tgukranblwphql\"}],\"propertyBag\":{\"qwahoi\":\"uzgy\"},\"dynamicErrorMessage\":\"wgniipr\"}") .toObject(DpmJobExtendedInfo.class); - Assertions.assertEquals("nxaulk", model.tasksList().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-04T10:50:30Z"), model.tasksList().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-31T21:19:31Z"), model.tasksList().get(0).endTime()); - Assertions.assertEquals(Duration.parse("PT117H14M50S"), model.tasksList().get(0).duration()); - Assertions.assertEquals("jnnawtqa", model.tasksList().get(0).status()); - Assertions.assertEquals("pizruwnpqxpxiw", model.propertyBag().get("cng")); - Assertions.assertEquals("rhgfgrwsdpgrat", model.dynamicErrorMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DpmJobExtendedInfo model = new DpmJobExtendedInfo() - .withTasksList(Arrays.asList( - new DpmJobTaskDetails().withTaskId("nxaulk") - .withStartTime(OffsetDateTime.parse("2021-05-04T10:50:30Z")) - .withEndTime(OffsetDateTime.parse("2021-07-31T21:19:31Z")) - .withDuration(Duration.parse("PT117H14M50S")) - .withStatus("jnnawtqa"), - new DpmJobTaskDetails().withTaskId("xuckpggqoweyir") - .withStartTime(OffsetDateTime.parse("2021-10-13T06:42:41Z")) - .withEndTime(OffsetDateTime.parse("2021-03-03T15:45:16Z")) - .withDuration(Duration.parse("PT61H45M7S")) - .withStatus("fl"))) - .withPropertyBag(mapOf("cng", "pizruwnpqxpxiw", "kv", "saasiixtmkzj")) - .withDynamicErrorMessage("rhgfgrwsdpgrat"); - model = BinaryData.fromObject(model).toObject(DpmJobExtendedInfo.class); - Assertions.assertEquals("nxaulk", model.tasksList().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-04T10:50:30Z"), model.tasksList().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-31T21:19:31Z"), model.tasksList().get(0).endTime()); - Assertions.assertEquals(Duration.parse("PT117H14M50S"), model.tasksList().get(0).duration()); - Assertions.assertEquals("jnnawtqa", model.tasksList().get(0).status()); - Assertions.assertEquals("pizruwnpqxpxiw", model.propertyBag().get("cng")); - Assertions.assertEquals("rhgfgrwsdpgrat", model.dynamicErrorMessage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("lrmymyincqlhri", model.tasksList().get(0).taskId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-10T16:10:58Z"), model.tasksList().get(0).startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-05T12:47:55Z"), model.tasksList().get(0).endTime()); + Assertions.assertEquals(Duration.parse("PT120H6M36S"), model.tasksList().get(0).duration()); + Assertions.assertEquals("ovgqcgxuugqkctot", model.tasksList().get(0).status()); + Assertions.assertEquals("uzgy", model.propertyBag().get("qwahoi")); + Assertions.assertEquals("wgniipr", model.dynamicErrorMessage()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmJobTaskDetailsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmJobTaskDetailsTests.java index ea59e80fe4e9..b2b2f9c1dec1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmJobTaskDetailsTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmJobTaskDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,27 +14,12 @@ public final class DpmJobTaskDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DpmJobTaskDetails model = BinaryData.fromString( - "{\"taskId\":\"zb\",\"startTime\":\"2021-02-19T02:39:37Z\",\"endTime\":\"2021-06-29T17:23:40Z\",\"duration\":\"PT167H34M34S\",\"status\":\"ctbrxkjzwrgxffm\"}") + "{\"taskId\":\"vawuwzdufypivlsb\",\"startTime\":\"2021-03-20T16:30:31Z\",\"endTime\":\"2021-12-09T01:16:52Z\",\"duration\":\"PT35H28M8S\",\"status\":\"mifoxxkub\"}") .toObject(DpmJobTaskDetails.class); - Assertions.assertEquals("zb", model.taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-19T02:39:37Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-29T17:23:40Z"), model.endTime()); - Assertions.assertEquals(Duration.parse("PT167H34M34S"), model.duration()); - Assertions.assertEquals("ctbrxkjzwrgxffm", model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DpmJobTaskDetails model = new DpmJobTaskDetails().withTaskId("zb") - .withStartTime(OffsetDateTime.parse("2021-02-19T02:39:37Z")) - .withEndTime(OffsetDateTime.parse("2021-06-29T17:23:40Z")) - .withDuration(Duration.parse("PT167H34M34S")) - .withStatus("ctbrxkjzwrgxffm"); - model = BinaryData.fromObject(model).toObject(DpmJobTaskDetails.class); - Assertions.assertEquals("zb", model.taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-19T02:39:37Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-29T17:23:40Z"), model.endTime()); - Assertions.assertEquals(Duration.parse("PT167H34M34S"), model.duration()); - Assertions.assertEquals("ctbrxkjzwrgxffm", model.status()); + Assertions.assertEquals("vawuwzdufypivlsb", model.taskId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-20T16:30:31Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-09T01:16:52Z"), model.endTime()); + Assertions.assertEquals(Duration.parse("PT35H28M8S"), model.duration()); + Assertions.assertEquals("mifoxxkub", model.status()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmJobTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmJobTests.java index 848467b2922d..9e82d760050d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmJobTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmJobTests.java @@ -1,119 +1,46 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.DpmErrorInfo; import com.azure.resourcemanager.recoveryservicesbackup.models.DpmJob; -import com.azure.resourcemanager.recoveryservicesbackup.models.DpmJobExtendedInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.DpmJobTaskDetails; import com.azure.resourcemanager.recoveryservicesbackup.models.JobSupportedAction; import java.time.Duration; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class DpmJobTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DpmJob model = BinaryData.fromString( - "{\"jobType\":\"DpmJob\",\"duration\":\"PT188H4M57S\",\"dpmServerName\":\"xo\",\"containerName\":\"ftgz\",\"containerType\":\"pbswvefloccsrm\",\"workloadType\":\"ihmipgawtxxpk\",\"actionsInfo\":[\"Invalid\",\"Cancellable\"],\"errorDetails\":[{\"errorString\":\"rytfmpcycil\",\"recommendations\":[\"aykggnoxu\",\"t\",\"ksxwpnd\"]},{\"errorString\":\"pfnznthjtwkj\",\"recommendations\":[\"rxuzvoam\",\"tcqiosmg\",\"zah\"]}],\"extendedInfo\":{\"tasksList\":[{\"taskId\":\"yrtltlaprltzkat\",\"startTime\":\"2021-01-26T08:01:35Z\",\"endTime\":\"2021-11-05T23:53:12Z\",\"duration\":\"PT141H27M7S\",\"status\":\"s\"}],\"propertyBag\":{\"ebwlnbmhyreeudzq\":\"qalarvlagunbtg\"},\"dynamicErrorMessage\":\"bpdqmjxlyy\"},\"entityFriendlyName\":\"lgouwtlmjj\",\"backupManagementType\":\"MAB\",\"operation\":\"qtobaxkjeyt\",\"status\":\"lbfjkwr\",\"startTime\":\"2021-05-29T11:10:20Z\",\"endTime\":\"2021-06-19T00:14:04Z\",\"activityId\":\"hsyrqunj\"}") + "{\"jobType\":\"DpmJob\",\"duration\":\"PT213H47M45S\",\"dpmServerName\":\"euachtomfl\",\"containerName\":\"tswfpfmdgycxnms\",\"containerType\":\"hqjjys\",\"workloadType\":\"rlpshhkv\",\"actionsInfo\":[\"Invalid\",\"Retriable\",\"Cancellable\",\"Cancellable\"],\"errorDetails\":[{\"errorString\":\"mpqvwwsk\",\"recommendations\":[\"cbrwi\",\"uvqejosovyrrle\",\"esi\"]},{\"errorString\":\"qtljqobbpihehc\",\"recommendations\":[\"bmrqbrjbbmp\",\"dlvykfrex\",\"rseqwjksghudgz\"]},{\"errorString\":\"ogjggsvoujkxibda\",\"recommendations\":[\"kmdyomkxfbvfbh\",\"y\"]}],\"extendedInfo\":{\"tasksList\":[{\"taskId\":\"pgddeimawz\",\"startTime\":\"2021-03-24T04:17:47Z\",\"endTime\":\"2021-09-21T07:08:48Z\",\"duration\":\"PT106H40M40S\",\"status\":\"ikjcjcazt\"},{\"taskId\":\"snsqowxwcoml\",\"startTime\":\"2021-08-11T16:27:42Z\",\"endTime\":\"2021-01-28T06:56:23Z\",\"duration\":\"PT59H1M9S\",\"status\":\"cswkacvejy\"}],\"propertyBag\":{\"tgddpqthehnmnaoy\":\"lvhbwrnf\",\"hdroznnh\":\"nkcoeqswankltyt\",\"hemlwywaee\":\"rlktgjcsggu\",\"lycsxz\":\"zgfbukklelssx\"},\"dynamicErrorMessage\":\"ksrl\"},\"entityFriendlyName\":\"desqplpvmjcdo\",\"backupManagementType\":\"AzureIaasVM\",\"operation\":\"dyvt\",\"status\":\"wxvgpiudeugfsxze\",\"startTime\":\"2021-08-07T11:21:57Z\",\"endTime\":\"2021-08-01T08:13:49Z\",\"activityId\":\"ufykhvuhxepmru\"}") .toObject(DpmJob.class); - Assertions.assertEquals("lgouwtlmjj", model.entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); - Assertions.assertEquals("qtobaxkjeyt", model.operation()); - Assertions.assertEquals("lbfjkwr", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-29T11:10:20Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T00:14:04Z"), model.endTime()); - Assertions.assertEquals("hsyrqunj", model.activityId()); - Assertions.assertEquals(Duration.parse("PT188H4M57S"), model.duration()); - Assertions.assertEquals("xo", model.dpmServerName()); - Assertions.assertEquals("ftgz", model.containerName()); - Assertions.assertEquals("pbswvefloccsrm", model.containerType()); - Assertions.assertEquals("ihmipgawtxxpk", model.workloadType()); + Assertions.assertEquals("desqplpvmjcdo", model.entityFriendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.backupManagementType()); + Assertions.assertEquals("dyvt", model.operation()); + Assertions.assertEquals("wxvgpiudeugfsxze", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-07T11:21:57Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-01T08:13:49Z"), model.endTime()); + Assertions.assertEquals("ufykhvuhxepmru", model.activityId()); + Assertions.assertEquals(Duration.parse("PT213H47M45S"), model.duration()); + Assertions.assertEquals("euachtomfl", model.dpmServerName()); + Assertions.assertEquals("tswfpfmdgycxnms", model.containerName()); + Assertions.assertEquals("hqjjys", model.containerType()); + Assertions.assertEquals("rlpshhkv", model.workloadType()); Assertions.assertEquals(JobSupportedAction.INVALID, model.actionsInfo().get(0)); - Assertions.assertEquals("rytfmpcycil", model.errorDetails().get(0).errorString()); - Assertions.assertEquals("aykggnoxu", model.errorDetails().get(0).recommendations().get(0)); - Assertions.assertEquals("yrtltlaprltzkat", model.extendedInfo().tasksList().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-26T08:01:35Z"), + Assertions.assertEquals("mpqvwwsk", model.errorDetails().get(0).errorString()); + Assertions.assertEquals("cbrwi", model.errorDetails().get(0).recommendations().get(0)); + Assertions.assertEquals("pgddeimawz", model.extendedInfo().tasksList().get(0).taskId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-24T04:17:47Z"), model.extendedInfo().tasksList().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-05T23:53:12Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-09-21T07:08:48Z"), model.extendedInfo().tasksList().get(0).endTime()); - Assertions.assertEquals(Duration.parse("PT141H27M7S"), model.extendedInfo().tasksList().get(0).duration()); - Assertions.assertEquals("s", model.extendedInfo().tasksList().get(0).status()); - Assertions.assertEquals("qalarvlagunbtg", model.extendedInfo().propertyBag().get("ebwlnbmhyreeudzq")); - Assertions.assertEquals("bpdqmjxlyy", model.extendedInfo().dynamicErrorMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DpmJob model = new DpmJob().withEntityFriendlyName("lgouwtlmjj") - .withBackupManagementType(BackupManagementType.MAB) - .withOperation("qtobaxkjeyt") - .withStatus("lbfjkwr") - .withStartTime(OffsetDateTime.parse("2021-05-29T11:10:20Z")) - .withEndTime(OffsetDateTime.parse("2021-06-19T00:14:04Z")) - .withActivityId("hsyrqunj") - .withDuration(Duration.parse("PT188H4M57S")) - .withDpmServerName("xo") - .withContainerName("ftgz") - .withContainerType("pbswvefloccsrm") - .withWorkloadType("ihmipgawtxxpk") - .withActionsInfo(Arrays.asList(JobSupportedAction.INVALID, JobSupportedAction.CANCELLABLE)) - .withErrorDetails(Arrays.asList( - new DpmErrorInfo().withErrorString("rytfmpcycil") - .withRecommendations(Arrays.asList("aykggnoxu", "t", "ksxwpnd")), - new DpmErrorInfo().withErrorString("pfnznthjtwkj") - .withRecommendations(Arrays.asList("rxuzvoam", "tcqiosmg", "zah")))) - .withExtendedInfo(new DpmJobExtendedInfo() - .withTasksList(Arrays.asList(new DpmJobTaskDetails().withTaskId("yrtltlaprltzkat") - .withStartTime(OffsetDateTime.parse("2021-01-26T08:01:35Z")) - .withEndTime(OffsetDateTime.parse("2021-11-05T23:53:12Z")) - .withDuration(Duration.parse("PT141H27M7S")) - .withStatus("s"))) - .withPropertyBag(mapOf("ebwlnbmhyreeudzq", "qalarvlagunbtg")) - .withDynamicErrorMessage("bpdqmjxlyy")); - model = BinaryData.fromObject(model).toObject(DpmJob.class); - Assertions.assertEquals("lgouwtlmjj", model.entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); - Assertions.assertEquals("qtobaxkjeyt", model.operation()); - Assertions.assertEquals("lbfjkwr", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-29T11:10:20Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T00:14:04Z"), model.endTime()); - Assertions.assertEquals("hsyrqunj", model.activityId()); - Assertions.assertEquals(Duration.parse("PT188H4M57S"), model.duration()); - Assertions.assertEquals("xo", model.dpmServerName()); - Assertions.assertEquals("ftgz", model.containerName()); - Assertions.assertEquals("pbswvefloccsrm", model.containerType()); - Assertions.assertEquals("ihmipgawtxxpk", model.workloadType()); - Assertions.assertEquals(JobSupportedAction.INVALID, model.actionsInfo().get(0)); - Assertions.assertEquals("rytfmpcycil", model.errorDetails().get(0).errorString()); - Assertions.assertEquals("aykggnoxu", model.errorDetails().get(0).recommendations().get(0)); - Assertions.assertEquals("yrtltlaprltzkat", model.extendedInfo().tasksList().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-26T08:01:35Z"), - model.extendedInfo().tasksList().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-05T23:53:12Z"), - model.extendedInfo().tasksList().get(0).endTime()); - Assertions.assertEquals(Duration.parse("PT141H27M7S"), model.extendedInfo().tasksList().get(0).duration()); - Assertions.assertEquals("s", model.extendedInfo().tasksList().get(0).status()); - Assertions.assertEquals("qalarvlagunbtg", model.extendedInfo().propertyBag().get("ebwlnbmhyreeudzq")); - Assertions.assertEquals("bpdqmjxlyy", model.extendedInfo().dynamicErrorMessage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(Duration.parse("PT106H40M40S"), model.extendedInfo().tasksList().get(0).duration()); + Assertions.assertEquals("ikjcjcazt", model.extendedInfo().tasksList().get(0).status()); + Assertions.assertEquals("lvhbwrnf", model.extendedInfo().propertyBag().get("tgddpqthehnmnaoy")); + Assertions.assertEquals("ksrl", model.extendedInfo().dynamicErrorMessage()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmProtectedItemExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmProtectedItemExtendedInfoTests.java index ddb17cfdb993..adf7fb1e604b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmProtectedItemExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmProtectedItemExtendedInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -15,56 +15,57 @@ public final class DpmProtectedItemExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DpmProtectedItemExtendedInfo model = BinaryData.fromString( - "{\"protectableObjectLoadPath\":{\"vuporqzdfuydzv\":\"vfgpikqmhhaowjrm\"},\"protected\":true,\"isPresentOnCloud\":true,\"lastBackupStatus\":\"qmxq\",\"lastRefreshedAt\":\"2021-06-24T21:59:48Z\",\"oldestRecoveryPoint\":\"2020-12-21T19:56:22Z\",\"recoveryPointCount\":1002449917,\"onPremiseOldestRecoveryPoint\":\"2021-01-11T11:04:44Z\",\"onPremiseLatestRecoveryPoint\":\"2021-12-01T08:12:15Z\",\"onPremiseRecoveryPointCount\":998809541,\"isCollocated\":true,\"protectionGroupName\":\"mzqkz\",\"diskStorageUsedInBytes\":\"uwiwtglxxhljfpg\",\"totalDiskStorageSizeInBytes\":\"crmnzhrgmqgjs\"}") + "{\"protectableObjectLoadPath\":{\"lzlfbxzpuz\":\"mpukgriw\",\"yydhibnuqqk\":\"cispnqzahmgkbr\",\"drgvtqagn\":\"ik\"},\"protected\":true,\"isPresentOnCloud\":false,\"lastBackupStatus\":\"jggmebfsiarbu\",\"lastRefreshedAt\":\"2021-02-21T10:02:12Z\",\"oldestRecoveryPoint\":\"2021-10-04T02:04:35Z\",\"recoveryPointCount\":1487439384,\"onPremiseOldestRecoveryPoint\":\"2021-03-17T12:33:19Z\",\"onPremiseLatestRecoveryPoint\":\"2021-12-03T11:22:47Z\",\"onPremiseRecoveryPointCount\":2024670267,\"isCollocated\":true,\"protectionGroupName\":\"xttd\",\"diskStorageUsedInBytes\":\"rbnlankxmyskp\",\"totalDiskStorageSizeInBytes\":\"enbtkcxywny\"}") .toObject(DpmProtectedItemExtendedInfo.class); - Assertions.assertEquals("vfgpikqmhhaowjrm", model.protectableObjectLoadPath().get("vuporqzdfuydzv")); - Assertions.assertEquals(true, model.protectedProperty()); - Assertions.assertEquals(true, model.isPresentOnCloud()); - Assertions.assertEquals("qmxq", model.lastBackupStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-24T21:59:48Z"), model.lastRefreshedAt()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-21T19:56:22Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(1002449917, model.recoveryPointCount()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-11T11:04:44Z"), model.onPremiseOldestRecoveryPoint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-01T08:12:15Z"), model.onPremiseLatestRecoveryPoint()); - Assertions.assertEquals(998809541, model.onPremiseRecoveryPointCount()); - Assertions.assertEquals(true, model.isCollocated()); - Assertions.assertEquals("mzqkz", model.protectionGroupName()); - Assertions.assertEquals("uwiwtglxxhljfpg", model.diskStorageUsedInBytes()); - Assertions.assertEquals("crmnzhrgmqgjs", model.totalDiskStorageSizeInBytes()); + Assertions.assertEquals("mpukgriw", model.protectableObjectLoadPath().get("lzlfbxzpuz")); + Assertions.assertTrue(model.protectedProperty()); + Assertions.assertFalse(model.isPresentOnCloud()); + Assertions.assertEquals("jggmebfsiarbu", model.lastBackupStatus()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-21T10:02:12Z"), model.lastRefreshedAt()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-04T02:04:35Z"), model.oldestRecoveryPoint()); + Assertions.assertEquals(1487439384, model.recoveryPointCount()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-17T12:33:19Z"), model.onPremiseOldestRecoveryPoint()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T11:22:47Z"), model.onPremiseLatestRecoveryPoint()); + Assertions.assertEquals(2024670267, model.onPremiseRecoveryPointCount()); + Assertions.assertTrue(model.isCollocated()); + Assertions.assertEquals("xttd", model.protectionGroupName()); + Assertions.assertEquals("rbnlankxmyskp", model.diskStorageUsedInBytes()); + Assertions.assertEquals("enbtkcxywny", model.totalDiskStorageSizeInBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DpmProtectedItemExtendedInfo model = new DpmProtectedItemExtendedInfo() - .withProtectableObjectLoadPath(mapOf("vuporqzdfuydzv", "vfgpikqmhhaowjrm")) + .withProtectableObjectLoadPath( + mapOf("lzlfbxzpuz", "mpukgriw", "yydhibnuqqk", "cispnqzahmgkbr", "drgvtqagn", "ik")) .withProtectedProperty(true) - .withIsPresentOnCloud(true) - .withLastBackupStatus("qmxq") - .withLastRefreshedAt(OffsetDateTime.parse("2021-06-24T21:59:48Z")) - .withOldestRecoveryPoint(OffsetDateTime.parse("2020-12-21T19:56:22Z")) - .withRecoveryPointCount(1002449917) - .withOnPremiseOldestRecoveryPoint(OffsetDateTime.parse("2021-01-11T11:04:44Z")) - .withOnPremiseLatestRecoveryPoint(OffsetDateTime.parse("2021-12-01T08:12:15Z")) - .withOnPremiseRecoveryPointCount(998809541) + .withIsPresentOnCloud(false) + .withLastBackupStatus("jggmebfsiarbu") + .withLastRefreshedAt(OffsetDateTime.parse("2021-02-21T10:02:12Z")) + .withOldestRecoveryPoint(OffsetDateTime.parse("2021-10-04T02:04:35Z")) + .withRecoveryPointCount(1487439384) + .withOnPremiseOldestRecoveryPoint(OffsetDateTime.parse("2021-03-17T12:33:19Z")) + .withOnPremiseLatestRecoveryPoint(OffsetDateTime.parse("2021-12-03T11:22:47Z")) + .withOnPremiseRecoveryPointCount(2024670267) .withIsCollocated(true) - .withProtectionGroupName("mzqkz") - .withDiskStorageUsedInBytes("uwiwtglxxhljfpg") - .withTotalDiskStorageSizeInBytes("crmnzhrgmqgjs"); + .withProtectionGroupName("xttd") + .withDiskStorageUsedInBytes("rbnlankxmyskp") + .withTotalDiskStorageSizeInBytes("enbtkcxywny"); model = BinaryData.fromObject(model).toObject(DpmProtectedItemExtendedInfo.class); - Assertions.assertEquals("vfgpikqmhhaowjrm", model.protectableObjectLoadPath().get("vuporqzdfuydzv")); - Assertions.assertEquals(true, model.protectedProperty()); - Assertions.assertEquals(true, model.isPresentOnCloud()); - Assertions.assertEquals("qmxq", model.lastBackupStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-24T21:59:48Z"), model.lastRefreshedAt()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-21T19:56:22Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(1002449917, model.recoveryPointCount()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-11T11:04:44Z"), model.onPremiseOldestRecoveryPoint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-01T08:12:15Z"), model.onPremiseLatestRecoveryPoint()); - Assertions.assertEquals(998809541, model.onPremiseRecoveryPointCount()); - Assertions.assertEquals(true, model.isCollocated()); - Assertions.assertEquals("mzqkz", model.protectionGroupName()); - Assertions.assertEquals("uwiwtglxxhljfpg", model.diskStorageUsedInBytes()); - Assertions.assertEquals("crmnzhrgmqgjs", model.totalDiskStorageSizeInBytes()); + Assertions.assertEquals("mpukgriw", model.protectableObjectLoadPath().get("lzlfbxzpuz")); + Assertions.assertTrue(model.protectedProperty()); + Assertions.assertFalse(model.isPresentOnCloud()); + Assertions.assertEquals("jggmebfsiarbu", model.lastBackupStatus()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-21T10:02:12Z"), model.lastRefreshedAt()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-04T02:04:35Z"), model.oldestRecoveryPoint()); + Assertions.assertEquals(1487439384, model.recoveryPointCount()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-17T12:33:19Z"), model.onPremiseOldestRecoveryPoint()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T11:22:47Z"), model.onPremiseLatestRecoveryPoint()); + Assertions.assertEquals(2024670267, model.onPremiseRecoveryPointCount()); + Assertions.assertTrue(model.isCollocated()); + Assertions.assertEquals("xttd", model.protectionGroupName()); + Assertions.assertEquals("rbnlankxmyskp", model.diskStorageUsedInBytes()); + Assertions.assertEquals("enbtkcxywny", model.totalDiskStorageSizeInBytes()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmProtectedItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmProtectedItemTests.java index 2381ffc65a09..63f8d5826e1e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmProtectedItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmProtectedItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -9,6 +9,9 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.DpmProtectedItem; import com.azure.resourcemanager.recoveryservicesbackup.models.DpmProtectedItemExtendedInfo; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItemState; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanInfo; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanStatus; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanSummary; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; @@ -19,118 +22,121 @@ public final class DpmProtectedItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DpmProtectedItem model = BinaryData.fromString( - "{\"protectedItemType\":\"DPMProtectedItem\",\"friendlyName\":\"kwfbkgo\",\"backupEngineName\":\"wopdbydpiz\",\"protectionState\":\"BackupsSuspended\",\"extendedInfo\":{\"protectableObjectLoadPath\":{\"fcttuxuuyilfl\":\"pxbiygnugjknfs\",\"jztczytqj\":\"oiquvrehmrnjhvs\"},\"protected\":false,\"isPresentOnCloud\":true,\"lastBackupStatus\":\"nfprnjletlxs\",\"lastRefreshedAt\":\"2021-08-25T23:38:29Z\",\"oldestRecoveryPoint\":\"2021-01-20T22:12:31Z\",\"recoveryPointCount\":2070557844,\"onPremiseOldestRecoveryPoint\":\"2021-04-29T17:32:24Z\",\"onPremiseLatestRecoveryPoint\":\"2021-06-14T11:53:50Z\",\"onPremiseRecoveryPointCount\":1329774917,\"isCollocated\":false,\"protectionGroupName\":\"yn\",\"diskStorageUsedInBytes\":\"lqwzdvpiwhxqsz\",\"totalDiskStorageSizeInBytes\":\"maajquhuxylr\"},\"backupManagementType\":\"AzureWorkload\",\"workloadType\":\"SAPHanaDatabase\",\"containerName\":\"jbmzyospspsh\",\"sourceResourceId\":\"fkyjpmspbpssdfpp\",\"policyId\":\"gt\",\"lastRecoveryPoint\":\"2021-10-15T21:25:34Z\",\"backupSetName\":\"jtvczkcnyxrxmun\",\"createMode\":\"Default\",\"deferredDeleteTimeInUTC\":\"2021-10-31T10:07:09Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"vxlx\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":true,\"resourceGuardOperationRequests\":[\"bgkc\",\"khpzvuqdflv\",\"niypfpubcpzg\"],\"isArchiveEnabled\":true,\"policyName\":\"vhjknidi\",\"softDeleteRetentionPeriodInDays\":1404757265,\"vaultId\":\"xgpnr\"}") + "{\"protectedItemType\":\"DPMProtectedItem\",\"friendlyName\":\"ohoqqnwvlryav\",\"backupEngineName\":\"heun\",\"protectionState\":\"BackupsSuspended\",\"extendedInfo\":{\"protectableObjectLoadPath\":{\"ocukoklyax\":\"xzko\"},\"protected\":false,\"isPresentOnCloud\":false,\"lastBackupStatus\":\"szfkbe\",\"lastRefreshedAt\":\"2021-10-30T14:26:27Z\",\"oldestRecoveryPoint\":\"2021-10-05T00:39Z\",\"recoveryPointCount\":1511983432,\"onPremiseOldestRecoveryPoint\":\"2021-05-22T16:15:16Z\",\"onPremiseLatestRecoveryPoint\":\"2021-01-21T18:41:39Z\",\"onPremiseRecoveryPointCount\":2012409691,\"isCollocated\":true,\"protectionGroupName\":\"xsenhwlr\",\"diskStorageUsedInBytes\":\"frzpwvlqdqgb\",\"totalDiskStorageSizeInBytes\":\"ylihkaetckt\"},\"backupManagementType\":\"DefaultBackup\",\"workloadType\":\"VM\",\"containerName\":\"snkymuctq\",\"sourceResourceId\":\"fbebrjcxer\",\"policyId\":\"wutttxfvjrbi\",\"lastRecoveryPoint\":\"2020-12-24T00:10:53Z\",\"backupSetName\":\"epcyvahfnlj\",\"createMode\":\"Recover\",\"deferredDeleteTimeInUTC\":\"2021-03-04T13:42:29Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"j\",\"isDeferredDeleteScheduleUpcoming\":false,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"jljyoxgv\",\"ltbgsncghkj\",\"szzhbijhtxfvgxbf\"],\"isArchiveEnabled\":true,\"policyName\":\"eh\",\"softDeleteRetentionPeriodInDays\":1229145222,\"vaultId\":\"cxgod\",\"sourceSideScanInfo\":{\"sourceSideScanStatus\":\"NotApplicable\",\"sourceSideScanSummary\":\"Unknown\"}}") .toObject(DpmProtectedItem.class); - Assertions.assertEquals("jbmzyospspsh", model.containerName()); - Assertions.assertEquals("fkyjpmspbpssdfpp", model.sourceResourceId()); - Assertions.assertEquals("gt", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-15T21:25:34Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("jtvczkcnyxrxmun", model.backupSetName()); - Assertions.assertEquals(CreateMode.DEFAULT, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-31T10:07:09Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(true, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("vxlx", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(true, model.isRehydrate()); - Assertions.assertEquals("bgkc", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.isArchiveEnabled()); - Assertions.assertEquals("vhjknidi", model.policyName()); - Assertions.assertEquals(1404757265, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("kwfbkgo", model.friendlyName()); - Assertions.assertEquals("wopdbydpiz", model.backupEngineName()); + Assertions.assertEquals("snkymuctq", model.containerName()); + Assertions.assertEquals("fbebrjcxer", model.sourceResourceId()); + Assertions.assertEquals("wutttxfvjrbi", model.policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-24T00:10:53Z"), model.lastRecoveryPoint()); + Assertions.assertEquals("epcyvahfnlj", model.backupSetName()); + Assertions.assertEquals(CreateMode.RECOVER, model.createMode()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T13:42:29Z"), model.deferredDeleteTimeInUtc()); + Assertions.assertTrue(model.isScheduledForDeferredDelete()); + Assertions.assertEquals("j", model.deferredDeleteTimeRemaining()); + Assertions.assertFalse(model.isDeferredDeleteScheduleUpcoming()); + Assertions.assertFalse(model.isRehydrate()); + Assertions.assertEquals("jljyoxgv", model.resourceGuardOperationRequests().get(0)); + Assertions.assertTrue(model.isArchiveEnabled()); + Assertions.assertEquals("eh", model.policyName()); + Assertions.assertEquals(1229145222, model.softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.NOT_APPLICABLE, model.sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.UNKNOWN, model.sourceSideScanInfo().sourceSideScanSummary()); + Assertions.assertEquals("ohoqqnwvlryav", model.friendlyName()); + Assertions.assertEquals("heun", model.backupEngineName()); Assertions.assertEquals(ProtectedItemState.BACKUPS_SUSPENDED, model.protectionState()); - Assertions.assertEquals("pxbiygnugjknfs", - model.extendedInfo().protectableObjectLoadPath().get("fcttuxuuyilfl")); - Assertions.assertEquals(false, model.extendedInfo().protectedProperty()); - Assertions.assertEquals(true, model.extendedInfo().isPresentOnCloud()); - Assertions.assertEquals("nfprnjletlxs", model.extendedInfo().lastBackupStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-25T23:38:29Z"), model.extendedInfo().lastRefreshedAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T22:12:31Z"), - model.extendedInfo().oldestRecoveryPoint()); - Assertions.assertEquals(2070557844, model.extendedInfo().recoveryPointCount()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-29T17:32:24Z"), + Assertions.assertEquals("xzko", model.extendedInfo().protectableObjectLoadPath().get("ocukoklyax")); + Assertions.assertFalse(model.extendedInfo().protectedProperty()); + Assertions.assertFalse(model.extendedInfo().isPresentOnCloud()); + Assertions.assertEquals("szfkbe", model.extendedInfo().lastBackupStatus()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-30T14:26:27Z"), model.extendedInfo().lastRefreshedAt()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-05T00:39Z"), model.extendedInfo().oldestRecoveryPoint()); + Assertions.assertEquals(1511983432, model.extendedInfo().recoveryPointCount()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-22T16:15:16Z"), model.extendedInfo().onPremiseOldestRecoveryPoint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-14T11:53:50Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-01-21T18:41:39Z"), model.extendedInfo().onPremiseLatestRecoveryPoint()); - Assertions.assertEquals(1329774917, model.extendedInfo().onPremiseRecoveryPointCount()); - Assertions.assertEquals(false, model.extendedInfo().isCollocated()); - Assertions.assertEquals("yn", model.extendedInfo().protectionGroupName()); - Assertions.assertEquals("lqwzdvpiwhxqsz", model.extendedInfo().diskStorageUsedInBytes()); - Assertions.assertEquals("maajquhuxylr", model.extendedInfo().totalDiskStorageSizeInBytes()); + Assertions.assertEquals(2012409691, model.extendedInfo().onPremiseRecoveryPointCount()); + Assertions.assertTrue(model.extendedInfo().isCollocated()); + Assertions.assertEquals("xsenhwlr", model.extendedInfo().protectionGroupName()); + Assertions.assertEquals("frzpwvlqdqgb", model.extendedInfo().diskStorageUsedInBytes()); + Assertions.assertEquals("ylihkaetckt", model.extendedInfo().totalDiskStorageSizeInBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DpmProtectedItem model = new DpmProtectedItem().withContainerName("jbmzyospspsh") - .withSourceResourceId("fkyjpmspbpssdfpp") - .withPolicyId("gt") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-10-15T21:25:34Z")) - .withBackupSetName("jtvczkcnyxrxmun") - .withCreateMode(CreateMode.DEFAULT) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-10-31T10:07:09Z")) + DpmProtectedItem model = new DpmProtectedItem().withContainerName("snkymuctq") + .withSourceResourceId("fbebrjcxer") + .withPolicyId("wutttxfvjrbi") + .withLastRecoveryPoint(OffsetDateTime.parse("2020-12-24T00:10:53Z")) + .withBackupSetName("epcyvahfnlj") + .withCreateMode(CreateMode.RECOVER) + .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-03-04T13:42:29Z")) .withIsScheduledForDeferredDelete(true) - .withDeferredDeleteTimeRemaining("vxlx") - .withIsDeferredDeleteScheduleUpcoming(true) - .withIsRehydrate(true) - .withResourceGuardOperationRequests(Arrays.asList("bgkc", "khpzvuqdflv", "niypfpubcpzg")) + .withDeferredDeleteTimeRemaining("j") + .withIsDeferredDeleteScheduleUpcoming(false) + .withIsRehydrate(false) + .withResourceGuardOperationRequests(Arrays.asList("jljyoxgv", "ltbgsncghkj", "szzhbijhtxfvgxbf")) .withIsArchiveEnabled(true) - .withPolicyName("vhjknidi") - .withSoftDeleteRetentionPeriod(1404757265) - .withFriendlyName("kwfbkgo") - .withBackupEngineName("wopdbydpiz") + .withPolicyName("eh") + .withSoftDeleteRetentionPeriodInDays(1229145222) + .withSourceSideScanInfo( + new SourceSideScanInfo().withSourceSideScanStatus(SourceSideScanStatus.NOT_APPLICABLE) + .withSourceSideScanSummary(SourceSideScanSummary.UNKNOWN)) + .withFriendlyName("ohoqqnwvlryav") + .withBackupEngineName("heun") .withProtectionState(ProtectedItemState.BACKUPS_SUSPENDED) - .withExtendedInfo(new DpmProtectedItemExtendedInfo() - .withProtectableObjectLoadPath(mapOf("fcttuxuuyilfl", "pxbiygnugjknfs", "jztczytqj", "oiquvrehmrnjhvs")) - .withProtectedProperty(false) - .withIsPresentOnCloud(true) - .withLastBackupStatus("nfprnjletlxs") - .withLastRefreshedAt(OffsetDateTime.parse("2021-08-25T23:38:29Z")) - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-01-20T22:12:31Z")) - .withRecoveryPointCount(2070557844) - .withOnPremiseOldestRecoveryPoint(OffsetDateTime.parse("2021-04-29T17:32:24Z")) - .withOnPremiseLatestRecoveryPoint(OffsetDateTime.parse("2021-06-14T11:53:50Z")) - .withOnPremiseRecoveryPointCount(1329774917) - .withIsCollocated(false) - .withProtectionGroupName("yn") - .withDiskStorageUsedInBytes("lqwzdvpiwhxqsz") - .withTotalDiskStorageSizeInBytes("maajquhuxylr")); + .withExtendedInfo( + new DpmProtectedItemExtendedInfo().withProtectableObjectLoadPath(mapOf("ocukoklyax", "xzko")) + .withProtectedProperty(false) + .withIsPresentOnCloud(false) + .withLastBackupStatus("szfkbe") + .withLastRefreshedAt(OffsetDateTime.parse("2021-10-30T14:26:27Z")) + .withOldestRecoveryPoint(OffsetDateTime.parse("2021-10-05T00:39Z")) + .withRecoveryPointCount(1511983432) + .withOnPremiseOldestRecoveryPoint(OffsetDateTime.parse("2021-05-22T16:15:16Z")) + .withOnPremiseLatestRecoveryPoint(OffsetDateTime.parse("2021-01-21T18:41:39Z")) + .withOnPremiseRecoveryPointCount(2012409691) + .withIsCollocated(true) + .withProtectionGroupName("xsenhwlr") + .withDiskStorageUsedInBytes("frzpwvlqdqgb") + .withTotalDiskStorageSizeInBytes("ylihkaetckt")); model = BinaryData.fromObject(model).toObject(DpmProtectedItem.class); - Assertions.assertEquals("jbmzyospspsh", model.containerName()); - Assertions.assertEquals("fkyjpmspbpssdfpp", model.sourceResourceId()); - Assertions.assertEquals("gt", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-15T21:25:34Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("jtvczkcnyxrxmun", model.backupSetName()); - Assertions.assertEquals(CreateMode.DEFAULT, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-31T10:07:09Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(true, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("vxlx", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(true, model.isRehydrate()); - Assertions.assertEquals("bgkc", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.isArchiveEnabled()); - Assertions.assertEquals("vhjknidi", model.policyName()); - Assertions.assertEquals(1404757265, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("kwfbkgo", model.friendlyName()); - Assertions.assertEquals("wopdbydpiz", model.backupEngineName()); + Assertions.assertEquals("snkymuctq", model.containerName()); + Assertions.assertEquals("fbebrjcxer", model.sourceResourceId()); + Assertions.assertEquals("wutttxfvjrbi", model.policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-24T00:10:53Z"), model.lastRecoveryPoint()); + Assertions.assertEquals("epcyvahfnlj", model.backupSetName()); + Assertions.assertEquals(CreateMode.RECOVER, model.createMode()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T13:42:29Z"), model.deferredDeleteTimeInUtc()); + Assertions.assertTrue(model.isScheduledForDeferredDelete()); + Assertions.assertEquals("j", model.deferredDeleteTimeRemaining()); + Assertions.assertFalse(model.isDeferredDeleteScheduleUpcoming()); + Assertions.assertFalse(model.isRehydrate()); + Assertions.assertEquals("jljyoxgv", model.resourceGuardOperationRequests().get(0)); + Assertions.assertTrue(model.isArchiveEnabled()); + Assertions.assertEquals("eh", model.policyName()); + Assertions.assertEquals(1229145222, model.softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.NOT_APPLICABLE, model.sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.UNKNOWN, model.sourceSideScanInfo().sourceSideScanSummary()); + Assertions.assertEquals("ohoqqnwvlryav", model.friendlyName()); + Assertions.assertEquals("heun", model.backupEngineName()); Assertions.assertEquals(ProtectedItemState.BACKUPS_SUSPENDED, model.protectionState()); - Assertions.assertEquals("pxbiygnugjknfs", - model.extendedInfo().protectableObjectLoadPath().get("fcttuxuuyilfl")); - Assertions.assertEquals(false, model.extendedInfo().protectedProperty()); - Assertions.assertEquals(true, model.extendedInfo().isPresentOnCloud()); - Assertions.assertEquals("nfprnjletlxs", model.extendedInfo().lastBackupStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-25T23:38:29Z"), model.extendedInfo().lastRefreshedAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T22:12:31Z"), - model.extendedInfo().oldestRecoveryPoint()); - Assertions.assertEquals(2070557844, model.extendedInfo().recoveryPointCount()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-29T17:32:24Z"), + Assertions.assertEquals("xzko", model.extendedInfo().protectableObjectLoadPath().get("ocukoklyax")); + Assertions.assertFalse(model.extendedInfo().protectedProperty()); + Assertions.assertFalse(model.extendedInfo().isPresentOnCloud()); + Assertions.assertEquals("szfkbe", model.extendedInfo().lastBackupStatus()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-30T14:26:27Z"), model.extendedInfo().lastRefreshedAt()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-05T00:39Z"), model.extendedInfo().oldestRecoveryPoint()); + Assertions.assertEquals(1511983432, model.extendedInfo().recoveryPointCount()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-22T16:15:16Z"), model.extendedInfo().onPremiseOldestRecoveryPoint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-14T11:53:50Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-01-21T18:41:39Z"), model.extendedInfo().onPremiseLatestRecoveryPoint()); - Assertions.assertEquals(1329774917, model.extendedInfo().onPremiseRecoveryPointCount()); - Assertions.assertEquals(false, model.extendedInfo().isCollocated()); - Assertions.assertEquals("yn", model.extendedInfo().protectionGroupName()); - Assertions.assertEquals("lqwzdvpiwhxqsz", model.extendedInfo().diskStorageUsedInBytes()); - Assertions.assertEquals("maajquhuxylr", model.extendedInfo().totalDiskStorageSizeInBytes()); + Assertions.assertEquals(2012409691, model.extendedInfo().onPremiseRecoveryPointCount()); + Assertions.assertTrue(model.extendedInfo().isCollocated()); + Assertions.assertEquals("xsenhwlr", model.extendedInfo().protectionGroupName()); + Assertions.assertEquals("frzpwvlqdqgb", model.extendedInfo().diskStorageUsedInBytes()); + Assertions.assertEquals("ylihkaetckt", model.extendedInfo().totalDiskStorageSizeInBytes()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ExtendedLocationTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ExtendedLocationTests.java index 56117551f8e1..a40ac4928d88 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ExtendedLocationTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ExtendedLocationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,17 +11,17 @@ public final class ExtendedLocationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExtendedLocation model = BinaryData.fromString("{\"name\":\"qxfzyjqttvwk\",\"type\":\"hjpenuygbq\"}") + ExtendedLocation model = BinaryData.fromString("{\"name\":\"ihhyuspskasd\",\"type\":\"mfwdgzxu\"}") .toObject(ExtendedLocation.class); - Assertions.assertEquals("qxfzyjqttvwk", model.name()); - Assertions.assertEquals("hjpenuygbq", model.type()); + Assertions.assertEquals("ihhyuspskasd", model.name()); + Assertions.assertEquals("mfwdgzxu", model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExtendedLocation model = new ExtendedLocation().withName("qxfzyjqttvwk").withType("hjpenuygbq"); + ExtendedLocation model = new ExtendedLocation().withName("ihhyuspskasd").withType("mfwdgzxu"); model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("qxfzyjqttvwk", model.name()); - Assertions.assertEquals("hjpenuygbq", model.type()); + Assertions.assertEquals("ihhyuspskasd", model.name()); + Assertions.assertEquals("mfwdgzxu", model.type()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ExtendedPropertiesTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ExtendedPropertiesTests.java index 87d80c6b010a..70a24703b536 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ExtendedPropertiesTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ExtendedPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,24 +14,22 @@ public final class ExtendedPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtendedProperties model = BinaryData.fromString( - "{\"diskExclusionProperties\":{\"diskLunList\":[1959547059,1820009051],\"isInclusionList\":false},\"linuxVmApplicationName\":\"lfg\"}") + "{\"diskExclusionProperties\":{\"diskLunList\":[743935236],\"isInclusionList\":false},\"linuxVmApplicationName\":\"pwlbjnpg\"}") .toObject(ExtendedProperties.class); - Assertions.assertEquals(1959547059, model.diskExclusionProperties().diskLunList().get(0)); - Assertions.assertEquals(false, model.diskExclusionProperties().isInclusionList()); - Assertions.assertEquals("lfg", model.linuxVmApplicationName()); + Assertions.assertEquals(743935236, model.diskExclusionProperties().diskLunList().get(0)); + Assertions.assertFalse(model.diskExclusionProperties().isInclusionList()); + Assertions.assertEquals("pwlbjnpg", model.linuxVmApplicationName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExtendedProperties model - = new ExtendedProperties() - .withDiskExclusionProperties( - new DiskExclusionProperties().withDiskLunList(Arrays.asList(1959547059, 1820009051)) - .withIsInclusionList(false)) - .withLinuxVmApplicationName("lfg"); + ExtendedProperties model = new ExtendedProperties() + .withDiskExclusionProperties( + new DiskExclusionProperties().withDiskLunList(Arrays.asList(743935236)).withIsInclusionList(false)) + .withLinuxVmApplicationName("pwlbjnpg"); model = BinaryData.fromObject(model).toObject(ExtendedProperties.class); - Assertions.assertEquals(1959547059, model.diskExclusionProperties().diskLunList().get(0)); - Assertions.assertEquals(false, model.diskExclusionProperties().isInclusionList()); - Assertions.assertEquals("lfg", model.linuxVmApplicationName()); + Assertions.assertEquals(743935236, model.diskExclusionProperties().diskLunList().get(0)); + Assertions.assertFalse(model.diskExclusionProperties().isInclusionList()); + Assertions.assertEquals("pwlbjnpg", model.linuxVmApplicationName()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FeatureSupportRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FeatureSupportRequestTests.java index 8f7f10d8b8a3..c31228b74ad0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FeatureSupportRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FeatureSupportRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FeatureSupportsValidateWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FeatureSupportsValidateWithResponseMockTests.java index 90f72f6fd536..92b1e215006f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FeatureSupportsValidateWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FeatureSupportsValidateWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -22,7 +22,7 @@ public final class FeatureSupportsValidateWithResponseMockTests { @Test public void testValidateWithResponse() throws Exception { - String responseStr = "{\"supportStatus\":\"Invalid\"}"; + String responseStr = "{\"supportStatus\":\"NotSupported\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testValidateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AzureVMResourceFeatureSupportResponse response = manager.featureSupports() - .validateWithResponse("ueqfrojsyd", new FeatureSupportRequest(), com.azure.core.util.Context.NONE) + .validateWithResponse("exmj", new FeatureSupportRequest(), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(SupportStatus.INVALID, response.supportStatus()); + Assertions.assertEquals(SupportStatus.NOT_SUPPORTED, response.supportStatus()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostInfoForRehydrationRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostInfoForRehydrationRequestTests.java index 2f04c7000ddf..3265b9d033aa 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostInfoForRehydrationRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostInfoForRehydrationRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,31 +14,31 @@ public final class FetchTieringCostInfoForRehydrationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FetchTieringCostInfoForRehydrationRequest model = BinaryData.fromString( - "{\"objectType\":\"FetchTieringCostInfoForRehydrationRequest\",\"containerName\":\"bdweade\",\"protectedItemName\":\"zmwntopagt\",\"recoveryPointId\":\"mvmmagoaqylkjz\",\"rehydrationPriority\":\"Standard\",\"sourceTierType\":\"Invalid\",\"targetTierType\":\"ArchivedRP\"}") + "{\"objectType\":\"FetchTieringCostInfoForRehydrationRequest\",\"containerName\":\"jfgxxsaetg\",\"protectedItemName\":\"dgvpyig\",\"recoveryPointId\":\"aqqilzdcduwjoed\",\"rehydrationPriority\":\"High\",\"sourceTierType\":\"InstantRP\",\"targetTierType\":\"ArchivedRP\"}") .toObject(FetchTieringCostInfoForRehydrationRequest.class); - Assertions.assertEquals(RecoveryPointTierType.INVALID, model.sourceTierType()); + Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.sourceTierType()); Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.targetTierType()); - Assertions.assertEquals("bdweade", model.containerName()); - Assertions.assertEquals("zmwntopagt", model.protectedItemName()); - Assertions.assertEquals("mvmmagoaqylkjz", model.recoveryPointId()); - Assertions.assertEquals(RehydrationPriority.STANDARD, model.rehydrationPriority()); + Assertions.assertEquals("jfgxxsaetg", model.containerName()); + Assertions.assertEquals("dgvpyig", model.protectedItemName()); + Assertions.assertEquals("aqqilzdcduwjoed", model.recoveryPointId()); + Assertions.assertEquals(RehydrationPriority.HIGH, model.rehydrationPriority()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FetchTieringCostInfoForRehydrationRequest model - = new FetchTieringCostInfoForRehydrationRequest().withSourceTierType(RecoveryPointTierType.INVALID) + = new FetchTieringCostInfoForRehydrationRequest().withSourceTierType(RecoveryPointTierType.INSTANT_RP) .withTargetTierType(RecoveryPointTierType.ARCHIVED_RP) - .withContainerName("bdweade") - .withProtectedItemName("zmwntopagt") - .withRecoveryPointId("mvmmagoaqylkjz") - .withRehydrationPriority(RehydrationPriority.STANDARD); + .withContainerName("jfgxxsaetg") + .withProtectedItemName("dgvpyig") + .withRecoveryPointId("aqqilzdcduwjoed") + .withRehydrationPriority(RehydrationPriority.HIGH); model = BinaryData.fromObject(model).toObject(FetchTieringCostInfoForRehydrationRequest.class); - Assertions.assertEquals(RecoveryPointTierType.INVALID, model.sourceTierType()); + Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.sourceTierType()); Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.targetTierType()); - Assertions.assertEquals("bdweade", model.containerName()); - Assertions.assertEquals("zmwntopagt", model.protectedItemName()); - Assertions.assertEquals("mvmmagoaqylkjz", model.recoveryPointId()); - Assertions.assertEquals(RehydrationPriority.STANDARD, model.rehydrationPriority()); + Assertions.assertEquals("jfgxxsaetg", model.containerName()); + Assertions.assertEquals("dgvpyig", model.protectedItemName()); + Assertions.assertEquals("aqqilzdcduwjoed", model.recoveryPointId()); + Assertions.assertEquals(RehydrationPriority.HIGH, model.rehydrationPriority()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostInfoRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostInfoRequestTests.java index d83a3164e73c..0f726ec99cac 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostInfoRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostInfoRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,19 +13,19 @@ public final class FetchTieringCostInfoRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FetchTieringCostInfoRequest model = BinaryData.fromString( - "{\"objectType\":\"FetchTieringCostInfoRequest\",\"sourceTierType\":\"Invalid\",\"targetTierType\":\"InstantRP\"}") + "{\"objectType\":\"FetchTieringCostInfoRequest\",\"sourceTierType\":\"HardenedRP\",\"targetTierType\":\"Invalid\"}") .toObject(FetchTieringCostInfoRequest.class); - Assertions.assertEquals(RecoveryPointTierType.INVALID, model.sourceTierType()); - Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.targetTierType()); + Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.sourceTierType()); + Assertions.assertEquals(RecoveryPointTierType.INVALID, model.targetTierType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FetchTieringCostInfoRequest model - = new FetchTieringCostInfoRequest().withSourceTierType(RecoveryPointTierType.INVALID) - .withTargetTierType(RecoveryPointTierType.INSTANT_RP); + = new FetchTieringCostInfoRequest().withSourceTierType(RecoveryPointTierType.HARDENED_RP) + .withTargetTierType(RecoveryPointTierType.INVALID); model = BinaryData.fromObject(model).toObject(FetchTieringCostInfoRequest.class); - Assertions.assertEquals(RecoveryPointTierType.INVALID, model.sourceTierType()); - Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.targetTierType()); + Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.sourceTierType()); + Assertions.assertEquals(RecoveryPointTierType.INVALID, model.targetTierType()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostSavingsInfoForPolicyRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostSavingsInfoForPolicyRequestTests.java index 18db4c1a503a..185cc529ac9f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostSavingsInfoForPolicyRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostSavingsInfoForPolicyRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,22 +13,22 @@ public final class FetchTieringCostSavingsInfoForPolicyRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FetchTieringCostSavingsInfoForPolicyRequest model = BinaryData.fromString( - "{\"objectType\":\"FetchTieringCostSavingsInfoForPolicyRequest\",\"policyName\":\"nzcpdltkr\",\"sourceTierType\":\"ArchivedRP\",\"targetTierType\":\"InstantRP\"}") + "{\"objectType\":\"FetchTieringCostSavingsInfoForPolicyRequest\",\"policyName\":\"caifpaurww\",\"sourceTierType\":\"HardenedRP\",\"targetTierType\":\"Invalid\"}") .toObject(FetchTieringCostSavingsInfoForPolicyRequest.class); - Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.sourceTierType()); - Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.targetTierType()); - Assertions.assertEquals("nzcpdltkr", model.policyName()); + Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.sourceTierType()); + Assertions.assertEquals(RecoveryPointTierType.INVALID, model.targetTierType()); + Assertions.assertEquals("caifpaurww", model.policyName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FetchTieringCostSavingsInfoForPolicyRequest model - = new FetchTieringCostSavingsInfoForPolicyRequest().withSourceTierType(RecoveryPointTierType.ARCHIVED_RP) - .withTargetTierType(RecoveryPointTierType.INSTANT_RP) - .withPolicyName("nzcpdltkr"); + = new FetchTieringCostSavingsInfoForPolicyRequest().withSourceTierType(RecoveryPointTierType.HARDENED_RP) + .withTargetTierType(RecoveryPointTierType.INVALID) + .withPolicyName("caifpaurww"); model = BinaryData.fromObject(model).toObject(FetchTieringCostSavingsInfoForPolicyRequest.class); - Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.sourceTierType()); - Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.targetTierType()); - Assertions.assertEquals("nzcpdltkr", model.policyName()); + Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.sourceTierType()); + Assertions.assertEquals(RecoveryPointTierType.INVALID, model.targetTierType()); + Assertions.assertEquals("caifpaurww", model.policyName()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostSavingsInfoForProtectedItemRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostSavingsInfoForProtectedItemRequestTests.java index 9a65907c5239..b40ef9b3a1df 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostSavingsInfoForProtectedItemRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostSavingsInfoForProtectedItemRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,12 +13,12 @@ public final class FetchTieringCostSavingsInfoForProtectedItemRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FetchTieringCostSavingsInfoForProtectedItemRequest model = BinaryData.fromString( - "{\"objectType\":\"FetchTieringCostSavingsInfoForProtectedItemRequest\",\"containerName\":\"mtbdrvcqgu\",\"protectedItemName\":\"fzhompheq\",\"sourceTierType\":\"ArchivedRP\",\"targetTierType\":\"HardenedRP\"}") + "{\"objectType\":\"FetchTieringCostSavingsInfoForProtectedItemRequest\",\"containerName\":\"fjqq\",\"protectedItemName\":\"cdmkxwxdcvjw\",\"sourceTierType\":\"ArchivedRP\",\"targetTierType\":\"Invalid\"}") .toObject(FetchTieringCostSavingsInfoForProtectedItemRequest.class); Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.sourceTierType()); - Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.targetTierType()); - Assertions.assertEquals("mtbdrvcqgu", model.containerName()); - Assertions.assertEquals("fzhompheq", model.protectedItemName()); + Assertions.assertEquals(RecoveryPointTierType.INVALID, model.targetTierType()); + Assertions.assertEquals("fjqq", model.containerName()); + Assertions.assertEquals("cdmkxwxdcvjw", model.protectedItemName()); } @org.junit.jupiter.api.Test @@ -26,13 +26,13 @@ public void testSerialize() throws Exception { FetchTieringCostSavingsInfoForProtectedItemRequest model = new FetchTieringCostSavingsInfoForProtectedItemRequest() .withSourceTierType(RecoveryPointTierType.ARCHIVED_RP) - .withTargetTierType(RecoveryPointTierType.HARDENED_RP) - .withContainerName("mtbdrvcqgu") - .withProtectedItemName("fzhompheq"); + .withTargetTierType(RecoveryPointTierType.INVALID) + .withContainerName("fjqq") + .withProtectedItemName("cdmkxwxdcvjw"); model = BinaryData.fromObject(model).toObject(FetchTieringCostSavingsInfoForProtectedItemRequest.class); Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.sourceTierType()); - Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.targetTierType()); - Assertions.assertEquals("mtbdrvcqgu", model.containerName()); - Assertions.assertEquals("fzhompheq", model.protectedItemName()); + Assertions.assertEquals(RecoveryPointTierType.INVALID, model.targetTierType()); + Assertions.assertEquals("fjqq", model.containerName()); + Assertions.assertEquals("cdmkxwxdcvjw", model.protectedItemName()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostSavingsInfoForVaultRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostSavingsInfoForVaultRequestTests.java index 2be122a85272..9eb67febf594 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostSavingsInfoForVaultRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostSavingsInfoForVaultRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostsPostMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostsPostMockTests.java index 809a9c492cb5..e477e3c5fe46 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostsPostMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FetchTieringCostsPostMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -31,9 +31,9 @@ public void testPost() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); TieringCostInfo response = manager.fetchTieringCosts() - .post("i", "ersejeg", + .post("lvoc", "tvdxxhe", new FetchTieringCostInfoRequest().withSourceTierType(RecoveryPointTierType.ARCHIVED_RP) - .withTargetTierType(RecoveryPointTierType.ARCHIVED_RP), + .withTargetTierType(RecoveryPointTierType.INVALID), com.azure.core.util.Context.NONE); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericContainerExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericContainerExtendedInfoTests.java index d3ff02d53952..d59591eed5c5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericContainerExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericContainerExtendedInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -15,31 +15,31 @@ public final class GenericContainerExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GenericContainerExtendedInfo model = BinaryData.fromString( - "{\"rawCertData\":\"qnvzoqgyipemch\",\"containerIdentityInfo\":{\"uniqueName\":\"sczuejdtxptlghwz\",\"aadTenantId\":\"mewjjstliuhq\",\"servicePrincipalClientId\":\"moaiancz\",\"audience\":\"odrrslblxyd\"},\"serviceEndpoints\":{\"xiwkgfbql\":\"xvv\",\"c\":\"nqkhych\"}}") + "{\"rawCertData\":\"nwqjnoba\",\"containerIdentityInfo\":{\"uniqueName\":\"ddviacegfnmntfpm\",\"aadTenantId\":\"emfnczdwvvbal\",\"servicePrincipalClientId\":\"l\",\"audience\":\"hpodbzev\"},\"serviceEndpoints\":{\"kuvsjcswsm\":\"nhf\",\"qypfcv\":\"stul\"}}") .toObject(GenericContainerExtendedInfo.class); - Assertions.assertEquals("qnvzoqgyipemch", model.rawCertData()); - Assertions.assertEquals("sczuejdtxptlghwz", model.containerIdentityInfo().uniqueName()); - Assertions.assertEquals("mewjjstliuhq", model.containerIdentityInfo().aadTenantId()); - Assertions.assertEquals("moaiancz", model.containerIdentityInfo().servicePrincipalClientId()); - Assertions.assertEquals("odrrslblxyd", model.containerIdentityInfo().audience()); - Assertions.assertEquals("xvv", model.serviceEndpoints().get("xiwkgfbql")); + Assertions.assertEquals("nwqjnoba", model.rawCertData()); + Assertions.assertEquals("ddviacegfnmntfpm", model.containerIdentityInfo().uniqueName()); + Assertions.assertEquals("emfnczdwvvbal", model.containerIdentityInfo().aadTenantId()); + Assertions.assertEquals("l", model.containerIdentityInfo().servicePrincipalClientId()); + Assertions.assertEquals("hpodbzev", model.containerIdentityInfo().audience()); + Assertions.assertEquals("nhf", model.serviceEndpoints().get("kuvsjcswsm")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - GenericContainerExtendedInfo model = new GenericContainerExtendedInfo().withRawCertData("qnvzoqgyipemch") - .withContainerIdentityInfo(new ContainerIdentityInfo().withUniqueName("sczuejdtxptlghwz") - .withAadTenantId("mewjjstliuhq") - .withServicePrincipalClientId("moaiancz") - .withAudience("odrrslblxyd")) - .withServiceEndpoints(mapOf("xiwkgfbql", "xvv", "c", "nqkhych")); + GenericContainerExtendedInfo model = new GenericContainerExtendedInfo().withRawCertData("nwqjnoba") + .withContainerIdentityInfo(new ContainerIdentityInfo().withUniqueName("ddviacegfnmntfpm") + .withAadTenantId("emfnczdwvvbal") + .withServicePrincipalClientId("l") + .withAudience("hpodbzev")) + .withServiceEndpoints(mapOf("kuvsjcswsm", "nhf", "qypfcv", "stul")); model = BinaryData.fromObject(model).toObject(GenericContainerExtendedInfo.class); - Assertions.assertEquals("qnvzoqgyipemch", model.rawCertData()); - Assertions.assertEquals("sczuejdtxptlghwz", model.containerIdentityInfo().uniqueName()); - Assertions.assertEquals("mewjjstliuhq", model.containerIdentityInfo().aadTenantId()); - Assertions.assertEquals("moaiancz", model.containerIdentityInfo().servicePrincipalClientId()); - Assertions.assertEquals("odrrslblxyd", model.containerIdentityInfo().audience()); - Assertions.assertEquals("xvv", model.serviceEndpoints().get("xiwkgfbql")); + Assertions.assertEquals("nwqjnoba", model.rawCertData()); + Assertions.assertEquals("ddviacegfnmntfpm", model.containerIdentityInfo().uniqueName()); + Assertions.assertEquals("emfnczdwvvbal", model.containerIdentityInfo().aadTenantId()); + Assertions.assertEquals("l", model.containerIdentityInfo().servicePrincipalClientId()); + Assertions.assertEquals("hpodbzev", model.containerIdentityInfo().audience()); + Assertions.assertEquals("nhf", model.serviceEndpoints().get("kuvsjcswsm")); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericContainerTests.java index 1d7305ccc795..2abc87730021 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericContainerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericContainerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -17,51 +17,51 @@ public final class GenericContainerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GenericContainer model = BinaryData.fromString( - "{\"containerType\":\"GenericContainer\",\"fabricName\":\"nlzijiufe\",\"extendedInformation\":{\"rawCertData\":\"vflnwyvqkxrerln\",\"containerIdentityInfo\":{\"uniqueName\":\"yl\",\"aadTenantId\":\"wxzut\",\"servicePrincipalClientId\":\"ztwhghmupg\",\"audience\":\"jtcdxabbujftaben\"},\"serviceEndpoints\":{\"ucafedd\":\"lqpx\",\"gnhgook\":\"wnlzafwxu\"}},\"friendlyName\":\"alvnbwgpb\",\"backupManagementType\":\"DefaultBackup\",\"registrationStatus\":\"uclvdjj\",\"healthStatus\":\"yrdnqod\",\"protectableObjectType\":\"hhxhq\"}") + "{\"containerType\":\"GenericContainer\",\"fabricName\":\"katnwxyi\",\"extendedInformation\":{\"rawCertData\":\"dkqqfkuvscxkd\",\"containerIdentityInfo\":{\"uniqueName\":\"govibrxkpmloazu\",\"aadTenantId\":\"ocbgoorbteoyb\",\"servicePrincipalClientId\":\"jxakv\",\"audience\":\"gslordilmyww\"},\"serviceEndpoints\":{\"edabgyvudtjue\":\"kxn\",\"yxccyb\":\"bcihxuuwhc\",\"px\":\"payakkud\"}},\"friendlyName\":\"jplmagstcy\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"kyrk\",\"healthStatus\":\"dg\",\"protectableObjectType\":\"gsj\"}") .toObject(GenericContainer.class); - Assertions.assertEquals("alvnbwgpb", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); - Assertions.assertEquals("uclvdjj", model.registrationStatus()); - Assertions.assertEquals("yrdnqod", model.healthStatus()); - Assertions.assertEquals("hhxhq", model.protectableObjectType()); - Assertions.assertEquals("nlzijiufe", model.fabricName()); - Assertions.assertEquals("vflnwyvqkxrerln", model.extendedInformation().rawCertData()); - Assertions.assertEquals("yl", model.extendedInformation().containerIdentityInfo().uniqueName()); - Assertions.assertEquals("wxzut", model.extendedInformation().containerIdentityInfo().aadTenantId()); - Assertions.assertEquals("ztwhghmupg", + Assertions.assertEquals("jplmagstcy", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.backupManagementType()); + Assertions.assertEquals("kyrk", model.registrationStatus()); + Assertions.assertEquals("dg", model.healthStatus()); + Assertions.assertEquals("gsj", model.protectableObjectType()); + Assertions.assertEquals("katnwxyi", model.fabricName()); + Assertions.assertEquals("dkqqfkuvscxkd", model.extendedInformation().rawCertData()); + Assertions.assertEquals("govibrxkpmloazu", model.extendedInformation().containerIdentityInfo().uniqueName()); + Assertions.assertEquals("ocbgoorbteoyb", model.extendedInformation().containerIdentityInfo().aadTenantId()); + Assertions.assertEquals("jxakv", model.extendedInformation().containerIdentityInfo().servicePrincipalClientId()); - Assertions.assertEquals("jtcdxabbujftaben", model.extendedInformation().containerIdentityInfo().audience()); - Assertions.assertEquals("lqpx", model.extendedInformation().serviceEndpoints().get("ucafedd")); + Assertions.assertEquals("gslordilmyww", model.extendedInformation().containerIdentityInfo().audience()); + Assertions.assertEquals("kxn", model.extendedInformation().serviceEndpoints().get("edabgyvudtjue")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - GenericContainer model = new GenericContainer().withFriendlyName("alvnbwgpb") - .withBackupManagementType(BackupManagementType.DEFAULT_BACKUP) - .withRegistrationStatus("uclvdjj") - .withHealthStatus("yrdnqod") - .withProtectableObjectType("hhxhq") - .withFabricName("nlzijiufe") - .withExtendedInformation(new GenericContainerExtendedInfo().withRawCertData("vflnwyvqkxrerln") - .withContainerIdentityInfo(new ContainerIdentityInfo().withUniqueName("yl") - .withAadTenantId("wxzut") - .withServicePrincipalClientId("ztwhghmupg") - .withAudience("jtcdxabbujftaben")) - .withServiceEndpoints(mapOf("ucafedd", "lqpx", "gnhgook", "wnlzafwxu"))); + GenericContainer model = new GenericContainer().withFriendlyName("jplmagstcy") + .withBackupManagementType(BackupManagementType.AZURE_WORKLOAD) + .withRegistrationStatus("kyrk") + .withHealthStatus("dg") + .withProtectableObjectType("gsj") + .withFabricName("katnwxyi") + .withExtendedInformation(new GenericContainerExtendedInfo().withRawCertData("dkqqfkuvscxkd") + .withContainerIdentityInfo(new ContainerIdentityInfo().withUniqueName("govibrxkpmloazu") + .withAadTenantId("ocbgoorbteoyb") + .withServicePrincipalClientId("jxakv") + .withAudience("gslordilmyww")) + .withServiceEndpoints(mapOf("edabgyvudtjue", "kxn", "yxccyb", "bcihxuuwhc", "px", "payakkud"))); model = BinaryData.fromObject(model).toObject(GenericContainer.class); - Assertions.assertEquals("alvnbwgpb", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); - Assertions.assertEquals("uclvdjj", model.registrationStatus()); - Assertions.assertEquals("yrdnqod", model.healthStatus()); - Assertions.assertEquals("hhxhq", model.protectableObjectType()); - Assertions.assertEquals("nlzijiufe", model.fabricName()); - Assertions.assertEquals("vflnwyvqkxrerln", model.extendedInformation().rawCertData()); - Assertions.assertEquals("yl", model.extendedInformation().containerIdentityInfo().uniqueName()); - Assertions.assertEquals("wxzut", model.extendedInformation().containerIdentityInfo().aadTenantId()); - Assertions.assertEquals("ztwhghmupg", + Assertions.assertEquals("jplmagstcy", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.backupManagementType()); + Assertions.assertEquals("kyrk", model.registrationStatus()); + Assertions.assertEquals("dg", model.healthStatus()); + Assertions.assertEquals("gsj", model.protectableObjectType()); + Assertions.assertEquals("katnwxyi", model.fabricName()); + Assertions.assertEquals("dkqqfkuvscxkd", model.extendedInformation().rawCertData()); + Assertions.assertEquals("govibrxkpmloazu", model.extendedInformation().containerIdentityInfo().uniqueName()); + Assertions.assertEquals("ocbgoorbteoyb", model.extendedInformation().containerIdentityInfo().aadTenantId()); + Assertions.assertEquals("jxakv", model.extendedInformation().containerIdentityInfo().servicePrincipalClientId()); - Assertions.assertEquals("jtcdxabbujftaben", model.extendedInformation().containerIdentityInfo().audience()); - Assertions.assertEquals("lqpx", model.extendedInformation().serviceEndpoints().get("ucafedd")); + Assertions.assertEquals("gslordilmyww", model.extendedInformation().containerIdentityInfo().audience()); + Assertions.assertEquals("kxn", model.extendedInformation().serviceEndpoints().get("edabgyvudtjue")); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericProtectedItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericProtectedItemTests.java index 1726ac8af8a7..387bcd7994f1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericProtectedItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericProtectedItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -8,6 +8,9 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode; import com.azure.resourcemanager.recoveryservicesbackup.models.GenericProtectedItem; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionState; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanInfo; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanStatus; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanSummary; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; @@ -18,77 +21,85 @@ public final class GenericProtectedItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GenericProtectedItem model = BinaryData.fromString( - "{\"protectedItemType\":\"GenericProtectedItem\",\"friendlyName\":\"hs\",\"policyState\":\"koj\",\"protectionState\":\"BackupsSuspended\",\"protectedItemId\":1910453689912487458,\"sourceAssociations\":{\"yetefyp\":\"wrpqafgfugsnnf\",\"fjgtixrjvzuy\":\"coc\",\"olbauirop\":\"urmlmuo\",\"onwpnga\":\"ons\"},\"fabricName\":\"n\",\"backupManagementType\":\"AzureStorage\",\"workloadType\":\"SAPAseDatabase\",\"containerName\":\"rtmjfj\",\"sourceResourceId\":\"ccxlzhcoxovnek\",\"policyId\":\"nlusfnrd\",\"lastRecoveryPoint\":\"2021-11-01T20:24:07Z\",\"backupSetName\":\"xrdcqtj\",\"createMode\":\"Default\",\"deferredDeleteTimeInUTC\":\"2021-08-09T19:44:37Z\",\"isScheduledForDeferredDelete\":false,\"deferredDeleteTimeRemaining\":\"uslvyjtcvuwkasi\",\"isDeferredDeleteScheduleUpcoming\":false,\"isRehydrate\":true,\"resourceGuardOperationRequests\":[\"ghtuqfecjxey\",\"tuhxuicb\",\"ewmrswnjlxu\",\"rhwpus\"],\"isArchiveEnabled\":true,\"policyName\":\"qehgpd\",\"softDeleteRetentionPeriodInDays\":448724007,\"vaultId\":\"qatucoigebxnc\"}") + "{\"protectedItemType\":\"GenericProtectedItem\",\"friendlyName\":\"rsyn\",\"policyState\":\"idybyxczf\",\"protectionState\":\"ProtectionError\",\"protectedItemId\":8740719776623853829,\"sourceAssociations\":{\"qlfktsths\":\"abphlw\",\"twwrqp\":\"cocmnyyaztt\",\"eaxib\":\"edckzywbiexzfey\"},\"fabricName\":\"jwbhqwalmuz\",\"backupManagementType\":\"AzureBackupServer\",\"workloadType\":\"Sharepoint\",\"containerName\":\"dkzjancuxrh\",\"sourceResourceId\":\"bavxbniwdjswzt\",\"policyId\":\"bpg\",\"lastRecoveryPoint\":\"2021-04-13T23:02:25Z\",\"backupSetName\":\"x\",\"createMode\":\"Default\",\"deferredDeleteTimeInUTC\":\"2021-04-28T02:43:47Z\",\"isScheduledForDeferredDelete\":false,\"deferredDeleteTimeRemaining\":\"zabglcuhxwt\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":true,\"resourceGuardOperationRequests\":[\"bbovplwzbhvgyugu\",\"svmkfssxquk\"],\"isArchiveEnabled\":true,\"policyName\":\"gmgsxnkjzkde\",\"softDeleteRetentionPeriodInDays\":1710407502,\"vaultId\":\"lopwiyig\",\"sourceSideScanInfo\":{\"sourceSideScanStatus\":\"NotConfigured\",\"sourceSideScanSummary\":\"NotApplicable\"}}") .toObject(GenericProtectedItem.class); - Assertions.assertEquals("rtmjfj", model.containerName()); - Assertions.assertEquals("ccxlzhcoxovnek", model.sourceResourceId()); - Assertions.assertEquals("nlusfnrd", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T20:24:07Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("xrdcqtj", model.backupSetName()); + Assertions.assertEquals("dkzjancuxrh", model.containerName()); + Assertions.assertEquals("bavxbniwdjswzt", model.sourceResourceId()); + Assertions.assertEquals("bpg", model.policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-13T23:02:25Z"), model.lastRecoveryPoint()); + Assertions.assertEquals("x", model.backupSetName()); Assertions.assertEquals(CreateMode.DEFAULT, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-09T19:44:37Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("uslvyjtcvuwkasi", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(false, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(true, model.isRehydrate()); - Assertions.assertEquals("ghtuqfecjxey", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.isArchiveEnabled()); - Assertions.assertEquals("qehgpd", model.policyName()); - Assertions.assertEquals(448724007, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("hs", model.friendlyName()); - Assertions.assertEquals("koj", model.policyState()); - Assertions.assertEquals(ProtectionState.BACKUPS_SUSPENDED, model.protectionState()); - Assertions.assertEquals(1910453689912487458L, model.protectedItemId()); - Assertions.assertEquals("wrpqafgfugsnnf", model.sourceAssociations().get("yetefyp")); - Assertions.assertEquals("n", model.fabricName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-28T02:43:47Z"), model.deferredDeleteTimeInUtc()); + Assertions.assertFalse(model.isScheduledForDeferredDelete()); + Assertions.assertEquals("zabglcuhxwt", model.deferredDeleteTimeRemaining()); + Assertions.assertTrue(model.isDeferredDeleteScheduleUpcoming()); + Assertions.assertTrue(model.isRehydrate()); + Assertions.assertEquals("bbovplwzbhvgyugu", model.resourceGuardOperationRequests().get(0)); + Assertions.assertTrue(model.isArchiveEnabled()); + Assertions.assertEquals("gmgsxnkjzkde", model.policyName()); + Assertions.assertEquals(1710407502, model.softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.NOT_CONFIGURED, model.sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.NOT_APPLICABLE, + model.sourceSideScanInfo().sourceSideScanSummary()); + Assertions.assertEquals("rsyn", model.friendlyName()); + Assertions.assertEquals("idybyxczf", model.policyState()); + Assertions.assertEquals(ProtectionState.PROTECTION_ERROR, model.protectionState()); + Assertions.assertEquals(8740719776623853829L, model.protectedItemId()); + Assertions.assertEquals("abphlw", model.sourceAssociations().get("qlfktsths")); + Assertions.assertEquals("jwbhqwalmuz", model.fabricName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - GenericProtectedItem model = new GenericProtectedItem().withContainerName("rtmjfj") - .withSourceResourceId("ccxlzhcoxovnek") - .withPolicyId("nlusfnrd") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-11-01T20:24:07Z")) - .withBackupSetName("xrdcqtj") + GenericProtectedItem model = new GenericProtectedItem().withContainerName("dkzjancuxrh") + .withSourceResourceId("bavxbniwdjswzt") + .withPolicyId("bpg") + .withLastRecoveryPoint(OffsetDateTime.parse("2021-04-13T23:02:25Z")) + .withBackupSetName("x") .withCreateMode(CreateMode.DEFAULT) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-08-09T19:44:37Z")) + .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-04-28T02:43:47Z")) .withIsScheduledForDeferredDelete(false) - .withDeferredDeleteTimeRemaining("uslvyjtcvuwkasi") - .withIsDeferredDeleteScheduleUpcoming(false) + .withDeferredDeleteTimeRemaining("zabglcuhxwt") + .withIsDeferredDeleteScheduleUpcoming(true) .withIsRehydrate(true) - .withResourceGuardOperationRequests(Arrays.asList("ghtuqfecjxey", "tuhxuicb", "ewmrswnjlxu", "rhwpus")) + .withResourceGuardOperationRequests(Arrays.asList("bbovplwzbhvgyugu", "svmkfssxquk")) .withIsArchiveEnabled(true) - .withPolicyName("qehgpd") - .withSoftDeleteRetentionPeriod(448724007) - .withFriendlyName("hs") - .withPolicyState("koj") - .withProtectionState(ProtectionState.BACKUPS_SUSPENDED) - .withProtectedItemId(1910453689912487458L) - .withSourceAssociations( - mapOf("yetefyp", "wrpqafgfugsnnf", "fjgtixrjvzuy", "coc", "olbauirop", "urmlmuo", "onwpnga", "ons")) - .withFabricName("n"); + .withPolicyName("gmgsxnkjzkde") + .withSoftDeleteRetentionPeriodInDays(1710407502) + .withSourceSideScanInfo( + new SourceSideScanInfo().withSourceSideScanStatus(SourceSideScanStatus.NOT_CONFIGURED) + .withSourceSideScanSummary(SourceSideScanSummary.NOT_APPLICABLE)) + .withFriendlyName("rsyn") + .withPolicyState("idybyxczf") + .withProtectionState(ProtectionState.PROTECTION_ERROR) + .withProtectedItemId(8740719776623853829L) + .withSourceAssociations(mapOf("qlfktsths", "abphlw", "twwrqp", "cocmnyyaztt", "eaxib", "edckzywbiexzfey")) + .withFabricName("jwbhqwalmuz"); model = BinaryData.fromObject(model).toObject(GenericProtectedItem.class); - Assertions.assertEquals("rtmjfj", model.containerName()); - Assertions.assertEquals("ccxlzhcoxovnek", model.sourceResourceId()); - Assertions.assertEquals("nlusfnrd", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T20:24:07Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("xrdcqtj", model.backupSetName()); + Assertions.assertEquals("dkzjancuxrh", model.containerName()); + Assertions.assertEquals("bavxbniwdjswzt", model.sourceResourceId()); + Assertions.assertEquals("bpg", model.policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-13T23:02:25Z"), model.lastRecoveryPoint()); + Assertions.assertEquals("x", model.backupSetName()); Assertions.assertEquals(CreateMode.DEFAULT, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-09T19:44:37Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("uslvyjtcvuwkasi", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(false, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(true, model.isRehydrate()); - Assertions.assertEquals("ghtuqfecjxey", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.isArchiveEnabled()); - Assertions.assertEquals("qehgpd", model.policyName()); - Assertions.assertEquals(448724007, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("hs", model.friendlyName()); - Assertions.assertEquals("koj", model.policyState()); - Assertions.assertEquals(ProtectionState.BACKUPS_SUSPENDED, model.protectionState()); - Assertions.assertEquals(1910453689912487458L, model.protectedItemId()); - Assertions.assertEquals("wrpqafgfugsnnf", model.sourceAssociations().get("yetefyp")); - Assertions.assertEquals("n", model.fabricName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-28T02:43:47Z"), model.deferredDeleteTimeInUtc()); + Assertions.assertFalse(model.isScheduledForDeferredDelete()); + Assertions.assertEquals("zabglcuhxwt", model.deferredDeleteTimeRemaining()); + Assertions.assertTrue(model.isDeferredDeleteScheduleUpcoming()); + Assertions.assertTrue(model.isRehydrate()); + Assertions.assertEquals("bbovplwzbhvgyugu", model.resourceGuardOperationRequests().get(0)); + Assertions.assertTrue(model.isArchiveEnabled()); + Assertions.assertEquals("gmgsxnkjzkde", model.policyName()); + Assertions.assertEquals(1710407502, model.softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.NOT_CONFIGURED, model.sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.NOT_APPLICABLE, + model.sourceSideScanInfo().sourceSideScanSummary()); + Assertions.assertEquals("rsyn", model.friendlyName()); + Assertions.assertEquals("idybyxczf", model.policyState()); + Assertions.assertEquals(ProtectionState.PROTECTION_ERROR, model.protectionState()); + Assertions.assertEquals(8740719776623853829L, model.protectedItemId()); + Assertions.assertEquals("abphlw", model.sourceAssociations().get("qlfktsths")); + Assertions.assertEquals("jwbhqwalmuz", model.fabricName()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericProtectionPolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericProtectionPolicyTests.java index 2b69f13be8c3..168be5d90757 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericProtectionPolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericProtectionPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -25,151 +25,123 @@ public final class GenericProtectionPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GenericProtectionPolicy model = BinaryData.fromString( - "{\"backupManagementType\":\"GenericProtectionPolicy\",\"subProtectionPolicy\":[{\"policyType\":\"Invalid\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{\"jsvthnwpzteko\":{\"tieringMode\":\"DoNotTier\",\"duration\":1707376707,\"durationType\":\"Weeks\"},\"ttgplucfotangcf\":{\"tieringMode\":\"Invalid\",\"duration\":1710129608,\"durationType\":\"Days\"}},\"snapshotBackupAdditionalDetails\":{\"instantRpRetentionRangeInDays\":1254839089,\"instantRPDetails\":\"cugswvxwlmzqw\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"xnjmxm\",\"identityName\":\"qudtcvclx\",\"userAssignedIdentityProperties\":{\"clientId\":\"dkvgfabuiyjibuzp\",\"principalId\":\"ugneikn\"}}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{\"ozipqwjedmurrxx\":{\"tieringMode\":\"DoNotTier\",\"duration\":189423563,\"durationType\":\"Days\"},\"qylkmqpzoyhlf\":{\"tieringMode\":\"DoNotTier\",\"duration\":1207642443,\"durationType\":\"Weeks\"},\"oxoebqi\":{\"tieringMode\":\"TierRecommended\",\"duration\":774397044,\"durationType\":\"Months\"},\"fujqlafcba\":{\"tieringMode\":\"TierRecommended\",\"duration\":1158646195,\"durationType\":\"Invalid\"}},\"snapshotBackupAdditionalDetails\":{\"instantRpRetentionRangeInDays\":1447409867,\"instantRPDetails\":\"ofoiy\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"filkmkkholv\",\"identityName\":\"dviauogp\",\"userAssignedIdentityProperties\":{\"clientId\":\"rtvtiukye\",\"principalId\":\"hnmnahmnx\"}}}}],\"timeZone\":\"xjqirwrweoox\",\"fabricName\":\"i\",\"protectedItemsCount\":1625380187,\"resourceGuardOperationRequests\":[\"snewmozqvbub\",\"ma\",\"hsycxhxzgaz\",\"taboidvmf\"]}") + "{\"backupManagementType\":\"GenericProtectionPolicy\",\"subProtectionPolicy\":[{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{\"nsduugwbsre\":{\"tieringMode\":\"DoNotTier\",\"duration\":1059023797,\"durationType\":\"Years\"},\"arenlvhhtklnvnaf\":{\"tieringMode\":\"TierAfter\",\"duration\":36512952,\"durationType\":\"Days\"}},\"snapshotBackupAdditionalDetails\":{\"instantRpRetentionRangeInDays\":64736512,\"instantRPDetails\":\"edev\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"slcqxypokkh\",\"identityName\":\"nqcymczngnbdxxew\",\"userAssignedIdentityProperties\":{\"clientId\":\"nvudbchaqdtvqecr\",\"principalId\":\"tmxxdtddmflhuy\"}}}}],\"timeZone\":\"zv\",\"fabricName\":\"napxbannovv\",\"protectedItemsCount\":1885263219,\"resourceGuardOperationRequests\":[\"tprwnw\",\"roevyt\",\"yo\"]}") .toObject(GenericProtectionPolicy.class); - Assertions.assertEquals(1625380187, model.protectedItemsCount()); - Assertions.assertEquals("snewmozqvbub", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(PolicyType.INVALID, model.subProtectionPolicy().get(0).policyType()); + Assertions.assertEquals(1885263219, model.protectedItemsCount()); + Assertions.assertEquals("tprwnw", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(PolicyType.DIFFERENTIAL, model.subProtectionPolicy().get(0).policyType()); Assertions.assertEquals(TieringMode.DO_NOT_TIER, - model.subProtectionPolicy().get(0).tieringPolicy().get("jsvthnwpzteko").tieringMode()); - Assertions.assertEquals(1707376707, - model.subProtectionPolicy().get(0).tieringPolicy().get("jsvthnwpzteko").duration()); - Assertions.assertEquals(RetentionDurationType.WEEKS, - model.subProtectionPolicy().get(0).tieringPolicy().get("jsvthnwpzteko").durationType()); - Assertions.assertEquals(1254839089, + model.subProtectionPolicy().get(0).tieringPolicy().get("nsduugwbsre").tieringMode()); + Assertions.assertEquals(1059023797, + model.subProtectionPolicy().get(0).tieringPolicy().get("nsduugwbsre").duration()); + Assertions.assertEquals(RetentionDurationType.YEARS, + model.subProtectionPolicy().get(0).tieringPolicy().get("nsduugwbsre").durationType()); + Assertions.assertEquals(64736512, model.subProtectionPolicy().get(0).snapshotBackupAdditionalDetails().instantRpRetentionRangeInDays()); - Assertions.assertEquals("cugswvxwlmzqw", + Assertions.assertEquals("edev", model.subProtectionPolicy().get(0).snapshotBackupAdditionalDetails().instantRPDetails()); - Assertions.assertEquals("xnjmxm", + Assertions.assertEquals("slcqxypokkh", model.subProtectionPolicy() .get(0) .snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .identityArmId()); - Assertions.assertEquals("qudtcvclx", + Assertions.assertEquals("nqcymczngnbdxxew", model.subProtectionPolicy() .get(0) .snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .identityName()); - Assertions.assertEquals("dkvgfabuiyjibuzp", + Assertions.assertEquals("nvudbchaqdtvqecr", model.subProtectionPolicy() .get(0) .snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .userAssignedIdentityProperties() .clientId()); - Assertions.assertEquals("ugneikn", + Assertions.assertEquals("tmxxdtddmflhuy", model.subProtectionPolicy() .get(0) .snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .userAssignedIdentityProperties() .principalId()); - Assertions.assertEquals("xjqirwrweoox", model.timeZone()); - Assertions.assertEquals("i", model.fabricName()); + Assertions.assertEquals("zv", model.timeZone()); + Assertions.assertEquals("napxbannovv", model.fabricName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { GenericProtectionPolicy model - = new GenericProtectionPolicy().withProtectedItemsCount(1625380187) - .withResourceGuardOperationRequests(Arrays.asList("snewmozqvbub", "ma", "hsycxhxzgaz", "taboidvmf")) + = new GenericProtectionPolicy().withProtectedItemsCount(1885263219) + .withResourceGuardOperationRequests(Arrays.asList("tprwnw", "roevyt", "yo")) .withSubProtectionPolicy( Arrays .asList( - new SubProtectionPolicy().withPolicyType(PolicyType.INVALID) + new SubProtectionPolicy().withPolicyType(PolicyType.DIFFERENTIAL) .withSchedulePolicy(new SchedulePolicy()) .withRetentionPolicy(new RetentionPolicy()) - .withTieringPolicy(mapOf("jsvthnwpzteko", + .withTieringPolicy(mapOf("nsduugwbsre", new TieringPolicy().withTieringMode(TieringMode.DO_NOT_TIER) - .withDuration(1707376707) - .withDurationType(RetentionDurationType.WEEKS), - "ttgplucfotangcf", - new TieringPolicy().withTieringMode(TieringMode.INVALID) - .withDuration(1710129608) + .withDuration(1059023797) + .withDurationType(RetentionDurationType.YEARS), + "arenlvhhtklnvnaf", + new TieringPolicy().withTieringMode(TieringMode.TIER_AFTER) + .withDuration(36512952) .withDurationType(RetentionDurationType.DAYS))) .withSnapshotBackupAdditionalDetails( - new SnapshotBackupAdditionalDetails().withInstantRpRetentionRangeInDays(1254839089) - .withInstantRPDetails("cugswvxwlmzqw") + new SnapshotBackupAdditionalDetails().withInstantRpRetentionRangeInDays(64736512) + .withInstantRPDetails("edev") .withUserAssignedManagedIdentityDetails( - new UserAssignedManagedIdentityDetails().withIdentityArmId("xnjmxm") - .withIdentityName("qudtcvclx") + new UserAssignedManagedIdentityDetails().withIdentityArmId("slcqxypokkh") + .withIdentityName("nqcymczngnbdxxew") .withUserAssignedIdentityProperties(new UserAssignedIdentityProperties() - .withClientId("dkvgfabuiyjibuzp") - .withPrincipalId("ugneikn")))), - new SubProtectionPolicy().withPolicyType(PolicyType.INCREMENTAL) - .withSchedulePolicy(new SchedulePolicy()) - .withRetentionPolicy(new RetentionPolicy()) - .withTieringPolicy(mapOf("ozipqwjedmurrxx", - new TieringPolicy().withTieringMode(TieringMode.DO_NOT_TIER) - .withDuration(189423563) - .withDurationType(RetentionDurationType.DAYS), - "qylkmqpzoyhlf", - new TieringPolicy().withTieringMode(TieringMode.DO_NOT_TIER) - .withDuration(1207642443) - .withDurationType(RetentionDurationType.WEEKS), - "oxoebqi", - new TieringPolicy().withTieringMode(TieringMode.TIER_RECOMMENDED) - .withDuration(774397044) - .withDurationType(RetentionDurationType.MONTHS), - "fujqlafcba", - new TieringPolicy().withTieringMode(TieringMode.TIER_RECOMMENDED) - .withDuration(1158646195) - .withDurationType(RetentionDurationType.INVALID))) - .withSnapshotBackupAdditionalDetails( - new SnapshotBackupAdditionalDetails().withInstantRpRetentionRangeInDays(1447409867) - .withInstantRPDetails("ofoiy") - .withUserAssignedManagedIdentityDetails( - new UserAssignedManagedIdentityDetails().withIdentityArmId("filkmkkholv") - .withIdentityName("dviauogp") - .withUserAssignedIdentityProperties( - new UserAssignedIdentityProperties().withClientId("rtvtiukye") - .withPrincipalId("hnmnahmnx")))))) - .withTimeZone("xjqirwrweoox") - .withFabricName("i"); + .withClientId("nvudbchaqdtvqecr") + .withPrincipalId("tmxxdtddmflhuy")))))) + .withTimeZone("zv") + .withFabricName("napxbannovv"); model = BinaryData.fromObject(model).toObject(GenericProtectionPolicy.class); - Assertions.assertEquals(1625380187, model.protectedItemsCount()); - Assertions.assertEquals("snewmozqvbub", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(PolicyType.INVALID, model.subProtectionPolicy().get(0).policyType()); + Assertions.assertEquals(1885263219, model.protectedItemsCount()); + Assertions.assertEquals("tprwnw", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(PolicyType.DIFFERENTIAL, model.subProtectionPolicy().get(0).policyType()); Assertions.assertEquals(TieringMode.DO_NOT_TIER, - model.subProtectionPolicy().get(0).tieringPolicy().get("jsvthnwpzteko").tieringMode()); - Assertions.assertEquals(1707376707, - model.subProtectionPolicy().get(0).tieringPolicy().get("jsvthnwpzteko").duration()); - Assertions.assertEquals(RetentionDurationType.WEEKS, - model.subProtectionPolicy().get(0).tieringPolicy().get("jsvthnwpzteko").durationType()); - Assertions.assertEquals(1254839089, + model.subProtectionPolicy().get(0).tieringPolicy().get("nsduugwbsre").tieringMode()); + Assertions.assertEquals(1059023797, + model.subProtectionPolicy().get(0).tieringPolicy().get("nsduugwbsre").duration()); + Assertions.assertEquals(RetentionDurationType.YEARS, + model.subProtectionPolicy().get(0).tieringPolicy().get("nsduugwbsre").durationType()); + Assertions.assertEquals(64736512, model.subProtectionPolicy().get(0).snapshotBackupAdditionalDetails().instantRpRetentionRangeInDays()); - Assertions.assertEquals("cugswvxwlmzqw", + Assertions.assertEquals("edev", model.subProtectionPolicy().get(0).snapshotBackupAdditionalDetails().instantRPDetails()); - Assertions.assertEquals("xnjmxm", + Assertions.assertEquals("slcqxypokkh", model.subProtectionPolicy() .get(0) .snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .identityArmId()); - Assertions.assertEquals("qudtcvclx", + Assertions.assertEquals("nqcymczngnbdxxew", model.subProtectionPolicy() .get(0) .snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .identityName()); - Assertions.assertEquals("dkvgfabuiyjibuzp", + Assertions.assertEquals("nvudbchaqdtvqecr", model.subProtectionPolicy() .get(0) .snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .userAssignedIdentityProperties() .clientId()); - Assertions.assertEquals("ugneikn", + Assertions.assertEquals("tmxxdtddmflhuy", model.subProtectionPolicy() .get(0) .snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .userAssignedIdentityProperties() .principalId()); - Assertions.assertEquals("xjqirwrweoox", model.timeZone()); - Assertions.assertEquals("i", model.fabricName()); + Assertions.assertEquals("zv", model.timeZone()); + Assertions.assertEquals("napxbannovv", model.fabricName()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericRecoveryPointTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericRecoveryPointTests.java index 6438f6d73894..608b4d4ea4a0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericRecoveryPointTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericRecoveryPointTests.java @@ -1,12 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.GenericRecoveryPoint; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointProperties; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -14,33 +16,17 @@ public final class GenericRecoveryPointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GenericRecoveryPoint model = BinaryData.fromString( - "{\"objectType\":\"GenericRecoveryPoint\",\"friendlyName\":\"fepbnwgfmxjgc\",\"recoveryPointType\":\"jbgdlfgtdysnaquf\",\"recoveryPointTime\":\"2021-04-21T16:46:54Z\",\"recoveryPointAdditionalInfo\":\"tqhamzjrw\",\"recoveryPointProperties\":{\"expiryTime\":\"zeqyjleziun\",\"ruleName\":\"dfzantkwcegy\",\"isSoftDeleted\":false}}") + "{\"objectType\":\"GenericRecoveryPoint\",\"friendlyName\":\"gogczhonnxkrlgny\",\"recoveryPointType\":\"ossxk\",\"recoveryPointTime\":\"2021-01-10T00:28:10Z\",\"recoveryPointAdditionalInfo\":\"rrghxjbdhqxvcxgf\",\"recoveryPointProperties\":{\"expiryTime\":\"sofbshrn\",\"ruleName\":\"buswdvzyy\",\"isSoftDeleted\":false},\"threatStatus\":\"Unknown\",\"threatInfo\":[{\"threatTitle\":\"srtkfa\",\"threatDescription\":\"opqgikyzirtxdyux\",\"lastUpdatedTime\":\"2021-05-05T23:09:26Z\",\"threatState\":\"InProgress\",\"threatStartTime\":\"2021-07-14T22:05:57Z\",\"threatEndTime\":\"2021-11-18T04:28:14Z\",\"threatURI\":\"ioilqukrydxtq\",\"threatSeverity\":\"Informational\"}]}") .toObject(GenericRecoveryPoint.class); - Assertions.assertEquals("fepbnwgfmxjgc", model.friendlyName()); - Assertions.assertEquals("jbgdlfgtdysnaquf", model.recoveryPointType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-21T16:46:54Z"), model.recoveryPointTime()); - Assertions.assertEquals("tqhamzjrw", model.recoveryPointAdditionalInfo()); - Assertions.assertEquals("zeqyjleziun", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("dfzantkwcegy", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(false, model.recoveryPointProperties().isSoftDeleted()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GenericRecoveryPoint model = new GenericRecoveryPoint().withFriendlyName("fepbnwgfmxjgc") - .withRecoveryPointType("jbgdlfgtdysnaquf") - .withRecoveryPointTime(OffsetDateTime.parse("2021-04-21T16:46:54Z")) - .withRecoveryPointAdditionalInfo("tqhamzjrw") - .withRecoveryPointProperties(new RecoveryPointProperties().withExpiryTime("zeqyjleziun") - .withRuleName("dfzantkwcegy") - .withIsSoftDeleted(false)); - model = BinaryData.fromObject(model).toObject(GenericRecoveryPoint.class); - Assertions.assertEquals("fepbnwgfmxjgc", model.friendlyName()); - Assertions.assertEquals("jbgdlfgtdysnaquf", model.recoveryPointType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-21T16:46:54Z"), model.recoveryPointTime()); - Assertions.assertEquals("tqhamzjrw", model.recoveryPointAdditionalInfo()); - Assertions.assertEquals("zeqyjleziun", model.recoveryPointProperties().expiryTime()); - Assertions.assertEquals("dfzantkwcegy", model.recoveryPointProperties().ruleName()); - Assertions.assertEquals(false, model.recoveryPointProperties().isSoftDeleted()); + Assertions.assertEquals(ThreatStatus.UNKNOWN, model.threatStatus()); + Assertions.assertEquals(ThreatState.IN_PROGRESS, model.threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.INFORMATIONAL, model.threatInfo().get(0).threatSeverity()); + Assertions.assertEquals("gogczhonnxkrlgny", model.friendlyName()); + Assertions.assertEquals("ossxk", model.recoveryPointType()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-10T00:28:10Z"), model.recoveryPointTime()); + Assertions.assertEquals("rrghxjbdhqxvcxgf", model.recoveryPointAdditionalInfo()); + Assertions.assertEquals("sofbshrn", model.recoveryPointProperties().expiryTime()); + Assertions.assertEquals("buswdvzyy", model.recoveryPointProperties().ruleName()); + Assertions.assertFalse(model.recoveryPointProperties().isSoftDeleted()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GetTieringCostOperationResultsGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GetTieringCostOperationResultsGetWithResponseMockTests.java index 5f2d934ada01..f8ea207fe241 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GetTieringCostOperationResultsGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GetTieringCostOperationResultsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -29,7 +29,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); TieringCostInfo response = manager.getTieringCostOperationResults() - .getWithResponse("jguwrjmwvv", "tu", "kxxi", com.azure.core.util.Context.NONE) + .getWithResponse("lilw", "ghjhjvmabzzbwa", "b", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/HourlyScheduleTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/HourlyScheduleTests.java index 62c195119913..f70f2e7dfa94 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/HourlyScheduleTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/HourlyScheduleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,21 +13,21 @@ public final class HourlyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HourlySchedule model = BinaryData.fromString( - "{\"interval\":649940007,\"scheduleWindowStartTime\":\"2021-11-27T20:43:51Z\",\"scheduleWindowDuration\":1895248762}") + "{\"interval\":1160823097,\"scheduleWindowStartTime\":\"2021-05-05T21:41:44Z\",\"scheduleWindowDuration\":1658827458}") .toObject(HourlySchedule.class); - Assertions.assertEquals(649940007, model.interval()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-27T20:43:51Z"), model.scheduleWindowStartTime()); - Assertions.assertEquals(1895248762, model.scheduleWindowDuration()); + Assertions.assertEquals(1160823097, model.interval()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-05T21:41:44Z"), model.scheduleWindowStartTime()); + Assertions.assertEquals(1658827458, model.scheduleWindowDuration()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HourlySchedule model = new HourlySchedule().withInterval(649940007) - .withScheduleWindowStartTime(OffsetDateTime.parse("2021-11-27T20:43:51Z")) - .withScheduleWindowDuration(1895248762); + HourlySchedule model = new HourlySchedule().withInterval(1160823097) + .withScheduleWindowStartTime(OffsetDateTime.parse("2021-05-05T21:41:44Z")) + .withScheduleWindowDuration(1658827458); model = BinaryData.fromObject(model).toObject(HourlySchedule.class); - Assertions.assertEquals(649940007, model.interval()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-27T20:43:51Z"), model.scheduleWindowStartTime()); - Assertions.assertEquals(1895248762, model.scheduleWindowDuration()); + Assertions.assertEquals(1160823097, model.interval()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-05T21:41:44Z"), model.scheduleWindowStartTime()); + Assertions.assertEquals(1658827458, model.scheduleWindowDuration()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaaSvmContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaaSvmContainerTests.java index bdf40386c1bd..37129148d7a1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaaSvmContainerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaaSvmContainerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,36 +13,36 @@ public final class IaaSvmContainerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IaaSvmContainer model = BinaryData.fromString( - "{\"containerType\":\"IaasVMContainer\",\"virtualMachineId\":\"incqlhriswsl\",\"virtualMachineVersion\":\"iiovgqcgxu\",\"resourceGroup\":\"qkctotiowlxte\",\"friendlyName\":\"ptjgwdt\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"anblwphqlkccu\",\"healthStatus\":\"ygqwahoiu\",\"protectableObjectType\":\"gniiprglvaw\"}") + "{\"containerType\":\"IaasVMContainer\",\"virtualMachineId\":\"mrqemvvhmx\",\"virtualMachineVersion\":\"rjfut\",\"resourceGroup\":\"oe\",\"friendlyName\":\"vewzcj\",\"backupManagementType\":\"AzureBackupServer\",\"registrationStatus\":\"cpmguaadraufact\",\"healthStatus\":\"hzovaj\",\"protectableObjectType\":\"iuxxpshneekulfg\"}") .toObject(IaaSvmContainer.class); - Assertions.assertEquals("ptjgwdt", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.backupManagementType()); - Assertions.assertEquals("anblwphqlkccu", model.registrationStatus()); - Assertions.assertEquals("ygqwahoiu", model.healthStatus()); - Assertions.assertEquals("gniiprglvaw", model.protectableObjectType()); - Assertions.assertEquals("incqlhriswsl", model.virtualMachineId()); - Assertions.assertEquals("iiovgqcgxu", model.virtualMachineVersion()); - Assertions.assertEquals("qkctotiowlxte", model.resourceGroup()); + Assertions.assertEquals("vewzcj", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); + Assertions.assertEquals("cpmguaadraufact", model.registrationStatus()); + Assertions.assertEquals("hzovaj", model.healthStatus()); + Assertions.assertEquals("iuxxpshneekulfg", model.protectableObjectType()); + Assertions.assertEquals("mrqemvvhmx", model.virtualMachineId()); + Assertions.assertEquals("rjfut", model.virtualMachineVersion()); + Assertions.assertEquals("oe", model.resourceGroup()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IaaSvmContainer model = new IaaSvmContainer().withFriendlyName("ptjgwdt") - .withBackupManagementType(BackupManagementType.AZURE_WORKLOAD) - .withRegistrationStatus("anblwphqlkccu") - .withHealthStatus("ygqwahoiu") - .withProtectableObjectType("gniiprglvaw") - .withVirtualMachineId("incqlhriswsl") - .withVirtualMachineVersion("iiovgqcgxu") - .withResourceGroup("qkctotiowlxte"); + IaaSvmContainer model = new IaaSvmContainer().withFriendlyName("vewzcj") + .withBackupManagementType(BackupManagementType.AZURE_BACKUP_SERVER) + .withRegistrationStatus("cpmguaadraufact") + .withHealthStatus("hzovaj") + .withProtectableObjectType("iuxxpshneekulfg") + .withVirtualMachineId("mrqemvvhmx") + .withVirtualMachineVersion("rjfut") + .withResourceGroup("oe"); model = BinaryData.fromObject(model).toObject(IaaSvmContainer.class); - Assertions.assertEquals("ptjgwdt", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.backupManagementType()); - Assertions.assertEquals("anblwphqlkccu", model.registrationStatus()); - Assertions.assertEquals("ygqwahoiu", model.healthStatus()); - Assertions.assertEquals("gniiprglvaw", model.protectableObjectType()); - Assertions.assertEquals("incqlhriswsl", model.virtualMachineId()); - Assertions.assertEquals("iiovgqcgxu", model.virtualMachineVersion()); - Assertions.assertEquals("qkctotiowlxte", model.resourceGroup()); + Assertions.assertEquals("vewzcj", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); + Assertions.assertEquals("cpmguaadraufact", model.registrationStatus()); + Assertions.assertEquals("hzovaj", model.healthStatus()); + Assertions.assertEquals("iuxxpshneekulfg", model.protectableObjectType()); + Assertions.assertEquals("mrqemvvhmx", model.virtualMachineId()); + Assertions.assertEquals("rjfut", model.virtualMachineVersion()); + Assertions.assertEquals("oe", model.resourceGroup()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaaSvmProtectableItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaaSvmProtectableItemTests.java deleted file mode 100644 index 783b8245cb04..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaaSvmProtectableItemTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.IaaSvmProtectableItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import org.junit.jupiter.api.Assertions; - -public final class IaaSvmProtectableItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IaaSvmProtectableItem model = BinaryData.fromString( - "{\"protectableItemType\":\"IaaSVMProtectableItem\",\"virtualMachineId\":\"qmrjg\",\"virtualMachineVersion\":\"hfqlgg\",\"resourceGroup\":\"iwzcxmjpbyeph\",\"backupManagementType\":\"t\",\"workloadType\":\"j\",\"friendlyName\":\"cmyfqipgxhnpo\",\"protectionState\":\"Protected\"}") - .toObject(IaaSvmProtectableItem.class); - Assertions.assertEquals("t", model.backupManagementType()); - Assertions.assertEquals("j", model.workloadType()); - Assertions.assertEquals("cmyfqipgxhnpo", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); - Assertions.assertEquals("qmrjg", model.virtualMachineId()); - Assertions.assertEquals("hfqlgg", model.virtualMachineVersion()); - Assertions.assertEquals("iwzcxmjpbyeph", model.resourceGroup()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IaaSvmProtectableItem model = new IaaSvmProtectableItem().withBackupManagementType("t") - .withWorkloadType("j") - .withFriendlyName("cmyfqipgxhnpo") - .withProtectionState(ProtectionStatus.PROTECTED) - .withVirtualMachineId("qmrjg") - .withVirtualMachineVersion("hfqlgg") - .withResourceGroup("iwzcxmjpbyeph"); - model = BinaryData.fromObject(model).toObject(IaaSvmProtectableItem.class); - Assertions.assertEquals("t", model.backupManagementType()); - Assertions.assertEquals("j", model.workloadType()); - Assertions.assertEquals("cmyfqipgxhnpo", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); - Assertions.assertEquals("qmrjg", model.virtualMachineId()); - Assertions.assertEquals("hfqlgg", model.virtualMachineVersion()); - Assertions.assertEquals("iwzcxmjpbyeph", model.resourceGroup()); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaasVMBackupRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaasVMBackupRequestTests.java index c180d63c81d3..28f8686c5879 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaasVMBackupRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaasVMBackupRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,16 +14,16 @@ public final class IaasVMBackupRequestTests { public void testDeserialize() throws Exception { IaasVMBackupRequest model = BinaryData .fromString( - "{\"objectType\":\"IaasVMBackupRequest\",\"recoveryPointExpiryTimeInUTC\":\"2021-03-03T05:15:58Z\"}") + "{\"objectType\":\"IaasVMBackupRequest\",\"recoveryPointExpiryTimeInUTC\":\"2021-10-20T05:52:01Z\"}") .toObject(IaasVMBackupRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-03T05:15:58Z"), model.recoveryPointExpiryTimeInUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-20T05:52:01Z"), model.recoveryPointExpiryTimeInUtc()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IaasVMBackupRequest model - = new IaasVMBackupRequest().withRecoveryPointExpiryTimeInUtc(OffsetDateTime.parse("2021-03-03T05:15:58Z")); + = new IaasVMBackupRequest().withRecoveryPointExpiryTimeInUtc(OffsetDateTime.parse("2021-10-20T05:52:01Z")); model = BinaryData.fromObject(model).toObject(IaasVMBackupRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-03T05:15:58Z"), model.recoveryPointExpiryTimeInUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-20T05:52:01Z"), model.recoveryPointExpiryTimeInUtc()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaasVmProtectableItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaasVmProtectableItemTests.java new file mode 100644 index 000000000000..77a069376fdf --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaasVmProtectableItemTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.recoveryservicesbackup.models.IaasVmProtectableItem; +import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; +import org.junit.jupiter.api.Assertions; + +public final class IaasVmProtectableItemTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IaasVmProtectableItem model = BinaryData.fromString( + "{\"protectableItemType\":\"IaaSVMProtectableItem\",\"virtualMachineId\":\"pqsixymmp\",\"virtualMachineVersion\":\"ivyqlkjuvsmbmsl\",\"resourceGroup\":\"yovwzdbpqv\",\"backupManagementType\":\"efgv\",\"workloadType\":\"nokcv\",\"friendlyName\":\"ubseskvcuartr\",\"protectionState\":\"ProtectionFailed\"}") + .toObject(IaasVmProtectableItem.class); + Assertions.assertEquals("efgv", model.backupManagementType()); + Assertions.assertEquals("nokcv", model.workloadType()); + Assertions.assertEquals("ubseskvcuartr", model.friendlyName()); + Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); + Assertions.assertEquals("pqsixymmp", model.virtualMachineId()); + Assertions.assertEquals("ivyqlkjuvsmbmsl", model.virtualMachineVersion()); + Assertions.assertEquals("yovwzdbpqv", model.resourceGroup()); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaasVmilrRegistrationRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaasVmilrRegistrationRequestTests.java index 330689b476c5..cde663fa02ab 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaasVmilrRegistrationRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaasVmilrRegistrationRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,24 +12,24 @@ public final class IaasVmilrRegistrationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IaasVmilrRegistrationRequest model = BinaryData.fromString( - "{\"objectType\":\"IaasVMILRRegistrationRequest\",\"recoveryPointId\":\"ehurqlr\",\"virtualMachineId\":\"fawey\",\"initiatorName\":\"kphyjdxrav\",\"renewExistingRegistration\":true}") + "{\"objectType\":\"IaasVMILRRegistrationRequest\",\"recoveryPointId\":\"lqivbgkcv\",\"virtualMachineId\":\"pzvuqdflvo\",\"initiatorName\":\"yp\",\"renewExistingRegistration\":true}") .toObject(IaasVmilrRegistrationRequest.class); - Assertions.assertEquals("ehurqlr", model.recoveryPointId()); - Assertions.assertEquals("fawey", model.virtualMachineId()); - Assertions.assertEquals("kphyjdxrav", model.initiatorName()); - Assertions.assertEquals(true, model.renewExistingRegistration()); + Assertions.assertEquals("lqivbgkcv", model.recoveryPointId()); + Assertions.assertEquals("pzvuqdflvo", model.virtualMachineId()); + Assertions.assertEquals("yp", model.initiatorName()); + Assertions.assertTrue(model.renewExistingRegistration()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IaasVmilrRegistrationRequest model = new IaasVmilrRegistrationRequest().withRecoveryPointId("ehurqlr") - .withVirtualMachineId("fawey") - .withInitiatorName("kphyjdxrav") + IaasVmilrRegistrationRequest model = new IaasVmilrRegistrationRequest().withRecoveryPointId("lqivbgkcv") + .withVirtualMachineId("pzvuqdflvo") + .withInitiatorName("yp") .withRenewExistingRegistration(true); model = BinaryData.fromObject(model).toObject(IaasVmilrRegistrationRequest.class); - Assertions.assertEquals("ehurqlr", model.recoveryPointId()); - Assertions.assertEquals("fawey", model.virtualMachineId()); - Assertions.assertEquals("kphyjdxrav", model.initiatorName()); - Assertions.assertEquals(true, model.renewExistingRegistration()); + Assertions.assertEquals("lqivbgkcv", model.recoveryPointId()); + Assertions.assertEquals("pzvuqdflvo", model.virtualMachineId()); + Assertions.assertEquals("yp", model.initiatorName()); + Assertions.assertTrue(model.renewExistingRegistration()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IdentityBasedRestoreDetailsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IdentityBasedRestoreDetailsTests.java index fc6ef0c86c7b..c4c0897ba818 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IdentityBasedRestoreDetailsTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IdentityBasedRestoreDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,18 +12,18 @@ public final class IdentityBasedRestoreDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IdentityBasedRestoreDetails model - = BinaryData.fromString("{\"objectType\":\"btcjuah\",\"targetStorageAccountId\":\"qtobkauxo\"}") + = BinaryData.fromString("{\"objectType\":\"mrnjh\",\"targetStorageAccountId\":\"ujztcz\"}") .toObject(IdentityBasedRestoreDetails.class); - Assertions.assertEquals("btcjuah", model.objectType()); - Assertions.assertEquals("qtobkauxo", model.targetStorageAccountId()); + Assertions.assertEquals("mrnjh", model.objectType()); + Assertions.assertEquals("ujztcz", model.targetStorageAccountId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IdentityBasedRestoreDetails model - = new IdentityBasedRestoreDetails().withObjectType("btcjuah").withTargetStorageAccountId("qtobkauxo"); + = new IdentityBasedRestoreDetails().withObjectType("mrnjh").withTargetStorageAccountId("ujztcz"); model = BinaryData.fromObject(model).toObject(IdentityBasedRestoreDetails.class); - Assertions.assertEquals("btcjuah", model.objectType()); - Assertions.assertEquals("qtobkauxo", model.targetStorageAccountId()); + Assertions.assertEquals("mrnjh", model.objectType()); + Assertions.assertEquals("ujztcz", model.targetStorageAccountId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IdentityInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IdentityInfoTests.java index eb655cdb21d7..1fc9acf99e1d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IdentityInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IdentityInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,19 +11,19 @@ public final class IdentityInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IdentityInfo model = BinaryData - .fromString("{\"isSystemAssignedIdentity\":true,\"managedIdentityResourceId\":\"phwpnulaiywzej\"}") - .toObject(IdentityInfo.class); - Assertions.assertEquals(true, model.isSystemAssignedIdentity()); - Assertions.assertEquals("phwpnulaiywzej", model.managedIdentityResourceId()); + IdentityInfo model + = BinaryData.fromString("{\"isSystemAssignedIdentity\":false,\"managedIdentityResourceId\":\"uvr\"}") + .toObject(IdentityInfo.class); + Assertions.assertFalse(model.isSystemAssignedIdentity()); + Assertions.assertEquals("uvr", model.managedIdentityResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IdentityInfo model - = new IdentityInfo().withIsSystemAssignedIdentity(true).withManagedIdentityResourceId("phwpnulaiywzej"); + = new IdentityInfo().withIsSystemAssignedIdentity(false).withManagedIdentityResourceId("uvr"); model = BinaryData.fromObject(model).toObject(IdentityInfo.class); - Assertions.assertEquals(true, model.isSystemAssignedIdentity()); - Assertions.assertEquals("phwpnulaiywzej", model.managedIdentityResourceId()); + Assertions.assertFalse(model.isSystemAssignedIdentity()); + Assertions.assertEquals("uvr", model.managedIdentityResourceId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IlrRequestResourceTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IlrRequestResourceTests.java index 25ebdb799eda..a1bd8ef96abd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IlrRequestResourceTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IlrRequestResourceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -15,23 +15,23 @@ public final class IlrRequestResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IlrRequestResource model = BinaryData.fromString( - "{\"properties\":{\"objectType\":\"IlrRequest\"},\"eTag\":\"sdbnwdcfhucqdpf\",\"location\":\"vglsbjjca\",\"tags\":{\"xqtvcofu\":\"bvtvudutncormr\",\"vkg\":\"f\"},\"id\":\"u\",\"name\":\"gdknnqv\",\"type\":\"aznqntoru\"}") + "{\"location\":\"xsmrpddouifamow\",\"tags\":{\"nlqwzdvpiwhx\":\"yn\",\"xylrjvmtygjbmz\":\"szdtmaajquh\"},\"eTag\":\"spsp\",\"properties\":{\"objectType\":\"IlrRequest\"},\"id\":\"kfkyjp\",\"name\":\"sp\",\"type\":\"pssdfppyogtie\"}") .toObject(IlrRequestResource.class); - Assertions.assertEquals("vglsbjjca", model.location()); - Assertions.assertEquals("bvtvudutncormr", model.tags().get("xqtvcofu")); - Assertions.assertEquals("sdbnwdcfhucqdpf", model.etag()); + Assertions.assertEquals("xsmrpddouifamow", model.location()); + Assertions.assertEquals("yn", model.tags().get("nlqwzdvpiwhx")); + Assertions.assertEquals("spsp", model.eTag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IlrRequestResource model = new IlrRequestResource().withLocation("vglsbjjca") - .withTags(mapOf("xqtvcofu", "bvtvudutncormr", "vkg", "f")) - .withProperties(new IlrRequest()) - .withEtag("sdbnwdcfhucqdpf"); + IlrRequestResource model = new IlrRequestResource().withLocation("xsmrpddouifamow") + .withTags(mapOf("nlqwzdvpiwhx", "yn", "xylrjvmtygjbmz", "szdtmaajquh")) + .withETag("spsp") + .withProperties(new IlrRequest()); model = BinaryData.fromObject(model).toObject(IlrRequestResource.class); - Assertions.assertEquals("vglsbjjca", model.location()); - Assertions.assertEquals("bvtvudutncormr", model.tags().get("xqtvcofu")); - Assertions.assertEquals("sdbnwdcfhucqdpf", model.etag()); + Assertions.assertEquals("xsmrpddouifamow", model.location()); + Assertions.assertEquals("yn", model.tags().get("nlqwzdvpiwhx")); + Assertions.assertEquals("spsp", model.eTag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IlrRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IlrRequestTests.java index 61c077ff3ad5..b6c91051aef3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IlrRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IlrRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/InstantItemRecoveryTargetTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/InstantItemRecoveryTargetTests.java index 7ebf4ab62685..31b49acfecc1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/InstantItemRecoveryTargetTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/InstantItemRecoveryTargetTests.java @@ -1,46 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientScriptForConnect; import com.azure.resourcemanager.recoveryservicesbackup.models.InstantItemRecoveryTarget; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class InstantItemRecoveryTargetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InstantItemRecoveryTarget model = BinaryData.fromString( - "{\"clientScripts\":[{\"scriptContent\":\"xmrgchbapxkiy\",\"scriptExtension\":\"j\",\"osType\":\"ajb\",\"url\":\"cgduusio\",\"scriptNameSuffix\":\"blevpmcluj\"},{\"scriptContent\":\"kyxl\",\"scriptExtension\":\"sjgkzzltafh\",\"osType\":\"ffovwmbjlzqsczp\",\"url\":\"dwnapf\",\"scriptNameSuffix\":\"wow\"}]}") + "{\"clientScripts\":[{\"scriptContent\":\"y\",\"scriptExtension\":\"git\",\"osType\":\"qhabifpikxwcz\",\"url\":\"scnpqxuhivy\",\"scriptNameSuffix\":\"iwbybrkxvdumjg\"}]}") .toObject(InstantItemRecoveryTarget.class); - Assertions.assertEquals("xmrgchbapxkiy", model.clientScripts().get(0).scriptContent()); - Assertions.assertEquals("j", model.clientScripts().get(0).scriptExtension()); - Assertions.assertEquals("ajb", model.clientScripts().get(0).osType()); - Assertions.assertEquals("cgduusio", model.clientScripts().get(0).url()); - Assertions.assertEquals("blevpmcluj", model.clientScripts().get(0).scriptNameSuffix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InstantItemRecoveryTarget model = new InstantItemRecoveryTarget().withClientScripts(Arrays.asList( - new ClientScriptForConnect().withScriptContent("xmrgchbapxkiy") - .withScriptExtension("j") - .withOsType("ajb") - .withUrl("cgduusio") - .withScriptNameSuffix("blevpmcluj"), - new ClientScriptForConnect().withScriptContent("kyxl") - .withScriptExtension("sjgkzzltafh") - .withOsType("ffovwmbjlzqsczp") - .withUrl("dwnapf") - .withScriptNameSuffix("wow"))); - model = BinaryData.fromObject(model).toObject(InstantItemRecoveryTarget.class); - Assertions.assertEquals("xmrgchbapxkiy", model.clientScripts().get(0).scriptContent()); - Assertions.assertEquals("j", model.clientScripts().get(0).scriptExtension()); - Assertions.assertEquals("ajb", model.clientScripts().get(0).osType()); - Assertions.assertEquals("cgduusio", model.clientScripts().get(0).url()); - Assertions.assertEquals("blevpmcluj", model.clientScripts().get(0).scriptNameSuffix()); + Assertions.assertEquals("y", model.clientScripts().get(0).scriptContent()); + Assertions.assertEquals("git", model.clientScripts().get(0).scriptExtension()); + Assertions.assertEquals("qhabifpikxwcz", model.clientScripts().get(0).osType()); + Assertions.assertEquals("scnpqxuhivy", model.clientScripts().get(0).url()); + Assertions.assertEquals("iwbybrkxvdumjg", model.clientScripts().get(0).scriptNameSuffix()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/InstantRPAdditionalDetailsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/InstantRPAdditionalDetailsTests.java index 142027345a62..5e2282cb5746 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/InstantRPAdditionalDetailsTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/InstantRPAdditionalDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,18 +12,18 @@ public final class InstantRPAdditionalDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InstantRPAdditionalDetails model = BinaryData - .fromString("{\"azureBackupRGNamePrefix\":\"tx\",\"azureBackupRGNameSuffix\":\"zukxitmmqtgqq\"}") + .fromString("{\"azureBackupRGNamePrefix\":\"ddbhf\",\"azureBackupRGNameSuffix\":\"fpazjzoywjxhpd\"}") .toObject(InstantRPAdditionalDetails.class); - Assertions.assertEquals("tx", model.azureBackupRGNamePrefix()); - Assertions.assertEquals("zukxitmmqtgqq", model.azureBackupRGNameSuffix()); + Assertions.assertEquals("ddbhf", model.azureBackupRGNamePrefix()); + Assertions.assertEquals("fpazjzoywjxhpd", model.azureBackupRGNameSuffix()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InstantRPAdditionalDetails model = new InstantRPAdditionalDetails().withAzureBackupRGNamePrefix("tx") - .withAzureBackupRGNameSuffix("zukxitmmqtgqq"); + InstantRPAdditionalDetails model = new InstantRPAdditionalDetails().withAzureBackupRGNamePrefix("ddbhf") + .withAzureBackupRGNameSuffix("fpazjzoywjxhpd"); model = BinaryData.fromObject(model).toObject(InstantRPAdditionalDetails.class); - Assertions.assertEquals("tx", model.azureBackupRGNamePrefix()); - Assertions.assertEquals("zukxitmmqtgqq", model.azureBackupRGNameSuffix()); + Assertions.assertEquals("ddbhf", model.azureBackupRGNamePrefix()); + Assertions.assertEquals("fpazjzoywjxhpd", model.azureBackupRGNameSuffix()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsProvisionWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsProvisionWithResponseMockTests.java index ac318d422cd9..823c6d3109fd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsProvisionWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsProvisionWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -32,11 +32,12 @@ public void testProvisionWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.itemLevelRecoveryConnections() - .provisionWithResponse("jialz", "nobrqlpb", "jtrpzuyud", "vbxnhsqeaeonqe", "wgdhu", "uzytz", - new IlrRequestResource().withLocation("mpinmzvfkneerzzt") - .withTags(mapOf("lugdybnhrxlelf", "sj", "htdm", "hkeizcp", "c", "wjekptycaydbj")) - .withProperties(new IlrRequest()) - .withEtag("gatmoljiy"), + .provisionWithResponse("bnhrxlelfjhkeiz", "pihtdmiwjekpt", "caydbjzcqymlcfnz", "mhsurlgwqkpmm", "pstauol", + "wiubmomsgvv", + new IlrRequestResource().withLocation("vvlrlohewjjmajn") + .withTags(mapOf("fzqxjo", "lqionswaeqk", "totryegpkhxrme", "ho")) + .withETag("nlwkbfokxkhupz") + .withProperties(new IlrRequest()), com.azure.core.util.Context.NONE); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsRevokeWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsRevokeWithResponseMockTests.java index c71fb8fd1570..6281b9c6e177 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsRevokeWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsRevokeWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -28,7 +28,7 @@ public void testRevokeWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.itemLevelRecoveryConnections() - .revokeWithResponse("lrlohewjjmajnkdf", "q", "onswae", "kzfzqxjosho", "totryegpkhxrme", "znlw", + .revokeWithResponse("y", "lugekdfqnhtt", "do", "rczfjjnnuxxr", "kmhmnulwempdc", "frhjulrsulwzp", com.azure.core.util.Context.NONE); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobCancellationsTriggerWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobCancellationsTriggerWithResponseMockTests.java index 26b35371c75a..3f3f9e3d2ad6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobCancellationsTriggerWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobCancellationsTriggerWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -28,7 +28,7 @@ public void testTriggerWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.jobCancellations() - .triggerWithResponse("sqwudohzilfmnli", "psimsf", "ypofqpmbhyqgs", com.azure.core.util.Context.NONE); + .triggerWithResponse("upjo", "mozsayebrazwz", "pzbtzuyk", com.azure.core.util.Context.NONE); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobDetailsGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobDetailsGetWithResponseMockTests.java index 3eaadb72302b..827e92150f23 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobDetailsGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobDetailsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -22,7 +22,7 @@ public final class JobDetailsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"jobType\":\"Job\",\"entityFriendlyName\":\"mkekxpkzwaqxo\",\"backupManagementType\":\"AzureWorkload\",\"operation\":\"chiqbplvfid\",\"status\":\"ztekxbyjgmsfep\",\"startTime\":\"2021-07-22T21:48:32Z\",\"endTime\":\"2021-06-14T04:53:05Z\",\"activityId\":\"a\"},\"eTag\":\"grhrdic\",\"location\":\"dw\",\"tags\":{\"ukdveksbuhoduc\":\"owxwyovcxjsgbip\",\"scrdp\":\"v\",\"yszekbhwlka\":\"bfdyjduss\",\"n\":\"ggkrehbf\"},\"id\":\"ybff\",\"name\":\"jfiimreoa\",\"type\":\"sqtaadusrexxfa\"}"; + = "{\"properties\":{\"jobType\":\"Job\",\"entityFriendlyName\":\"bwzjnufzrf\",\"backupManagementType\":\"AzureSql\",\"operation\":\"gnnbzrtf\",\"status\":\"dzuubjtvgjsxm\",\"startTime\":\"2021-09-12T11:20:26Z\",\"endTime\":\"2021-10-04T17:55:49Z\",\"activityId\":\"vdpwwobtdphti\"},\"tags\":{\"hks\":\"fofwan\",\"riwgybjp\":\"auwazcgwd\"},\"location\":\"ok\",\"eTag\":\"vgllixdgby\",\"id\":\"wewqkj\",\"name\":\"xprwpxs\",\"type\":\"ohutxlcsk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,18 +32,18 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); JobResource response = manager.jobDetails() - .getWithResponse("toyrplixlajml", "pq", "evhamfowg", com.azure.core.util.Context.NONE) + .getWithResponse("rf", "bdxzfxnxmlbmu", "swkjmdihdcyyyz", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("dw", response.location()); - Assertions.assertEquals("owxwyovcxjsgbip", response.tags().get("ukdveksbuhoduc")); - Assertions.assertEquals("mkekxpkzwaqxo", response.properties().entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, response.properties().backupManagementType()); - Assertions.assertEquals("chiqbplvfid", response.properties().operation()); - Assertions.assertEquals("ztekxbyjgmsfep", response.properties().status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-22T21:48:32Z"), response.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-14T04:53:05Z"), response.properties().endTime()); - Assertions.assertEquals("a", response.properties().activityId()); - Assertions.assertEquals("grhrdic", response.etag()); + Assertions.assertEquals("bwzjnufzrf", response.properties().entityFriendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_SQL, response.properties().backupManagementType()); + Assertions.assertEquals("gnnbzrtf", response.properties().operation()); + Assertions.assertEquals("dzuubjtvgjsxm", response.properties().status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-12T11:20:26Z"), response.properties().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-04T17:55:49Z"), response.properties().endTime()); + Assertions.assertEquals("vdpwwobtdphti", response.properties().activityId()); + Assertions.assertEquals("fofwan", response.tags().get("hks")); + Assertions.assertEquals("ok", response.location()); + Assertions.assertEquals("vgllixdgby", response.etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobOperationResultsGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobOperationResultsGetWithResponseMockTests.java index b61d841cf1a7..3d53df90dfe6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobOperationResultsGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobOperationResultsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -28,7 +28,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.jobOperationResults() - .getWithResponse("rmmttjxop", "gerhsmvg", "htwzmqilr", "xy", com.azure.core.util.Context.NONE); + .getWithResponse("kipfsdyepf", "ocmbezacf", "ztgaz", "yqejga", com.azure.core.util.Context.NONE); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobResourceInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobResourceInnerTests.java index 0b9414a0f0d2..63ea6d39b212 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobResourceInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobResourceInnerTests.java @@ -1,71 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.JobResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.Job; import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class JobResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { JobResourceInner model = BinaryData.fromString( - "{\"properties\":{\"jobType\":\"Job\",\"entityFriendlyName\":\"iotwmcdytdxwit\",\"backupManagementType\":\"Invalid\",\"operation\":\"awgqwgxhni\",\"status\":\"x\",\"startTime\":\"2021-09-13T09:37:01Z\",\"endTime\":\"2021-04-10T12:35:25Z\",\"activityId\":\"gklwn\"},\"eTag\":\"hjdauwhvylwz\",\"location\":\"tdhxujznbmpowuwp\",\"tags\":{\"alupjm\":\"lve\",\"iplrbpbewtghfgb\":\"hfxobbcswsrtj\",\"wxzvlvqhjkb\":\"c\",\"iebwwaloayqcgwrt\":\"gibtnm\"},\"id\":\"j\",\"name\":\"zg\",\"type\":\"yzm\"}") + "{\"properties\":{\"jobType\":\"Job\",\"entityFriendlyName\":\"vbopfppdbwnu\",\"backupManagementType\":\"AzureWorkload\",\"operation\":\"xkumasjcaac\",\"status\":\"mmcpug\",\"startTime\":\"2021-09-14T23:55:36Z\",\"endTime\":\"2021-09-16T19:52:32Z\",\"activityId\":\"vufhbzehewhoq\"},\"tags\":{\"xeaclgsc\":\"bqnbl\",\"rsrrmoucsofldp\":\"orim\",\"mxuq\":\"viyfcaabeolhbhlv\"},\"location\":\"s\",\"eTag\":\"kcudfbsfarfsiowl\",\"id\":\"xnq\",\"name\":\"vwgf\",\"type\":\"tmhqykiz\"}") .toObject(JobResourceInner.class); - Assertions.assertEquals("tdhxujznbmpowuwp", model.location()); - Assertions.assertEquals("lve", model.tags().get("alupjm")); - Assertions.assertEquals("iotwmcdytdxwit", model.properties().entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.INVALID, model.properties().backupManagementType()); - Assertions.assertEquals("awgqwgxhni", model.properties().operation()); - Assertions.assertEquals("x", model.properties().status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T09:37:01Z"), model.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T12:35:25Z"), model.properties().endTime()); - Assertions.assertEquals("gklwn", model.properties().activityId()); - Assertions.assertEquals("hjdauwhvylwz", model.etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobResourceInner model = new JobResourceInner().withLocation("tdhxujznbmpowuwp") - .withTags(mapOf("alupjm", "lve", "iplrbpbewtghfgb", "hfxobbcswsrtj", "wxzvlvqhjkb", "c", "iebwwaloayqcgwrt", - "gibtnm")) - .withProperties(new Job().withEntityFriendlyName("iotwmcdytdxwit") - .withBackupManagementType(BackupManagementType.INVALID) - .withOperation("awgqwgxhni") - .withStatus("x") - .withStartTime(OffsetDateTime.parse("2021-09-13T09:37:01Z")) - .withEndTime(OffsetDateTime.parse("2021-04-10T12:35:25Z")) - .withActivityId("gklwn")) - .withEtag("hjdauwhvylwz"); - model = BinaryData.fromObject(model).toObject(JobResourceInner.class); - Assertions.assertEquals("tdhxujznbmpowuwp", model.location()); - Assertions.assertEquals("lve", model.tags().get("alupjm")); - Assertions.assertEquals("iotwmcdytdxwit", model.properties().entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.INVALID, model.properties().backupManagementType()); - Assertions.assertEquals("awgqwgxhni", model.properties().operation()); - Assertions.assertEquals("x", model.properties().status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T09:37:01Z"), model.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T12:35:25Z"), model.properties().endTime()); - Assertions.assertEquals("gklwn", model.properties().activityId()); - Assertions.assertEquals("hjdauwhvylwz", model.etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("vbopfppdbwnu", model.properties().entityFriendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.properties().backupManagementType()); + Assertions.assertEquals("xkumasjcaac", model.properties().operation()); + Assertions.assertEquals("mmcpug", model.properties().status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-14T23:55:36Z"), model.properties().startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T19:52:32Z"), model.properties().endTime()); + Assertions.assertEquals("vufhbzehewhoq", model.properties().activityId()); + Assertions.assertEquals("bqnbl", model.tags().get("xeaclgsc")); + Assertions.assertEquals("s", model.location()); + Assertions.assertEquals("kcudfbsfarfsiowl", model.etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobResourceListTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobResourceListTests.java index 15b213f4d20f..cf9db4f75fe4 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobResourceListTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobResourceListTests.java @@ -1,82 +1,34 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.JobResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.JobResourceList; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.Job; -import com.azure.resourcemanager.recoveryservicesbackup.models.JobResourceList; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class JobResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { JobResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"jobType\":\"Job\",\"entityFriendlyName\":\"uzbpzkafku\",\"backupManagementType\":\"AzureIaasVM\",\"operation\":\"nwbmeh\",\"status\":\"eyvjusrtslhspkde\",\"startTime\":\"2021-01-28T17:00:30Z\",\"endTime\":\"2021-02-20T10:46:34Z\",\"activityId\":\"xagkvtmelmqkrh\"},\"eTag\":\"vljua\",\"location\":\"aquhcdhm\",\"tags\":{\"fadmws\":\"laexqp\",\"lf\":\"crgvxpvgom\",\"ali\":\"isgwbnbbeldawkz\",\"hashsfwxosow\":\"urqhaka\"},\"id\":\"xcug\",\"name\":\"cjooxdjebwpucwwf\",\"type\":\"ovbvmeueciv\"}],\"nextLink\":\"zceuojgjrw\"}") + "{\"value\":[{\"properties\":{\"jobType\":\"Job\",\"entityFriendlyName\":\"akxcptsoqfyiaseq\",\"backupManagementType\":\"AzureSql\",\"operation\":\"ttzrazisgyki\",\"status\":\"mvanbwzo\",\"startTime\":\"2021-06-13T19:14:44Z\",\"endTime\":\"2020-12-23T04:15:05Z\",\"activityId\":\"bsojk\"},\"tags\":{\"ysprq\":\"hmdp\",\"pli\":\"gnzxojpslsvj\",\"qvapcohhoucq\":\"fiqwoy\"},\"location\":\"oj\",\"eTag\":\"x\",\"id\":\"zdcgdzbenr\",\"name\":\"bcawetz\",\"type\":\"ddtjwfljhznam\"}],\"nextLink\":\"atmzw\"}") .toObject(JobResourceList.class); - Assertions.assertEquals("zceuojgjrw", model.nextLink()); - Assertions.assertEquals("aquhcdhm", model.value().get(0).location()); - Assertions.assertEquals("laexqp", model.value().get(0).tags().get("fadmws")); - Assertions.assertEquals("uzbpzkafku", model.value().get(0).properties().entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, + Assertions.assertEquals("atmzw", model.nextLink()); + Assertions.assertEquals("akxcptsoqfyiaseq", model.value().get(0).properties().entityFriendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_SQL, model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("nwbmeh", model.value().get(0).properties().operation()); - Assertions.assertEquals("eyvjusrtslhspkde", model.value().get(0).properties().status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-28T17:00:30Z"), + Assertions.assertEquals("ttzrazisgyki", model.value().get(0).properties().operation()); + Assertions.assertEquals("mvanbwzo", model.value().get(0).properties().status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-13T19:14:44Z"), model.value().get(0).properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-20T10:46:34Z"), + Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T04:15:05Z"), model.value().get(0).properties().endTime()); - Assertions.assertEquals("xagkvtmelmqkrh", model.value().get(0).properties().activityId()); - Assertions.assertEquals("vljua", model.value().get(0).etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobResourceList model = new JobResourceList().withNextLink("zceuojgjrw") - .withValue(Arrays.asList(new JobResourceInner().withLocation("aquhcdhm") - .withTags( - mapOf("fadmws", "laexqp", "lf", "crgvxpvgom", "ali", "isgwbnbbeldawkz", "hashsfwxosow", "urqhaka")) - .withProperties(new Job().withEntityFriendlyName("uzbpzkafku") - .withBackupManagementType(BackupManagementType.AZURE_IAAS_VM) - .withOperation("nwbmeh") - .withStatus("eyvjusrtslhspkde") - .withStartTime(OffsetDateTime.parse("2021-01-28T17:00:30Z")) - .withEndTime(OffsetDateTime.parse("2021-02-20T10:46:34Z")) - .withActivityId("xagkvtmelmqkrh")) - .withEtag("vljua"))); - model = BinaryData.fromObject(model).toObject(JobResourceList.class); - Assertions.assertEquals("zceuojgjrw", model.nextLink()); - Assertions.assertEquals("aquhcdhm", model.value().get(0).location()); - Assertions.assertEquals("laexqp", model.value().get(0).tags().get("fadmws")); - Assertions.assertEquals("uzbpzkafku", model.value().get(0).properties().entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, - model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("nwbmeh", model.value().get(0).properties().operation()); - Assertions.assertEquals("eyvjusrtslhspkde", model.value().get(0).properties().status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-28T17:00:30Z"), - model.value().get(0).properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-20T10:46:34Z"), - model.value().get(0).properties().endTime()); - Assertions.assertEquals("xagkvtmelmqkrh", model.value().get(0).properties().activityId()); - Assertions.assertEquals("vljua", model.value().get(0).etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("bsojk", model.value().get(0).properties().activityId()); + Assertions.assertEquals("hmdp", model.value().get(0).tags().get("ysprq")); + Assertions.assertEquals("oj", model.value().get(0).location()); + Assertions.assertEquals("x", model.value().get(0).etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobTests.java index 17004795dc86..29f857c8b36b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,33 +14,14 @@ public final class JobTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Job model = BinaryData.fromString( - "{\"jobType\":\"Job\",\"entityFriendlyName\":\"xongmtsavjcbpwxq\",\"backupManagementType\":\"DefaultBackup\",\"operation\":\"nftguvriuhpr\",\"status\":\"dyvxqtayriww\",\"startTime\":\"2021-05-20T03:51:26Z\",\"endTime\":\"2021-02-13T03:31:18Z\",\"activityId\":\"xrmcqibycnojvk\"}") + "{\"jobType\":\"Job\",\"entityFriendlyName\":\"ksaoafcluqvox\",\"backupManagementType\":\"DPM\",\"operation\":\"im\",\"status\":\"vwg\",\"startTime\":\"2021-04-28T08:25:10Z\",\"endTime\":\"2020-12-22T05:57:37Z\",\"activityId\":\"zgwe\"}") .toObject(Job.class); - Assertions.assertEquals("xongmtsavjcbpwxq", model.entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); - Assertions.assertEquals("nftguvriuhpr", model.operation()); - Assertions.assertEquals("dyvxqtayriww", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-20T03:51:26Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-13T03:31:18Z"), model.endTime()); - Assertions.assertEquals("xrmcqibycnojvk", model.activityId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Job model = new Job().withEntityFriendlyName("xongmtsavjcbpwxq") - .withBackupManagementType(BackupManagementType.DEFAULT_BACKUP) - .withOperation("nftguvriuhpr") - .withStatus("dyvxqtayriww") - .withStartTime(OffsetDateTime.parse("2021-05-20T03:51:26Z")) - .withEndTime(OffsetDateTime.parse("2021-02-13T03:31:18Z")) - .withActivityId("xrmcqibycnojvk"); - model = BinaryData.fromObject(model).toObject(Job.class); - Assertions.assertEquals("xongmtsavjcbpwxq", model.entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); - Assertions.assertEquals("nftguvriuhpr", model.operation()); - Assertions.assertEquals("dyvxqtayriww", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-20T03:51:26Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-13T03:31:18Z"), model.endTime()); - Assertions.assertEquals("xrmcqibycnojvk", model.activityId()); + Assertions.assertEquals("ksaoafcluqvox", model.entityFriendlyName()); + Assertions.assertEquals(BackupManagementType.DPM, model.backupManagementType()); + Assertions.assertEquals("im", model.operation()); + Assertions.assertEquals("vwg", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-28T08:25:10Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-22T05:57:37Z"), model.endTime()); + Assertions.assertEquals("zgwe", model.activityId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobsExportWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobsExportWithResponseMockTests.java index 7d9fc0b91073..ace4346536c5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobsExportWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobsExportWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -27,7 +27,7 @@ public void testExportWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.jobs().exportWithResponse("ewihapfji", "knjdiqfliejhp", "lbiedfsbw", com.azure.core.util.Context.NONE); + manager.jobs().exportWithResponse("amppultassaekewn", "zeajbk", "jlcyizy", com.azure.core.util.Context.NONE); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ListRecoveryPointsRecommendedForMoveRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ListRecoveryPointsRecommendedForMoveRequestTests.java index c1766f7cd4ae..504408defd14 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ListRecoveryPointsRecommendedForMoveRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ListRecoveryPointsRecommendedForMoveRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,19 +13,19 @@ public final class ListRecoveryPointsRecommendedForMoveRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ListRecoveryPointsRecommendedForMoveRequest model - = BinaryData.fromString("{\"objectType\":\"elvezrypq\",\"excludedRPList\":[\"eokerqwkyhkobopg\"]}") + = BinaryData.fromString("{\"objectType\":\"bpzkafkuwbc\",\"excludedRPList\":[\"bmehh\"]}") .toObject(ListRecoveryPointsRecommendedForMoveRequest.class); - Assertions.assertEquals("elvezrypq", model.objectType()); - Assertions.assertEquals("eokerqwkyhkobopg", model.excludedRPList().get(0)); + Assertions.assertEquals("bpzkafkuwbc", model.objectType()); + Assertions.assertEquals("bmehh", model.excludedRPList().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ListRecoveryPointsRecommendedForMoveRequest model - = new ListRecoveryPointsRecommendedForMoveRequest().withObjectType("elvezrypq") - .withExcludedRPList(Arrays.asList("eokerqwkyhkobopg")); + = new ListRecoveryPointsRecommendedForMoveRequest().withObjectType("bpzkafkuwbc") + .withExcludedRPList(Arrays.asList("bmehh")); model = BinaryData.fromObject(model).toObject(ListRecoveryPointsRecommendedForMoveRequest.class); - Assertions.assertEquals("elvezrypq", model.objectType()); - Assertions.assertEquals("eokerqwkyhkobopg", model.excludedRPList().get(0)); + Assertions.assertEquals("bpzkafkuwbc", model.objectType()); + Assertions.assertEquals("bmehh", model.excludedRPList().get(0)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/LogSchedulePolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/LogSchedulePolicyTests.java index 3ff43477f48d..4614db7574b2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/LogSchedulePolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/LogSchedulePolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,15 +12,15 @@ public final class LogSchedulePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LogSchedulePolicy model = BinaryData - .fromString("{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":914637173}") + .fromString("{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":519622226}") .toObject(LogSchedulePolicy.class); - Assertions.assertEquals(914637173, model.scheduleFrequencyInMins()); + Assertions.assertEquals(519622226, model.scheduleFrequencyInMins()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LogSchedulePolicy model = new LogSchedulePolicy().withScheduleFrequencyInMins(914637173); + LogSchedulePolicy model = new LogSchedulePolicy().withScheduleFrequencyInMins(519622226); model = BinaryData.fromObject(model).toObject(LogSchedulePolicy.class); - Assertions.assertEquals(914637173, model.scheduleFrequencyInMins()); + Assertions.assertEquals(519622226, model.scheduleFrequencyInMins()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/LongTermRetentionPolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/LongTermRetentionPolicyTests.java index 3bdbd3b8b60c..6f60cddfc697 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/LongTermRetentionPolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/LongTermRetentionPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -27,125 +27,121 @@ public final class LongTermRetentionPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LongTermRetentionPolicy model = BinaryData.fromString( - "{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2021-10-21T20:36:02Z\",\"2021-04-29T21:17:46Z\",\"2021-03-11T03:18:05Z\"],\"retentionDuration\":{\"count\":1282256848,\"durationType\":\"Weeks\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2021-10-25T04:16:39Z\",\"2021-08-08T18:00:09Z\"],\"retentionDuration\":{\"count\":772955822,\"durationType\":\"Invalid\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":661810692,\"isLast\":false},{\"date\":923324597,\"isLast\":true},{\"date\":2020150927,\"isLast\":true},{\"date\":439727663,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Thursday\"],\"weeksOfTheMonth\":[\"First\",\"Second\",\"Fourth\"]},\"retentionTimes\":[\"2021-03-28T11:35:07Z\",\"2021-11-15T04:13:11Z\"],\"retentionDuration\":{\"count\":220520024,\"durationType\":\"Days\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1093469503,\"isLast\":false},{\"date\":2063038318,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Tuesday\",\"Saturday\",\"Wednesday\"],\"weeksOfTheMonth\":[\"Fourth\",\"Fourth\",\"Second\",\"Invalid\"]},\"retentionTimes\":[\"2021-10-22T15:55:19Z\",\"2021-03-05T13:08Z\",\"2021-04-01T12:27:49Z\"],\"retentionDuration\":{\"count\":314959325,\"durationType\":\"Invalid\"}}}") + "{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2021-05-03T03:00:46Z\",\"2021-09-10T23:02:27Z\",\"2021-11-14T08:40:48Z\"],\"retentionDuration\":{\"count\":240582317,\"durationType\":\"Months\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Wednesday\",\"Monday\",\"Saturday\"],\"retentionTimes\":[\"2021-10-11T18:38:45Z\",\"2021-01-20T19:50:29Z\",\"2021-08-16T03:47:52Z\"],\"retentionDuration\":{\"count\":367170768,\"durationType\":\"Days\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":370827804,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Saturday\",\"Friday\",\"Friday\",\"Sunday\"],\"weeksOfTheMonth\":[\"First\",\"Third\",\"Third\",\"Last\"]},\"retentionTimes\":[\"2021-04-27T14:33:17Z\",\"2021-07-31T13:07:21Z\"],\"retentionDuration\":{\"count\":642883737,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"December\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":436205084,\"isLast\":true},{\"date\":1412186545,\"isLast\":false},{\"date\":2085491837,\"isLast\":true},{\"date\":361835019,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\",\"First\",\"Invalid\",\"Third\"]},\"retentionTimes\":[\"2021-04-11T05:09:16Z\"],\"retentionDuration\":{\"count\":958421959,\"durationType\":\"Years\"}}}") .toObject(LongTermRetentionPolicy.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-21T20:36:02Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-05-03T03:00:46Z"), model.dailySchedule().retentionTimes().get(0)); - Assertions.assertEquals(1282256848, model.dailySchedule().retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.WEEKS, model.dailySchedule().retentionDuration().durationType()); - Assertions.assertEquals(DayOfWeek.SUNDAY, model.weeklySchedule().daysOfTheWeek().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-25T04:16:39Z"), + Assertions.assertEquals(240582317, model.dailySchedule().retentionDuration().count()); + Assertions.assertEquals(RetentionDurationType.MONTHS, model.dailySchedule().retentionDuration().durationType()); + Assertions.assertEquals(DayOfWeek.MONDAY, model.weeklySchedule().daysOfTheWeek().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-11T18:38:45Z"), model.weeklySchedule().retentionTimes().get(0)); - Assertions.assertEquals(772955822, model.weeklySchedule().retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.INVALID, - model.weeklySchedule().retentionDuration().durationType()); + Assertions.assertEquals(367170768, model.weeklySchedule().retentionDuration().count()); + Assertions.assertEquals(RetentionDurationType.DAYS, model.weeklySchedule().retentionDuration().durationType()); Assertions.assertEquals(RetentionScheduleFormat.WEEKLY, model.monthlySchedule().retentionScheduleFormatType()); - Assertions.assertEquals(661810692, + Assertions.assertEquals(370827804, model.monthlySchedule().retentionScheduleDaily().daysOfTheMonth().get(0).date()); - Assertions.assertEquals(false, - model.monthlySchedule().retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); - Assertions.assertEquals(DayOfWeek.THURSDAY, + Assertions.assertFalse(model.monthlySchedule().retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); + Assertions.assertEquals(DayOfWeek.SATURDAY, model.monthlySchedule().retentionScheduleWeekly().daysOfTheWeek().get(0)); Assertions.assertEquals(WeekOfMonth.FIRST, model.monthlySchedule().retentionScheduleWeekly().weeksOfTheMonth().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-28T11:35:07Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T14:33:17Z"), model.monthlySchedule().retentionTimes().get(0)); - Assertions.assertEquals(220520024, model.monthlySchedule().retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.DAYS, model.monthlySchedule().retentionDuration().durationType()); + Assertions.assertEquals(642883737, model.monthlySchedule().retentionDuration().count()); + Assertions.assertEquals(RetentionDurationType.MONTHS, + model.monthlySchedule().retentionDuration().durationType()); Assertions.assertEquals(RetentionScheduleFormat.WEEKLY, model.yearlySchedule().retentionScheduleFormatType()); - Assertions.assertEquals(MonthOfYear.JANUARY, model.yearlySchedule().monthsOfYear().get(0)); - Assertions.assertEquals(1093469503, + Assertions.assertEquals(MonthOfYear.DECEMBER, model.yearlySchedule().monthsOfYear().get(0)); + Assertions.assertEquals(436205084, model.yearlySchedule().retentionScheduleDaily().daysOfTheMonth().get(0).date()); - Assertions.assertEquals(false, - model.yearlySchedule().retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); - Assertions.assertEquals(DayOfWeek.TUESDAY, + Assertions.assertTrue(model.yearlySchedule().retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); + Assertions.assertEquals(DayOfWeek.SUNDAY, model.yearlySchedule().retentionScheduleWeekly().daysOfTheWeek().get(0)); - Assertions.assertEquals(WeekOfMonth.FOURTH, + Assertions.assertEquals(WeekOfMonth.FIRST, model.yearlySchedule().retentionScheduleWeekly().weeksOfTheMonth().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-22T15:55:19Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-04-11T05:09:16Z"), model.yearlySchedule().retentionTimes().get(0)); - Assertions.assertEquals(314959325, model.yearlySchedule().retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.INVALID, - model.yearlySchedule().retentionDuration().durationType()); + Assertions.assertEquals(958421959, model.yearlySchedule().retentionDuration().count()); + Assertions.assertEquals(RetentionDurationType.YEARS, model.yearlySchedule().retentionDuration().durationType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { LongTermRetentionPolicy model = new LongTermRetentionPolicy() .withDailySchedule(new DailyRetentionSchedule() - .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-10-21T20:36:02Z"), - OffsetDateTime.parse("2021-04-29T21:17:46Z"), OffsetDateTime.parse("2021-03-11T03:18:05Z"))) + .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-05-03T03:00:46Z"), + OffsetDateTime.parse("2021-09-10T23:02:27Z"), OffsetDateTime.parse("2021-11-14T08:40:48Z"))) .withRetentionDuration( - new RetentionDuration().withCount(1282256848).withDurationType(RetentionDurationType.WEEKS))) - .withWeeklySchedule(new WeeklyRetentionSchedule().withDaysOfTheWeek(Arrays.asList(DayOfWeek.SUNDAY)) - .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-10-25T04:16:39Z"), - OffsetDateTime.parse("2021-08-08T18:00:09Z"))) + new RetentionDuration().withCount(240582317).withDurationType(RetentionDurationType.MONTHS))) + .withWeeklySchedule(new WeeklyRetentionSchedule() + .withDaysOfTheWeek( + Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.WEDNESDAY, DayOfWeek.MONDAY, DayOfWeek.SATURDAY)) + .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-10-11T18:38:45Z"), + OffsetDateTime.parse("2021-01-20T19:50:29Z"), OffsetDateTime.parse("2021-08-16T03:47:52Z"))) .withRetentionDuration( - new RetentionDuration().withCount(772955822).withDurationType(RetentionDurationType.INVALID))) - .withMonthlySchedule(new MonthlyRetentionSchedule() + new RetentionDuration().withCount(367170768).withDurationType(RetentionDurationType.DAYS))) + .withMonthlySchedule( + new MonthlyRetentionSchedule().withRetentionScheduleFormatType(RetentionScheduleFormat.WEEKLY) + .withRetentionScheduleDaily(new DailyRetentionFormat() + .withDaysOfTheMonth(Arrays.asList(new Day().withDate(370827804).withIsLast(false)))) + .withRetentionScheduleWeekly(new WeeklyRetentionFormat() + .withDaysOfTheWeek( + Arrays.asList(DayOfWeek.SATURDAY, DayOfWeek.FRIDAY, DayOfWeek.FRIDAY, DayOfWeek.SUNDAY)) + .withWeeksOfTheMonth( + Arrays.asList(WeekOfMonth.FIRST, WeekOfMonth.THIRD, WeekOfMonth.THIRD, WeekOfMonth.LAST))) + .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-04-27T14:33:17Z"), + OffsetDateTime.parse("2021-07-31T13:07:21Z"))) + .withRetentionDuration( + new RetentionDuration().withCount(642883737).withDurationType(RetentionDurationType.MONTHS))) + .withYearlySchedule(new YearlyRetentionSchedule() .withRetentionScheduleFormatType(RetentionScheduleFormat.WEEKLY) + .withMonthsOfYear(Arrays.asList(MonthOfYear.DECEMBER)) .withRetentionScheduleDaily(new DailyRetentionFormat().withDaysOfTheMonth(Arrays.asList( - new Day().withDate(661810692).withIsLast(false), new Day().withDate(923324597).withIsLast(true), - new Day().withDate(2020150927).withIsLast(true), new Day().withDate(439727663).withIsLast(false)))) + new Day().withDate(436205084).withIsLast(true), new Day().withDate(1412186545).withIsLast(false), + new Day().withDate(2085491837).withIsLast(true), new Day().withDate(361835019).withIsLast(false)))) .withRetentionScheduleWeekly( - new WeeklyRetentionFormat().withDaysOfTheWeek(Arrays.asList(DayOfWeek.THURSDAY)) - .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.FIRST, WeekOfMonth.SECOND, WeekOfMonth.FOURTH))) - .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-03-28T11:35:07Z"), - OffsetDateTime.parse("2021-11-15T04:13:11Z"))) + new WeeklyRetentionFormat().withDaysOfTheWeek(Arrays.asList(DayOfWeek.SUNDAY)) + .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.FIRST, WeekOfMonth.FIRST, WeekOfMonth.INVALID, + WeekOfMonth.THIRD))) + .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-04-11T05:09:16Z"))) .withRetentionDuration( - new RetentionDuration().withCount(220520024).withDurationType(RetentionDurationType.DAYS))) - .withYearlySchedule( - new YearlyRetentionSchedule().withRetentionScheduleFormatType(RetentionScheduleFormat.WEEKLY) - .withMonthsOfYear(Arrays.asList(MonthOfYear.JANUARY, MonthOfYear.APRIL)) - .withRetentionScheduleDaily(new DailyRetentionFormat() - .withDaysOfTheMonth(Arrays.asList(new Day().withDate(1093469503).withIsLast(false), - new Day().withDate(2063038318).withIsLast(false)))) - .withRetentionScheduleWeekly(new WeeklyRetentionFormat() - .withDaysOfTheWeek(Arrays.asList(DayOfWeek.TUESDAY, DayOfWeek.SATURDAY, DayOfWeek.WEDNESDAY)) - .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.FOURTH, WeekOfMonth.FOURTH, WeekOfMonth.SECOND, - WeekOfMonth.INVALID))) - .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-10-22T15:55:19Z"), - OffsetDateTime.parse("2021-03-05T13:08Z"), OffsetDateTime.parse("2021-04-01T12:27:49Z"))) - .withRetentionDuration( - new RetentionDuration().withCount(314959325).withDurationType(RetentionDurationType.INVALID))); + new RetentionDuration().withCount(958421959).withDurationType(RetentionDurationType.YEARS))); model = BinaryData.fromObject(model).toObject(LongTermRetentionPolicy.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-21T20:36:02Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-05-03T03:00:46Z"), model.dailySchedule().retentionTimes().get(0)); - Assertions.assertEquals(1282256848, model.dailySchedule().retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.WEEKS, model.dailySchedule().retentionDuration().durationType()); - Assertions.assertEquals(DayOfWeek.SUNDAY, model.weeklySchedule().daysOfTheWeek().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-25T04:16:39Z"), + Assertions.assertEquals(240582317, model.dailySchedule().retentionDuration().count()); + Assertions.assertEquals(RetentionDurationType.MONTHS, model.dailySchedule().retentionDuration().durationType()); + Assertions.assertEquals(DayOfWeek.MONDAY, model.weeklySchedule().daysOfTheWeek().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-11T18:38:45Z"), model.weeklySchedule().retentionTimes().get(0)); - Assertions.assertEquals(772955822, model.weeklySchedule().retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.INVALID, - model.weeklySchedule().retentionDuration().durationType()); + Assertions.assertEquals(367170768, model.weeklySchedule().retentionDuration().count()); + Assertions.assertEquals(RetentionDurationType.DAYS, model.weeklySchedule().retentionDuration().durationType()); Assertions.assertEquals(RetentionScheduleFormat.WEEKLY, model.monthlySchedule().retentionScheduleFormatType()); - Assertions.assertEquals(661810692, + Assertions.assertEquals(370827804, model.monthlySchedule().retentionScheduleDaily().daysOfTheMonth().get(0).date()); - Assertions.assertEquals(false, - model.monthlySchedule().retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); - Assertions.assertEquals(DayOfWeek.THURSDAY, + Assertions.assertFalse(model.monthlySchedule().retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); + Assertions.assertEquals(DayOfWeek.SATURDAY, model.monthlySchedule().retentionScheduleWeekly().daysOfTheWeek().get(0)); Assertions.assertEquals(WeekOfMonth.FIRST, model.monthlySchedule().retentionScheduleWeekly().weeksOfTheMonth().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-28T11:35:07Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T14:33:17Z"), model.monthlySchedule().retentionTimes().get(0)); - Assertions.assertEquals(220520024, model.monthlySchedule().retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.DAYS, model.monthlySchedule().retentionDuration().durationType()); + Assertions.assertEquals(642883737, model.monthlySchedule().retentionDuration().count()); + Assertions.assertEquals(RetentionDurationType.MONTHS, + model.monthlySchedule().retentionDuration().durationType()); Assertions.assertEquals(RetentionScheduleFormat.WEEKLY, model.yearlySchedule().retentionScheduleFormatType()); - Assertions.assertEquals(MonthOfYear.JANUARY, model.yearlySchedule().monthsOfYear().get(0)); - Assertions.assertEquals(1093469503, + Assertions.assertEquals(MonthOfYear.DECEMBER, model.yearlySchedule().monthsOfYear().get(0)); + Assertions.assertEquals(436205084, model.yearlySchedule().retentionScheduleDaily().daysOfTheMonth().get(0).date()); - Assertions.assertEquals(false, - model.yearlySchedule().retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); - Assertions.assertEquals(DayOfWeek.TUESDAY, + Assertions.assertTrue(model.yearlySchedule().retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); + Assertions.assertEquals(DayOfWeek.SUNDAY, model.yearlySchedule().retentionScheduleWeekly().daysOfTheWeek().get(0)); - Assertions.assertEquals(WeekOfMonth.FOURTH, + Assertions.assertEquals(WeekOfMonth.FIRST, model.yearlySchedule().retentionScheduleWeekly().weeksOfTheMonth().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-22T15:55:19Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-04-11T05:09:16Z"), model.yearlySchedule().retentionTimes().get(0)); - Assertions.assertEquals(314959325, model.yearlySchedule().retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.INVALID, - model.yearlySchedule().retentionDuration().durationType()); + Assertions.assertEquals(958421959, model.yearlySchedule().retentionDuration().count()); + Assertions.assertEquals(RetentionDurationType.YEARS, model.yearlySchedule().retentionDuration().durationType()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/LongTermSchedulePolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/LongTermSchedulePolicyTests.java index 0304fc7cefec..8c81f6d2e1ed 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/LongTermSchedulePolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/LongTermSchedulePolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabContainerExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabContainerExtendedInfoTests.java index 38e119784d5a..c889e066f460 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabContainerExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabContainerExtendedInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -15,28 +15,28 @@ public final class MabContainerExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MabContainerExtendedInfo model = BinaryData.fromString( - "{\"lastRefreshedAt\":\"2020-12-20T17:14:40Z\",\"backupItemType\":\"AzureSqlDb\",\"backupItems\":[\"aqkue\",\"tgroesh\"],\"policyName\":\"gzcbyf\",\"lastBackupStatus\":\"kfaoytehq\"}") + "{\"lastRefreshedAt\":\"2021-10-23T11:41:17Z\",\"backupItemType\":\"VM\",\"backupItems\":[\"zhvfcibyfmowuxr\"],\"policyName\":\"pvdwxf\",\"lastBackupStatus\":\"iivwzjbhyzsxjrka\"}") .toObject(MabContainerExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-20T17:14:40Z"), model.lastRefreshedAt()); - Assertions.assertEquals(BackupItemType.AZURE_SQL_DB, model.backupItemType()); - Assertions.assertEquals("aqkue", model.backupItems().get(0)); - Assertions.assertEquals("gzcbyf", model.policyName()); - Assertions.assertEquals("kfaoytehq", model.lastBackupStatus()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-23T11:41:17Z"), model.lastRefreshedAt()); + Assertions.assertEquals(BackupItemType.VM, model.backupItemType()); + Assertions.assertEquals("zhvfcibyfmowuxr", model.backupItems().get(0)); + Assertions.assertEquals("pvdwxf", model.policyName()); + Assertions.assertEquals("iivwzjbhyzsxjrka", model.lastBackupStatus()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MabContainerExtendedInfo model - = new MabContainerExtendedInfo().withLastRefreshedAt(OffsetDateTime.parse("2020-12-20T17:14:40Z")) - .withBackupItemType(BackupItemType.AZURE_SQL_DB) - .withBackupItems(Arrays.asList("aqkue", "tgroesh")) - .withPolicyName("gzcbyf") - .withLastBackupStatus("kfaoytehq"); + = new MabContainerExtendedInfo().withLastRefreshedAt(OffsetDateTime.parse("2021-10-23T11:41:17Z")) + .withBackupItemType(BackupItemType.VM) + .withBackupItems(Arrays.asList("zhvfcibyfmowuxr")) + .withPolicyName("pvdwxf") + .withLastBackupStatus("iivwzjbhyzsxjrka"); model = BinaryData.fromObject(model).toObject(MabContainerExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-20T17:14:40Z"), model.lastRefreshedAt()); - Assertions.assertEquals(BackupItemType.AZURE_SQL_DB, model.backupItemType()); - Assertions.assertEquals("aqkue", model.backupItems().get(0)); - Assertions.assertEquals("gzcbyf", model.policyName()); - Assertions.assertEquals("kfaoytehq", model.lastBackupStatus()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-23T11:41:17Z"), model.lastRefreshedAt()); + Assertions.assertEquals(BackupItemType.VM, model.backupItemType()); + Assertions.assertEquals("zhvfcibyfmowuxr", model.backupItems().get(0)); + Assertions.assertEquals("pvdwxf", model.policyName()); + Assertions.assertEquals("iivwzjbhyzsxjrka", model.lastBackupStatus()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabErrorInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabErrorInfoTests.java index a5852b4a55da..418a2cb3d4cf 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabErrorInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabErrorInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -10,14 +10,8 @@ public final class MabErrorInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MabErrorInfo model - = BinaryData.fromString("{\"errorString\":\"nbdxxewun\",\"recommendations\":[\"udbchaqdtv\"]}") - .toObject(MabErrorInfo.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MabErrorInfo model = new MabErrorInfo(); - model = BinaryData.fromObject(model).toObject(MabErrorInfo.class); + MabErrorInfo model = BinaryData + .fromString("{\"errorString\":\"mkoisqcssf\",\"recommendations\":[\"ifmcsypobkdqzr\",\"zsylollgt\"]}") + .toObject(MabErrorInfo.class); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabFileFolderProtectedItemExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabFileFolderProtectedItemExtendedInfoTests.java index 3b05afcca00a..80f7e95af306 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabFileFolderProtectedItemExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabFileFolderProtectedItemExtendedInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,22 +13,22 @@ public final class MabFileFolderProtectedItemExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MabFileFolderProtectedItemExtendedInfo model = BinaryData.fromString( - "{\"lastRefreshedAt\":\"2021-05-24T15:53:38Z\",\"oldestRecoveryPoint\":\"2021-12-05T13:20:13Z\",\"recoveryPointCount\":1601507048}") + "{\"lastRefreshedAt\":\"2021-10-11T12:20:20Z\",\"oldestRecoveryPoint\":\"2021-08-01T15:40:57Z\",\"recoveryPointCount\":1456485650}") .toObject(MabFileFolderProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T15:53:38Z"), model.lastRefreshedAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-05T13:20:13Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(1601507048, model.recoveryPointCount()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-11T12:20:20Z"), model.lastRefreshedAt()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-01T15:40:57Z"), model.oldestRecoveryPoint()); + Assertions.assertEquals(1456485650, model.recoveryPointCount()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MabFileFolderProtectedItemExtendedInfo model = new MabFileFolderProtectedItemExtendedInfo() - .withLastRefreshedAt(OffsetDateTime.parse("2021-05-24T15:53:38Z")) - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-12-05T13:20:13Z")) - .withRecoveryPointCount(1601507048); + .withLastRefreshedAt(OffsetDateTime.parse("2021-10-11T12:20:20Z")) + .withOldestRecoveryPoint(OffsetDateTime.parse("2021-08-01T15:40:57Z")) + .withRecoveryPointCount(1456485650); model = BinaryData.fromObject(model).toObject(MabFileFolderProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T15:53:38Z"), model.lastRefreshedAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-05T13:20:13Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(1601507048, model.recoveryPointCount()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-11T12:20:20Z"), model.lastRefreshedAt()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-01T15:40:57Z"), model.oldestRecoveryPoint()); + Assertions.assertEquals(1456485650, model.recoveryPointCount()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabFileFolderProtectedItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabFileFolderProtectedItemTests.java index 654dc33c08a0..39b8bc5030b2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabFileFolderProtectedItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabFileFolderProtectedItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -8,6 +8,9 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode; import com.azure.resourcemanager.recoveryservicesbackup.models.MabFileFolderProtectedItem; import com.azure.resourcemanager.recoveryservicesbackup.models.MabFileFolderProtectedItemExtendedInfo; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanInfo; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanStatus; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanSummary; import java.time.OffsetDateTime; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -16,87 +19,94 @@ public final class MabFileFolderProtectedItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MabFileFolderProtectedItem model = BinaryData.fromString( - "{\"protectedItemType\":\"MabFileFolderProtectedItem\",\"friendlyName\":\"crqctmxxdtddmflh\",\"computerName\":\"tx\",\"lastBackupStatus\":\"tznapxbannovv\",\"lastBackupTime\":\"2021-08-07T02:06:49Z\",\"protectionState\":\"ytprwnwvroev\",\"deferredDeleteSyncTimeInUTC\":714202887842253439,\"extendedInfo\":{\"lastRefreshedAt\":\"2021-06-10T18:55:52Z\",\"oldestRecoveryPoint\":\"2021-05-28T01:47:37Z\",\"recoveryPointCount\":1027800493},\"backupManagementType\":\"AzureBackupServer\",\"workloadType\":\"FileFolder\",\"containerName\":\"asbcrymodizrx\",\"sourceResourceId\":\"obdxnazpmkmlm\",\"policyId\":\"vfxzopjh\",\"lastRecoveryPoint\":\"2021-01-01T07:16:13Z\",\"backupSetName\":\"iohrdddtf\",\"createMode\":\"Recover\",\"deferredDeleteTimeInUTC\":\"2021-02-17T22:58:35Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"bbnz\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"qofyuicdhzbdy\"],\"isArchiveEnabled\":true,\"policyName\":\"bdvibidmhmwffpl\",\"softDeleteRetentionPeriodInDays\":150860449,\"vaultId\":\"apckccrrvw\"}") + "{\"protectedItemType\":\"MabFileFolderProtectedItem\",\"friendlyName\":\"baiuebbaumny\",\"computerName\":\"ped\",\"lastBackupStatus\":\"jn\",\"lastBackupTime\":\"2021-04-22T17:58:43Z\",\"protectionState\":\"hsmtxpsiebtfhvp\",\"deferredDeleteSyncTimeInUTC\":8197357733931810453,\"extendedInfo\":{\"lastRefreshedAt\":\"2021-05-25T03:50:38Z\",\"oldestRecoveryPoint\":\"2021-03-26T13:00:09Z\",\"recoveryPointCount\":1997614477},\"backupManagementType\":\"AzureSql\",\"workloadType\":\"Exchange\",\"containerName\":\"ldwkyzxuutkn\",\"sourceResourceId\":\"scwsv\",\"policyId\":\"otogtwrupqs\",\"lastRecoveryPoint\":\"2021-05-04T00:58:15Z\",\"backupSetName\":\"i\",\"createMode\":\"Default\",\"deferredDeleteTimeInUTC\":\"2021-04-03T22:13:45Z\",\"isScheduledForDeferredDelete\":false,\"deferredDeleteTimeRemaining\":\"eil\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":true,\"resourceGuardOperationRequests\":[\"jfcn\"],\"isArchiveEnabled\":false,\"policyName\":\"nxdhbt\",\"softDeleteRetentionPeriodInDays\":1907592616,\"vaultId\":\"ywpnvjt\",\"sourceSideScanInfo\":{\"sourceSideScanStatus\":\"NotConfigured\",\"sourceSideScanSummary\":\"Healthy\"}}") .toObject(MabFileFolderProtectedItem.class); - Assertions.assertEquals("asbcrymodizrx", model.containerName()); - Assertions.assertEquals("obdxnazpmkmlm", model.sourceResourceId()); - Assertions.assertEquals("vfxzopjh", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T07:16:13Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("iohrdddtf", model.backupSetName()); - Assertions.assertEquals(CreateMode.RECOVER, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-17T22:58:35Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(true, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("bbnz", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, model.isRehydrate()); - Assertions.assertEquals("qofyuicdhzbdy", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.isArchiveEnabled()); - Assertions.assertEquals("bdvibidmhmwffpl", model.policyName()); - Assertions.assertEquals(150860449, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("crqctmxxdtddmflh", model.friendlyName()); - Assertions.assertEquals("tx", model.computerName()); - Assertions.assertEquals("tznapxbannovv", model.lastBackupStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-07T02:06:49Z"), model.lastBackupTime()); - Assertions.assertEquals("ytprwnwvroev", model.protectionState()); - Assertions.assertEquals(714202887842253439L, model.deferredDeleteSyncTimeInUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-10T18:55:52Z"), model.extendedInfo().lastRefreshedAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-28T01:47:37Z"), + Assertions.assertEquals("ldwkyzxuutkn", model.containerName()); + Assertions.assertEquals("scwsv", model.sourceResourceId()); + Assertions.assertEquals("otogtwrupqs", model.policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-04T00:58:15Z"), model.lastRecoveryPoint()); + Assertions.assertEquals("i", model.backupSetName()); + Assertions.assertEquals(CreateMode.DEFAULT, model.createMode()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-03T22:13:45Z"), model.deferredDeleteTimeInUtc()); + Assertions.assertFalse(model.isScheduledForDeferredDelete()); + Assertions.assertEquals("eil", model.deferredDeleteTimeRemaining()); + Assertions.assertTrue(model.isDeferredDeleteScheduleUpcoming()); + Assertions.assertTrue(model.isRehydrate()); + Assertions.assertEquals("jfcn", model.resourceGuardOperationRequests().get(0)); + Assertions.assertFalse(model.isArchiveEnabled()); + Assertions.assertEquals("nxdhbt", model.policyName()); + Assertions.assertEquals(1907592616, model.softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.NOT_CONFIGURED, model.sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.HEALTHY, model.sourceSideScanInfo().sourceSideScanSummary()); + Assertions.assertEquals("baiuebbaumny", model.friendlyName()); + Assertions.assertEquals("ped", model.computerName()); + Assertions.assertEquals("jn", model.lastBackupStatus()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-22T17:58:43Z"), model.lastBackupTime()); + Assertions.assertEquals("hsmtxpsiebtfhvp", model.protectionState()); + Assertions.assertEquals(8197357733931810453L, model.deferredDeleteSyncTimeInUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-25T03:50:38Z"), model.extendedInfo().lastRefreshedAt()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-26T13:00:09Z"), model.extendedInfo().oldestRecoveryPoint()); - Assertions.assertEquals(1027800493, model.extendedInfo().recoveryPointCount()); + Assertions.assertEquals(1997614477, model.extendedInfo().recoveryPointCount()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MabFileFolderProtectedItem model = new MabFileFolderProtectedItem().withContainerName("asbcrymodizrx") - .withSourceResourceId("obdxnazpmkmlm") - .withPolicyId("vfxzopjh") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-01-01T07:16:13Z")) - .withBackupSetName("iohrdddtf") - .withCreateMode(CreateMode.RECOVER) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-02-17T22:58:35Z")) - .withIsScheduledForDeferredDelete(true) - .withDeferredDeleteTimeRemaining("bbnz") + MabFileFolderProtectedItem model = new MabFileFolderProtectedItem().withContainerName("ldwkyzxuutkn") + .withSourceResourceId("scwsv") + .withPolicyId("otogtwrupqs") + .withLastRecoveryPoint(OffsetDateTime.parse("2021-05-04T00:58:15Z")) + .withBackupSetName("i") + .withCreateMode(CreateMode.DEFAULT) + .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-04-03T22:13:45Z")) + .withIsScheduledForDeferredDelete(false) + .withDeferredDeleteTimeRemaining("eil") .withIsDeferredDeleteScheduleUpcoming(true) - .withIsRehydrate(false) - .withResourceGuardOperationRequests(Arrays.asList("qofyuicdhzbdy")) - .withIsArchiveEnabled(true) - .withPolicyName("bdvibidmhmwffpl") - .withSoftDeleteRetentionPeriod(150860449) - .withFriendlyName("crqctmxxdtddmflh") - .withComputerName("tx") - .withLastBackupStatus("tznapxbannovv") - .withLastBackupTime(OffsetDateTime.parse("2021-08-07T02:06:49Z")) - .withProtectionState("ytprwnwvroev") - .withDeferredDeleteSyncTimeInUtc(714202887842253439L) + .withIsRehydrate(true) + .withResourceGuardOperationRequests(Arrays.asList("jfcn")) + .withIsArchiveEnabled(false) + .withPolicyName("nxdhbt") + .withSoftDeleteRetentionPeriodInDays(1907592616) + .withSourceSideScanInfo( + new SourceSideScanInfo().withSourceSideScanStatus(SourceSideScanStatus.NOT_CONFIGURED) + .withSourceSideScanSummary(SourceSideScanSummary.HEALTHY)) + .withFriendlyName("baiuebbaumny") + .withComputerName("ped") + .withLastBackupStatus("jn") + .withLastBackupTime(OffsetDateTime.parse("2021-04-22T17:58:43Z")) + .withProtectionState("hsmtxpsiebtfhvp") + .withDeferredDeleteSyncTimeInUtc(8197357733931810453L) .withExtendedInfo(new MabFileFolderProtectedItemExtendedInfo() - .withLastRefreshedAt(OffsetDateTime.parse("2021-06-10T18:55:52Z")) - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-05-28T01:47:37Z")) - .withRecoveryPointCount(1027800493)); + .withLastRefreshedAt(OffsetDateTime.parse("2021-05-25T03:50:38Z")) + .withOldestRecoveryPoint(OffsetDateTime.parse("2021-03-26T13:00:09Z")) + .withRecoveryPointCount(1997614477)); model = BinaryData.fromObject(model).toObject(MabFileFolderProtectedItem.class); - Assertions.assertEquals("asbcrymodizrx", model.containerName()); - Assertions.assertEquals("obdxnazpmkmlm", model.sourceResourceId()); - Assertions.assertEquals("vfxzopjh", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T07:16:13Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("iohrdddtf", model.backupSetName()); - Assertions.assertEquals(CreateMode.RECOVER, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-17T22:58:35Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(true, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("bbnz", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, model.isRehydrate()); - Assertions.assertEquals("qofyuicdhzbdy", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.isArchiveEnabled()); - Assertions.assertEquals("bdvibidmhmwffpl", model.policyName()); - Assertions.assertEquals(150860449, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("crqctmxxdtddmflh", model.friendlyName()); - Assertions.assertEquals("tx", model.computerName()); - Assertions.assertEquals("tznapxbannovv", model.lastBackupStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-07T02:06:49Z"), model.lastBackupTime()); - Assertions.assertEquals("ytprwnwvroev", model.protectionState()); - Assertions.assertEquals(714202887842253439L, model.deferredDeleteSyncTimeInUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-10T18:55:52Z"), model.extendedInfo().lastRefreshedAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-28T01:47:37Z"), + Assertions.assertEquals("ldwkyzxuutkn", model.containerName()); + Assertions.assertEquals("scwsv", model.sourceResourceId()); + Assertions.assertEquals("otogtwrupqs", model.policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-04T00:58:15Z"), model.lastRecoveryPoint()); + Assertions.assertEquals("i", model.backupSetName()); + Assertions.assertEquals(CreateMode.DEFAULT, model.createMode()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-03T22:13:45Z"), model.deferredDeleteTimeInUtc()); + Assertions.assertFalse(model.isScheduledForDeferredDelete()); + Assertions.assertEquals("eil", model.deferredDeleteTimeRemaining()); + Assertions.assertTrue(model.isDeferredDeleteScheduleUpcoming()); + Assertions.assertTrue(model.isRehydrate()); + Assertions.assertEquals("jfcn", model.resourceGuardOperationRequests().get(0)); + Assertions.assertFalse(model.isArchiveEnabled()); + Assertions.assertEquals("nxdhbt", model.policyName()); + Assertions.assertEquals(1907592616, model.softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.NOT_CONFIGURED, model.sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.HEALTHY, model.sourceSideScanInfo().sourceSideScanSummary()); + Assertions.assertEquals("baiuebbaumny", model.friendlyName()); + Assertions.assertEquals("ped", model.computerName()); + Assertions.assertEquals("jn", model.lastBackupStatus()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-22T17:58:43Z"), model.lastBackupTime()); + Assertions.assertEquals("hsmtxpsiebtfhvp", model.protectionState()); + Assertions.assertEquals(8197357733931810453L, model.deferredDeleteSyncTimeInUtc()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-25T03:50:38Z"), model.extendedInfo().lastRefreshedAt()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-26T13:00:09Z"), model.extendedInfo().oldestRecoveryPoint()); - Assertions.assertEquals(1027800493, model.extendedInfo().recoveryPointCount()); + Assertions.assertEquals(1997614477, model.extendedInfo().recoveryPointCount()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabJobExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabJobExtendedInfoTests.java index 25cb3d0152cc..34bd5b94d4ef 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabJobExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabJobExtendedInfoTests.java @@ -1,80 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.MabJobExtendedInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.MabJobTaskDetails; import java.time.Duration; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class MabJobExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MabJobExtendedInfo model = BinaryData.fromString( - "{\"tasksList\":[{\"taskId\":\"rr\",\"startTime\":\"2021-09-26T10:44:20Z\",\"endTime\":\"2021-04-08T08:51:31Z\",\"duration\":\"PT56H52M7S\",\"status\":\"kzudn\"},{\"taskId\":\"rfih\",\"startTime\":\"2021-08-14T07:35:37Z\",\"endTime\":\"2021-11-27T01:46:36Z\",\"duration\":\"PT80H59M41S\",\"status\":\"uzzjgnrefq\"},{\"taskId\":\"qotoihiqakydiwfb\",\"startTime\":\"2021-01-24T08:46:06Z\",\"endTime\":\"2021-07-02T17:59:05Z\",\"duration\":\"PT191H55M41S\",\"status\":\"vhcspodaqaxsip\"},{\"taskId\":\"tgbebj\",\"startTime\":\"2021-04-15T14:48:50Z\",\"endTime\":\"2021-09-18T23:08:53Z\",\"duration\":\"PT192H52M50S\",\"status\":\"h\"}],\"propertyBag\":{\"iqsowsaaelc\":\"nfpubntnbatz\",\"mjvlgfgg\":\"ttcjuhplrvkmjc\",\"sfuztlvtmv\":\"vkyylizrzbjpsf\"},\"dynamicErrorMessage\":\"bwidql\"}") + "{\"tasksList\":[{\"taskId\":\"ydmxzj\",\"startTime\":\"2021-11-13T18:52:53Z\",\"endTime\":\"2021-08-22T23:00:09Z\",\"duration\":\"PT229H38M42S\",\"status\":\"kihcirlde\"},{\"taskId\":\"rdcoxnbkkj\",\"startTime\":\"2021-04-25T04:45:39Z\",\"endTime\":\"2021-08-18T22:42:25Z\",\"duration\":\"PT158H45M21S\",\"status\":\"nqbpi\"},{\"taskId\":\"qltgrd\",\"startTime\":\"2021-08-08T02:29:28Z\",\"endTime\":\"2021-03-28T12:05:51Z\",\"duration\":\"PT147H26M55S\",\"status\":\"bfihw\"},{\"taskId\":\"vctafsrb\",\"startTime\":\"2021-08-17T18:59:51Z\",\"endTime\":\"2021-06-04T08:10:19Z\",\"duration\":\"PT191H36M25S\",\"status\":\"wxihs\"}],\"propertyBag\":{\"lsbs\":\"wqagnepzwa\",\"glrrczez\":\"qqqagwwrxaomzi\",\"wjqo\":\"hhltnjadhqo\"},\"dynamicErrorMessage\":\"eayfbpcmspl\"}") .toObject(MabJobExtendedInfo.class); - Assertions.assertEquals("rr", model.tasksList().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-26T10:44:20Z"), model.tasksList().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-08T08:51:31Z"), model.tasksList().get(0).endTime()); - Assertions.assertEquals(Duration.parse("PT56H52M7S"), model.tasksList().get(0).duration()); - Assertions.assertEquals("kzudn", model.tasksList().get(0).status()); - Assertions.assertEquals("nfpubntnbatz", model.propertyBag().get("iqsowsaaelc")); - Assertions.assertEquals("bwidql", model.dynamicErrorMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MabJobExtendedInfo model = new MabJobExtendedInfo() - .withTasksList(Arrays.asList( - new MabJobTaskDetails().withTaskId("rr") - .withStartTime(OffsetDateTime.parse("2021-09-26T10:44:20Z")) - .withEndTime(OffsetDateTime.parse("2021-04-08T08:51:31Z")) - .withDuration(Duration.parse("PT56H52M7S")) - .withStatus("kzudn"), - new MabJobTaskDetails().withTaskId("rfih") - .withStartTime(OffsetDateTime.parse("2021-08-14T07:35:37Z")) - .withEndTime(OffsetDateTime.parse("2021-11-27T01:46:36Z")) - .withDuration(Duration.parse("PT80H59M41S")) - .withStatus("uzzjgnrefq"), - new MabJobTaskDetails().withTaskId("qotoihiqakydiwfb") - .withStartTime(OffsetDateTime.parse("2021-01-24T08:46:06Z")) - .withEndTime(OffsetDateTime.parse("2021-07-02T17:59:05Z")) - .withDuration(Duration.parse("PT191H55M41S")) - .withStatus("vhcspodaqaxsip"), - new MabJobTaskDetails().withTaskId("tgbebj") - .withStartTime(OffsetDateTime.parse("2021-04-15T14:48:50Z")) - .withEndTime(OffsetDateTime.parse("2021-09-18T23:08:53Z")) - .withDuration(Duration.parse("PT192H52M50S")) - .withStatus("h"))) - .withPropertyBag( - mapOf("iqsowsaaelc", "nfpubntnbatz", "mjvlgfgg", "ttcjuhplrvkmjc", "sfuztlvtmv", "vkyylizrzbjpsf")) - .withDynamicErrorMessage("bwidql"); - model = BinaryData.fromObject(model).toObject(MabJobExtendedInfo.class); - Assertions.assertEquals("rr", model.tasksList().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-26T10:44:20Z"), model.tasksList().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-08T08:51:31Z"), model.tasksList().get(0).endTime()); - Assertions.assertEquals(Duration.parse("PT56H52M7S"), model.tasksList().get(0).duration()); - Assertions.assertEquals("kzudn", model.tasksList().get(0).status()); - Assertions.assertEquals("nfpubntnbatz", model.propertyBag().get("iqsowsaaelc")); - Assertions.assertEquals("bwidql", model.dynamicErrorMessage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("ydmxzj", model.tasksList().get(0).taskId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-13T18:52:53Z"), model.tasksList().get(0).startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-22T23:00:09Z"), model.tasksList().get(0).endTime()); + Assertions.assertEquals(Duration.parse("PT229H38M42S"), model.tasksList().get(0).duration()); + Assertions.assertEquals("kihcirlde", model.tasksList().get(0).status()); + Assertions.assertEquals("wqagnepzwa", model.propertyBag().get("lsbs")); + Assertions.assertEquals("eayfbpcmspl", model.dynamicErrorMessage()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabJobTaskDetailsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabJobTaskDetailsTests.java index df2aba3ddad3..4505c0bc98fc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabJobTaskDetailsTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabJobTaskDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,27 +14,12 @@ public final class MabJobTaskDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MabJobTaskDetails model = BinaryData.fromString( - "{\"taskId\":\"ukoveofi\",\"startTime\":\"2021-09-21T12:24:31Z\",\"endTime\":\"2021-05-29T17:41:41Z\",\"duration\":\"PT110H2M21S\",\"status\":\"mvl\"}") + "{\"taskId\":\"rrueqthwmg\",\"startTime\":\"2021-01-09T20:20:26Z\",\"endTime\":\"2021-07-17T15:53:32Z\",\"duration\":\"PT184H20M35S\",\"status\":\"igdhxiidlo\"}") .toObject(MabJobTaskDetails.class); - Assertions.assertEquals("ukoveofi", model.taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-21T12:24:31Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-29T17:41:41Z"), model.endTime()); - Assertions.assertEquals(Duration.parse("PT110H2M21S"), model.duration()); - Assertions.assertEquals("mvl", model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MabJobTaskDetails model = new MabJobTaskDetails().withTaskId("ukoveofi") - .withStartTime(OffsetDateTime.parse("2021-09-21T12:24:31Z")) - .withEndTime(OffsetDateTime.parse("2021-05-29T17:41:41Z")) - .withDuration(Duration.parse("PT110H2M21S")) - .withStatus("mvl"); - model = BinaryData.fromObject(model).toObject(MabJobTaskDetails.class); - Assertions.assertEquals("ukoveofi", model.taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-21T12:24:31Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-29T17:41:41Z"), model.endTime()); - Assertions.assertEquals(Duration.parse("PT110H2M21S"), model.duration()); - Assertions.assertEquals("mvl", model.status()); + Assertions.assertEquals("rrueqthwmg", model.taskId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-09T20:20:26Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-17T15:53:32Z"), model.endTime()); + Assertions.assertEquals(Duration.parse("PT184H20M35S"), model.duration()); + Assertions.assertEquals("igdhxiidlo", model.status()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabJobTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabJobTests.java index 503277b6f5ec..a114c741efd1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabJobTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabJobTests.java @@ -1,127 +1,45 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; import com.azure.resourcemanager.recoveryservicesbackup.models.JobSupportedAction; -import com.azure.resourcemanager.recoveryservicesbackup.models.MabErrorInfo; import com.azure.resourcemanager.recoveryservicesbackup.models.MabJob; -import com.azure.resourcemanager.recoveryservicesbackup.models.MabJobExtendedInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.MabJobTaskDetails; import com.azure.resourcemanager.recoveryservicesbackup.models.MabServerType; import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadType; import java.time.Duration; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class MabJobTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MabJob model = BinaryData.fromString( - "{\"jobType\":\"MabJob\",\"duration\":\"PT31H21M14S\",\"actionsInfo\":[\"Retriable\"],\"mabServerName\":\"mmoiroqboshbra\",\"mabServerType\":\"SQLAGWorkLoadContainer\",\"workloadType\":\"Client\",\"errorDetails\":[{\"errorString\":\"svbpavbopfppdbwn\",\"recommendations\":[\"ahxku\",\"asjcaacfdmmcpu\",\"mehqepvufh\",\"zeh\"]},{\"errorString\":\"hoqhnl\",\"recommendations\":[\"bldxeaclgscho\",\"imkrsrrmouc\",\"ofldpuviyfcaa\",\"eolhbhlvbmx\"]}],\"extendedInfo\":{\"tasksList\":[{\"taskId\":\"xtkcudfbsfar\",\"startTime\":\"2021-06-06T17:38:54Z\",\"endTime\":\"2021-04-06T00:55:24Z\",\"duration\":\"PT194H13S\",\"status\":\"xnq\"},{\"taskId\":\"wgfstmhqykizm\",\"startTime\":\"2021-02-16T03:38:42Z\",\"endTime\":\"2020-12-22T10:08:06Z\",\"duration\":\"PT113H39M6S\",\"status\":\"luqvoxmycjimryv\"},{\"taskId\":\"cwwp\",\"startTime\":\"2021-10-27T09:31:22Z\",\"endTime\":\"2021-01-20T21:01:08Z\",\"duration\":\"PT70H10S\",\"status\":\"dsxwefoh\"},{\"taskId\":\"bvopwndyqle\",\"startTime\":\"2021-03-08T13:30:31Z\",\"endTime\":\"2021-11-12T21:46:28Z\",\"duration\":\"PT181H48M10S\",\"status\":\"hlowkx\"}],\"propertyBag\":{\"fjmzsyzfho\":\"br\",\"pjrtws\":\"lhikcyychunsj\",\"uic\":\"hv\",\"ubhvj\":\"hvtrrmhwrbfdpyf\"},\"dynamicErrorMessage\":\"r\"},\"entityFriendlyName\":\"uyzlw\",\"backupManagementType\":\"MAB\",\"operation\":\"mhoocl\",\"status\":\"n\",\"startTime\":\"2021-11-26T19:05Z\",\"endTime\":\"2021-08-15T12:03:46Z\",\"activityId\":\"zjkmmykyujxs\"}") + "{\"jobType\":\"MabJob\",\"duration\":\"PT236H35M17S\",\"actionsInfo\":[\"Cancellable\"],\"mabServerName\":\"h\",\"mabServerType\":\"SQLAGWorkLoadContainer\",\"workloadType\":\"SAPHanaDatabase\",\"errorDetails\":[{\"errorString\":\"vpbbt\",\"recommendations\":[\"joknssqyzqedik\",\"frdbiqmrjgeihf\"]},{\"errorString\":\"ggwfiwz\",\"recommendations\":[\"jpbyephmgtv\"]},{\"errorString\":\"vrcmyfqipgxhnpo\",\"recommendations\":[\"wcabvnuileeya\",\"wlpaugmrmfjlrxwt\",\"aukhfkvcisiz\"]}],\"extendedInfo\":{\"tasksList\":[{\"taskId\":\"sx\",\"startTime\":\"2021-10-20T01:41:58Z\",\"endTime\":\"2021-07-20T15:21:27Z\",\"duration\":\"PT196H25M37S\",\"status\":\"gyeewxeiq\"}],\"propertyBag\":{\"amljdlrgmsplzgau\":\"mgomg\",\"ewgnxkympqanxrj\":\"cshhv\",\"bta\":\"ixt\"},\"dynamicErrorMessage\":\"pnyghs\"},\"entityFriendlyName\":\"cyl\",\"backupManagementType\":\"Invalid\",\"operation\":\"nsghp\",\"status\":\"cphdrwjjkhvyo\",\"startTime\":\"2021-02-03T13:59:48Z\",\"endTime\":\"2021-04-06T06:54:17Z\",\"activityId\":\"vxnqmhrpqpd\"}") .toObject(MabJob.class); - Assertions.assertEquals("uyzlw", model.entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); - Assertions.assertEquals("mhoocl", model.operation()); - Assertions.assertEquals("n", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-26T19:05Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-15T12:03:46Z"), model.endTime()); - Assertions.assertEquals("zjkmmykyujxs", model.activityId()); - Assertions.assertEquals(Duration.parse("PT31H21M14S"), model.duration()); - Assertions.assertEquals(JobSupportedAction.RETRIABLE, model.actionsInfo().get(0)); - Assertions.assertEquals("mmoiroqboshbra", model.mabServerName()); + Assertions.assertEquals("cyl", model.entityFriendlyName()); + Assertions.assertEquals(BackupManagementType.INVALID, model.backupManagementType()); + Assertions.assertEquals("nsghp", model.operation()); + Assertions.assertEquals("cphdrwjjkhvyo", model.status()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-03T13:59:48Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T06:54:17Z"), model.endTime()); + Assertions.assertEquals("vxnqmhrpqpd", model.activityId()); + Assertions.assertEquals(Duration.parse("PT236H35M17S"), model.duration()); + Assertions.assertEquals(JobSupportedAction.CANCELLABLE, model.actionsInfo().get(0)); + Assertions.assertEquals("h", model.mabServerName()); Assertions.assertEquals(MabServerType.SQLAGWORK_LOAD_CONTAINER, model.mabServerType()); - Assertions.assertEquals(WorkloadType.CLIENT, model.workloadType()); - Assertions.assertEquals("xtkcudfbsfar", model.extendedInfo().tasksList().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-06T17:38:54Z"), + Assertions.assertEquals(WorkloadType.SAPHANA_DATABASE, model.workloadType()); + Assertions.assertEquals("sx", model.extendedInfo().tasksList().get(0).taskId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-20T01:41:58Z"), model.extendedInfo().tasksList().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T00:55:24Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-07-20T15:21:27Z"), model.extendedInfo().tasksList().get(0).endTime()); - Assertions.assertEquals(Duration.parse("PT194H13S"), model.extendedInfo().tasksList().get(0).duration()); - Assertions.assertEquals("xnq", model.extendedInfo().tasksList().get(0).status()); - Assertions.assertEquals("br", model.extendedInfo().propertyBag().get("fjmzsyzfho")); - Assertions.assertEquals("r", model.extendedInfo().dynamicErrorMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MabJob model = new MabJob().withEntityFriendlyName("uyzlw") - .withBackupManagementType(BackupManagementType.MAB) - .withOperation("mhoocl") - .withStatus("n") - .withStartTime(OffsetDateTime.parse("2021-11-26T19:05Z")) - .withEndTime(OffsetDateTime.parse("2021-08-15T12:03:46Z")) - .withActivityId("zjkmmykyujxs") - .withDuration(Duration.parse("PT31H21M14S")) - .withActionsInfo(Arrays.asList(JobSupportedAction.RETRIABLE)) - .withMabServerName("mmoiroqboshbra") - .withMabServerType(MabServerType.SQLAGWORK_LOAD_CONTAINER) - .withWorkloadType(WorkloadType.CLIENT) - .withErrorDetails(Arrays.asList(new MabErrorInfo(), new MabErrorInfo())) - .withExtendedInfo(new MabJobExtendedInfo() - .withTasksList(Arrays.asList( - new MabJobTaskDetails().withTaskId("xtkcudfbsfar") - .withStartTime(OffsetDateTime.parse("2021-06-06T17:38:54Z")) - .withEndTime(OffsetDateTime.parse("2021-04-06T00:55:24Z")) - .withDuration(Duration.parse("PT194H13S")) - .withStatus("xnq"), - new MabJobTaskDetails().withTaskId("wgfstmhqykizm") - .withStartTime(OffsetDateTime.parse("2021-02-16T03:38:42Z")) - .withEndTime(OffsetDateTime.parse("2020-12-22T10:08:06Z")) - .withDuration(Duration.parse("PT113H39M6S")) - .withStatus("luqvoxmycjimryv"), - new MabJobTaskDetails().withTaskId("cwwp") - .withStartTime(OffsetDateTime.parse("2021-10-27T09:31:22Z")) - .withEndTime(OffsetDateTime.parse("2021-01-20T21:01:08Z")) - .withDuration(Duration.parse("PT70H10S")) - .withStatus("dsxwefoh"), - new MabJobTaskDetails().withTaskId("bvopwndyqle") - .withStartTime(OffsetDateTime.parse("2021-03-08T13:30:31Z")) - .withEndTime(OffsetDateTime.parse("2021-11-12T21:46:28Z")) - .withDuration(Duration.parse("PT181H48M10S")) - .withStatus("hlowkx"))) - .withPropertyBag( - mapOf("fjmzsyzfho", "br", "pjrtws", "lhikcyychunsj", "uic", "hv", "ubhvj", "hvtrrmhwrbfdpyf")) - .withDynamicErrorMessage("r")); - model = BinaryData.fromObject(model).toObject(MabJob.class); - Assertions.assertEquals("uyzlw", model.entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); - Assertions.assertEquals("mhoocl", model.operation()); - Assertions.assertEquals("n", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-26T19:05Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-15T12:03:46Z"), model.endTime()); - Assertions.assertEquals("zjkmmykyujxs", model.activityId()); - Assertions.assertEquals(Duration.parse("PT31H21M14S"), model.duration()); - Assertions.assertEquals(JobSupportedAction.RETRIABLE, model.actionsInfo().get(0)); - Assertions.assertEquals("mmoiroqboshbra", model.mabServerName()); - Assertions.assertEquals(MabServerType.SQLAGWORK_LOAD_CONTAINER, model.mabServerType()); - Assertions.assertEquals(WorkloadType.CLIENT, model.workloadType()); - Assertions.assertEquals("xtkcudfbsfar", model.extendedInfo().tasksList().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-06T17:38:54Z"), - model.extendedInfo().tasksList().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T00:55:24Z"), - model.extendedInfo().tasksList().get(0).endTime()); - Assertions.assertEquals(Duration.parse("PT194H13S"), model.extendedInfo().tasksList().get(0).duration()); - Assertions.assertEquals("xnq", model.extendedInfo().tasksList().get(0).status()); - Assertions.assertEquals("br", model.extendedInfo().propertyBag().get("fjmzsyzfho")); - Assertions.assertEquals("r", model.extendedInfo().dynamicErrorMessage()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(Duration.parse("PT196H25M37S"), model.extendedInfo().tasksList().get(0).duration()); + Assertions.assertEquals("gyeewxeiq", model.extendedInfo().tasksList().get(0).status()); + Assertions.assertEquals("mgomg", model.extendedInfo().propertyBag().get("amljdlrgmsplzgau")); + Assertions.assertEquals("pnyghs", model.extendedInfo().dynamicErrorMessage()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabProtectionPolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabProtectionPolicyTests.java index 9df9ece323e4..bbea78a1a348 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabProtectionPolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabProtectionPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -15,20 +15,20 @@ public final class MabProtectionPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MabProtectionPolicy model = BinaryData.fromString( - "{\"backupManagementType\":\"MAB\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"protectedItemsCount\":1642701073,\"resourceGuardOperationRequests\":[\"kujrllfojui\",\"jpu\",\"yjucejikzoeo\"]}") + "{\"backupManagementType\":\"MAB\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"protectedItemsCount\":67510907,\"resourceGuardOperationRequests\":[\"xv\",\"sasbcrymodizrx\",\"lobdxna\",\"pmkmlmvevfx\"]}") .toObject(MabProtectionPolicy.class); - Assertions.assertEquals(1642701073, model.protectedItemsCount()); - Assertions.assertEquals("kujrllfojui", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(67510907, model.protectedItemsCount()); + Assertions.assertEquals("xv", model.resourceGuardOperationRequests().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MabProtectionPolicy model = new MabProtectionPolicy().withProtectedItemsCount(1642701073) - .withResourceGuardOperationRequests(Arrays.asList("kujrllfojui", "jpu", "yjucejikzoeo")) + MabProtectionPolicy model = new MabProtectionPolicy().withProtectedItemsCount(67510907) + .withResourceGuardOperationRequests(Arrays.asList("xv", "sasbcrymodizrx", "lobdxna", "pmkmlmvevfx")) .withSchedulePolicy(new SchedulePolicy()) .withRetentionPolicy(new RetentionPolicy()); model = BinaryData.fromObject(model).toObject(MabProtectionPolicy.class); - Assertions.assertEquals(1642701073, model.protectedItemsCount()); - Assertions.assertEquals("kujrllfojui", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(67510907, model.protectedItemsCount()); + Assertions.assertEquals("xv", model.resourceGuardOperationRequests().get(0)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MonthlyRetentionScheduleTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MonthlyRetentionScheduleTests.java index 0b87b6f515f5..a2637dd93c6f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MonthlyRetentionScheduleTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MonthlyRetentionScheduleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -22,39 +22,42 @@ public final class MonthlyRetentionScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonthlyRetentionSchedule model = BinaryData.fromString( - "{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":705670671,\"isLast\":true}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Monday\",\"Friday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2021-08-12T00:06:39Z\",\"2021-06-16T20:51:40Z\",\"2021-09-27T14:55:54Z\"],\"retentionDuration\":{\"count\":2092352940,\"durationType\":\"Days\"}}") + "{\"retentionScheduleFormatType\":\"Invalid\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1949452896,\"isLast\":false},{\"date\":1028499619,\"isLast\":true},{\"date\":492324140,\"isLast\":true},{\"date\":1523023612,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Saturday\",\"Friday\",\"Sunday\",\"Thursday\"],\"weeksOfTheMonth\":[\"Fourth\"]},\"retentionTimes\":[\"2021-05-24T07:28:56Z\",\"2021-09-29T07:48:28Z\",\"2021-02-01T12:22:18Z\",\"2021-03-06T14:12:26Z\"],\"retentionDuration\":{\"count\":122155375,\"durationType\":\"Weeks\"}}") .toObject(MonthlyRetentionSchedule.class); - Assertions.assertEquals(RetentionScheduleFormat.WEEKLY, model.retentionScheduleFormatType()); - Assertions.assertEquals(705670671, model.retentionScheduleDaily().daysOfTheMonth().get(0).date()); - Assertions.assertEquals(true, model.retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); - Assertions.assertEquals(DayOfWeek.MONDAY, model.retentionScheduleWeekly().daysOfTheWeek().get(0)); - Assertions.assertEquals(WeekOfMonth.FIRST, model.retentionScheduleWeekly().weeksOfTheMonth().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T00:06:39Z"), model.retentionTimes().get(0)); - Assertions.assertEquals(2092352940, model.retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.DAYS, model.retentionDuration().durationType()); + Assertions.assertEquals(RetentionScheduleFormat.INVALID, model.retentionScheduleFormatType()); + Assertions.assertEquals(1949452896, model.retentionScheduleDaily().daysOfTheMonth().get(0).date()); + Assertions.assertFalse(model.retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); + Assertions.assertEquals(DayOfWeek.SATURDAY, model.retentionScheduleWeekly().daysOfTheWeek().get(0)); + Assertions.assertEquals(WeekOfMonth.FOURTH, model.retentionScheduleWeekly().weeksOfTheMonth().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T07:28:56Z"), model.retentionTimes().get(0)); + Assertions.assertEquals(122155375, model.retentionDuration().count()); + Assertions.assertEquals(RetentionDurationType.WEEKS, model.retentionDuration().durationType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MonthlyRetentionSchedule model - = new MonthlyRetentionSchedule().withRetentionScheduleFormatType(RetentionScheduleFormat.WEEKLY) - .withRetentionScheduleDaily(new DailyRetentionFormat() - .withDaysOfTheMonth(Arrays.asList(new Day().withDate(705670671).withIsLast(true)))) + = new MonthlyRetentionSchedule().withRetentionScheduleFormatType(RetentionScheduleFormat.INVALID) + .withRetentionScheduleDaily(new DailyRetentionFormat().withDaysOfTheMonth(Arrays.asList( + new Day().withDate(1949452896).withIsLast(false), new Day().withDate(1028499619).withIsLast(true), + new Day().withDate(492324140).withIsLast(true), new Day().withDate(1523023612).withIsLast(false)))) .withRetentionScheduleWeekly(new WeeklyRetentionFormat() - .withDaysOfTheWeek(Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.MONDAY, DayOfWeek.FRIDAY)) - .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.FIRST))) - .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-08-12T00:06:39Z"), - OffsetDateTime.parse("2021-06-16T20:51:40Z"), OffsetDateTime.parse("2021-09-27T14:55:54Z"))) + .withDaysOfTheWeek( + Arrays.asList(DayOfWeek.SATURDAY, DayOfWeek.FRIDAY, DayOfWeek.SUNDAY, DayOfWeek.THURSDAY)) + .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.FOURTH))) + .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-05-24T07:28:56Z"), + OffsetDateTime.parse("2021-09-29T07:48:28Z"), OffsetDateTime.parse("2021-02-01T12:22:18Z"), + OffsetDateTime.parse("2021-03-06T14:12:26Z"))) .withRetentionDuration( - new RetentionDuration().withCount(2092352940).withDurationType(RetentionDurationType.DAYS)); + new RetentionDuration().withCount(122155375).withDurationType(RetentionDurationType.WEEKS)); model = BinaryData.fromObject(model).toObject(MonthlyRetentionSchedule.class); - Assertions.assertEquals(RetentionScheduleFormat.WEEKLY, model.retentionScheduleFormatType()); - Assertions.assertEquals(705670671, model.retentionScheduleDaily().daysOfTheMonth().get(0).date()); - Assertions.assertEquals(true, model.retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); - Assertions.assertEquals(DayOfWeek.MONDAY, model.retentionScheduleWeekly().daysOfTheWeek().get(0)); - Assertions.assertEquals(WeekOfMonth.FIRST, model.retentionScheduleWeekly().weeksOfTheMonth().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T00:06:39Z"), model.retentionTimes().get(0)); - Assertions.assertEquals(2092352940, model.retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.DAYS, model.retentionDuration().durationType()); + Assertions.assertEquals(RetentionScheduleFormat.INVALID, model.retentionScheduleFormatType()); + Assertions.assertEquals(1949452896, model.retentionScheduleDaily().daysOfTheMonth().get(0).date()); + Assertions.assertFalse(model.retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); + Assertions.assertEquals(DayOfWeek.SATURDAY, model.retentionScheduleWeekly().daysOfTheWeek().get(0)); + Assertions.assertEquals(WeekOfMonth.FOURTH, model.retentionScheduleWeekly().weeksOfTheMonth().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T07:28:56Z"), model.retentionTimes().get(0)); + Assertions.assertEquals(122155375, model.retentionDuration().count()); + Assertions.assertEquals(RetentionDurationType.WEEKS, model.retentionDuration().durationType()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MoveRPAcrossTiersRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MoveRPAcrossTiersRequestTests.java index 8fe96a51659a..fc1143377b95 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MoveRPAcrossTiersRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MoveRPAcrossTiersRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,22 +12,21 @@ public final class MoveRPAcrossTiersRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MoveRPAcrossTiersRequest model = BinaryData - .fromString( - "{\"objectType\":\"qdpsqxqvpsvu\",\"sourceTierType\":\"ArchivedRP\",\"targetTierType\":\"InstantRP\"}") + MoveRPAcrossTiersRequest model = BinaryData.fromString( + "{\"objectType\":\"ixjsprozvcputeg\",\"sourceTierType\":\"ArchivedRP\",\"targetTierType\":\"InstantRP\"}") .toObject(MoveRPAcrossTiersRequest.class); - Assertions.assertEquals("qdpsqxqvpsvu", model.objectType()); + Assertions.assertEquals("ixjsprozvcputeg", model.objectType()); Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.sourceTierType()); Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.targetTierType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MoveRPAcrossTiersRequest model = new MoveRPAcrossTiersRequest().withObjectType("qdpsqxqvpsvu") + MoveRPAcrossTiersRequest model = new MoveRPAcrossTiersRequest().withObjectType("ixjsprozvcputeg") .withSourceTierType(RecoveryPointTierType.ARCHIVED_RP) .withTargetTierType(RecoveryPointTierType.INSTANT_RP); model = BinaryData.fromObject(model).toObject(MoveRPAcrossTiersRequest.class); - Assertions.assertEquals("qdpsqxqvpsvu", model.objectType()); + Assertions.assertEquals("ixjsprozvcputeg", model.objectType()); Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.sourceTierType()); Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.targetTierType()); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/NameInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/NameInfoTests.java index 0e5337353148..d94c51f5e0db 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/NameInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/NameInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,17 +11,9 @@ public final class NameInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NameInfo model = BinaryData.fromString("{\"value\":\"ukjfkgiawxklr\",\"localizedValue\":\"lwckbasyypnddhs\"}") - .toObject(NameInfo.class); - Assertions.assertEquals("ukjfkgiawxklr", model.value()); - Assertions.assertEquals("lwckbasyypnddhs", model.localizedValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameInfo model = new NameInfo().withValue("ukjfkgiawxklr").withLocalizedValue("lwckbasyypnddhs"); - model = BinaryData.fromObject(model).toObject(NameInfo.class); - Assertions.assertEquals("ukjfkgiawxklr", model.value()); - Assertions.assertEquals("lwckbasyypnddhs", model.localizedValue()); + NameInfo model + = BinaryData.fromString("{\"value\":\"w\",\"localizedValue\":\"yoyp\"}").toObject(NameInfo.class); + Assertions.assertEquals("w", model.value()); + Assertions.assertEquals("yoyp", model.localizedValue()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OkResponseTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OkResponseTests.java new file mode 100644 index 000000000000..6493b00f66f1 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OkResponseTests.java @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.recoveryservicesbackup.models.OkResponse; + +public final class OkResponseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OkResponse model = BinaryData.fromString("{}").toObject(OkResponse.class); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationResultInfoBaseTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationResultInfoBaseTests.java index 8c48463ff85a..220e5b653e26 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationResultInfoBaseTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationResultInfoBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,10 +13,4 @@ public void testDeserialize() throws Exception { OperationResultInfoBase model = BinaryData.fromString("{\"objectType\":\"OperationResultInfoBase\"}") .toObject(OperationResultInfoBase.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationResultInfoBase model = new OperationResultInfoBase(); - model = BinaryData.fromObject(model).toObject(OperationResultInfoBase.class); - } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationResultInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationResultInfoTests.java index a366aaa896cc..82aa794a3f32 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationResultInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationResultInfoTests.java @@ -1,27 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.OperationResultInfo; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class OperationResultInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationResultInfo model - = BinaryData.fromString("{\"objectType\":\"OperationResultInfo\",\"jobList\":[\"zejet\",\"kl\",\"tikyj\"]}") + = BinaryData.fromString("{\"objectType\":\"OperationResultInfo\",\"jobList\":[\"vbxngr\",\"bwggahtt\"]}") .toObject(OperationResultInfo.class); - Assertions.assertEquals("zejet", model.jobList().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationResultInfo model = new OperationResultInfo().withJobList(Arrays.asList("zejet", "kl", "tikyj")); - model = BinaryData.fromObject(model).toObject(OperationResultInfo.class); - Assertions.assertEquals("zejet", model.jobList().get(0)); + Assertions.assertEquals("vbxngr", model.jobList().get(0)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusExtendedInfoTests.java index 34cb9c586129..0541aabd352e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusExtendedInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,10 +13,4 @@ public void testDeserialize() throws Exception { OperationStatusExtendedInfo model = BinaryData.fromString("{\"objectType\":\"OperationStatusExtendedInfo\"}") .toObject(OperationStatusExtendedInfo.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationStatusExtendedInfo model = new OperationStatusExtendedInfo(); - model = BinaryData.fromObject(model).toObject(OperationStatusExtendedInfo.class); - } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusJobExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusJobExtendedInfoTests.java index 656051aff4ae..68393177a4a6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusJobExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusJobExtendedInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,15 +12,8 @@ public final class OperationStatusJobExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationStatusJobExtendedInfo model - = BinaryData.fromString("{\"objectType\":\"OperationStatusJobExtendedInfo\",\"jobId\":\"mvqmtdwckygroej\"}") + = BinaryData.fromString("{\"objectType\":\"OperationStatusJobExtendedInfo\",\"jobId\":\"ktsizntocipaou\"}") .toObject(OperationStatusJobExtendedInfo.class); - Assertions.assertEquals("mvqmtdwckygroej", model.jobId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationStatusJobExtendedInfo model = new OperationStatusJobExtendedInfo().withJobId("mvqmtdwckygroej"); - model = BinaryData.fromObject(model).toObject(OperationStatusJobExtendedInfo.class); - Assertions.assertEquals("mvqmtdwckygroej", model.jobId()); + Assertions.assertEquals("ktsizntocipaou", model.jobId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusJobsExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusJobsExtendedInfoTests.java index b3c35a480c86..14dc3f85d91e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusJobsExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusJobsExtendedInfoTests.java @@ -1,45 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusJobsExtendedInfo; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class OperationStatusJobsExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationStatusJobsExtendedInfo model = BinaryData.fromString( - "{\"objectType\":\"OperationStatusJobsExtendedInfo\",\"jobIds\":[\"ljdjuskbrreqy\",\"kceysfaqegplw\",\"ysh\"],\"failedJobsError\":{\"gkqu\":\"kvb\"}}") + "{\"objectType\":\"OperationStatusJobsExtendedInfo\",\"jobIds\":[\"s\",\"ucmpoyfd\",\"fogknygjofjdde\"],\"failedJobsError\":{\"jzyflu\":\"deupewnwrei\"}}") .toObject(OperationStatusJobsExtendedInfo.class); - Assertions.assertEquals("ljdjuskbrreqy", model.jobIds().get(0)); - Assertions.assertEquals("kvb", model.failedJobsError().get("gkqu")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationStatusJobsExtendedInfo model - = new OperationStatusJobsExtendedInfo().withJobIds(Arrays.asList("ljdjuskbrreqy", "kceysfaqegplw", "ysh")) - .withFailedJobsError(mapOf("gkqu", "kvb")); - model = BinaryData.fromObject(model).toObject(OperationStatusJobsExtendedInfo.class); - Assertions.assertEquals("ljdjuskbrreqy", model.jobIds().get(0)); - Assertions.assertEquals("kvb", model.failedJobsError().get("gkqu")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("s", model.jobIds().get(0)); + Assertions.assertEquals("deupewnwrei", model.failedJobsError().get("jzyflu")); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusProvisionIlrExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusProvisionIlrExtendedInfoTests.java index 440c5c47af76..9f175537a553 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusProvisionIlrExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusProvisionIlrExtendedInfoTests.java @@ -1,43 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientScriptForConnect; -import com.azure.resourcemanager.recoveryservicesbackup.models.InstantItemRecoveryTarget; import com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusProvisionIlrExtendedInfo; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class OperationStatusProvisionIlrExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationStatusProvisionIlrExtendedInfo model = BinaryData.fromString( - "{\"objectType\":\"OperationStatusProvisionILRExtendedInfo\",\"recoveryTarget\":{\"clientScripts\":[{\"scriptContent\":\"tdacarvvlfn\",\"scriptExtension\":\"mt\",\"osType\":\"iwenazero\",\"url\":\"rs\",\"scriptNameSuffix\":\"lsxkd\"}]}}") + "{\"objectType\":\"OperationStatusProvisionILRExtendedInfo\",\"recoveryTarget\":{\"clientScripts\":[{\"scriptContent\":\"ofcqhsm\",\"scriptExtension\":\"rkdtmlxh\",\"osType\":\"uksjtxukcdmp\",\"url\":\"cryuan\",\"scriptNameSuffix\":\"uxzdxtay\"},{\"scriptContent\":\"hmwhfpmrqo\",\"scriptExtension\":\"tu\",\"osType\":\"nryrtihf\",\"url\":\"ijbpzvgnwzsymgl\",\"scriptNameSuffix\":\"fcyzkohdbihanufh\"}]}}") .toObject(OperationStatusProvisionIlrExtendedInfo.class); - Assertions.assertEquals("tdacarvvlfn", model.recoveryTarget().clientScripts().get(0).scriptContent()); - Assertions.assertEquals("mt", model.recoveryTarget().clientScripts().get(0).scriptExtension()); - Assertions.assertEquals("iwenazero", model.recoveryTarget().clientScripts().get(0).osType()); - Assertions.assertEquals("rs", model.recoveryTarget().clientScripts().get(0).url()); - Assertions.assertEquals("lsxkd", model.recoveryTarget().clientScripts().get(0).scriptNameSuffix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationStatusProvisionIlrExtendedInfo model - = new OperationStatusProvisionIlrExtendedInfo().withRecoveryTarget(new InstantItemRecoveryTarget() - .withClientScripts(Arrays.asList(new ClientScriptForConnect().withScriptContent("tdacarvvlfn") - .withScriptExtension("mt") - .withOsType("iwenazero") - .withUrl("rs") - .withScriptNameSuffix("lsxkd")))); - model = BinaryData.fromObject(model).toObject(OperationStatusProvisionIlrExtendedInfo.class); - Assertions.assertEquals("tdacarvvlfn", model.recoveryTarget().clientScripts().get(0).scriptContent()); - Assertions.assertEquals("mt", model.recoveryTarget().clientScripts().get(0).scriptExtension()); - Assertions.assertEquals("iwenazero", model.recoveryTarget().clientScripts().get(0).osType()); - Assertions.assertEquals("rs", model.recoveryTarget().clientScripts().get(0).url()); - Assertions.assertEquals("lsxkd", model.recoveryTarget().clientScripts().get(0).scriptNameSuffix()); + Assertions.assertEquals("ofcqhsm", model.recoveryTarget().clientScripts().get(0).scriptContent()); + Assertions.assertEquals("rkdtmlxh", model.recoveryTarget().clientScripts().get(0).scriptExtension()); + Assertions.assertEquals("uksjtxukcdmp", model.recoveryTarget().clientScripts().get(0).osType()); + Assertions.assertEquals("cryuan", model.recoveryTarget().clientScripts().get(0).url()); + Assertions.assertEquals("uxzdxtay", model.recoveryTarget().clientScripts().get(0).scriptNameSuffix()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationsListMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationsListMockTests.java index f7f0ea952a63..991ecc4a4435 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationsListMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -22,7 +22,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"ryf\",\"display\":{\"provider\":\"asigrowsocne\",\"resource\":\"ygdjboqgrmtqjk\",\"operation\":\"vadrmm\",\"description\":\"uawvcmjzk\"},\"origin\":\"idisczskosw\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"ugam\",\"displayName\":\"krrcoiisbamnpp\",\"blobDuration\":\"ekuztdsbe\"},{\"name\":\"xyfukzxuizhyhn\",\"displayName\":\"kpetiarxq\",\"blobDuration\":\"bxdukecpxdazvd\"},{\"name\":\"tmmkosz\",\"displayName\":\"blnsntrpcaqk\",\"blobDuration\":\"f\"},{\"name\":\"tfmhklbnldpvcb\",\"displayName\":\"ezyquw\",\"blobDuration\":\"qxutrpbrruyuua\"}]}}}]}"; + = "{\"value\":[{\"name\":\"fciatxtjrr\",\"display\":{\"provider\":\"dskjhhxdlaj\",\"resource\":\"xcxscvslxlh\",\"operation\":\"vkrmukmyjmkx\",\"description\":\"tcsloj\"},\"origin\":\"qid\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"jhqxc\",\"displayName\":\"htkbtnq\",\"blobDuration\":\"ngldmbiipsn\"},{\"name\":\"wl\",\"displayName\":\"znxhhllxr\",\"blobDuration\":\"ctkwmuqqoajxeiyg\"},{\"name\":\"srwvaexhdctrce\",\"displayName\":\"kbrup\",\"blobDuration\":\"ehdmljzacvumep\"},{\"name\":\"bibnzpphepifex\",\"displayName\":\"qirccj\",\"blobDuration\":\"ykcgxvrpjlvcz\"}]}}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,17 +34,17 @@ public void testList() throws Exception { PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("ryf", response.iterator().next().name()); - Assertions.assertEquals("asigrowsocne", response.iterator().next().display().provider()); - Assertions.assertEquals("ygdjboqgrmtqjk", response.iterator().next().display().resource()); - Assertions.assertEquals("vadrmm", response.iterator().next().display().operation()); - Assertions.assertEquals("uawvcmjzk", response.iterator().next().display().description()); - Assertions.assertEquals("idisczskosw", response.iterator().next().origin()); - Assertions.assertEquals("ugam", + Assertions.assertEquals("fciatxtjrr", response.iterator().next().name()); + Assertions.assertEquals("dskjhhxdlaj", response.iterator().next().display().provider()); + Assertions.assertEquals("xcxscvslxlh", response.iterator().next().display().resource()); + Assertions.assertEquals("vkrmukmyjmkx", response.iterator().next().display().operation()); + Assertions.assertEquals("tcsloj", response.iterator().next().display().description()); + Assertions.assertEquals("qid", response.iterator().next().origin()); + Assertions.assertEquals("jhqxc", response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("krrcoiisbamnpp", + Assertions.assertEquals("htkbtnq", response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("ekuztdsbe", + Assertions.assertEquals("ngldmbiipsn", response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).blobDuration()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PatchRecoveryPointInputTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PatchRecoveryPointInputTests.java new file mode 100644 index 000000000000..4d6e1bf2872c --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PatchRecoveryPointInputTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.recoveryservicesbackup.models.PatchRecoveryPointInput; +import com.azure.resourcemanager.recoveryservicesbackup.models.PatchRecoveryPointPropertiesInput; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class PatchRecoveryPointInputTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PatchRecoveryPointInput model + = BinaryData.fromString("{\"recoveryPointProperties\":{\"expiryTime\":\"2021-08-24T02:48:56Z\"}}") + .toObject(PatchRecoveryPointInput.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-24T02:48:56Z"), + model.recoveryPointProperties().expiryTime()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PatchRecoveryPointInput model = new PatchRecoveryPointInput().withRecoveryPointProperties( + new PatchRecoveryPointPropertiesInput().withExpiryTime(OffsetDateTime.parse("2021-08-24T02:48:56Z"))); + model = BinaryData.fromObject(model).toObject(PatchRecoveryPointInput.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-24T02:48:56Z"), + model.recoveryPointProperties().expiryTime()); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PatchRecoveryPointPropertiesInputTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PatchRecoveryPointPropertiesInputTests.java new file mode 100644 index 000000000000..ede3b82f2d34 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PatchRecoveryPointPropertiesInputTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.recoveryservicesbackup.models.PatchRecoveryPointPropertiesInput; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class PatchRecoveryPointPropertiesInputTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PatchRecoveryPointPropertiesInput model = BinaryData.fromString("{\"expiryTime\":\"2021-10-20T00:41:29Z\"}") + .toObject(PatchRecoveryPointPropertiesInput.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-20T00:41:29Z"), model.expiryTime()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PatchRecoveryPointPropertiesInput model + = new PatchRecoveryPointPropertiesInput().withExpiryTime(OffsetDateTime.parse("2021-10-20T00:41:29Z")); + model = BinaryData.fromObject(model).toObject(PatchRecoveryPointPropertiesInput.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-20T00:41:29Z"), model.expiryTime()); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PointInTimeRangeTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PointInTimeRangeTests.java index b8ec2a9aeba7..1317467b3701 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PointInTimeRangeTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PointInTimeRangeTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,18 +13,9 @@ public final class PointInTimeRangeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PointInTimeRange model - = BinaryData.fromString("{\"startTime\":\"2021-04-20T09:51:44Z\",\"endTime\":\"2021-09-25T22:26:54Z\"}") + = BinaryData.fromString("{\"startTime\":\"2021-04-12T20:00:21Z\",\"endTime\":\"2021-10-31T18:45:45Z\"}") .toObject(PointInTimeRange.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-20T09:51:44Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-25T22:26:54Z"), model.endTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PointInTimeRange model = new PointInTimeRange().withStartTime(OffsetDateTime.parse("2021-04-20T09:51:44Z")) - .withEndTime(OffsetDateTime.parse("2021-09-25T22:26:54Z")); - model = BinaryData.fromObject(model).toObject(PointInTimeRange.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-20T09:51:44Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-25T22:26:54Z"), model.endTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-12T20:00:21Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-31T18:45:45Z"), model.endTime()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PreValidateEnableBackupRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PreValidateEnableBackupRequestTests.java index a24dd7289590..b7de9d9dcdd0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PreValidateEnableBackupRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PreValidateEnableBackupRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,25 +13,25 @@ public final class PreValidateEnableBackupRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PreValidateEnableBackupRequest model = BinaryData.fromString( - "{\"resourceType\":\"Sharepoint\",\"resourceId\":\"gdf\",\"vaultId\":\"lzl\",\"properties\":\"xrifkwmrvkts\"}") + "{\"resourceType\":\"SystemState\",\"resourceId\":\"iw\",\"vaultId\":\"m\",\"properties\":\"zhzzwvywrg\"}") .toObject(PreValidateEnableBackupRequest.class); - Assertions.assertEquals(DataSourceType.SHAREPOINT, model.resourceType()); - Assertions.assertEquals("gdf", model.resourceId()); - Assertions.assertEquals("lzl", model.vaultId()); - Assertions.assertEquals("xrifkwmrvkts", model.properties()); + Assertions.assertEquals(DataSourceType.SYSTEM_STATE, model.resourceType()); + Assertions.assertEquals("iw", model.resourceId()); + Assertions.assertEquals("m", model.vaultId()); + Assertions.assertEquals("zhzzwvywrg", model.properties()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PreValidateEnableBackupRequest model - = new PreValidateEnableBackupRequest().withResourceType(DataSourceType.SHAREPOINT) - .withResourceId("gdf") - .withVaultId("lzl") - .withProperties("xrifkwmrvkts"); + = new PreValidateEnableBackupRequest().withResourceType(DataSourceType.SYSTEM_STATE) + .withResourceId("iw") + .withVaultId("m") + .withProperties("zhzzwvywrg"); model = BinaryData.fromObject(model).toObject(PreValidateEnableBackupRequest.class); - Assertions.assertEquals(DataSourceType.SHAREPOINT, model.resourceType()); - Assertions.assertEquals("gdf", model.resourceId()); - Assertions.assertEquals("lzl", model.vaultId()); - Assertions.assertEquals("xrifkwmrvkts", model.properties()); + Assertions.assertEquals(DataSourceType.SYSTEM_STATE, model.resourceType()); + Assertions.assertEquals("iw", model.resourceId()); + Assertions.assertEquals("m", model.vaultId()); + Assertions.assertEquals("zhzzwvywrg", model.properties()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrepareDataMoveRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrepareDataMoveRequestTests.java index 34ef8a004c19..248348c771ab 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrepareDataMoveRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrepareDataMoveRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,27 +14,27 @@ public final class PrepareDataMoveRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrepareDataMoveRequest model = BinaryData.fromString( - "{\"targetResourceId\":\"ujjugwdkcglh\",\"targetRegion\":\"lazjdyggdtjixhbk\",\"dataMoveLevel\":\"Container\",\"sourceContainerArmIds\":[\"wey\",\"hmenevfyexfwhybc\",\"bvyvdcsity\"],\"ignoreMoved\":false}") + "{\"targetResourceId\":\"mmhquvgjxpyb\",\"targetRegion\":\"zm\",\"dataMoveLevel\":\"Invalid\",\"sourceContainerArmIds\":[\"zopbsphrupidgs\",\"bb\",\"jhphoyc\",\"sx\"],\"ignoreMoved\":false}") .toObject(PrepareDataMoveRequest.class); - Assertions.assertEquals("ujjugwdkcglh", model.targetResourceId()); - Assertions.assertEquals("lazjdyggdtjixhbk", model.targetRegion()); - Assertions.assertEquals(DataMoveLevel.CONTAINER, model.dataMoveLevel()); - Assertions.assertEquals("wey", model.sourceContainerArmIds().get(0)); - Assertions.assertEquals(false, model.ignoreMoved()); + Assertions.assertEquals("mmhquvgjxpyb", model.targetResourceId()); + Assertions.assertEquals("zm", model.targetRegion()); + Assertions.assertEquals(DataMoveLevel.INVALID, model.dataMoveLevel()); + Assertions.assertEquals("zopbsphrupidgs", model.sourceContainerArmIds().get(0)); + Assertions.assertFalse(model.ignoreMoved()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrepareDataMoveRequest model = new PrepareDataMoveRequest().withTargetResourceId("ujjugwdkcglh") - .withTargetRegion("lazjdyggdtjixhbk") - .withDataMoveLevel(DataMoveLevel.CONTAINER) - .withSourceContainerArmIds(Arrays.asList("wey", "hmenevfyexfwhybc", "bvyvdcsity")) + PrepareDataMoveRequest model = new PrepareDataMoveRequest().withTargetResourceId("mmhquvgjxpyb") + .withTargetRegion("zm") + .withDataMoveLevel(DataMoveLevel.INVALID) + .withSourceContainerArmIds(Arrays.asList("zopbsphrupidgs", "bb", "jhphoyc", "sx")) .withIgnoreMoved(false); model = BinaryData.fromObject(model).toObject(PrepareDataMoveRequest.class); - Assertions.assertEquals("ujjugwdkcglh", model.targetResourceId()); - Assertions.assertEquals("lazjdyggdtjixhbk", model.targetRegion()); - Assertions.assertEquals(DataMoveLevel.CONTAINER, model.dataMoveLevel()); - Assertions.assertEquals("wey", model.sourceContainerArmIds().get(0)); - Assertions.assertEquals(false, model.ignoreMoved()); + Assertions.assertEquals("mmhquvgjxpyb", model.targetResourceId()); + Assertions.assertEquals("zm", model.targetRegion()); + Assertions.assertEquals(DataMoveLevel.INVALID, model.dataMoveLevel()); + Assertions.assertEquals("zopbsphrupidgs", model.sourceContainerArmIds().get(0)); + Assertions.assertFalse(model.ignoreMoved()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrepareDataMoveResponseTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrepareDataMoveResponseTests.java index 0ebb8783d5f6..36e977690be2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrepareDataMoveResponseTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrepareDataMoveResponseTests.java @@ -1,44 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.PrepareDataMoveResponse; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class PrepareDataMoveResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrepareDataMoveResponse model = BinaryData.fromString( - "{\"objectType\":\"PrepareDataMoveResponse\",\"correlationId\":\"k\",\"sourceVaultProperties\":{\"tgvgzp\":\"zolxrzvhqjwtr\",\"wro\":\"rrkolawjmjs\",\"guyn\":\"cdxfzzzwyjafitl\"}}") + "{\"objectType\":\"PrepareDataMoveResponse\",\"correlationId\":\"fizuckyf\",\"sourceVaultProperties\":{\"zuhtymwisdkfthwx\":\"fidfvzw\",\"mijcmmxdcufufs\":\"nteiwaopv\",\"fycc\":\"pymzidnsezcxtbzs\"}}") .toObject(PrepareDataMoveResponse.class); - Assertions.assertEquals("k", model.correlationId()); - Assertions.assertEquals("zolxrzvhqjwtr", model.sourceVaultProperties().get("tgvgzp")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrepareDataMoveResponse model = new PrepareDataMoveResponse().withCorrelationId("k") - .withSourceVaultProperties( - mapOf("tgvgzp", "zolxrzvhqjwtr", "wro", "rrkolawjmjs", "guyn", "cdxfzzzwyjafitl")); - model = BinaryData.fromObject(model).toObject(PrepareDataMoveResponse.class); - Assertions.assertEquals("k", model.correlationId()); - Assertions.assertEquals("zolxrzvhqjwtr", model.sourceVaultProperties().get("tgvgzp")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("fizuckyf", model.correlationId()); + Assertions.assertEquals("fidfvzw", model.sourceVaultProperties().get("zuhtymwisdkfthwx")); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionResourceInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionResourceInnerTests.java index 2029ff47a943..2975eb55a9bb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionResourceInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionResourceInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -21,48 +21,44 @@ public final class PrivateEndpointConnectionResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionResourceInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"gehoqfbowskany\"},\"groupIds\":[\"AzureSiteRecovery\",\"AzureBackup\",\"AzureBackup_secondary\",\"AzureSiteRecovery\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"ywgndrv\",\"actionsRequired\":\"hzgpphrcgyncocpe\"}},\"eTag\":\"vmmcoofs\",\"location\":\"lzevgbmqjqab\",\"tags\":{\"wnfnbacf\":\"mivkwlzuvcc\",\"bqqwxrj\":\"onlebxetqgtzxdpn\",\"mpmngnzscxaqwoo\":\"eallnwsubisnj\"},\"id\":\"hcbonqvpkvlr\",\"name\":\"njeaseipheofloke\",\"type\":\"y\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"privateEndpoint\":{\"id\":\"aondjrkclamgg\"},\"groupIds\":[\"AzureSiteRecovery\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"oqeykglt\",\"actionsRequired\":\"xhqf\"}},\"tags\":{\"iucijjcea\":\"ayejsxtlgflwfgz\"},\"location\":\"ijjj\",\"eTag\":\"va\",\"id\":\"a\",\"name\":\"zknxkv\",\"type\":\"cxetyvkunmignoh\"}") .toObject(PrivateEndpointConnectionResourceInner.class); - Assertions.assertEquals("lzevgbmqjqab", model.location()); - Assertions.assertEquals("mivkwlzuvcc", model.tags().get("wnfnbacf")); - Assertions.assertEquals(ProvisioningState.SUCCEEDED, model.properties().provisioningState()); - Assertions.assertEquals("gehoqfbowskany", model.properties().privateEndpoint().id()); + Assertions.assertEquals(ProvisioningState.FAILED, model.properties().provisioningState()); + Assertions.assertEquals("aondjrkclamgg", model.properties().privateEndpoint().id()); Assertions.assertEquals(VaultSubResourceType.AZURE_SITE_RECOVERY, model.properties().groupIds().get(0)); - Assertions.assertEquals(PrivateEndpointConnectionStatus.REJECTED, + Assertions.assertEquals(PrivateEndpointConnectionStatus.PENDING, model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ywgndrv", model.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("hzgpphrcgyncocpe", - model.properties().privateLinkServiceConnectionState().actionRequired()); - Assertions.assertEquals("vmmcoofs", model.etag()); + Assertions.assertEquals("oqeykglt", model.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("xhqf", model.properties().privateLinkServiceConnectionState().actionRequired()); + Assertions.assertEquals("ayejsxtlgflwfgz", model.tags().get("iucijjcea")); + Assertions.assertEquals("ijjj", model.location()); + Assertions.assertEquals("va", model.etag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateEndpointConnectionResourceInner model = new PrivateEndpointConnectionResourceInner() - .withLocation("lzevgbmqjqab") - .withTags( - mapOf("wnfnbacf", "mivkwlzuvcc", "bqqwxrj", "onlebxetqgtzxdpn", "mpmngnzscxaqwoo", "eallnwsubisnj")) - .withProperties(new PrivateEndpointConnection().withProvisioningState(ProvisioningState.SUCCEEDED) - .withPrivateEndpoint(new PrivateEndpoint().withId("gehoqfbowskany")) - .withGroupIds(Arrays.asList(VaultSubResourceType.AZURE_SITE_RECOVERY, VaultSubResourceType.AZURE_BACKUP, - VaultSubResourceType.AZURE_BACKUP_SECONDARY, VaultSubResourceType.AZURE_SITE_RECOVERY)) + .withProperties(new PrivateEndpointConnection().withProvisioningState(ProvisioningState.FAILED) + .withPrivateEndpoint(new PrivateEndpoint().withId("aondjrkclamgg")) + .withGroupIds(Arrays.asList(VaultSubResourceType.AZURE_SITE_RECOVERY)) .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointConnectionStatus.REJECTED) - .withDescription("ywgndrv") - .withActionRequired("hzgpphrcgyncocpe"))) - .withEtag("vmmcoofs"); + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointConnectionStatus.PENDING) + .withDescription("oqeykglt") + .withActionRequired("xhqf"))) + .withTags(mapOf("iucijjcea", "ayejsxtlgflwfgz")) + .withLocation("ijjj") + .withEtag("va"); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionResourceInner.class); - Assertions.assertEquals("lzevgbmqjqab", model.location()); - Assertions.assertEquals("mivkwlzuvcc", model.tags().get("wnfnbacf")); - Assertions.assertEquals(ProvisioningState.SUCCEEDED, model.properties().provisioningState()); - Assertions.assertEquals("gehoqfbowskany", model.properties().privateEndpoint().id()); + Assertions.assertEquals(ProvisioningState.FAILED, model.properties().provisioningState()); + Assertions.assertEquals("aondjrkclamgg", model.properties().privateEndpoint().id()); Assertions.assertEquals(VaultSubResourceType.AZURE_SITE_RECOVERY, model.properties().groupIds().get(0)); - Assertions.assertEquals(PrivateEndpointConnectionStatus.REJECTED, + Assertions.assertEquals(PrivateEndpointConnectionStatus.PENDING, model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ywgndrv", model.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("hzgpphrcgyncocpe", - model.properties().privateLinkServiceConnectionState().actionRequired()); - Assertions.assertEquals("vmmcoofs", model.etag()); + Assertions.assertEquals("oqeykglt", model.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("xhqf", model.properties().privateLinkServiceConnectionState().actionRequired()); + Assertions.assertEquals("ayejsxtlgflwfgz", model.tags().get("iucijjcea")); + Assertions.assertEquals("ijjj", model.location()); + Assertions.assertEquals("va", model.etag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionTests.java index f72aca7a15ce..7e521bfe2926 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -18,35 +18,35 @@ public final class PrivateEndpointConnectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnection model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"dlwtgrhpdj\"},\"groupIds\":[\"AzureBackup\",\"AzureSiteRecovery\",\"AzureBackup_secondary\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"pqyegualhbxxh\",\"actionsRequired\":\"jzzvdud\"}}") + "{\"provisioningState\":\"Deleting\",\"privateEndpoint\":{\"id\":\"ogjwpindedvabbxb\"},\"groupIds\":[\"AzureBackup_secondary\",\"AzureBackup_secondary\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"ywfcfxzi\",\"actionsRequired\":\"zi\"}}") .toObject(PrivateEndpointConnection.class); - Assertions.assertEquals(ProvisioningState.SUCCEEDED, model.provisioningState()); - Assertions.assertEquals("dlwtgrhpdj", model.privateEndpoint().id()); - Assertions.assertEquals(VaultSubResourceType.AZURE_BACKUP, model.groupIds().get(0)); - Assertions.assertEquals(PrivateEndpointConnectionStatus.PENDING, + Assertions.assertEquals(ProvisioningState.DELETING, model.provisioningState()); + Assertions.assertEquals("ogjwpindedvabbxb", model.privateEndpoint().id()); + Assertions.assertEquals(VaultSubResourceType.AZURE_BACKUP_SECONDARY, model.groupIds().get(0)); + Assertions.assertEquals(PrivateEndpointConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("pqyegualhbxxh", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("jzzvdud", model.privateLinkServiceConnectionState().actionRequired()); + Assertions.assertEquals("ywfcfxzi", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("zi", model.privateLinkServiceConnectionState().actionRequired()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateEndpointConnection model - = new PrivateEndpointConnection().withProvisioningState(ProvisioningState.SUCCEEDED) - .withPrivateEndpoint(new PrivateEndpoint().withId("dlwtgrhpdj")) - .withGroupIds(Arrays.asList(VaultSubResourceType.AZURE_BACKUP, VaultSubResourceType.AZURE_SITE_RECOVERY, - VaultSubResourceType.AZURE_BACKUP_SECONDARY)) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointConnectionStatus.PENDING) - .withDescription("pqyegualhbxxh") - .withActionRequired("jzzvdud")); + PrivateEndpointConnection model = new PrivateEndpointConnection() + .withProvisioningState(ProvisioningState.DELETING) + .withPrivateEndpoint(new PrivateEndpoint().withId("ogjwpindedvabbxb")) + .withGroupIds( + Arrays.asList(VaultSubResourceType.AZURE_BACKUP_SECONDARY, VaultSubResourceType.AZURE_BACKUP_SECONDARY)) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointConnectionStatus.REJECTED) + .withDescription("ywfcfxzi") + .withActionRequired("zi")); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnection.class); - Assertions.assertEquals(ProvisioningState.SUCCEEDED, model.provisioningState()); - Assertions.assertEquals("dlwtgrhpdj", model.privateEndpoint().id()); - Assertions.assertEquals(VaultSubResourceType.AZURE_BACKUP, model.groupIds().get(0)); - Assertions.assertEquals(PrivateEndpointConnectionStatus.PENDING, + Assertions.assertEquals(ProvisioningState.DELETING, model.provisioningState()); + Assertions.assertEquals("ogjwpindedvabbxb", model.privateEndpoint().id()); + Assertions.assertEquals(VaultSubResourceType.AZURE_BACKUP_SECONDARY, model.groupIds().get(0)); + Assertions.assertEquals(PrivateEndpointConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("pqyegualhbxxh", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("jzzvdud", model.privateLinkServiceConnectionState().actionRequired()); + Assertions.assertEquals("ywfcfxzi", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("zi", model.privateLinkServiceConnectionState().actionRequired()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionsDeleteMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionsDeleteMockTests.java index 6e8d2bf3276f..8c09a7259438 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionsDeleteMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionsDeleteMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -27,7 +27,8 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.privateEndpointConnections().delete("ewoi", "mrvz", "juyrsrziuctixg", com.azure.core.util.Context.NONE); + manager.privateEndpointConnections() + .delete("lmsoodtmve", "dhdyswcrptveaj", "zxvlgsrgkrfizrp", com.azure.core.util.Context.NONE); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java index ba4d12aa1587..f66bb67534cc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -24,7 +24,7 @@ public final class PrivateEndpointConnectionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"privateEndpoint\":{\"id\":\"flqqbtnyjpylxd\"},\"groupIds\":[\"AzureBackup_secondary\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"s\",\"actionsRequired\":\"aevwjcnkot\"}},\"eTag\":\"wuhvaj\",\"location\":\"ailfemjjzak\",\"tags\":{\"cm\":\"iqullqxbdmvr\",\"rkadjfynnfmuiiir\":\"erndbrnyeofltfnn\"},\"id\":\"pfoh\",\"name\":\"kfkxbbcbrwjiut\",\"type\":\"njizb\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"ahovuuw\"},\"groupIds\":[\"AzureSiteRecovery\",\"AzureBackup\",\"AzureBackup\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"oti\",\"actionsRequired\":\"bbcngkeg\"}},\"tags\":{\"w\":\"pxbbfe\"},\"location\":\"y\",\"eTag\":\"oxpdxq\",\"id\":\"r\",\"name\":\"lqownkiua\",\"type\":\"ewnahwkxjjmzt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,19 +34,18 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnectionResource response = manager.privateEndpointConnections() - .getWithResponse("vop", "m", "uoqujlyeg", com.azure.core.util.Context.NONE) + .getWithResponse("r", "rwpewsa", "doejtighsxjpyt", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ailfemjjzak", response.location()); - Assertions.assertEquals("iqullqxbdmvr", response.tags().get("cm")); - Assertions.assertEquals(ProvisioningState.FAILED, response.properties().provisioningState()); - Assertions.assertEquals("flqqbtnyjpylxd", response.properties().privateEndpoint().id()); - Assertions.assertEquals(VaultSubResourceType.AZURE_BACKUP_SECONDARY, response.properties().groupIds().get(0)); - Assertions.assertEquals(PrivateEndpointConnectionStatus.DISCONNECTED, + Assertions.assertEquals(ProvisioningState.SUCCEEDED, response.properties().provisioningState()); + Assertions.assertEquals("ahovuuw", response.properties().privateEndpoint().id()); + Assertions.assertEquals(VaultSubResourceType.AZURE_SITE_RECOVERY, response.properties().groupIds().get(0)); + Assertions.assertEquals(PrivateEndpointConnectionStatus.APPROVED, response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("s", response.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("aevwjcnkot", - response.properties().privateLinkServiceConnectionState().actionRequired()); - Assertions.assertEquals("wuhvaj", response.etag()); + Assertions.assertEquals("oti", response.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("bbcngkeg", response.properties().privateLinkServiceConnectionState().actionRequired()); + Assertions.assertEquals("pxbbfe", response.tags().get("w")); + Assertions.assertEquals("y", response.location()); + Assertions.assertEquals("oxpdxq", response.etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionsPutMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionsPutMockTests.java index 71fd745987f2..3b25785bd15e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionsPutMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionsPutMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -30,7 +30,7 @@ public final class PrivateEndpointConnectionsPutMockTests { @Test public void testPut() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"nxwdvwnjkg\"},\"groupIds\":[\"AzureSiteRecovery\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"sqftibtyibuyvp\",\"actionsRequired\":\"fqjpnqno\"}},\"eTag\":\"sbede\",\"location\":\"rexkxbhxvucn\",\"tags\":{\"ajsvk\":\"mnhjevdyzn\",\"zzkivyhjr\":\"kmq\"},\"id\":\"iizjixlqfhefkwa\",\"name\":\"solronqqlm\",\"type\":\"nlqxsjxtele\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"jmfmeftvhkm\"},\"groupIds\":[\"AzureSiteRecovery\",\"AzureBackup\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"w\",\"actionsRequired\":\"jgrulcfogxhcxnwj\"}},\"tags\":{\"wakukzkdtzxs\":\"dzxcouzfwo\"},\"location\":\"dnlwglihezomuc\",\"eTag\":\"g\",\"id\":\"nione\",\"name\":\"bzdrdpuenxkgt\",\"type\":\"zlm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -40,32 +40,33 @@ public void testPut() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnectionResource response = manager.privateEndpointConnections() - .define("vka") - .withRegion("rr") - .withExistingVault("d", "uifr") - .withTags(mapOf("fsbzxlbzxo", "srhkhgsnxuwwkpph", "nmwpf", "eikjclwza", "uqqiqezxlhd", "uqtaazyqbxyxoyf")) - .withProperties(new PrivateEndpointConnection().withProvisioningState(ProvisioningState.PENDING) - .withPrivateEndpoint(new PrivateEndpoint().withId("swqjm")) - .withGroupIds(Arrays.asList(VaultSubResourceType.AZURE_BACKUP, - VaultSubResourceType.AZURE_BACKUP_SECONDARY, VaultSubResourceType.AZURE_SITE_RECOVERY)) + .define("lmcskyk") + .withExistingVault("wlp", "yuqh") + .withRegion("kctd") + .withTags(mapOf("yep", "wk", "xkzrn", "yamnnidmdiawp")) + .withProperties(new PrivateEndpointConnection().withProvisioningState(ProvisioningState.SUCCEEDED) + .withPrivateEndpoint(new PrivateEndpoint().withId("xcn")) + .withGroupIds( + Arrays.asList(VaultSubResourceType.AZURE_BACKUP, VaultSubResourceType.AZURE_BACKUP_SECONDARY, + VaultSubResourceType.AZURE_SITE_RECOVERY, VaultSubResourceType.AZURE_SITE_RECOVERY)) .withPrivateLinkServiceConnectionState( new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointConnectionStatus.APPROVED) - .withDescription("jufptbjczjnciuiy") - .withActionRequired("ldaswvpp"))) - .withEtag("qqzlgcndhz") + .withDescription("awmpjprd") + .withActionRequired("rpcfpcfjfwzl"))) + .withEtag("osgwqpsqazihqo") .create(); - Assertions.assertEquals("rexkxbhxvucn", response.location()); - Assertions.assertEquals("mnhjevdyzn", response.tags().get("ajsvk")); Assertions.assertEquals(ProvisioningState.SUCCEEDED, response.properties().provisioningState()); - Assertions.assertEquals("nxwdvwnjkg", response.properties().privateEndpoint().id()); + Assertions.assertEquals("jmfmeftvhkm", response.properties().privateEndpoint().id()); Assertions.assertEquals(VaultSubResourceType.AZURE_SITE_RECOVERY, response.properties().groupIds().get(0)); - Assertions.assertEquals(PrivateEndpointConnectionStatus.APPROVED, + Assertions.assertEquals(PrivateEndpointConnectionStatus.PENDING, response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("sqftibtyibuyvp", - response.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("fqjpnqno", response.properties().privateLinkServiceConnectionState().actionRequired()); - Assertions.assertEquals("sbede", response.etag()); + Assertions.assertEquals("w", response.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("jgrulcfogxhcxnwj", + response.properties().privateLinkServiceConnectionState().actionRequired()); + Assertions.assertEquals("dzxcouzfwo", response.tags().get("wakukzkdtzxs")); + Assertions.assertEquals("dnlwglihezomuc", response.location()); + Assertions.assertEquals("g", response.etag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointTests.java index 8bf27f2a88e6..dc490360ce2f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,14 +11,14 @@ public final class PrivateEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"dslfhotwmcy\"}").toObject(PrivateEndpoint.class); - Assertions.assertEquals("dslfhotwmcy", model.id()); + PrivateEndpoint model = BinaryData.fromString("{\"id\":\"wypusuvjsl\"}").toObject(PrivateEndpoint.class); + Assertions.assertEquals("wypusuvjsl", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint().withId("dslfhotwmcy"); + PrivateEndpoint model = new PrivateEndpoint().withId("wypusuvjsl"); model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - Assertions.assertEquals("dslfhotwmcy", model.id()); + Assertions.assertEquals("wypusuvjsl", model.id()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateLinkServiceConnectionStateTests.java index 5e77e84e8d22..f16688c413f9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateLinkServiceConnectionStateTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateLinkServiceConnectionStateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,22 +13,22 @@ public final class PrivateLinkServiceConnectionStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkServiceConnectionState model = BinaryData - .fromString("{\"status\":\"Disconnected\",\"description\":\"bjnpg\",\"actionsRequired\":\"ftadehxnltyfs\"}") + .fromString("{\"status\":\"Pending\",\"description\":\"iid\",\"actionsRequired\":\"llfryvdmvxadq\"}") .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("bjnpg", model.description()); - Assertions.assertEquals("ftadehxnltyfs", model.actionRequired()); + Assertions.assertEquals(PrivateEndpointConnectionStatus.PENDING, model.status()); + Assertions.assertEquals("iid", model.description()); + Assertions.assertEquals("llfryvdmvxadq", model.actionRequired()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateLinkServiceConnectionState model - = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointConnectionStatus.DISCONNECTED) - .withDescription("bjnpg") - .withActionRequired("ftadehxnltyfs"); + = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointConnectionStatus.PENDING) + .withDescription("iid") + .withActionRequired("llfryvdmvxadq"); model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("bjnpg", model.description()); - Assertions.assertEquals("ftadehxnltyfs", model.actionRequired()); + Assertions.assertEquals(PrivateEndpointConnectionStatus.PENDING, model.status()); + Assertions.assertEquals("iid", model.description()); + Assertions.assertEquals("llfryvdmvxadq", model.actionRequired()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainerResourceInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainerResourceInnerTests.java index ba3cbb524bf1..8c26df79e879 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainerResourceInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainerResourceInnerTests.java @@ -1,60 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectableContainerResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainer; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class ProtectableContainerResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProtectableContainerResourceInner model = BinaryData.fromString( - "{\"properties\":{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"queziky\",\"backupManagementType\":\"AzureWorkload\",\"healthStatus\":\"kallatmel\",\"containerId\":\"ipicc\"},\"eTag\":\"kzivgvvcnayrh\",\"location\":\"rnxxmueed\",\"tags\":{\"qtc\":\"dvstkw\",\"piohgwxrtfu\":\"ealmfmtdaaygdvwv\",\"k\":\"xepxgyqagvrvmn\"},\"id\":\"kghimdblxgwimfnj\",\"name\":\"fjxwmsz\",\"type\":\"kfoqreyfkzikfj\"}") + "{\"location\":\"nzcpdltkr\",\"tags\":{\"fzhompheq\":\"mtbdrvcqgu\",\"kyeclcdigpta\":\"urelyujlfyoump\"},\"eTag\":\"rzmq\",\"properties\":{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"ycijoclxiutgj\",\"backupManagementType\":\"AzureBackupServer\",\"healthStatus\":\"zjd\",\"containerId\":\"qjbtxjeaoqaqbzgy\"},\"id\":\"w\",\"name\":\"v\",\"type\":\"atbwbqam\"}") .toObject(ProtectableContainerResourceInner.class); - Assertions.assertEquals("rnxxmueed", model.location()); - Assertions.assertEquals("dvstkw", model.tags().get("qtc")); - Assertions.assertEquals("queziky", model.properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.properties().backupManagementType()); - Assertions.assertEquals("kallatmel", model.properties().healthStatus()); - Assertions.assertEquals("ipicc", model.properties().containerId()); - Assertions.assertEquals("kzivgvvcnayrh", model.etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProtectableContainerResourceInner model = new ProtectableContainerResourceInner().withLocation("rnxxmueed") - .withTags(mapOf("qtc", "dvstkw", "piohgwxrtfu", "ealmfmtdaaygdvwv", "k", "xepxgyqagvrvmn")) - .withProperties(new ProtectableContainer().withFriendlyName("queziky") - .withBackupManagementType(BackupManagementType.AZURE_WORKLOAD) - .withHealthStatus("kallatmel") - .withContainerId("ipicc")) - .withEtag("kzivgvvcnayrh"); - model = BinaryData.fromObject(model).toObject(ProtectableContainerResourceInner.class); - Assertions.assertEquals("rnxxmueed", model.location()); - Assertions.assertEquals("dvstkw", model.tags().get("qtc")); - Assertions.assertEquals("queziky", model.properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.properties().backupManagementType()); - Assertions.assertEquals("kallatmel", model.properties().healthStatus()); - Assertions.assertEquals("ipicc", model.properties().containerId()); - Assertions.assertEquals("kzivgvvcnayrh", model.etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("nzcpdltkr", model.location()); + Assertions.assertEquals("mtbdrvcqgu", model.tags().get("fzhompheq")); + Assertions.assertEquals("rzmq", model.eTag()); + Assertions.assertEquals("ycijoclxiutgj", model.properties().friendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.properties().backupManagementType()); + Assertions.assertEquals("zjd", model.properties().healthStatus()); + Assertions.assertEquals("qjbtxjeaoqaqbzgy", model.properties().containerId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainerResourceListTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainerResourceListTests.java index e9a6c5dac80f..57b5b669351a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainerResourceListTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainerResourceListTests.java @@ -1,82 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectableContainerResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectableContainerResourceList; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainer; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainerResourceList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class ProtectableContainerResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProtectableContainerResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"zapvhelx\",\"backupManagementType\":\"MAB\",\"healthStatus\":\"yat\",\"containerId\":\"ckcb\"},\"eTag\":\"ejrjxgciqibrho\",\"location\":\"xsdqrhzoymibmrqy\",\"tags\":{\"zdtmhrkwofy\":\"hwflu\",\"iwbwoenwashrtdtk\":\"voqacpiexpbt\",\"kulpiujwaasi\":\"nqxwbp\",\"qlpqwcciuq\":\"qiiobyuqer\"},\"id\":\"bdbutauvf\",\"name\":\"tkuwhhmhykojo\",\"type\":\"afnn\"},{\"properties\":{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"ichkoymkcdyhb\",\"backupManagementType\":\"AzureSql\",\"healthStatus\":\"wdreqnovvqfovl\",\"containerId\":\"ywsuwsy\"},\"eTag\":\"ndsytgadg\",\"location\":\"r\",\"tags\":{\"qnzarrwl\":\"en\",\"jfqka\":\"uu\",\"iipfpubj\":\"e\"},\"id\":\"bwwift\",\"name\":\"hqkvpuvksgplsak\",\"type\":\"ynfs\"},{\"properties\":{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"jphuopxodlqi\",\"backupManagementType\":\"AzureStorage\",\"healthStatus\":\"rz\",\"containerId\":\"leosjswsrms\"},\"eTag\":\"zrpzb\",\"location\":\"hckqqzqioxiy\",\"tags\":{\"ynkedyatrwyhqmib\":\"i\",\"mnzgmwznmabi\":\"yhwitsmypyynpcdp\",\"wwrlkdmtncv\":\"nsorgjhxbldt\",\"xdy\":\"kotl\"},\"id\":\"gsyocogj\",\"name\":\"tdtbnnhadooc\",\"type\":\"kvci\"}],\"nextLink\":\"nvpamq\"}") + "{\"value\":[{\"location\":\"e\",\"tags\":{\"hortu\":\"jiriuxeg\"},\"eTag\":\"wlpjfelqerppt\",\"properties\":{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"qnzmnhiil\",\"backupManagementType\":\"AzureStorage\",\"healthStatus\":\"cjgckbbcccgzpra\",\"containerId\":\"nyuffat\"},\"id\":\"ftipwcxbyubhiq\",\"name\":\"xyur\",\"type\":\"pnuhzafccnu\"},{\"location\":\"i\",\"tags\":{\"vatvcrkd\":\"lbuigv\"},\"eTag\":\"nbqxvhcsyhzlwxae\",\"properties\":{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"ur\",\"backupManagementType\":\"Invalid\",\"healthStatus\":\"d\",\"containerId\":\"dwead\"},\"id\":\"zmwntopagt\",\"name\":\"mvmmagoaqylkjz\",\"type\":\"jiuazjc\"}],\"nextLink\":\"xitp\"}") .toObject(ProtectableContainerResourceList.class); - Assertions.assertEquals("nvpamq", model.nextLink()); - Assertions.assertEquals("xsdqrhzoymibmrqy", model.value().get(0).location()); - Assertions.assertEquals("hwflu", model.value().get(0).tags().get("zdtmhrkwofy")); - Assertions.assertEquals("zapvhelx", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.MAB, model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("yat", model.value().get(0).properties().healthStatus()); - Assertions.assertEquals("ckcb", model.value().get(0).properties().containerId()); - Assertions.assertEquals("ejrjxgciqibrho", model.value().get(0).etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProtectableContainerResourceList model = new ProtectableContainerResourceList().withNextLink("nvpamq") - .withValue(Arrays.asList( - new ProtectableContainerResourceInner().withLocation("xsdqrhzoymibmrqy") - .withTags(mapOf("zdtmhrkwofy", "hwflu", "iwbwoenwashrtdtk", "voqacpiexpbt", "kulpiujwaasi", - "nqxwbp", "qlpqwcciuq", "qiiobyuqer")) - .withProperties(new ProtectableContainer().withFriendlyName("zapvhelx") - .withBackupManagementType(BackupManagementType.MAB) - .withHealthStatus("yat") - .withContainerId("ckcb")) - .withEtag("ejrjxgciqibrho"), - new ProtectableContainerResourceInner().withLocation("r") - .withTags(mapOf("qnzarrwl", "en", "jfqka", "uu", "iipfpubj", "e")) - .withProperties(new ProtectableContainer().withFriendlyName("ichkoymkcdyhb") - .withBackupManagementType(BackupManagementType.AZURE_SQL) - .withHealthStatus("wdreqnovvqfovl") - .withContainerId("ywsuwsy")) - .withEtag("ndsytgadg"), - new ProtectableContainerResourceInner().withLocation("hckqqzqioxiy") - .withTags(mapOf("ynkedyatrwyhqmib", "i", "mnzgmwznmabi", "yhwitsmypyynpcdp", "wwrlkdmtncv", - "nsorgjhxbldt", "xdy", "kotl")) - .withProperties(new ProtectableContainer().withFriendlyName("jphuopxodlqi") - .withBackupManagementType(BackupManagementType.AZURE_STORAGE) - .withHealthStatus("rz") - .withContainerId("leosjswsrms")) - .withEtag("zrpzb"))); - model = BinaryData.fromObject(model).toObject(ProtectableContainerResourceList.class); - Assertions.assertEquals("nvpamq", model.nextLink()); - Assertions.assertEquals("xsdqrhzoymibmrqy", model.value().get(0).location()); - Assertions.assertEquals("hwflu", model.value().get(0).tags().get("zdtmhrkwofy")); - Assertions.assertEquals("zapvhelx", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.MAB, model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("yat", model.value().get(0).properties().healthStatus()); - Assertions.assertEquals("ckcb", model.value().get(0).properties().containerId()); - Assertions.assertEquals("ejrjxgciqibrho", model.value().get(0).etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("xitp", model.nextLink()); + Assertions.assertEquals("e", model.value().get(0).location()); + Assertions.assertEquals("jiriuxeg", model.value().get(0).tags().get("hortu")); + Assertions.assertEquals("wlpjfelqerppt", model.value().get(0).eTag()); + Assertions.assertEquals("qnzmnhiil", model.value().get(0).properties().friendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_STORAGE, + model.value().get(0).properties().backupManagementType()); + Assertions.assertEquals("cjgckbbcccgzpra", model.value().get(0).properties().healthStatus()); + Assertions.assertEquals("nyuffat", model.value().get(0).properties().containerId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainerTests.java index 31ee240d48a9..f3ad2a92e612 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,24 +13,11 @@ public final class ProtectableContainerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProtectableContainer model = BinaryData.fromString( - "{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"n\",\"backupManagementType\":\"MAB\",\"healthStatus\":\"xwczelpcire\",\"containerId\":\"feaenwab\"}") + "{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"uliyslpkcv\",\"backupManagementType\":\"AzureBackupServer\",\"healthStatus\":\"uxx\",\"containerId\":\"myw\"}") .toObject(ProtectableContainer.class); - Assertions.assertEquals("n", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); - Assertions.assertEquals("xwczelpcire", model.healthStatus()); - Assertions.assertEquals("feaenwab", model.containerId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProtectableContainer model = new ProtectableContainer().withFriendlyName("n") - .withBackupManagementType(BackupManagementType.MAB) - .withHealthStatus("xwczelpcire") - .withContainerId("feaenwab"); - model = BinaryData.fromObject(model).toObject(ProtectableContainer.class); - Assertions.assertEquals("n", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); - Assertions.assertEquals("xwczelpcire", model.healthStatus()); - Assertions.assertEquals("feaenwab", model.containerId()); + Assertions.assertEquals("uliyslpkcv", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); + Assertions.assertEquals("uxx", model.healthStatus()); + Assertions.assertEquals("myw", model.containerId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainersListMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainersListMockTests.java index 2b5762177d07..edcee510cdf8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainersListMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainersListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -23,7 +23,7 @@ public final class ProtectableContainersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"nwlslrcigtzjcvbx\",\"backupManagementType\":\"AzureWorkload\",\"healthStatus\":\"snsso\",\"containerId\":\"xpavid\"},\"eTag\":\"ev\",\"location\":\"ffcvvyezslpuxgcb\",\"tags\":{\"wtrkx\":\"alpnp\",\"yqvnjobfe\":\"pazwug\",\"aewzgiudjp\":\"hldiuhzzgqlm\"},\"id\":\"pqht\",\"name\":\"qhnmhk\",\"type\":\"ezsdsuxheq\"}]}"; + = "{\"value\":[{\"location\":\"kfnaoaqymhc\",\"tags\":{\"yhquhc\":\"puowyrnsk\",\"pxecxqnwhscozaw\":\"ygxvha\",\"knpwirfljf\":\"vgxsm\",\"aprhknqiijgencdg\":\"wxqouoxudnmc\"},\"eTag\":\"queqihk\",\"properties\":{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"wlt\",\"backupManagementType\":\"Invalid\",\"healthStatus\":\"hld\",\"containerId\":\"hieproq\"},\"id\":\"mfxm\",\"name\":\"vprstv\",\"type\":\"itbfjtdy\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,15 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.protectableContainers() - .list("qwtltngvmreupt", "klzmijajw", "l", "fsvagh", com.azure.core.util.Context.NONE); + .list("wgwima", "neakh", "mhobcyan", "fvqtvkhgvoo", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ffcvvyezslpuxgcb", response.iterator().next().location()); - Assertions.assertEquals("alpnp", response.iterator().next().tags().get("wtrkx")); - Assertions.assertEquals("nwlslrcigtzjcvbx", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, + Assertions.assertEquals("kfnaoaqymhc", response.iterator().next().location()); + Assertions.assertEquals("puowyrnsk", response.iterator().next().tags().get("yhquhc")); + Assertions.assertEquals("queqihk", response.iterator().next().eTag()); + Assertions.assertEquals("wlt", response.iterator().next().properties().friendlyName()); + Assertions.assertEquals(BackupManagementType.INVALID, response.iterator().next().properties().backupManagementType()); - Assertions.assertEquals("snsso", response.iterator().next().properties().healthStatus()); - Assertions.assertEquals("xpavid", response.iterator().next().properties().containerId()); - Assertions.assertEquals("ev", response.iterator().next().etag()); + Assertions.assertEquals("hld", response.iterator().next().properties().healthStatus()); + Assertions.assertEquals("hieproq", response.iterator().next().properties().containerId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemOperationResultsGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemOperationResultsGetWithResponseMockTests.java index 9cb14f2b1e90..d811ab63b0eb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemOperationResultsGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemOperationResultsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,6 +12,8 @@ import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; import com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItemResource; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanStatus; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanSummary; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -22,7 +24,7 @@ public final class ProtectedItemOperationResultsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"MAB\",\"workloadType\":\"Exchange\",\"containerName\":\"pgajsqjce\",\"sourceResourceId\":\"bmfuvqarwzxu\",\"policyId\":\"ebluimmbwx\",\"lastRecoveryPoint\":\"2021-02-13T06:59:43Z\",\"backupSetName\":\"dmbvxekraok\",\"createMode\":\"Invalid\",\"deferredDeleteTimeInUTC\":\"2021-10-14T10:27:54Z\",\"isScheduledForDeferredDelete\":false,\"deferredDeleteTimeRemaining\":\"aokbavlyttaaknwf\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"p\",\"ujd\",\"gatolekscbctnan\",\"imwbzxpdcldpk\"],\"isArchiveEnabled\":false,\"policyName\":\"nlaimouxwksqmudm\",\"softDeleteRetentionPeriodInDays\":856423365,\"vaultId\":\"bicziuswswj\"},\"eTag\":\"b\",\"location\":\"sjhbtq\",\"tags\":{\"yrfwbivq\":\"fs\",\"yqe\":\"ogfuyzwvbhlim\",\"odlikcdrdaasax\":\"r\",\"wiyjvzuko\":\"obsmf\"},\"id\":\"r\",\"name\":\"awn\",\"type\":\"zm\"}"; + = "{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"DefaultBackup\",\"workloadType\":\"SQLDB\",\"containerName\":\"gwhnkbtlwlj\",\"sourceResourceId\":\"mctsnldkpwo\",\"policyId\":\"isubxbteog\",\"lastRecoveryPoint\":\"2021-06-19T21:30:06Z\",\"backupSetName\":\"ij\",\"createMode\":\"Default\",\"deferredDeleteTimeInUTC\":\"2021-06-14T08:17:16Z\",\"isScheduledForDeferredDelete\":false,\"deferredDeleteTimeRemaining\":\"s\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":true,\"resourceGuardOperationRequests\":[\"pxgnmqvzvluyqq\",\"ios\",\"scyvaifppuacvf\"],\"isArchiveEnabled\":false,\"policyName\":\"psfx\",\"softDeleteRetentionPeriodInDays\":149702899,\"vaultId\":\"soy\",\"sourceSideScanInfo\":{\"sourceSideScanStatus\":\"NotConfigured\",\"sourceSideScanSummary\":\"Healthy\"}},\"tags\":{\"ou\":\"ttehdp\",\"enygnxcgjtfrnquk\":\"stkfvvdshxcdeds\"},\"location\":\"fnslnlrxsmy\",\"eTag\":\"rwntfm\",\"id\":\"g\",\"name\":\"jdxwnazkurrdre\",\"type\":\"zjwhsetwwjwz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,29 +34,33 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ProtectedItemResource response = manager.protectedItemOperationResults() - .getWithResponse("gvkvebaqszll", "zlsmmdqgmihzpim", "qrhnxtminkl", "gxsvtza", "hzvqnsqktcmbjwz", "oslpky", + .getWithResponse("minxojjluxxdh", "lzzdz", "qjm", "ezay", "vribqlotokht", "wtaznkcqw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("sjhbtq", response.location()); - Assertions.assertEquals("fs", response.tags().get("yrfwbivq")); - Assertions.assertEquals("pgajsqjce", response.properties().containerName()); - Assertions.assertEquals("bmfuvqarwzxu", response.properties().sourceResourceId()); - Assertions.assertEquals("ebluimmbwx", response.properties().policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-13T06:59:43Z"), + Assertions.assertEquals("gwhnkbtlwlj", response.properties().containerName()); + Assertions.assertEquals("mctsnldkpwo", response.properties().sourceResourceId()); + Assertions.assertEquals("isubxbteog", response.properties().policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T21:30:06Z"), response.properties().lastRecoveryPoint()); - Assertions.assertEquals("dmbvxekraok", response.properties().backupSetName()); - Assertions.assertEquals(CreateMode.INVALID, response.properties().createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-14T10:27:54Z"), + Assertions.assertEquals("ij", response.properties().backupSetName()); + Assertions.assertEquals(CreateMode.DEFAULT, response.properties().createMode()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-14T08:17:16Z"), response.properties().deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, response.properties().isScheduledForDeferredDelete()); - Assertions.assertEquals("aokbavlyttaaknwf", response.properties().deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, response.properties().isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, response.properties().isRehydrate()); - Assertions.assertEquals("p", response.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, response.properties().isArchiveEnabled()); - Assertions.assertEquals("nlaimouxwksqmudm", response.properties().policyName()); - Assertions.assertEquals(856423365, response.properties().softDeleteRetentionPeriod()); - Assertions.assertEquals("b", response.etag()); + Assertions.assertFalse(response.properties().isScheduledForDeferredDelete()); + Assertions.assertEquals("s", response.properties().deferredDeleteTimeRemaining()); + Assertions.assertTrue(response.properties().isDeferredDeleteScheduleUpcoming()); + Assertions.assertTrue(response.properties().isRehydrate()); + Assertions.assertEquals("pxgnmqvzvluyqq", response.properties().resourceGuardOperationRequests().get(0)); + Assertions.assertFalse(response.properties().isArchiveEnabled()); + Assertions.assertEquals("psfx", response.properties().policyName()); + Assertions.assertEquals(149702899, response.properties().softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.NOT_CONFIGURED, + response.properties().sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.HEALTHY, + response.properties().sourceSideScanInfo().sourceSideScanSummary()); + Assertions.assertEquals("ttehdp", response.tags().get("ou")); + Assertions.assertEquals("fnslnlrxsmy", response.location()); + Assertions.assertEquals("rwntfm", response.etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemResourceInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemResourceInnerTests.java index 7fbd9b4dd22f..88c989bb0fb8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemResourceInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemResourceInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -8,6 +8,9 @@ import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectedItemResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItem; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanInfo; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanStatus; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanSummary; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; @@ -18,69 +21,80 @@ public final class ProtectedItemResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProtectedItemResourceInner model = BinaryData.fromString( - "{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"AzureWorkload\",\"workloadType\":\"SQLDataBase\",\"containerName\":\"pjhvmdajvnys\",\"sourceResourceId\":\"nqecanoaeup\",\"policyId\":\"yhltrpmopjmcm\",\"lastRecoveryPoint\":\"2020-12-22T02:02:43Z\",\"backupSetName\":\"kthfui\",\"createMode\":\"Recover\",\"deferredDeleteTimeInUTC\":\"2021-10-17T19:18:45Z\",\"isScheduledForDeferredDelete\":false,\"deferredDeleteTimeRemaining\":\"kvxod\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":true,\"resourceGuardOperationRequests\":[\"ydagfuaxbe\",\"yiuokktwh\",\"dxwzywqsmbsurexi\",\"o\"],\"isArchiveEnabled\":false,\"policyName\":\"fsfksymddyst\",\"softDeleteRetentionPeriodInDays\":980316888,\"vaultId\":\"xhqyudxorrqnb\"},\"eTag\":\"czvyifq\",\"location\":\"vkd\",\"tags\":{\"vvdfwatkpnpul\":\"llr\"},\"id\":\"xxbczwtr\",\"name\":\"wiqzbqjvsovmyo\",\"type\":\"acspkwl\"}") + "{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"Invalid\",\"workloadType\":\"SAPAseDatabase\",\"containerName\":\"ionpimexg\",\"sourceResourceId\":\"xgcp\",\"policyId\":\"gmaajrm\",\"lastRecoveryPoint\":\"2021-03-11T04:53:43Z\",\"backupSetName\":\"zrlovmclwhijcoej\",\"createMode\":\"Recover\",\"deferredDeleteTimeInUTC\":\"2021-04-06T12:53:23Z\",\"isScheduledForDeferredDelete\":false,\"deferredDeleteTimeRemaining\":\"sycbkbfk\",\"isDeferredDeleteScheduleUpcoming\":false,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"xppofmxaxcfjp\",\"ddtocjjxhvp\"],\"isArchiveEnabled\":false,\"policyName\":\"xhdzxibqeojnx\",\"softDeleteRetentionPeriodInDays\":2010157167,\"vaultId\":\"ddntwndei\",\"sourceSideScanInfo\":{\"sourceSideScanStatus\":\"Configured\",\"sourceSideScanSummary\":\"Suspicious\"}},\"tags\":{\"cffcyddglmj\":\"oqvuhr\",\"wpyeicxmqciwqvh\":\"hjq\"},\"location\":\"ixuigdtopbobj\",\"eTag\":\"hm\",\"id\":\"u\",\"name\":\"m\",\"type\":\"uhrzayvvt\"}") .toObject(ProtectedItemResourceInner.class); - Assertions.assertEquals("vkd", model.location()); - Assertions.assertEquals("llr", model.tags().get("vvdfwatkpnpul")); - Assertions.assertEquals("pjhvmdajvnys", model.properties().containerName()); - Assertions.assertEquals("nqecanoaeup", model.properties().sourceResourceId()); - Assertions.assertEquals("yhltrpmopjmcm", model.properties().policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-22T02:02:43Z"), model.properties().lastRecoveryPoint()); - Assertions.assertEquals("kthfui", model.properties().backupSetName()); + Assertions.assertEquals("ionpimexg", model.properties().containerName()); + Assertions.assertEquals("xgcp", model.properties().sourceResourceId()); + Assertions.assertEquals("gmaajrm", model.properties().policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-11T04:53:43Z"), model.properties().lastRecoveryPoint()); + Assertions.assertEquals("zrlovmclwhijcoej", model.properties().backupSetName()); Assertions.assertEquals(CreateMode.RECOVER, model.properties().createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-17T19:18:45Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T12:53:23Z"), model.properties().deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.properties().isScheduledForDeferredDelete()); - Assertions.assertEquals("kvxod", model.properties().deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.properties().isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(true, model.properties().isRehydrate()); - Assertions.assertEquals("ydagfuaxbe", model.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.properties().isArchiveEnabled()); - Assertions.assertEquals("fsfksymddyst", model.properties().policyName()); - Assertions.assertEquals(980316888, model.properties().softDeleteRetentionPeriod()); - Assertions.assertEquals("czvyifq", model.etag()); + Assertions.assertFalse(model.properties().isScheduledForDeferredDelete()); + Assertions.assertEquals("sycbkbfk", model.properties().deferredDeleteTimeRemaining()); + Assertions.assertFalse(model.properties().isDeferredDeleteScheduleUpcoming()); + Assertions.assertFalse(model.properties().isRehydrate()); + Assertions.assertEquals("xppofmxaxcfjp", model.properties().resourceGuardOperationRequests().get(0)); + Assertions.assertFalse(model.properties().isArchiveEnabled()); + Assertions.assertEquals("xhdzxibqeojnx", model.properties().policyName()); + Assertions.assertEquals(2010157167, model.properties().softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.CONFIGURED, + model.properties().sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.SUSPICIOUS, + model.properties().sourceSideScanInfo().sourceSideScanSummary()); + Assertions.assertEquals("oqvuhr", model.tags().get("cffcyddglmj")); + Assertions.assertEquals("ixuigdtopbobj", model.location()); + Assertions.assertEquals("hm", model.etag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProtectedItemResourceInner model = new ProtectedItemResourceInner().withLocation("vkd") - .withTags(mapOf("vvdfwatkpnpul", "llr")) - .withProperties(new ProtectedItem().withContainerName("pjhvmdajvnys") - .withSourceResourceId("nqecanoaeup") - .withPolicyId("yhltrpmopjmcm") - .withLastRecoveryPoint(OffsetDateTime.parse("2020-12-22T02:02:43Z")) - .withBackupSetName("kthfui") - .withCreateMode(CreateMode.RECOVER) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-10-17T19:18:45Z")) - .withIsScheduledForDeferredDelete(false) - .withDeferredDeleteTimeRemaining("kvxod") - .withIsDeferredDeleteScheduleUpcoming(true) - .withIsRehydrate(true) - .withResourceGuardOperationRequests(Arrays.asList("ydagfuaxbe", "yiuokktwh", "dxwzywqsmbsurexi", "o")) - .withIsArchiveEnabled(false) - .withPolicyName("fsfksymddyst") - .withSoftDeleteRetentionPeriod(980316888)) - .withEtag("czvyifq"); + ProtectedItemResourceInner model = new ProtectedItemResourceInner().withProperties(new ProtectedItem() + .withContainerName("ionpimexg") + .withSourceResourceId("xgcp") + .withPolicyId("gmaajrm") + .withLastRecoveryPoint(OffsetDateTime.parse("2021-03-11T04:53:43Z")) + .withBackupSetName("zrlovmclwhijcoej") + .withCreateMode(CreateMode.RECOVER) + .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-04-06T12:53:23Z")) + .withIsScheduledForDeferredDelete(false) + .withDeferredDeleteTimeRemaining("sycbkbfk") + .withIsDeferredDeleteScheduleUpcoming(false) + .withIsRehydrate(false) + .withResourceGuardOperationRequests(Arrays.asList("xppofmxaxcfjp", "ddtocjjxhvp")) + .withIsArchiveEnabled(false) + .withPolicyName("xhdzxibqeojnx") + .withSoftDeleteRetentionPeriodInDays(2010157167) + .withSourceSideScanInfo(new SourceSideScanInfo().withSourceSideScanStatus(SourceSideScanStatus.CONFIGURED) + .withSourceSideScanSummary(SourceSideScanSummary.SUSPICIOUS))) + .withTags(mapOf("cffcyddglmj", "oqvuhr", "wpyeicxmqciwqvh", "hjq")) + .withLocation("ixuigdtopbobj") + .withEtag("hm"); model = BinaryData.fromObject(model).toObject(ProtectedItemResourceInner.class); - Assertions.assertEquals("vkd", model.location()); - Assertions.assertEquals("llr", model.tags().get("vvdfwatkpnpul")); - Assertions.assertEquals("pjhvmdajvnys", model.properties().containerName()); - Assertions.assertEquals("nqecanoaeup", model.properties().sourceResourceId()); - Assertions.assertEquals("yhltrpmopjmcm", model.properties().policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-22T02:02:43Z"), model.properties().lastRecoveryPoint()); - Assertions.assertEquals("kthfui", model.properties().backupSetName()); + Assertions.assertEquals("ionpimexg", model.properties().containerName()); + Assertions.assertEquals("xgcp", model.properties().sourceResourceId()); + Assertions.assertEquals("gmaajrm", model.properties().policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-11T04:53:43Z"), model.properties().lastRecoveryPoint()); + Assertions.assertEquals("zrlovmclwhijcoej", model.properties().backupSetName()); Assertions.assertEquals(CreateMode.RECOVER, model.properties().createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-17T19:18:45Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T12:53:23Z"), model.properties().deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.properties().isScheduledForDeferredDelete()); - Assertions.assertEquals("kvxod", model.properties().deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.properties().isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(true, model.properties().isRehydrate()); - Assertions.assertEquals("ydagfuaxbe", model.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.properties().isArchiveEnabled()); - Assertions.assertEquals("fsfksymddyst", model.properties().policyName()); - Assertions.assertEquals(980316888, model.properties().softDeleteRetentionPeriod()); - Assertions.assertEquals("czvyifq", model.etag()); + Assertions.assertFalse(model.properties().isScheduledForDeferredDelete()); + Assertions.assertEquals("sycbkbfk", model.properties().deferredDeleteTimeRemaining()); + Assertions.assertFalse(model.properties().isDeferredDeleteScheduleUpcoming()); + Assertions.assertFalse(model.properties().isRehydrate()); + Assertions.assertEquals("xppofmxaxcfjp", model.properties().resourceGuardOperationRequests().get(0)); + Assertions.assertFalse(model.properties().isArchiveEnabled()); + Assertions.assertEquals("xhdzxibqeojnx", model.properties().policyName()); + Assertions.assertEquals(2010157167, model.properties().softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.CONFIGURED, + model.properties().sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.SUSPICIOUS, + model.properties().sourceSideScanInfo().sourceSideScanSummary()); + Assertions.assertEquals("oqvuhr", model.tags().get("cffcyddglmj")); + Assertions.assertEquals("ixuigdtopbobj", model.location()); + Assertions.assertEquals("hm", model.etag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemResourceListTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemResourceListTests.java index 9bf57ce00986..d913cdfc9d8e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemResourceListTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemResourceListTests.java @@ -1,125 +1,48 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectedItemResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectedItemResourceList; import com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItemResourceList; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanStatus; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanSummary; import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class ProtectedItemResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProtectedItemResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"AzureWorkload\",\"workloadType\":\"Sharepoint\",\"containerName\":\"y\",\"sourceResourceId\":\"pvgqzcjrvxdjzlm\",\"policyId\":\"xkvugfhzov\",\"lastRecoveryPoint\":\"2021-04-06T17:45:34Z\",\"backupSetName\":\"zunlu\",\"createMode\":\"Invalid\",\"deferredDeleteTimeInUTC\":\"2021-01-21T11:08:17Z\",\"isScheduledForDeferredDelete\":false,\"deferredDeleteTimeRemaining\":\"i\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"uaejxdultsk\",\"bbtdzumvee\"],\"isArchiveEnabled\":false,\"policyName\":\"ozuhkfp\",\"softDeleteRetentionPeriodInDays\":1369679233,\"vaultId\":\"ofd\"},\"eTag\":\"uusdttouwa\",\"location\":\"oekqvk\",\"tags\":{\"xwyjsflhhc\":\"smv\",\"ixisxyawjoy\":\"aln\",\"yexz\":\"qcslyjpkiid\"},\"id\":\"eli\",\"name\":\"hnrztfol\",\"type\":\"bnxknalaulppg\"},{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"Invalid\",\"workloadType\":\"AzureFileShare\",\"containerName\":\"nyiropuhpi\",\"sourceResourceId\":\"pgylg\",\"policyId\":\"itxmedjvcslynqww\",\"lastRecoveryPoint\":\"2021-09-17T17:00:46Z\",\"backupSetName\":\"zhxgktrmgucn\",\"createMode\":\"Recover\",\"deferredDeleteTimeInUTC\":\"2021-05-25T00:20:27Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"lwptfdy\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"ceopzfqrhhuaopp\"],\"isArchiveEnabled\":false,\"policyName\":\"qxolzdahzx\",\"softDeleteRetentionPeriodInDays\":792773086,\"vaultId\":\"gbkdmoizpos\"},\"eTag\":\"grcfb\",\"location\":\"nrmfqjhhk\",\"tags\":{\"vkr\":\"vjymjhxxjyngud\",\"szjfauvjfdxxivet\":\"swbxqz\",\"qaqtdoqmcbxvwvxy\":\"t\",\"obl\":\"lqbhsf\"},\"id\":\"tkblmpewww\",\"name\":\"bkrvrnsvshqj\",\"type\":\"hxcr\"}],\"nextLink\":\"fovasr\"}") + "{\"value\":[{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"AzureSql\",\"workloadType\":\"Invalid\",\"containerName\":\"xs\",\"sourceResourceId\":\"jhqkbiwetpozy\",\"policyId\":\"qiqyhgfsetzlexbs\",\"lastRecoveryPoint\":\"2021-11-26T17:22:15Z\",\"backupSetName\":\"ynojpziuw\",\"createMode\":\"Default\",\"deferredDeleteTimeInUTC\":\"2021-04-01T20:47:50Z\",\"isScheduledForDeferredDelete\":false,\"deferredDeleteTimeRemaining\":\"hqsycljselp\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"fhlbylccbev\",\"rhyzdf\"],\"isArchiveEnabled\":false,\"policyName\":\"fplt\",\"softDeleteRetentionPeriodInDays\":1573282986,\"vaultId\":\"irrhv\",\"sourceSideScanInfo\":{\"sourceSideScanStatus\":\"NotApplicable\",\"sourceSideScanSummary\":\"Healthy\"}},\"tags\":{\"wsigrbjbxsj\":\"pqigtuujwouhd\"},\"location\":\"vitvqkjyaz\",\"eTag\":\"mtggmu\",\"id\":\"ch\",\"name\":\"zfnkfexlvxno\",\"type\":\"kizvoa\"},{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"MAB\",\"workloadType\":\"VMwareVM\",\"containerName\":\"uwiguyxlyk\",\"sourceResourceId\":\"hvxzcwxhmp\",\"policyId\":\"tl\",\"lastRecoveryPoint\":\"2021-05-01T06:39:40Z\",\"backupSetName\":\"onwivkcqhrxhxkn\",\"createMode\":\"Invalid\",\"deferredDeleteTimeInUTC\":\"2021-10-06T09:15:33Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"upijubyqjfkakfq\",\"isDeferredDeleteScheduleUpcoming\":false,\"isRehydrate\":true,\"resourceGuardOperationRequests\":[\"ldudxjascowv\"],\"isArchiveEnabled\":true,\"policyName\":\"pdxphlkksnmgzvyf\",\"softDeleteRetentionPeriodInDays\":562287407,\"vaultId\":\"zuqnwsithuqo\",\"sourceSideScanInfo\":{\"sourceSideScanStatus\":\"Configured\",\"sourceSideScanSummary\":\"Healthy\"}},\"tags\":{\"ezvqq\":\"qulsutrjbhxykfhy\",\"rftb\":\"g\",\"reuquowtljvf\":\"ve\",\"yxvrqtvbczsul\":\"hreagk\"},\"location\":\"gglmepjpfsey\",\"eTag\":\"sa\",\"id\":\"psznga\",\"name\":\"p\",\"type\":\"ylkvecjuj\"}],\"nextLink\":\"goadyedmzr\"}") .toObject(ProtectedItemResourceList.class); - Assertions.assertEquals("fovasr", model.nextLink()); - Assertions.assertEquals("oekqvk", model.value().get(0).location()); - Assertions.assertEquals("smv", model.value().get(0).tags().get("xwyjsflhhc")); - Assertions.assertEquals("y", model.value().get(0).properties().containerName()); - Assertions.assertEquals("pvgqzcjrvxdjzlm", model.value().get(0).properties().sourceResourceId()); - Assertions.assertEquals("xkvugfhzov", model.value().get(0).properties().policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T17:45:34Z"), + Assertions.assertEquals("goadyedmzr", model.nextLink()); + Assertions.assertEquals("xs", model.value().get(0).properties().containerName()); + Assertions.assertEquals("jhqkbiwetpozy", model.value().get(0).properties().sourceResourceId()); + Assertions.assertEquals("qiqyhgfsetzlexbs", model.value().get(0).properties().policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-26T17:22:15Z"), model.value().get(0).properties().lastRecoveryPoint()); - Assertions.assertEquals("zunlu", model.value().get(0).properties().backupSetName()); - Assertions.assertEquals(CreateMode.INVALID, model.value().get(0).properties().createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-21T11:08:17Z"), + Assertions.assertEquals("ynojpziuw", model.value().get(0).properties().backupSetName()); + Assertions.assertEquals(CreateMode.DEFAULT, model.value().get(0).properties().createMode()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-01T20:47:50Z"), model.value().get(0).properties().deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.value().get(0).properties().isScheduledForDeferredDelete()); - Assertions.assertEquals("i", model.value().get(0).properties().deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.value().get(0).properties().isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, model.value().get(0).properties().isRehydrate()); - Assertions.assertEquals("uaejxdultsk", + Assertions.assertFalse(model.value().get(0).properties().isScheduledForDeferredDelete()); + Assertions.assertEquals("hqsycljselp", model.value().get(0).properties().deferredDeleteTimeRemaining()); + Assertions.assertTrue(model.value().get(0).properties().isDeferredDeleteScheduleUpcoming()); + Assertions.assertFalse(model.value().get(0).properties().isRehydrate()); + Assertions.assertEquals("fhlbylccbev", model.value().get(0).properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.value().get(0).properties().isArchiveEnabled()); - Assertions.assertEquals("ozuhkfp", model.value().get(0).properties().policyName()); - Assertions.assertEquals(1369679233, model.value().get(0).properties().softDeleteRetentionPeriod()); - Assertions.assertEquals("uusdttouwa", model.value().get(0).etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProtectedItemResourceList model = new ProtectedItemResourceList().withNextLink("fovasr") - .withValue(Arrays.asList( - new ProtectedItemResourceInner().withLocation("oekqvk") - .withTags(mapOf("xwyjsflhhc", "smv", "ixisxyawjoy", "aln", "yexz", "qcslyjpkiid")) - .withProperties(new ProtectedItem().withContainerName("y") - .withSourceResourceId("pvgqzcjrvxdjzlm") - .withPolicyId("xkvugfhzov") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-04-06T17:45:34Z")) - .withBackupSetName("zunlu") - .withCreateMode(CreateMode.INVALID) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-01-21T11:08:17Z")) - .withIsScheduledForDeferredDelete(false) - .withDeferredDeleteTimeRemaining("i") - .withIsDeferredDeleteScheduleUpcoming(true) - .withIsRehydrate(false) - .withResourceGuardOperationRequests(Arrays.asList("uaejxdultsk", "bbtdzumvee")) - .withIsArchiveEnabled(false) - .withPolicyName("ozuhkfp") - .withSoftDeleteRetentionPeriod(1369679233)) - .withEtag("uusdttouwa"), - new ProtectedItemResourceInner().withLocation("nrmfqjhhk") - .withTags(mapOf("vkr", "vjymjhxxjyngud", "szjfauvjfdxxivet", "swbxqz", "qaqtdoqmcbxvwvxy", "t", - "obl", "lqbhsf")) - .withProperties(new ProtectedItem().withContainerName("nyiropuhpi") - .withSourceResourceId("pgylg") - .withPolicyId("itxmedjvcslynqww") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-09-17T17:00:46Z")) - .withBackupSetName("zhxgktrmgucn") - .withCreateMode(CreateMode.RECOVER) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-05-25T00:20:27Z")) - .withIsScheduledForDeferredDelete(true) - .withDeferredDeleteTimeRemaining("lwptfdy") - .withIsDeferredDeleteScheduleUpcoming(true) - .withIsRehydrate(false) - .withResourceGuardOperationRequests(Arrays.asList("ceopzfqrhhuaopp")) - .withIsArchiveEnabled(false) - .withPolicyName("qxolzdahzx") - .withSoftDeleteRetentionPeriod(792773086)) - .withEtag("grcfb"))); - model = BinaryData.fromObject(model).toObject(ProtectedItemResourceList.class); - Assertions.assertEquals("fovasr", model.nextLink()); - Assertions.assertEquals("oekqvk", model.value().get(0).location()); - Assertions.assertEquals("smv", model.value().get(0).tags().get("xwyjsflhhc")); - Assertions.assertEquals("y", model.value().get(0).properties().containerName()); - Assertions.assertEquals("pvgqzcjrvxdjzlm", model.value().get(0).properties().sourceResourceId()); - Assertions.assertEquals("xkvugfhzov", model.value().get(0).properties().policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T17:45:34Z"), - model.value().get(0).properties().lastRecoveryPoint()); - Assertions.assertEquals("zunlu", model.value().get(0).properties().backupSetName()); - Assertions.assertEquals(CreateMode.INVALID, model.value().get(0).properties().createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-21T11:08:17Z"), - model.value().get(0).properties().deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.value().get(0).properties().isScheduledForDeferredDelete()); - Assertions.assertEquals("i", model.value().get(0).properties().deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.value().get(0).properties().isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, model.value().get(0).properties().isRehydrate()); - Assertions.assertEquals("uaejxdultsk", - model.value().get(0).properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.value().get(0).properties().isArchiveEnabled()); - Assertions.assertEquals("ozuhkfp", model.value().get(0).properties().policyName()); - Assertions.assertEquals(1369679233, model.value().get(0).properties().softDeleteRetentionPeriod()); - Assertions.assertEquals("uusdttouwa", model.value().get(0).etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertFalse(model.value().get(0).properties().isArchiveEnabled()); + Assertions.assertEquals("fplt", model.value().get(0).properties().policyName()); + Assertions.assertEquals(1573282986, model.value().get(0).properties().softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.NOT_APPLICABLE, + model.value().get(0).properties().sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.HEALTHY, + model.value().get(0).properties().sourceSideScanInfo().sourceSideScanSummary()); + Assertions.assertEquals("pqigtuujwouhd", model.value().get(0).tags().get("wsigrbjbxsj")); + Assertions.assertEquals("vitvqkjyaz", model.value().get(0).location()); + Assertions.assertEquals("mtggmu", model.value().get(0).etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemTests.java index 838c989009cb..8414bc70d841 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemTests.java @@ -1,12 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItem; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanInfo; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanStatus; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanSummary; import java.time.OffsetDateTime; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -15,57 +18,66 @@ public final class ProtectedItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProtectedItem model = BinaryData.fromString( - "{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"AzureBackupServer\",\"workloadType\":\"Sharepoint\",\"containerName\":\"xjmflbvv\",\"sourceResourceId\":\"hrk\",\"policyId\":\"iwwzjuqk\",\"lastRecoveryPoint\":\"2021-05-03T11:30:29Z\",\"backupSetName\":\"jiwkuofoskghsau\",\"createMode\":\"Invalid\",\"deferredDeleteTimeInUTC\":\"2021-01-11T01:27:45Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"eduugi\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":true,\"resourceGuardOperationRequests\":[\"y\"],\"isArchiveEnabled\":true,\"policyName\":\"e\",\"softDeleteRetentionPeriodInDays\":981492544,\"vaultId\":\"npc\"}") + "{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"MAB\",\"workloadType\":\"Invalid\",\"containerName\":\"iotkftutqxl\",\"sourceResourceId\":\"xlefgugnxkrx\",\"policyId\":\"mi\",\"lastRecoveryPoint\":\"2021-12-07T02:37:39Z\",\"backupSetName\":\"zrvqdr\",\"createMode\":\"Default\",\"deferredDeleteTimeInUTC\":\"2021-09-24T23:35:33Z\",\"isScheduledForDeferredDelete\":false,\"deferredDeleteTimeRemaining\":\"ehoqfbowskan\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":true,\"resourceGuardOperationRequests\":[\"iywgqywgndrvynh\"],\"isArchiveEnabled\":true,\"policyName\":\"hrc\",\"softDeleteRetentionPeriodInDays\":485990541,\"vaultId\":\"ocpecfvmmco\",\"sourceSideScanInfo\":{\"sourceSideScanStatus\":\"NotApplicable\",\"sourceSideScanSummary\":\"NotApplicable\"}}") .toObject(ProtectedItem.class); - Assertions.assertEquals("xjmflbvv", model.containerName()); - Assertions.assertEquals("hrk", model.sourceResourceId()); - Assertions.assertEquals("iwwzjuqk", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-03T11:30:29Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("jiwkuofoskghsau", model.backupSetName()); - Assertions.assertEquals(CreateMode.INVALID, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-11T01:27:45Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(true, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("eduugi", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(true, model.isRehydrate()); - Assertions.assertEquals("y", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.isArchiveEnabled()); - Assertions.assertEquals("e", model.policyName()); - Assertions.assertEquals(981492544, model.softDeleteRetentionPeriod()); + Assertions.assertEquals("iotkftutqxl", model.containerName()); + Assertions.assertEquals("xlefgugnxkrx", model.sourceResourceId()); + Assertions.assertEquals("mi", model.policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-07T02:37:39Z"), model.lastRecoveryPoint()); + Assertions.assertEquals("zrvqdr", model.backupSetName()); + Assertions.assertEquals(CreateMode.DEFAULT, model.createMode()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-24T23:35:33Z"), model.deferredDeleteTimeInUtc()); + Assertions.assertFalse(model.isScheduledForDeferredDelete()); + Assertions.assertEquals("ehoqfbowskan", model.deferredDeleteTimeRemaining()); + Assertions.assertTrue(model.isDeferredDeleteScheduleUpcoming()); + Assertions.assertTrue(model.isRehydrate()); + Assertions.assertEquals("iywgqywgndrvynh", model.resourceGuardOperationRequests().get(0)); + Assertions.assertTrue(model.isArchiveEnabled()); + Assertions.assertEquals("hrc", model.policyName()); + Assertions.assertEquals(485990541, model.softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.NOT_APPLICABLE, model.sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.NOT_APPLICABLE, + model.sourceSideScanInfo().sourceSideScanSummary()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProtectedItem model = new ProtectedItem().withContainerName("xjmflbvv") - .withSourceResourceId("hrk") - .withPolicyId("iwwzjuqk") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-05-03T11:30:29Z")) - .withBackupSetName("jiwkuofoskghsau") - .withCreateMode(CreateMode.INVALID) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-01-11T01:27:45Z")) - .withIsScheduledForDeferredDelete(true) - .withDeferredDeleteTimeRemaining("eduugi") + ProtectedItem model = new ProtectedItem().withContainerName("iotkftutqxl") + .withSourceResourceId("xlefgugnxkrx") + .withPolicyId("mi") + .withLastRecoveryPoint(OffsetDateTime.parse("2021-12-07T02:37:39Z")) + .withBackupSetName("zrvqdr") + .withCreateMode(CreateMode.DEFAULT) + .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-09-24T23:35:33Z")) + .withIsScheduledForDeferredDelete(false) + .withDeferredDeleteTimeRemaining("ehoqfbowskan") .withIsDeferredDeleteScheduleUpcoming(true) .withIsRehydrate(true) - .withResourceGuardOperationRequests(Arrays.asList("y")) + .withResourceGuardOperationRequests(Arrays.asList("iywgqywgndrvynh")) .withIsArchiveEnabled(true) - .withPolicyName("e") - .withSoftDeleteRetentionPeriod(981492544); + .withPolicyName("hrc") + .withSoftDeleteRetentionPeriodInDays(485990541) + .withSourceSideScanInfo( + new SourceSideScanInfo().withSourceSideScanStatus(SourceSideScanStatus.NOT_APPLICABLE) + .withSourceSideScanSummary(SourceSideScanSummary.NOT_APPLICABLE)); model = BinaryData.fromObject(model).toObject(ProtectedItem.class); - Assertions.assertEquals("xjmflbvv", model.containerName()); - Assertions.assertEquals("hrk", model.sourceResourceId()); - Assertions.assertEquals("iwwzjuqk", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-03T11:30:29Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("jiwkuofoskghsau", model.backupSetName()); - Assertions.assertEquals(CreateMode.INVALID, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-11T01:27:45Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(true, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("eduugi", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(true, model.isRehydrate()); - Assertions.assertEquals("y", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.isArchiveEnabled()); - Assertions.assertEquals("e", model.policyName()); - Assertions.assertEquals(981492544, model.softDeleteRetentionPeriod()); + Assertions.assertEquals("iotkftutqxl", model.containerName()); + Assertions.assertEquals("xlefgugnxkrx", model.sourceResourceId()); + Assertions.assertEquals("mi", model.policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-07T02:37:39Z"), model.lastRecoveryPoint()); + Assertions.assertEquals("zrvqdr", model.backupSetName()); + Assertions.assertEquals(CreateMode.DEFAULT, model.createMode()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-24T23:35:33Z"), model.deferredDeleteTimeInUtc()); + Assertions.assertFalse(model.isScheduledForDeferredDelete()); + Assertions.assertEquals("ehoqfbowskan", model.deferredDeleteTimeRemaining()); + Assertions.assertTrue(model.isDeferredDeleteScheduleUpcoming()); + Assertions.assertTrue(model.isRehydrate()); + Assertions.assertEquals("iywgqywgndrvynh", model.resourceGuardOperationRequests().get(0)); + Assertions.assertTrue(model.isArchiveEnabled()); + Assertions.assertEquals("hrc", model.policyName()); + Assertions.assertEquals(485990541, model.softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.NOT_APPLICABLE, model.sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.NOT_APPLICABLE, + model.sourceSideScanInfo().sourceSideScanSummary()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsCreateOrUpdateMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..7a21f142ab98 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsCreateOrUpdateMockTests.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; +import com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode; +import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItem; +import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItemResource; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanInfo; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanStatus; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanSummary; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ProtectedItemsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"MAB\",\"workloadType\":\"SQLDataBase\",\"containerName\":\"mskdch\",\"sourceResourceId\":\"iubavlzwpvgm\",\"policyId\":\"lkzazmgok\",\"lastRecoveryPoint\":\"2021-02-16T20:34:57Z\",\"backupSetName\":\"qafkmkrokzrth\",\"createMode\":\"Default\",\"deferredDeleteTimeInUTC\":\"2021-05-02T21:02:12Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"vaozn\",\"isDeferredDeleteScheduleUpcoming\":false,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"eagmceituug\",\"dhfpjstlzmbl\",\"yjdeolctaebfs\",\"rledjcu\"],\"isArchiveEnabled\":false,\"policyName\":\"tqi\",\"softDeleteRetentionPeriodInDays\":272961138,\"vaultId\":\"vsgeafgf\",\"sourceSideScanInfo\":{\"sourceSideScanStatus\":\"NotApplicable\",\"sourceSideScanSummary\":\"Suspicious\"}},\"tags\":{\"waaeskyfjl\":\"xezppk\",\"pq\":\"zeqtoyrplixlajml\",\"btmkekxpkzwaq\":\"evhamfowg\"},\"location\":\"fqovc\",\"eTag\":\"qbplvfiduszte\",\"id\":\"byjgmsfepx\",\"name\":\"ihpq\",\"type\":\"dagrhrdicxdw\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + RecoveryServicesBackupManager manager = RecoveryServicesBackupManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ProtectedItemResource response = manager.protectedItems() + .define("yj") + .withExistingProtectionContainer("qjilaywkdcwmqsyr", "lmhxdqaolfylnk", "bjpjvlyw", "tmfwobbjwhl") + .withRegion("smz") + .withTags(mapOf("u", "ghyksarcdrnxs", "fdqqjwkrhwz", "lzladltxkpbqh", "ztjctibpvbkae", "anojisgglmvokat")) + .withProperties(new ProtectedItem().withContainerName("dzgczeuntgxdnca") + .withSourceResourceId("tiekoifuvnyttz") + .withPolicyId("xgyrihlgmgbehlqt") + .withLastRecoveryPoint(OffsetDateTime.parse("2021-11-06T16:43:25Z")) + .withBackupSetName("lkndrndpgfjodh") + .withCreateMode(CreateMode.INVALID) + .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-05-28T21:39:18Z")) + .withIsScheduledForDeferredDelete(false) + .withDeferredDeleteTimeRemaining("ipxwgsabvcipo") + .withIsDeferredDeleteScheduleUpcoming(false) + .withIsRehydrate(true) + .withResourceGuardOperationRequests(Arrays.asList("umljcirvpef", "cdveititj", "s", "zaj")) + .withIsArchiveEnabled(true) + .withPolicyName("hwjuyxxbxqvmvua") + .withSoftDeleteRetentionPeriodInDays(1061051615) + .withSourceSideScanInfo( + new SourceSideScanInfo().withSourceSideScanStatus(SourceSideScanStatus.NOT_CONFIGURED) + .withSourceSideScanSummary(SourceSideScanSummary.NOT_APPLICABLE))) + .withEtag("dfwakwseivmak") + .create(); + + Assertions.assertEquals("mskdch", response.properties().containerName()); + Assertions.assertEquals("iubavlzwpvgm", response.properties().sourceResourceId()); + Assertions.assertEquals("lkzazmgok", response.properties().policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-16T20:34:57Z"), + response.properties().lastRecoveryPoint()); + Assertions.assertEquals("qafkmkrokzrth", response.properties().backupSetName()); + Assertions.assertEquals(CreateMode.DEFAULT, response.properties().createMode()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-02T21:02:12Z"), + response.properties().deferredDeleteTimeInUtc()); + Assertions.assertTrue(response.properties().isScheduledForDeferredDelete()); + Assertions.assertEquals("vaozn", response.properties().deferredDeleteTimeRemaining()); + Assertions.assertFalse(response.properties().isDeferredDeleteScheduleUpcoming()); + Assertions.assertFalse(response.properties().isRehydrate()); + Assertions.assertEquals("eagmceituug", response.properties().resourceGuardOperationRequests().get(0)); + Assertions.assertFalse(response.properties().isArchiveEnabled()); + Assertions.assertEquals("tqi", response.properties().policyName()); + Assertions.assertEquals(272961138, response.properties().softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.NOT_APPLICABLE, + response.properties().sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.SUSPICIOUS, + response.properties().sourceSideScanInfo().sourceSideScanSummary()); + Assertions.assertEquals("xezppk", response.tags().get("waaeskyfjl")); + Assertions.assertEquals("fqovc", response.location()); + Assertions.assertEquals("qbplvfiduszte", response.etag()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsCreateOrUpdateWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 765d53e365cc..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItemResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ProtectedItemsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"AzureStorage\",\"workloadType\":\"SQLDB\",\"containerName\":\"g\",\"sourceResourceId\":\"quv\",\"policyId\":\"gglpmcrdcuelj\",\"lastRecoveryPoint\":\"2021-09-29T07:33:04Z\",\"backupSetName\":\"xmfqryarvsxzqbg\",\"createMode\":\"Invalid\",\"deferredDeleteTimeInUTC\":\"2021-03-31T05:28:16Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"thzodubtlmjtgbl\",\"isDeferredDeleteScheduleUpcoming\":false,\"isRehydrate\":true,\"resourceGuardOperationRequests\":[\"kmfd\",\"xyxgbkkqv\",\"cteoedlrslsk\",\"zpxvjnzdpvoc\"],\"isArchiveEnabled\":true,\"policyName\":\"cnabxzf\",\"softDeleteRetentionPeriodInDays\":1683245202,\"vaultId\":\"ytexvzilmhivzk\"},\"eTag\":\"wncknr\",\"location\":\"dajlskzpt\",\"tags\":{\"cyrthxqlehm\":\"lwe\",\"inue\":\"gcj\",\"vfejvqnttmbqda\":\"oka\"},\"id\":\"zfivfokpysthhzag\",\"name\":\"fwy\",\"type\":\"rlhgenuze\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - RecoveryServicesBackupManager manager = RecoveryServicesBackupManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - ProtectedItemResource response = manager.protectedItems() - .define("xegqphr") - .withRegion("dbzsx") - .withExistingProtectionContainer("punettepdjxq", "skoynuiylpc", "aewse", "vesk") - .withTags(mapOf("pcbbprtugav", "qrs", "fogdrtbfcm", "zbcyksiv", "mb", "rftsjcwjjxs", "xkecifhocj", "wvif")) - .withProperties(new ProtectedItem().withContainerName("mjtsgh") - .withSourceResourceId("c") - .withPolicyId("pzarpzeqacdld") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-02-18T13:35:29Z")) - .withBackupSetName("ypefcpczshnuqnda") - .withCreateMode(CreateMode.DEFAULT) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-05-16T16:02:29Z")) - .withIsScheduledForDeferredDelete(false) - .withDeferredDeleteTimeRemaining("ytus") - .withIsDeferredDeleteScheduleUpcoming(false) - .withIsRehydrate(false) - .withResourceGuardOperationRequests(Arrays.asList("vegwqiukvz", "ydwtthao", "gkskjivbss", "ajq")) - .withIsArchiveEnabled(true) - .withPolicyName("eexpgeumi") - .withSoftDeleteRetentionPeriod(926167439)) - .withEtag("nofnin") - .create(); - - Assertions.assertEquals("dajlskzpt", response.location()); - Assertions.assertEquals("lwe", response.tags().get("cyrthxqlehm")); - Assertions.assertEquals("g", response.properties().containerName()); - Assertions.assertEquals("quv", response.properties().sourceResourceId()); - Assertions.assertEquals("gglpmcrdcuelj", response.properties().policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-29T07:33:04Z"), - response.properties().lastRecoveryPoint()); - Assertions.assertEquals("xmfqryarvsxzqbg", response.properties().backupSetName()); - Assertions.assertEquals(CreateMode.INVALID, response.properties().createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T05:28:16Z"), - response.properties().deferredDeleteTimeInUtc()); - Assertions.assertEquals(true, response.properties().isScheduledForDeferredDelete()); - Assertions.assertEquals("thzodubtlmjtgbl", response.properties().deferredDeleteTimeRemaining()); - Assertions.assertEquals(false, response.properties().isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(true, response.properties().isRehydrate()); - Assertions.assertEquals("kmfd", response.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, response.properties().isArchiveEnabled()); - Assertions.assertEquals("cnabxzf", response.properties().policyName()); - Assertions.assertEquals(1683245202, response.properties().softDeleteRetentionPeriod()); - Assertions.assertEquals("wncknr", response.etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsDeleteWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsDeleteWithResponseMockTests.java index 0731089f9c33..de597fba7c59 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsDeleteWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsDeleteWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -28,8 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.protectedItems() - .deleteWithResponse("hdmljz", "cvumepjpbi", "nzpphepife", "leqirccjclykcgxv", "pjlvczuoda", - com.azure.core.util.Context.NONE); + .deleteWithResponse("mzjqrbr", "vnmdyfoeboj", "jpp", "laohoqkp", "t", com.azure.core.util.Context.NONE); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsGetWithResponseMockTests.java index b09c2a291b42..41c933de55fc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,6 +12,8 @@ import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; import com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItemResource; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanStatus; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanSummary; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -22,7 +24,7 @@ public final class ProtectedItemsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"Invalid\",\"workloadType\":\"SAPHanaDatabase\",\"containerName\":\"fyihduyeuyldp\",\"sourceResourceId\":\"tybkcgs\",\"policyId\":\"h\",\"lastRecoveryPoint\":\"2021-05-03T17:57:59Z\",\"backupSetName\":\"mwynefxexlfciatx\",\"createMode\":\"Default\",\"deferredDeleteTimeInUTC\":\"2021-03-04T21:02:41Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"skjh\",\"isDeferredDeleteScheduleUpcoming\":false,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"oxcxscvslx\",\"hu\"],\"isArchiveEnabled\":true,\"policyName\":\"muk\",\"softDeleteRetentionPeriodInDays\":1314222544,\"vaultId\":\"kxettcslojfkq\"},\"eTag\":\"nqtoqx\",\"location\":\"hqxc\",\"tags\":{\"mbiipsnawwlqk\":\"tkbtnqlrngl\",\"xricctkwmuqq\":\"nxhhl\"},\"id\":\"ajxeiygle\",\"name\":\"rwvaexhdc\",\"type\":\"rceqnkbrupob\"}"; + = "{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"AzureStorage\",\"workloadType\":\"FileFolder\",\"containerName\":\"rmpwctofld\",\"sourceResourceId\":\"acdhztxkbr\",\"policyId\":\"drwjiy\",\"lastRecoveryPoint\":\"2021-04-12T17:31:30Z\",\"backupSetName\":\"jsrwqrxetf\",\"createMode\":\"Default\",\"deferredDeleteTimeInUTC\":\"2021-12-01T18:06:29Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"qnt\",\"isDeferredDeleteScheduleUpcoming\":false,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"vmaxgnuyea\",\"cmh\",\"dfjeceho\",\"wcpqtwl\"],\"isArchiveEnabled\":true,\"policyName\":\"rg\",\"softDeleteRetentionPeriodInDays\":1872039330,\"vaultId\":\"nyrukoil\",\"sourceSideScanInfo\":{\"sourceSideScanStatus\":\"Configured\",\"sourceSideScanSummary\":\"NotApplicable\"}},\"tags\":{\"pjlh\":\"e\",\"whbgxvellvul\":\"yxpzruzythqk\"},\"location\":\"d\",\"eTag\":\"itmujdtvm\",\"id\":\"yymffhmjp\",\"name\":\"dnyxfzuvrz\",\"type\":\"z\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,29 +34,33 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ProtectedItemResource response = manager.protectedItems() - .getWithResponse("ngatwmy", "yutrymd", "mfjhpycvjqdvdwkq", "ldrlefgnaavua", "n", "etaoutnpdc", + .getWithResponse("fkbebauzl", "btxxwpfhnjzud", "tpzkgmeboywhcz", "qrhm", "gqbedygi", "rzwnyk", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hqxc", response.location()); - Assertions.assertEquals("tkbtnqlrngl", response.tags().get("mbiipsnawwlqk")); - Assertions.assertEquals("fyihduyeuyldp", response.properties().containerName()); - Assertions.assertEquals("tybkcgs", response.properties().sourceResourceId()); - Assertions.assertEquals("h", response.properties().policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-03T17:57:59Z"), + Assertions.assertEquals("rmpwctofld", response.properties().containerName()); + Assertions.assertEquals("acdhztxkbr", response.properties().sourceResourceId()); + Assertions.assertEquals("drwjiy", response.properties().policyId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-12T17:31:30Z"), response.properties().lastRecoveryPoint()); - Assertions.assertEquals("mwynefxexlfciatx", response.properties().backupSetName()); + Assertions.assertEquals("jsrwqrxetf", response.properties().backupSetName()); Assertions.assertEquals(CreateMode.DEFAULT, response.properties().createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T21:02:41Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-12-01T18:06:29Z"), response.properties().deferredDeleteTimeInUtc()); - Assertions.assertEquals(true, response.properties().isScheduledForDeferredDelete()); - Assertions.assertEquals("skjh", response.properties().deferredDeleteTimeRemaining()); - Assertions.assertEquals(false, response.properties().isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, response.properties().isRehydrate()); - Assertions.assertEquals("oxcxscvslx", response.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, response.properties().isArchiveEnabled()); - Assertions.assertEquals("muk", response.properties().policyName()); - Assertions.assertEquals(1314222544, response.properties().softDeleteRetentionPeriod()); - Assertions.assertEquals("nqtoqx", response.etag()); + Assertions.assertTrue(response.properties().isScheduledForDeferredDelete()); + Assertions.assertEquals("qnt", response.properties().deferredDeleteTimeRemaining()); + Assertions.assertFalse(response.properties().isDeferredDeleteScheduleUpcoming()); + Assertions.assertFalse(response.properties().isRehydrate()); + Assertions.assertEquals("vmaxgnuyea", response.properties().resourceGuardOperationRequests().get(0)); + Assertions.assertTrue(response.properties().isArchiveEnabled()); + Assertions.assertEquals("rg", response.properties().policyName()); + Assertions.assertEquals(1872039330, response.properties().softDeleteRetentionPeriodInDays()); + Assertions.assertEquals(SourceSideScanStatus.CONFIGURED, + response.properties().sourceSideScanInfo().sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.NOT_APPLICABLE, + response.properties().sourceSideScanInfo().sourceSideScanSummary()); + Assertions.assertEquals("e", response.tags().get("pjlh")); + Assertions.assertEquals("d", response.location()); + Assertions.assertEquals("itmujdtvm", response.etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerOperationResultsGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerOperationResultsGetWithResponseMockTests.java index 75d89ba5fbca..e09f735230d0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerOperationResultsGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerOperationResultsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -22,7 +22,7 @@ public final class ProtectionContainerOperationResultsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"eeqgpkri\",\"backupManagementType\":\"AzureSql\",\"registrationStatus\":\"nixxo\",\"healthStatus\":\"zk\",\"protectableObjectType\":\"wnwpiwxeii\"},\"eTag\":\"mpepkldmaxxijv\",\"location\":\"kwsdgkj\",\"tags\":{\"wefcvoinw\":\"cwrase\",\"qicladv\":\"qartwy\"},\"id\":\"tdavuqmcbymsfobj\",\"name\":\"quvjez\",\"type\":\"j\"}"; + = "{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"dchpojxlehzl\",\"backupManagementType\":\"AzureIaasVM\",\"registrationStatus\":\"quwzp\",\"healthStatus\":\"ibelwcerwkw\",\"protectableObjectType\":\"jxljtxbusq\"},\"tags\":{\"sdzhgbdgzpagsec\":\"xniu\",\"ezoell\":\"adbuwqrgxfllmqiy\",\"w\":\"kki\",\"pymdjfuax\":\"mtum\"},\"location\":\"qvqpilrg\",\"eTag\":\"canlduwzorxs\",\"id\":\"x\",\"name\":\"qk\",\"type\":\"xym\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,16 +32,17 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ProtectionContainerResource response = manager.protectionContainerOperationResults() - .getWithResponse("eezn", "angp", "bfaxyxzlbc", "phmsexroq", "ndktxfv", com.azure.core.util.Context.NONE) + .getWithResponse("beqrztrx", "lxrdhabsrwrsn", "hpqatiwkkvyanxk", "vcsemsvuvdj", "qxetqmmlivrjjx", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("kwsdgkj", response.location()); - Assertions.assertEquals("cwrase", response.tags().get("wefcvoinw")); - Assertions.assertEquals("eeqgpkri", response.properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_SQL, response.properties().backupManagementType()); - Assertions.assertEquals("nixxo", response.properties().registrationStatus()); - Assertions.assertEquals("zk", response.properties().healthStatus()); - Assertions.assertEquals("wnwpiwxeii", response.properties().protectableObjectType()); - Assertions.assertEquals("mpepkldmaxxijv", response.etag()); + Assertions.assertEquals("dchpojxlehzl", response.properties().friendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, response.properties().backupManagementType()); + Assertions.assertEquals("quwzp", response.properties().registrationStatus()); + Assertions.assertEquals("ibelwcerwkw", response.properties().healthStatus()); + Assertions.assertEquals("jxljtxbusq", response.properties().protectableObjectType()); + Assertions.assertEquals("xniu", response.tags().get("sdzhgbdgzpagsec")); + Assertions.assertEquals("qvqpilrg", response.location()); + Assertions.assertEquals("canlduwzorxs", response.etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerRefreshOperationResultsGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerRefreshOperationResultsGetWithResponseMockTests.java index 763017c0eb2e..0a79dbd9877c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerRefreshOperationResultsGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerRefreshOperationResultsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -28,7 +28,8 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.protectionContainerRefreshOperationResults() - .getWithResponse("zrransyb", "lpolwzrghsrle", "nkfscjfn", "jwvuag", com.azure.core.util.Context.NONE); + .getWithResponse("dlcvmyo", "caymjchtvsnvlaq", "nzyzawatuwqko", "bczothymgobllms", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerResourceInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerResourceInnerTests.java index 12ff43707aca..c097e2ad3b66 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerResourceInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerResourceInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -16,37 +16,38 @@ public final class ProtectionContainerResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProtectionContainerResourceInner model = BinaryData.fromString( - "{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"kl\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"jhwuaanozjos\",\"healthStatus\":\"youlp\",\"protectableObjectType\":\"v\"},\"eTag\":\"glrvimjwosytxi\",\"location\":\"cskfcktqumiekk\",\"tags\":{\"yf\":\"ikh\",\"unygaeqid\":\"hdgqggeb\"},\"id\":\"qfatpxllrxcyjm\",\"name\":\"a\",\"type\":\"su\"}") + "{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"esutrgjupauutpw\",\"backupManagementType\":\"DPM\",\"registrationStatus\":\"hej\",\"healthStatus\":\"w\",\"protectableObjectType\":\"nfqn\"},\"tags\":{\"imwkslircizj\":\"psxjvf\",\"t\":\"vydfceacvlhvygdy\",\"jslb\":\"mrtwna\"},\"location\":\"kojgcyzts\",\"eTag\":\"z\",\"id\":\"aeqphchqnr\",\"name\":\"rpxeh\",\"type\":\"wrykqgai\"}") .toObject(ProtectionContainerResourceInner.class); - Assertions.assertEquals("cskfcktqumiekk", model.location()); - Assertions.assertEquals("ikh", model.tags().get("yf")); - Assertions.assertEquals("kl", model.properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.properties().backupManagementType()); - Assertions.assertEquals("jhwuaanozjos", model.properties().registrationStatus()); - Assertions.assertEquals("youlp", model.properties().healthStatus()); - Assertions.assertEquals("v", model.properties().protectableObjectType()); - Assertions.assertEquals("glrvimjwosytxi", model.etag()); + Assertions.assertEquals("esutrgjupauutpw", model.properties().friendlyName()); + Assertions.assertEquals(BackupManagementType.DPM, model.properties().backupManagementType()); + Assertions.assertEquals("hej", model.properties().registrationStatus()); + Assertions.assertEquals("w", model.properties().healthStatus()); + Assertions.assertEquals("nfqn", model.properties().protectableObjectType()); + Assertions.assertEquals("psxjvf", model.tags().get("imwkslircizj")); + Assertions.assertEquals("kojgcyzts", model.location()); + Assertions.assertEquals("z", model.etag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProtectionContainerResourceInner model = new ProtectionContainerResourceInner().withLocation("cskfcktqumiekk") - .withTags(mapOf("yf", "ikh", "unygaeqid", "hdgqggeb")) - .withProperties(new ProtectionContainer().withFriendlyName("kl") - .withBackupManagementType(BackupManagementType.AZURE_WORKLOAD) - .withRegistrationStatus("jhwuaanozjos") - .withHealthStatus("youlp") - .withProtectableObjectType("v")) - .withEtag("glrvimjwosytxi"); + ProtectionContainerResourceInner model = new ProtectionContainerResourceInner() + .withProperties(new ProtectionContainer().withFriendlyName("esutrgjupauutpw") + .withBackupManagementType(BackupManagementType.DPM) + .withRegistrationStatus("hej") + .withHealthStatus("w") + .withProtectableObjectType("nfqn")) + .withTags(mapOf("imwkslircizj", "psxjvf", "t", "vydfceacvlhvygdy", "jslb", "mrtwna")) + .withLocation("kojgcyzts") + .withEtag("z"); model = BinaryData.fromObject(model).toObject(ProtectionContainerResourceInner.class); - Assertions.assertEquals("cskfcktqumiekk", model.location()); - Assertions.assertEquals("ikh", model.tags().get("yf")); - Assertions.assertEquals("kl", model.properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.properties().backupManagementType()); - Assertions.assertEquals("jhwuaanozjos", model.properties().registrationStatus()); - Assertions.assertEquals("youlp", model.properties().healthStatus()); - Assertions.assertEquals("v", model.properties().protectableObjectType()); - Assertions.assertEquals("glrvimjwosytxi", model.etag()); + Assertions.assertEquals("esutrgjupauutpw", model.properties().friendlyName()); + Assertions.assertEquals(BackupManagementType.DPM, model.properties().backupManagementType()); + Assertions.assertEquals("hej", model.properties().registrationStatus()); + Assertions.assertEquals("w", model.properties().healthStatus()); + Assertions.assertEquals("nfqn", model.properties().protectableObjectType()); + Assertions.assertEquals("psxjvf", model.tags().get("imwkslircizj")); + Assertions.assertEquals("kojgcyzts", model.location()); + Assertions.assertEquals("z", model.etag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerResourceListTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerResourceListTests.java index cd3e24378065..c29f553f33ca 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerResourceListTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerResourceListTests.java @@ -1,80 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionContainerResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectionContainerResourceList; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionContainer; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionContainerResourceList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class ProtectionContainerResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProtectionContainerResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"bqwrvtldgm\",\"backupManagementType\":\"AzureStorage\",\"registrationStatus\":\"mpipaslthaqfxs\",\"healthStatus\":\"wutwbdsre\",\"protectableObjectType\":\"drhneuyow\"},\"eTag\":\"d\",\"location\":\"ytisibir\",\"tags\":{\"lfzxiavrmbzonoki\":\"ikpzimejza\",\"rgz\":\"rjqc\"},\"id\":\"frl\",\"name\":\"zszrnwoiindfpw\",\"type\":\"jylwbtlhflsj\"},{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"szfjvfbgofelja\",\"backupManagementType\":\"AzureSql\",\"registrationStatus\":\"qhl\",\"healthStatus\":\"riiiojnalghfkv\",\"protectableObjectType\":\"sexso\"},\"eTag\":\"el\",\"location\":\"qhhahhxvrhmzkwpj\",\"tags\":{\"ujxukndxd\":\"spughftqsxhq\",\"syqtfi\":\"grjguufzd\",\"phoszqz\":\"whbotzingamv\",\"kfwynw\":\"dphqamv\"},\"id\":\"vtbvkayh\",\"name\":\"tnvyqiatkzwp\",\"type\":\"npwzcjaes\"}],\"nextLink\":\"v\"}") + "{\"value\":[{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"uawvcmjzk\",\"backupManagementType\":\"MAB\",\"registrationStatus\":\"isczskoswo\",\"healthStatus\":\"qazu\",\"protectableObjectType\":\"mxzkr\"},\"tags\":{\"mnppccekuztd\":\"iisb\",\"y\":\"bezaxyfukzxuiz\",\"etiarxqiubxdukec\":\"nepk\",\"hctmmkosz\":\"xdazv\"},\"location\":\"blnsntrpcaqk\",\"eTag\":\"f\",\"id\":\"tfmhklbnldpvcb\",\"name\":\"hez\",\"type\":\"quwusq\"},{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"rp\",\"backupManagementType\":\"AzureSql\",\"registrationStatus\":\"yuuatvlmbjwcolbm\",\"healthStatus\":\"b\",\"protectableObjectType\":\"tpc\"},\"tags\":{\"rvxhmtfhocnxzcm\":\"pr\",\"sn\":\"hngxnoqrxtd\",\"hepfwwtjfdoes\":\"evhdlmydid\",\"dbckyo\":\"xhmw\"},\"location\":\"xkxhnegknjzrbhtm\",\"eTag\":\"lvukaobrlb\",\"id\":\"snbagnchjhg\",\"name\":\"muowakywalhjy\",\"type\":\"xcgqtagdrclsso\"},{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"mevtfycnlbvgjc\",\"backupManagementType\":\"AzureIaasVM\",\"registrationStatus\":\"gjiiytssiki\",\"healthStatus\":\"cufqbvntnrgmqs\",\"protectableObjectType\":\"hcekxgnlykm\"},\"tags\":{\"iw\":\"wzvmdoksqd\",\"hygtv\":\"wxlboncqbazqicq\",\"bdpkxyqvgx\":\"byjanep\",\"hkxdxuwsaifmc\":\"aodetv\"},\"location\":\"osbz\",\"eTag\":\"hg\",\"id\":\"kb\",\"name\":\"knjolgjyyxpve\",\"type\":\"szerqzevxoqei\"}],\"nextLink\":\"xwaljgl\"}") .toObject(ProtectionContainerResourceList.class); - Assertions.assertEquals("v", model.nextLink()); - Assertions.assertEquals("ytisibir", model.value().get(0).location()); - Assertions.assertEquals("ikpzimejza", model.value().get(0).tags().get("lfzxiavrmbzonoki")); - Assertions.assertEquals("bqwrvtldgm", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_STORAGE, - model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("mpipaslthaqfxs", model.value().get(0).properties().registrationStatus()); - Assertions.assertEquals("wutwbdsre", model.value().get(0).properties().healthStatus()); - Assertions.assertEquals("drhneuyow", model.value().get(0).properties().protectableObjectType()); - Assertions.assertEquals("d", model.value().get(0).etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProtectionContainerResourceList model = new ProtectionContainerResourceList().withNextLink("v") - .withValue(Arrays.asList( - new ProtectionContainerResourceInner().withLocation("ytisibir") - .withTags(mapOf("lfzxiavrmbzonoki", "ikpzimejza", "rgz", "rjqc")) - .withProperties(new ProtectionContainer().withFriendlyName("bqwrvtldgm") - .withBackupManagementType(BackupManagementType.AZURE_STORAGE) - .withRegistrationStatus("mpipaslthaqfxs") - .withHealthStatus("wutwbdsre") - .withProtectableObjectType("drhneuyow")) - .withEtag("d"), - new ProtectionContainerResourceInner().withLocation("qhhahhxvrhmzkwpj") - .withTags(mapOf("ujxukndxd", "spughftqsxhq", "syqtfi", "grjguufzd", "phoszqz", "whbotzingamv", - "kfwynw", "dphqamv")) - .withProperties(new ProtectionContainer().withFriendlyName("szfjvfbgofelja") - .withBackupManagementType(BackupManagementType.AZURE_SQL) - .withRegistrationStatus("qhl") - .withHealthStatus("riiiojnalghfkv") - .withProtectableObjectType("sexso")) - .withEtag("el"))); - model = BinaryData.fromObject(model).toObject(ProtectionContainerResourceList.class); - Assertions.assertEquals("v", model.nextLink()); - Assertions.assertEquals("ytisibir", model.value().get(0).location()); - Assertions.assertEquals("ikpzimejza", model.value().get(0).tags().get("lfzxiavrmbzonoki")); - Assertions.assertEquals("bqwrvtldgm", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_STORAGE, - model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("mpipaslthaqfxs", model.value().get(0).properties().registrationStatus()); - Assertions.assertEquals("wutwbdsre", model.value().get(0).properties().healthStatus()); - Assertions.assertEquals("drhneuyow", model.value().get(0).properties().protectableObjectType()); - Assertions.assertEquals("d", model.value().get(0).etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("xwaljgl", model.nextLink()); + Assertions.assertEquals("uawvcmjzk", model.value().get(0).properties().friendlyName()); + Assertions.assertEquals(BackupManagementType.MAB, model.value().get(0).properties().backupManagementType()); + Assertions.assertEquals("isczskoswo", model.value().get(0).properties().registrationStatus()); + Assertions.assertEquals("qazu", model.value().get(0).properties().healthStatus()); + Assertions.assertEquals("mxzkr", model.value().get(0).properties().protectableObjectType()); + Assertions.assertEquals("iisb", model.value().get(0).tags().get("mnppccekuztd")); + Assertions.assertEquals("blnsntrpcaqk", model.value().get(0).location()); + Assertions.assertEquals("f", model.value().get(0).etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerTests.java index b3c85d3587fa..0a40d2b6939f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,27 +13,27 @@ public final class ProtectionContainerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProtectionContainer model = BinaryData.fromString( - "{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"r\",\"backupManagementType\":\"AzureBackupServer\",\"registrationStatus\":\"mjsjqb\",\"healthStatus\":\"hyxxrwlycoduhpk\",\"protectableObjectType\":\"gymare\"}") + "{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"viklb\",\"backupManagementType\":\"MAB\",\"registrationStatus\":\"hbejdznxcvdsrhnj\",\"healthStatus\":\"olvtnovqfzge\",\"protectableObjectType\":\"dftuljltduce\"}") .toObject(ProtectionContainer.class); - Assertions.assertEquals("r", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); - Assertions.assertEquals("mjsjqb", model.registrationStatus()); - Assertions.assertEquals("hyxxrwlycoduhpk", model.healthStatus()); - Assertions.assertEquals("gymare", model.protectableObjectType()); + Assertions.assertEquals("viklb", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); + Assertions.assertEquals("hbejdznxcvdsrhnj", model.registrationStatus()); + Assertions.assertEquals("olvtnovqfzge", model.healthStatus()); + Assertions.assertEquals("dftuljltduce", model.protectableObjectType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProtectionContainer model = new ProtectionContainer().withFriendlyName("r") - .withBackupManagementType(BackupManagementType.AZURE_BACKUP_SERVER) - .withRegistrationStatus("mjsjqb") - .withHealthStatus("hyxxrwlycoduhpk") - .withProtectableObjectType("gymare"); + ProtectionContainer model = new ProtectionContainer().withFriendlyName("viklb") + .withBackupManagementType(BackupManagementType.MAB) + .withRegistrationStatus("hbejdznxcvdsrhnj") + .withHealthStatus("olvtnovqfzge") + .withProtectableObjectType("dftuljltduce"); model = BinaryData.fromObject(model).toObject(ProtectionContainer.class); - Assertions.assertEquals("r", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); - Assertions.assertEquals("mjsjqb", model.registrationStatus()); - Assertions.assertEquals("hyxxrwlycoduhpk", model.healthStatus()); - Assertions.assertEquals("gymare", model.protectableObjectType()); + Assertions.assertEquals("viklb", model.friendlyName()); + Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); + Assertions.assertEquals("hbejdznxcvdsrhnj", model.registrationStatus()); + Assertions.assertEquals("olvtnovqfzge", model.healthStatus()); + Assertions.assertEquals("dftuljltduce", model.protectableObjectType()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersGetWithResponseMockTests.java index 6b565a55c1a2..82465d558da9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -22,7 +22,7 @@ public final class ProtectionContainersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"hdklmvetatl\",\"backupManagementType\":\"DefaultBackup\",\"registrationStatus\":\"oixwgiksb\",\"healthStatus\":\"tooxrpog\",\"protectableObjectType\":\"hchgjtnhtukf\"},\"eTag\":\"ihmbfntume\",\"location\":\"zbxvqxbnuvw\",\"tags\":{\"xuqgovsxpwwztj\":\"sgomtmjz\",\"cgrllc\":\"mkkhtgfredml\"},\"id\":\"na\",\"name\":\"vjowazhpabac\",\"type\":\"mlyotg\"}"; + = "{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"gbsqgpewqcfutmd\",\"backupManagementType\":\"DPM\",\"registrationStatus\":\"glq\",\"healthStatus\":\"kn\",\"protectableObjectType\":\"clctzey\"},\"tags\":{\"v\":\"ndc\",\"uwkudrbcp\":\"wzqauxzanhmkvf\"},\"location\":\"xudqyemebunaucmc\",\"eTag\":\"tneemmjauwcgxef\",\"id\":\"haitranize\",\"name\":\"wgudasmxu\",\"type\":\"vfbngfco\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,17 +32,16 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ProtectionContainerResource response = manager.protectionContainers() - .getWithResponse("gcruxspinym", "qgwokmikp", "zfbmjxuv", "ipfdvhaxdvwzaehp", - com.azure.core.util.Context.NONE) + .getWithResponse("qseuzuukykcyqhy", "qzzdcykeyste", "fop", "z", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("zbxvqxbnuvw", response.location()); - Assertions.assertEquals("sgomtmjz", response.tags().get("xuqgovsxpwwztj")); - Assertions.assertEquals("hdklmvetatl", response.properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, response.properties().backupManagementType()); - Assertions.assertEquals("oixwgiksb", response.properties().registrationStatus()); - Assertions.assertEquals("tooxrpog", response.properties().healthStatus()); - Assertions.assertEquals("hchgjtnhtukf", response.properties().protectableObjectType()); - Assertions.assertEquals("ihmbfntume", response.etag()); + Assertions.assertEquals("gbsqgpewqcfutmd", response.properties().friendlyName()); + Assertions.assertEquals(BackupManagementType.DPM, response.properties().backupManagementType()); + Assertions.assertEquals("glq", response.properties().registrationStatus()); + Assertions.assertEquals("kn", response.properties().healthStatus()); + Assertions.assertEquals("clctzey", response.properties().protectableObjectType()); + Assertions.assertEquals("ndc", response.tags().get("v")); + Assertions.assertEquals("xudqyemebunaucmc", response.location()); + Assertions.assertEquals("tneemmjauwcgxef", response.etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersInquireWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersInquireWithResponseMockTests.java index de25a83fb3b4..60d8fc4c788e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersInquireWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersInquireWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -28,8 +28,7 @@ public void testInquireWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.protectionContainers() - .inquireWithResponse("ojmrvvxwjongzse", "qqrsil", "chskxxka", "sbvr", "aqgvto", - com.azure.core.util.Context.NONE); + .inquireWithResponse("lregpq", "moj", "vr", "tnvgyshqrdgrt", "mewjzlpyk", com.azure.core.util.Context.NONE); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersRefreshWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersRefreshWithResponseMockTests.java index c6815a059e07..beebbd8ffa1b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersRefreshWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersRefreshWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -28,7 +28,7 @@ public void testRefreshWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.protectionContainers() - .refreshWithResponse("rulfuct", "jrthcfjzhx", "yubqjr", "stvrjeqmt", com.azure.core.util.Context.NONE); + .refreshWithResponse("fa", "zwjcaye", "zrransyb", "lpolwzrghsrle", com.azure.core.util.Context.NONE); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersRegisterMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersRegisterMockTests.java index bb8e80d33daf..62607f32d31c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersRegisterMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersRegisterMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -25,7 +25,7 @@ public final class ProtectionContainersRegisterMockTests { @Test public void testRegister() throws Exception { String responseStr - = "{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"mtum\",\"backupManagementType\":\"DefaultBackup\",\"registrationStatus\":\"djf\",\"healthStatus\":\"xroq\",\"protectableObjectType\":\"pilrgunca\"},\"eTag\":\"duwzorxsbmxaqk\",\"location\":\"xym\",\"tags\":{\"cl\":\"vfqepd\",\"wcpjqduqgi\":\"uubwyvpjb\",\"lj\":\"exkydfb\"},\"id\":\"vhuerkjddvrglieg\",\"name\":\"tcvbiiftk\",\"type\":\"dwgdn\"}"; + = "{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"nmhkrezsd\",\"backupManagementType\":\"AzureIaasVM\",\"registrationStatus\":\"eqdgcruxsp\",\"healthStatus\":\"ymmqgwokmikp\",\"protectableObjectType\":\"fbmjxuvji\"},\"tags\":{\"vwzaehp\":\"vhax\",\"oixwgiksb\":\"hthdklmvetatlakf\"},\"location\":\"tooxrpog\",\"eTag\":\"hchgjtnhtukf\",\"id\":\"ihmbfntume\",\"name\":\"zbxvqxbnuvw\",\"type\":\"gasgomtmjzwx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,26 +35,26 @@ public void testRegister() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ProtectionContainerResource response = manager.protectionContainers() - .define("rsnrhp") - .withRegion("jxlehzlx") - .withExistingBackupFabric("zbeqrztrxa", "xrd", "absr") - .withTags(mapOf("iibelwcerw", "quwzp", "pjxljtxb", "w", "sdzhgbdgzpagsec", "sqtbxxniu")) - .withProperties(new ProtectionContainer().withFriendlyName("iwkkvya") - .withBackupManagementType(BackupManagementType.AZURE_BACKUP_SERVER) - .withRegistrationStatus("vcsemsvuvdj") - .withHealthStatus("xetqmm") - .withProtectableObjectType("vrjjxnw")) - .withEtag("chp") + .define("klzmijajw") + .withExistingBackupFabric("nkfscjfn", "jwvuag", "qwtltngvmreupt") + .withRegion("bfe") + .withTags(mapOf("zslp", "dnievwffcvvy", "trkxgpazwu", "xgcbdsvalpnpt", "qvn", "x")) + .withProperties(new ProtectionContainer().withFriendlyName("fsvagh") + .withBackupManagementType(BackupManagementType.AZURE_IAAS_VM) + .withRegistrationStatus("wl") + .withHealthStatus("rcigtzjcvbxq") + .withProtectableObjectType("psnssovyxp")) + .withEtag("ldiuhzzgqlm") .create(); - Assertions.assertEquals("xym", response.location()); - Assertions.assertEquals("vfqepd", response.tags().get("cl")); - Assertions.assertEquals("mtum", response.properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, response.properties().backupManagementType()); - Assertions.assertEquals("djf", response.properties().registrationStatus()); - Assertions.assertEquals("xroq", response.properties().healthStatus()); - Assertions.assertEquals("pilrgunca", response.properties().protectableObjectType()); - Assertions.assertEquals("duwzorxsbmxaqk", response.etag()); + Assertions.assertEquals("nmhkrezsd", response.properties().friendlyName()); + Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, response.properties().backupManagementType()); + Assertions.assertEquals("eqdgcruxsp", response.properties().registrationStatus()); + Assertions.assertEquals("ymmqgwokmikp", response.properties().healthStatus()); + Assertions.assertEquals("fbmjxuvji", response.properties().protectableObjectType()); + Assertions.assertEquals("vhax", response.tags().get("vwzaehp")); + Assertions.assertEquals("tooxrpog", response.location()); + Assertions.assertEquals("hchgjtnhtukf", response.etag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersUnregisterWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersUnregisterWithResponseMockTests.java index f14a221a8dde..2214678cb4a2 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersUnregisterWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainersUnregisterWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -28,8 +28,7 @@ public void testUnregisterWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.protectionContainers() - .unregisterWithResponse("wsxnsrqor", "genmvceb", "eetqujxcxxq", "dcqjkedwqurc", - com.azure.core.util.Context.NONE); + .unregisterWithResponse("ef", "priylfmp", "trauds", "hlcdc", com.azure.core.util.Context.NONE); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentResourceInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentResourceInnerTests.java index d8119b85d41e..4a49b42264fb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentResourceInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentResourceInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -17,38 +17,39 @@ public final class ProtectionIntentResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProtectionIntentResourceInner model = BinaryData.fromString( - "{\"properties\":{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"DefaultBackup\",\"sourceResourceId\":\"xhekuksjtxukcdm\",\"itemId\":\"rcryuanzwuxzdxta\",\"policyId\":\"lhmwhfpmrqobm\",\"protectionState\":\"Protected\"},\"eTag\":\"nryrtihf\",\"location\":\"tijbpzvgnwzsymgl\",\"tags\":{\"fcbjysagithxqha\":\"cyzkohdbihanuf\",\"cnpqxuhivyqniwby\":\"ifpikxwczby\",\"grtfwvu\":\"rkxvdum\",\"h\":\"xgaudccs\"},\"id\":\"jcny\",\"name\":\"j\",\"type\":\"kryhtnapczwlokj\"}") + "{\"properties\":{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"AzureIaasVM\",\"sourceResourceId\":\"iswskuk\",\"itemId\":\"asbvw\",\"policyId\":\"pkxkdtxfk\",\"protectionState\":\"ProtectionFailed\"},\"tags\":{\"bugtywatmqa\":\"twknvgm\",\"zcbyfq\":\"kueatgroeshoy\",\"uvjmv\":\"kfaoytehq\",\"roejnndl\":\"mtdwcky\"},\"location\":\"juskbrreqyn\",\"eTag\":\"eysfaqegplw\",\"id\":\"shwddkvbxgk\",\"name\":\"usybwptdaca\",\"type\":\"vvlfntymtp\"}") .toObject(ProtectionIntentResourceInner.class); - Assertions.assertEquals("tijbpzvgnwzsymgl", model.location()); - Assertions.assertEquals("cyzkohdbihanuf", model.tags().get("fcbjysagithxqha")); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.properties().backupManagementType()); - Assertions.assertEquals("xhekuksjtxukcdm", model.properties().sourceResourceId()); - Assertions.assertEquals("rcryuanzwuxzdxta", model.properties().itemId()); - Assertions.assertEquals("lhmwhfpmrqobm", model.properties().policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.properties().protectionState()); - Assertions.assertEquals("nryrtihf", model.etag()); + Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.properties().backupManagementType()); + Assertions.assertEquals("iswskuk", model.properties().sourceResourceId()); + Assertions.assertEquals("asbvw", model.properties().itemId()); + Assertions.assertEquals("pkxkdtxfk", model.properties().policyId()); + Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.properties().protectionState()); + Assertions.assertEquals("twknvgm", model.tags().get("bugtywatmqa")); + Assertions.assertEquals("juskbrreqyn", model.location()); + Assertions.assertEquals("eysfaqegplw", model.etag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProtectionIntentResourceInner model = new ProtectionIntentResourceInner().withLocation("tijbpzvgnwzsymgl") - .withTags(mapOf("fcbjysagithxqha", "cyzkohdbihanuf", "cnpqxuhivyqniwby", "ifpikxwczby", "grtfwvu", - "rkxvdum", "h", "xgaudccs")) - .withProperties(new ProtectionIntent().withBackupManagementType(BackupManagementType.DEFAULT_BACKUP) - .withSourceResourceId("xhekuksjtxukcdm") - .withItemId("rcryuanzwuxzdxta") - .withPolicyId("lhmwhfpmrqobm") - .withProtectionState(ProtectionStatus.PROTECTED)) - .withEtag("nryrtihf"); + ProtectionIntentResourceInner model = new ProtectionIntentResourceInner() + .withProperties(new ProtectionIntent().withBackupManagementType(BackupManagementType.AZURE_IAAS_VM) + .withSourceResourceId("iswskuk") + .withItemId("asbvw") + .withPolicyId("pkxkdtxfk") + .withProtectionState(ProtectionStatus.PROTECTION_FAILED)) + .withTags( + mapOf("bugtywatmqa", "twknvgm", "zcbyfq", "kueatgroeshoy", "uvjmv", "kfaoytehq", "roejnndl", "mtdwcky")) + .withLocation("juskbrreqyn") + .withEtag("eysfaqegplw"); model = BinaryData.fromObject(model).toObject(ProtectionIntentResourceInner.class); - Assertions.assertEquals("tijbpzvgnwzsymgl", model.location()); - Assertions.assertEquals("cyzkohdbihanuf", model.tags().get("fcbjysagithxqha")); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.properties().backupManagementType()); - Assertions.assertEquals("xhekuksjtxukcdm", model.properties().sourceResourceId()); - Assertions.assertEquals("rcryuanzwuxzdxta", model.properties().itemId()); - Assertions.assertEquals("lhmwhfpmrqobm", model.properties().policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.properties().protectionState()); - Assertions.assertEquals("nryrtihf", model.etag()); + Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.properties().backupManagementType()); + Assertions.assertEquals("iswskuk", model.properties().sourceResourceId()); + Assertions.assertEquals("asbvw", model.properties().itemId()); + Assertions.assertEquals("pkxkdtxfk", model.properties().policyId()); + Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.properties().protectionState()); + Assertions.assertEquals("twknvgm", model.tags().get("bugtywatmqa")); + Assertions.assertEquals("juskbrreqyn", model.location()); + Assertions.assertEquals("eysfaqegplw", model.etag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentResourceListTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentResourceListTests.java index 323e7787c9b9..f5ff7633863a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentResourceListTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentResourceListTests.java @@ -1,79 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionIntentResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectionIntentResourceList; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionIntent; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionIntentResourceList; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class ProtectionIntentResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProtectionIntentResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"MAB\",\"sourceResourceId\":\"wixjsprozvcp\",\"itemId\":\"eg\",\"policyId\":\"wmfdatscmdvpjhul\",\"protectionState\":\"Protected\"},\"eTag\":\"mkjozkrwf\",\"location\":\"dio\",\"tags\":{\"yoqpsoaccta\":\"slwejdpvw\",\"lahbcryff\":\"akl\",\"xpaojakhmsbz\":\"fdosyg\"},\"id\":\"hcrzevd\",\"name\":\"hlxaolthqtr\",\"type\":\"qjbpfzfsin\"},{\"properties\":{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"AzureBackupServer\",\"sourceResourceId\":\"jrwzox\",\"itemId\":\"tfell\",\"policyId\":\"fziton\",\"protectionState\":\"ProtectionFailed\"},\"eTag\":\"pjkjlxofpdv\",\"location\":\"pfxxy\",\"tags\":{\"mayhuybbkpodepoo\":\"i\",\"rxzxtheo\":\"inuvamiheogn\",\"cciqihnhungbwjz\":\"usivye\"},\"id\":\"nfygxgispemvtz\",\"name\":\"kufubljo\",\"type\":\"xqeofjaeqjhqjba\"}],\"nextLink\":\"msmjqulngsntn\"}") + "{\"value\":[{\"properties\":{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"AzureSql\",\"sourceResourceId\":\"nwyvq\",\"itemId\":\"rerlniy\",\"policyId\":\"lyfwxzutg\",\"protectionState\":\"ProtectionFailed\"},\"tags\":{\"upgxyjtcdxabbujf\":\"gh\",\"bbklqpxzuca\":\"abe\",\"dwwnl\":\"e\"},\"location\":\"fwxudgnhg\",\"eTag\":\"krtalvn\",\"id\":\"gpbemeluclvdjju\",\"name\":\"yrdnqod\",\"type\":\"ahhxhqfaqnvzoqg\"},{\"properties\":{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"DPM\",\"sourceResourceId\":\"chgavs\",\"itemId\":\"uejdtxptlg\",\"policyId\":\"zhomewjjstliu\",\"protectionState\":\"Protected\"},\"tags\":{\"blxydkxr\":\"oaiancznvodrrs\",\"hychocokuleh\":\"vvbxiwkgfbqljnq\"},\"location\":\"qlrqffaweyurk\",\"eTag\":\"y\",\"id\":\"xra\",\"name\":\"juqdbrx\",\"type\":\"rgchbap\"},{\"properties\":{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"MAB\",\"sourceResourceId\":\"jjk\",\"itemId\":\"jbuscg\",\"policyId\":\"u\",\"protectionState\":\"Invalid\"},\"tags\":{\"xkyxlzgs\":\"blevpmcluj\",\"taf\":\"gkzz\"},\"location\":\"zffovwmbjl\",\"eTag\":\"sczpgvdwnapfd\",\"id\":\"owftptnuwjtks\",\"name\":\"h\",\"type\":\"cgqyhleseyq\"}],\"nextLink\":\"vyeldot\"}") .toObject(ProtectionIntentResourceList.class); - Assertions.assertEquals("msmjqulngsntn", model.nextLink()); - Assertions.assertEquals("dio", model.value().get(0).location()); - Assertions.assertEquals("slwejdpvw", model.value().get(0).tags().get("yoqpsoaccta")); - Assertions.assertEquals(BackupManagementType.MAB, model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("wixjsprozvcp", model.value().get(0).properties().sourceResourceId()); - Assertions.assertEquals("eg", model.value().get(0).properties().itemId()); - Assertions.assertEquals("wmfdatscmdvpjhul", model.value().get(0).properties().policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.value().get(0).properties().protectionState()); - Assertions.assertEquals("mkjozkrwf", model.value().get(0).etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProtectionIntentResourceList model = new ProtectionIntentResourceList().withNextLink("msmjqulngsntn") - .withValue(Arrays.asList( - new ProtectionIntentResourceInner().withLocation("dio") - .withTags(mapOf("yoqpsoaccta", "slwejdpvw", "lahbcryff", "akl", "xpaojakhmsbz", "fdosyg")) - .withProperties(new ProtectionIntent().withBackupManagementType(BackupManagementType.MAB) - .withSourceResourceId("wixjsprozvcp") - .withItemId("eg") - .withPolicyId("wmfdatscmdvpjhul") - .withProtectionState(ProtectionStatus.PROTECTED)) - .withEtag("mkjozkrwf"), - new ProtectionIntentResourceInner().withLocation("pfxxy") - .withTags(mapOf("mayhuybbkpodepoo", "i", "rxzxtheo", "inuvamiheogn", "cciqihnhungbwjz", "usivye")) - .withProperties( - new ProtectionIntent().withBackupManagementType(BackupManagementType.AZURE_BACKUP_SERVER) - .withSourceResourceId("jrwzox") - .withItemId("tfell") - .withPolicyId("fziton") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED)) - .withEtag("pjkjlxofpdv"))); - model = BinaryData.fromObject(model).toObject(ProtectionIntentResourceList.class); - Assertions.assertEquals("msmjqulngsntn", model.nextLink()); - Assertions.assertEquals("dio", model.value().get(0).location()); - Assertions.assertEquals("slwejdpvw", model.value().get(0).tags().get("yoqpsoaccta")); - Assertions.assertEquals(BackupManagementType.MAB, model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("wixjsprozvcp", model.value().get(0).properties().sourceResourceId()); - Assertions.assertEquals("eg", model.value().get(0).properties().itemId()); - Assertions.assertEquals("wmfdatscmdvpjhul", model.value().get(0).properties().policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.value().get(0).properties().protectionState()); - Assertions.assertEquals("mkjozkrwf", model.value().get(0).etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("vyeldot", model.nextLink()); + Assertions.assertEquals(BackupManagementType.AZURE_SQL, + model.value().get(0).properties().backupManagementType()); + Assertions.assertEquals("nwyvq", model.value().get(0).properties().sourceResourceId()); + Assertions.assertEquals("rerlniy", model.value().get(0).properties().itemId()); + Assertions.assertEquals("lyfwxzutg", model.value().get(0).properties().policyId()); + Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, + model.value().get(0).properties().protectionState()); + Assertions.assertEquals("gh", model.value().get(0).tags().get("upgxyjtcdxabbujf")); + Assertions.assertEquals("fwxudgnhg", model.value().get(0).location()); + Assertions.assertEquals("krtalvn", model.value().get(0).etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentTests.java index 24caffe75769..a3a8ad21cc40 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,27 +14,28 @@ public final class ProtectionIntentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProtectionIntent model = BinaryData.fromString( - "{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"AzureSql\",\"sourceResourceId\":\"kvnipjoxz\",\"itemId\":\"chgejspodm\",\"policyId\":\"lzydehojwyahux\",\"protectionState\":\"ProtectionFailed\"}") + "{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"AzureBackupServer\",\"sourceResourceId\":\"naz\",\"itemId\":\"ohzrsqalsx\",\"policyId\":\"nwqapfgsdpcvess\",\"protectionState\":\"Invalid\"}") .toObject(ProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.AZURE_SQL, model.backupManagementType()); - Assertions.assertEquals("kvnipjoxz", model.sourceResourceId()); - Assertions.assertEquals("chgejspodm", model.itemId()); - Assertions.assertEquals("lzydehojwyahux", model.policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); + Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); + Assertions.assertEquals("naz", model.sourceResourceId()); + Assertions.assertEquals("ohzrsqalsx", model.itemId()); + Assertions.assertEquals("nwqapfgsdpcvess", model.policyId()); + Assertions.assertEquals(ProtectionStatus.INVALID, model.protectionState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProtectionIntent model = new ProtectionIntent().withBackupManagementType(BackupManagementType.AZURE_SQL) - .withSourceResourceId("kvnipjoxz") - .withItemId("chgejspodm") - .withPolicyId("lzydehojwyahux") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED); + ProtectionIntent model + = new ProtectionIntent().withBackupManagementType(BackupManagementType.AZURE_BACKUP_SERVER) + .withSourceResourceId("naz") + .withItemId("ohzrsqalsx") + .withPolicyId("nwqapfgsdpcvess") + .withProtectionState(ProtectionStatus.INVALID); model = BinaryData.fromObject(model).toObject(ProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.AZURE_SQL, model.backupManagementType()); - Assertions.assertEquals("kvnipjoxz", model.sourceResourceId()); - Assertions.assertEquals("chgejspodm", model.itemId()); - Assertions.assertEquals("lzydehojwyahux", model.policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); + Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); + Assertions.assertEquals("naz", model.sourceResourceId()); + Assertions.assertEquals("ohzrsqalsx", model.itemId()); + Assertions.assertEquals("nwqapfgsdpcvess", model.policyId()); + Assertions.assertEquals(ProtectionStatus.INVALID, model.protectionState()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentsCreateOrUpdateWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentsCreateOrUpdateWithResponseMockTests.java index 1027a48178ca..addeb9f71f8b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentsCreateOrUpdateWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentsCreateOrUpdateWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -26,7 +26,7 @@ public final class ProtectionIntentsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"DPM\",\"sourceResourceId\":\"ymvqdbpbhfckdvez\",\"itemId\":\"cssbzhddu\",\"policyId\":\"nqfblhkalehpava\",\"protectionState\":\"NotProtected\"},\"eTag\":\"qjtiogqgdm\",\"location\":\"nictteajo\",\"tags\":{\"tp\":\"gspnbonhpczykm\",\"mqyjgy\":\"wxqcsehchkhufmpq\",\"saeuzanhsfnhsenw\":\"zulo\",\"lidftujwjj\":\"hpzfngqj\"},\"id\":\"fwbeqrkuorh\",\"name\":\"ssruqnmdvhazcvj\",\"type\":\"tiq\"}"; + = "{\"properties\":{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"AzureBackupServer\",\"sourceResourceId\":\"jbrhlhpvzadbw\",\"itemId\":\"ninafhxrz\",\"policyId\":\"m\",\"protectionState\":\"Protecting\"},\"tags\":{\"cqx\":\"cwviqllukhk\",\"okstsinvagovjyh\":\"cbvzarmqcb\",\"ehqwhitxnmxgn\":\"rxbrdv\",\"orbalkj\":\"guzbuw\"},\"location\":\"kbd\",\"eTag\":\"ltqstqkqsygxiyn\",\"id\":\"ovagzkheuban\",\"name\":\"xunpqcckqiawzlz\",\"type\":\"laslgacizux\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,26 +36,26 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ProtectionIntentResource response = manager.protectionIntents() - .define("zrltixldzyyf") - .withRegion("gvmxnok") - .withExistingBackupFabric("obcancdexxqcw", "a", "fgvaknokzwj") - .withTags(mapOf("vcuartrhun", "lubses")) + .define("gpucdocfq") + .withExistingBackupFabric("piuzvk", "nhdimjuktirz", "a") + .withRegion("y") + .withTags(mapOf("jixwfgc", "shjvpzaptuoskaoi")) .withProperties(new ProtectionIntent().withBackupManagementType(BackupManagementType.AZURE_BACKUP_SERVER) - .withSourceResourceId("ixymmpujivyql") - .withItemId("uvsmbms") - .withPolicyId("oyovwz") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED)) - .withEtag("vybe") + .withSourceResourceId("f") + .withItemId("xwr") + .withPolicyId("vzklkvbgikyjtka") + .withProtectionState(ProtectionStatus.PROTECTED)) + .withEtag("c") .create(); - Assertions.assertEquals("nictteajo", response.location()); - Assertions.assertEquals("gspnbonhpczykm", response.tags().get("tp")); - Assertions.assertEquals(BackupManagementType.DPM, response.properties().backupManagementType()); - Assertions.assertEquals("ymvqdbpbhfckdvez", response.properties().sourceResourceId()); - Assertions.assertEquals("cssbzhddu", response.properties().itemId()); - Assertions.assertEquals("nqfblhkalehpava", response.properties().policyId()); - Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, response.properties().protectionState()); - Assertions.assertEquals("qjtiogqgdm", response.etag()); + Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, response.properties().backupManagementType()); + Assertions.assertEquals("jbrhlhpvzadbw", response.properties().sourceResourceId()); + Assertions.assertEquals("ninafhxrz", response.properties().itemId()); + Assertions.assertEquals("m", response.properties().policyId()); + Assertions.assertEquals(ProtectionStatus.PROTECTING, response.properties().protectionState()); + Assertions.assertEquals("cwviqllukhk", response.tags().get("cqx")); + Assertions.assertEquals("kbd", response.location()); + Assertions.assertEquals("ltqstqkqsygxiyn", response.etag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentsDeleteWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentsDeleteWithResponseMockTests.java index 65f813c73bd7..134e46c1c015 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentsDeleteWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentsDeleteWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.protectionIntents() - .deleteWithResponse("mwnrdj", "ibqbnaomhjrm", "u", "maxljalfihcj", com.azure.core.util.Context.NONE); + .deleteWithResponse("nltwmpftmfoeajog", "yxwe", "amfdd", "vlkpzwb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentsGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentsGetWithResponseMockTests.java index bd76be940cf1..f30e4268365b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentsGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -23,7 +23,7 @@ public final class ProtectionIntentsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"AzureIaasVM\",\"sourceResourceId\":\"h\",\"itemId\":\"ndnelqkaadlknw\",\"policyId\":\"anniyopetxivcnr\",\"protectionState\":\"Invalid\"},\"eTag\":\"ucae\",\"location\":\"hblkwqpatvbq\",\"tags\":{\"zqymtuowogtgits\":\"cjbctviv\"},\"id\":\"hzvb\",\"name\":\"zcdba\",\"type\":\"fzndscxmxeatkd\"}"; + = "{\"properties\":{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"MAB\",\"sourceResourceId\":\"shthmgpczqu\",\"itemId\":\"t\",\"policyId\":\"vcpxtzhigqqbtimp\",\"protectionState\":\"NotProtected\"},\"tags\":{\"aawja\":\"rnsihqhudsmus\"},\"location\":\"wj\",\"eTag\":\"czmnniixy\",\"id\":\"qban\",\"name\":\"sjtgirnbgmgmddo\",\"type\":\"gm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,17 +33,16 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ProtectionIntentResource response = manager.protectionIntents() - .getWithResponse("thgygvfltgvdi", "oynkrxwetwkdrcyr", "cpcunnuzdqum", "enodna", - com.azure.core.util.Context.NONE) + .getWithResponse("rxipmlnfyzav", "rbypi", "dbkp", "jtaqhsmqazpdg", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hblkwqpatvbq", response.location()); - Assertions.assertEquals("cjbctviv", response.tags().get("zqymtuowogtgits")); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, response.properties().backupManagementType()); - Assertions.assertEquals("h", response.properties().sourceResourceId()); - Assertions.assertEquals("ndnelqkaadlknw", response.properties().itemId()); - Assertions.assertEquals("anniyopetxivcnr", response.properties().policyId()); - Assertions.assertEquals(ProtectionStatus.INVALID, response.properties().protectionState()); - Assertions.assertEquals("ucae", response.etag()); + Assertions.assertEquals(BackupManagementType.MAB, response.properties().backupManagementType()); + Assertions.assertEquals("shthmgpczqu", response.properties().sourceResourceId()); + Assertions.assertEquals("t", response.properties().itemId()); + Assertions.assertEquals("vcpxtzhigqqbtimp", response.properties().policyId()); + Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, response.properties().protectionState()); + Assertions.assertEquals("rnsihqhudsmus", response.tags().get("aawja")); + Assertions.assertEquals("wj", response.location()); + Assertions.assertEquals("czmnniixy", response.etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesCreateOrUpdateWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesCreateOrUpdateWithResponseMockTests.java index 0860f229e141..fa68763dc312 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesCreateOrUpdateWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesCreateOrUpdateWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -25,7 +25,7 @@ public final class ProtectionPoliciesCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":1966283387,\"resourceGuardOperationRequests\":[\"l\",\"ywkdcwmqsy\",\"ilm\"]},\"eTag\":\"dqaolfylnkk\",\"location\":\"jpjvly\",\"tags\":{\"bjwhlwyjfnqzocr\":\"mfwo\",\"tgxdncaqt\":\"zgczeu\",\"vnyttzgi\":\"iekoif\"},\"id\":\"gyrihlgm\",\"name\":\"behlqtxnr\",\"type\":\"lkndrndpgfjodh\"}"; + = "{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":1240532352,\"resourceGuardOperationRequests\":[\"bjvbzinzab\",\"mvoglj\"]},\"tags\":{\"ehaqidoyzltgio\":\"pgidnw\",\"sergdtpe\":\"qoqpepiaeap\"},\"location\":\"acyh\",\"eTag\":\"wbpqqncjubkhjoz\",\"id\":\"mcwmbup\",\"name\":\"vqyvl\",\"type\":\"qiipsejb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,20 +35,20 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ProtectionPolicyResource response = manager.protectionPolicies() - .define("uwj") - .withRegion("hbgxvel") - .withExistingVault("esq", "ggvrbnyrukoilaci") - .withTags(mapOf("mnitmujd", "lnx", "lyymffhmjpddny", "vm", "mzjqrbr", "fzuvrzmz")) - .withProperties(new ProtectionPolicy().withProtectedItemsCount(844410077) - .withResourceGuardOperationRequests(Arrays.asList("h"))) - .withEtag("xpzruzythqkk") + .define("rufssjyg") + .withExistingVault("pkcdpreyxely", "cghf") + .withRegion("quox") + .withTags(mapOf("gvqcpdwj", "gmqfme", "djhunhghcgawnr", "quxweyslandkd")) + .withProperties(new ProtectionPolicy().withProtectedItemsCount(1781553839) + .withResourceGuardOperationRequests(Arrays.asList("bh"))) + .withEtag("tireimse") .create(); - Assertions.assertEquals("jpjvly", response.location()); - Assertions.assertEquals("mfwo", response.tags().get("bjwhlwyjfnqzocr")); - Assertions.assertEquals(1966283387, response.properties().protectedItemsCount()); - Assertions.assertEquals("l", response.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("dqaolfylnkk", response.etag()); + Assertions.assertEquals(1240532352, response.properties().protectedItemsCount()); + Assertions.assertEquals("bjvbzinzab", response.properties().resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("pgidnw", response.tags().get("ehaqidoyzltgio")); + Assertions.assertEquals("acyh", response.location()); + Assertions.assertEquals("wbpqqncjubkhjoz", response.etag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesDeleteMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesDeleteMockTests.java index d3698269176b..df6e967d3287 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesDeleteMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesDeleteMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -27,8 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.protectionPolicies() - .delete("thvmaxgnuyeamcmh", "dfjeceho", "wcpqtwl", com.azure.core.util.Context.NONE); + manager.protectionPolicies().delete("abmdlqj", "edpf", "xlhupmomihzbdnp", com.azure.core.util.Context.NONE); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesGetWithResponseMockTests.java index b7969b10256f..9ed35c5cdb10 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -21,7 +21,7 @@ public final class ProtectionPoliciesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":1297585909,\"resourceGuardOperationRequests\":[\"kbeba\",\"zlqbtxxwpfhn\",\"zudrtpzk\"]},\"eTag\":\"eboywhczzqrhm\",\"location\":\"gqbedygi\",\"tags\":{\"tofldseacdh\":\"wnykdidjchlrmpw\",\"g\":\"txkbr\",\"fj\":\"rwjiyew\"},\"id\":\"rwq\",\"name\":\"xet\",\"type\":\"gcwvrrmdqntycna\"}"; + = "{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":1400257872,\"resourceGuardOperationRequests\":[\"cqydey\",\"vskiczd\",\"rjeizik\"]},\"tags\":{\"ycqsxr\":\"boohxbms\",\"ewuyqa\":\"d\",\"hdaurghooxaexb\":\"ohpjhgejkbv\"},\"location\":\"xjxjoe\",\"eTag\":\"qxrkdknko\",\"id\":\"ktmbozomtzami\",\"name\":\"bigwcdgzseznu\",\"type\":\"keuair\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ProtectionPolicyResource response = manager.protectionPolicies() - .getWithResponse("btahdeanii", "llbvgwzsfftedous", "ktjtgra", com.azure.core.util.Context.NONE) + .getWithResponse("lusnawmhhgzotfr", "yrgkoekv", "wxxyxhighctx", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("gqbedygi", response.location()); - Assertions.assertEquals("wnykdidjchlrmpw", response.tags().get("tofldseacdh")); - Assertions.assertEquals(1297585909, response.properties().protectedItemsCount()); - Assertions.assertEquals("kbeba", response.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("eboywhczzqrhm", response.etag()); + Assertions.assertEquals(1400257872, response.properties().protectedItemsCount()); + Assertions.assertEquals("cqydey", response.properties().resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("boohxbms", response.tags().get("ycqsxr")); + Assertions.assertEquals("xjxjoe", response.location()); + Assertions.assertEquals("qxrkdknko", response.etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyOperationResultsGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyOperationResultsGetWithResponseMockTests.java index 80b37463abc9..c884dcb7b93e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyOperationResultsGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyOperationResultsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -21,7 +21,7 @@ public final class ProtectionPolicyOperationResultsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":403745976,\"resourceGuardOperationRequests\":[\"tjnsx\"]},\"eTag\":\"jlnsj\",\"location\":\"wjuyxx\",\"tags\":{\"aytuadxkxeqbwp\":\"vmv\",\"xsl\":\"tghyksarcdr\",\"x\":\"vlzladl\",\"wzdanojisgglmvo\":\"pbqhvfdqqjwkr\"},\"id\":\"atuztjct\",\"name\":\"bpvbkaehxsmzygd\",\"type\":\"wakwseivmakxhys\"}"; + = "{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":199182368,\"resourceGuardOperationRequests\":[\"ljky\",\"sjrclrvtzq\"]},\"tags\":{\"y\":\"ctbhpjhxpcvrd\",\"n\":\"it\"},\"location\":\"ad\",\"eTag\":\"zjahwriuomz\",\"id\":\"fki\",\"name\":\"eevsa\",\"type\":\"xwspcaxikhfjq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +31,13 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ProtectionPolicyResource response = manager.protectionPolicyOperationResults() - .getWithResponse("aqotwfhipxwgsabv", "ipowza", "czuumljcir", "pefyc", com.azure.core.util.Context.NONE) + .getWithResponse("njc", "hmocgjshg", "u", "rhwv", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wjuyxx", response.location()); - Assertions.assertEquals("vmv", response.tags().get("aytuadxkxeqbwp")); - Assertions.assertEquals(403745976, response.properties().protectedItemsCount()); - Assertions.assertEquals("tjnsx", response.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("jlnsj", response.etag()); + Assertions.assertEquals(199182368, response.properties().protectedItemsCount()); + Assertions.assertEquals("ljky", response.properties().resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("ctbhpjhxpcvrd", response.tags().get("y")); + Assertions.assertEquals("ad", response.location()); + Assertions.assertEquals("zjahwriuomz", response.etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyResourceInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyResourceInnerTests.java index a486a36c1410..a34723a29f26 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyResourceInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyResourceInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -16,29 +16,29 @@ public final class ProtectionPolicyResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProtectionPolicyResourceInner model = BinaryData.fromString( - "{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":208644200,\"resourceGuardOperationRequests\":[\"kvceoveilovnotyf\",\"fcnj\",\"k\"]},\"eTag\":\"x\",\"location\":\"hbttkphyw\",\"tags\":{\"mclfplphoxuscr\":\"jtoqne\",\"psbjta\":\"abgy\",\"kqujidsuyono\":\"qugxywpmueefjzwf\",\"tcc\":\"glaocq\"},\"id\":\"g\",\"name\":\"udxytlmoyrx\",\"type\":\"wfudwpzntxhdzhl\"}") + "{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":319794832,\"resourceGuardOperationRequests\":[\"pxtivhjk\"]},\"tags\":{\"jxgpnrhgovfg\":\"ibg\",\"mhha\":\"ik\",\"uydzvk\":\"wjrmzvuporqzd\",\"okmvkhlggd\":\"vxcnqmxqps\"},\"location\":\"em\",\"eTag\":\"kzsz\",\"id\":\"iwtglxxhljfpg\",\"name\":\"icrmnzh\",\"type\":\"gmqgjs\"}") .toObject(ProtectionPolicyResourceInner.class); - Assertions.assertEquals("hbttkphyw", model.location()); - Assertions.assertEquals("jtoqne", model.tags().get("mclfplphoxuscr")); - Assertions.assertEquals(208644200, model.properties().protectedItemsCount()); - Assertions.assertEquals("kvceoveilovnotyf", model.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("x", model.etag()); + Assertions.assertEquals(319794832, model.properties().protectedItemsCount()); + Assertions.assertEquals("pxtivhjk", model.properties().resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("ibg", model.tags().get("jxgpnrhgovfg")); + Assertions.assertEquals("em", model.location()); + Assertions.assertEquals("kzsz", model.etag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProtectionPolicyResourceInner model = new ProtectionPolicyResourceInner().withLocation("hbttkphyw") - .withTags(mapOf("mclfplphoxuscr", "jtoqne", "psbjta", "abgy", "kqujidsuyono", "qugxywpmueefjzwf", "tcc", - "glaocq")) - .withProperties(new ProtectionPolicy().withProtectedItemsCount(208644200) - .withResourceGuardOperationRequests(Arrays.asList("kvceoveilovnotyf", "fcnj", "k"))) - .withEtag("x"); + ProtectionPolicyResourceInner model = new ProtectionPolicyResourceInner() + .withProperties(new ProtectionPolicy().withProtectedItemsCount(319794832) + .withResourceGuardOperationRequests(Arrays.asList("pxtivhjk"))) + .withTags(mapOf("jxgpnrhgovfg", "ibg", "mhha", "ik", "uydzvk", "wjrmzvuporqzd", "okmvkhlggd", "vxcnqmxqps")) + .withLocation("em") + .withEtag("kzsz"); model = BinaryData.fromObject(model).toObject(ProtectionPolicyResourceInner.class); - Assertions.assertEquals("hbttkphyw", model.location()); - Assertions.assertEquals("jtoqne", model.tags().get("mclfplphoxuscr")); - Assertions.assertEquals(208644200, model.properties().protectedItemsCount()); - Assertions.assertEquals("kvceoveilovnotyf", model.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("x", model.etag()); + Assertions.assertEquals(319794832, model.properties().protectedItemsCount()); + Assertions.assertEquals("pxtivhjk", model.properties().resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("ibg", model.tags().get("jxgpnrhgovfg")); + Assertions.assertEquals("em", model.location()); + Assertions.assertEquals("kzsz", model.etag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyResourceListTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyResourceListTests.java index b3c72d774c44..21126a36c53d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyResourceListTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyResourceListTests.java @@ -1,66 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionPolicyResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionPolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionPolicyResourceList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ProtectionPolicyResourceList; import org.junit.jupiter.api.Assertions; public final class ProtectionPolicyResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProtectionPolicyResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":712970145,\"resourceGuardOperationRequests\":[\"jwbhqwalmuz\"]},\"eTag\":\"xaepdkzjancuxr\",\"location\":\"d\",\"tags\":{\"bniwdj\":\"v\",\"s\":\"wz\",\"xytxhpzxbz\":\"bpg\",\"lcuhxwtctyqiklb\":\"fzab\"},\"id\":\"ovplw\",\"name\":\"bhvgy\",\"type\":\"gu\"},{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":1732351990,\"resourceGuardOperationRequests\":[\"ss\",\"qukkfp\",\"gmgsxnkjzkde\"]},\"eTag\":\"pvlopwiyighxpkd\",\"location\":\"zb\",\"tags\":{\"umnyqu\":\"ebb\",\"hsmtxpsiebtfhvp\":\"edeojnabc\",\"qmhjjdhtld\":\"sapskr\"},\"id\":\"kyzxuutk\",\"name\":\"cwscwsvlx\",\"type\":\"togt\"}],\"nextLink\":\"upqsx\"}") + "{\"value\":[{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":1939182119,\"resourceGuardOperationRequests\":[\"liohrd\",\"dtfgxqbawpcbb\",\"zqcyknap\"]},\"tags\":{\"wwgbdv\":\"yuicdhzbdy\",\"hmwffplfmuv\":\"bid\"},\"location\":\"ck\",\"eTag\":\"rrvwey\",\"id\":\"oy\",\"name\":\"ukphaimmoiroq\",\"type\":\"oshbragapyy\"}],\"nextLink\":\"fsv\"}") .toObject(ProtectionPolicyResourceList.class); - Assertions.assertEquals("upqsx", model.nextLink()); - Assertions.assertEquals("d", model.value().get(0).location()); - Assertions.assertEquals("v", model.value().get(0).tags().get("bniwdj")); - Assertions.assertEquals(712970145, model.value().get(0).properties().protectedItemsCount()); - Assertions.assertEquals("jwbhqwalmuz", - model.value().get(0).properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("xaepdkzjancuxr", model.value().get(0).etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProtectionPolicyResourceList model = new ProtectionPolicyResourceList().withNextLink("upqsx") - .withValue(Arrays.asList( - new ProtectionPolicyResourceInner().withLocation("d") - .withTags(mapOf("bniwdj", "v", "s", "wz", "xytxhpzxbz", "bpg", "lcuhxwtctyqiklb", "fzab")) - .withProperties(new ProtectionPolicy().withProtectedItemsCount(712970145) - .withResourceGuardOperationRequests(Arrays.asList("jwbhqwalmuz"))) - .withEtag("xaepdkzjancuxr"), - new ProtectionPolicyResourceInner().withLocation("zb") - .withTags(mapOf("umnyqu", "ebb", "hsmtxpsiebtfhvp", "edeojnabc", "qmhjjdhtld", "sapskr")) - .withProperties(new ProtectionPolicy().withProtectedItemsCount(1732351990) - .withResourceGuardOperationRequests(Arrays.asList("ss", "qukkfp", "gmgsxnkjzkde"))) - .withEtag("pvlopwiyighxpkd"))); - model = BinaryData.fromObject(model).toObject(ProtectionPolicyResourceList.class); - Assertions.assertEquals("upqsx", model.nextLink()); - Assertions.assertEquals("d", model.value().get(0).location()); - Assertions.assertEquals("v", model.value().get(0).tags().get("bniwdj")); - Assertions.assertEquals(712970145, model.value().get(0).properties().protectedItemsCount()); - Assertions.assertEquals("jwbhqwalmuz", - model.value().get(0).properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("xaepdkzjancuxr", model.value().get(0).etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("fsv", model.nextLink()); + Assertions.assertEquals(1939182119, model.value().get(0).properties().protectedItemsCount()); + Assertions.assertEquals("liohrd", model.value().get(0).properties().resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("yuicdhzbdy", model.value().get(0).tags().get("wwgbdv")); + Assertions.assertEquals("ck", model.value().get(0).location()); + Assertions.assertEquals("rrvwey", model.value().get(0).etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyTests.java index 5e1218e30fd7..739ee9887c4b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,18 +13,18 @@ public final class ProtectionPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProtectionPolicy model = BinaryData.fromString( - "{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":291050041,\"resourceGuardOperationRequests\":[\"ck\",\"rlhrxs\",\"kyv\"]}") + "{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":1587486803,\"resourceGuardOperationRequests\":[\"bfrmbodthsqqgvri\",\"bakclacjfrnxous\"]}") .toObject(ProtectionPolicy.class); - Assertions.assertEquals(291050041, model.protectedItemsCount()); - Assertions.assertEquals("ck", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(1587486803, model.protectedItemsCount()); + Assertions.assertEquals("bfrmbodthsqqgvri", model.resourceGuardOperationRequests().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProtectionPolicy model = new ProtectionPolicy().withProtectedItemsCount(291050041) - .withResourceGuardOperationRequests(Arrays.asList("ck", "rlhrxs", "kyv")); + ProtectionPolicy model = new ProtectionPolicy().withProtectedItemsCount(1587486803) + .withResourceGuardOperationRequests(Arrays.asList("bfrmbodthsqqgvri", "bakclacjfrnxous")); model = BinaryData.fromObject(model).toObject(ProtectionPolicy.class); - Assertions.assertEquals(291050041, model.protectedItemsCount()); - Assertions.assertEquals("ck", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals(1587486803, model.protectedItemsCount()); + Assertions.assertEquals("bfrmbodthsqqgvri", model.resourceGuardOperationRequests().get(0)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointDiskConfigurationTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointDiskConfigurationTests.java index 82fff122a6e2..bb1e40227a2c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointDiskConfigurationTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointDiskConfigurationTests.java @@ -1,48 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DiskInformation; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointDiskConfiguration; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class RecoveryPointDiskConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RecoveryPointDiskConfiguration model = BinaryData.fromString( - "{\"numberOfDisksIncludedInBackup\":1368173114,\"numberOfDisksAttachedToVm\":127402982,\"includedDiskList\":[{\"lun\":492529805,\"name\":\"jtmvc\"},{\"lun\":1046719550,\"name\":\"c\"},{\"lun\":1309345071,\"name\":\"buhhlkyqlt\"},{\"lun\":1949981472,\"name\":\"gtuwkff\"}],\"excludedDiskList\":[{\"lun\":1557166482,\"name\":\"sidfv\"},{\"lun\":259560415,\"name\":\"xnfuijtkbusqogs\"},{\"lun\":958455072,\"name\":\"yi\"},{\"lun\":2036577427,\"name\":\"arujt\"}]}") + "{\"numberOfDisksIncludedInBackup\":1622829877,\"numberOfDisksAttachedToVm\":602738724,\"includedDiskList\":[{\"lun\":68719037,\"name\":\"dshf\"},{\"lun\":224040944,\"name\":\"bgye\"},{\"lun\":934099618,\"name\":\"sgaojfmwncot\"}],\"excludedDiskList\":[{\"lun\":2093197643,\"name\":\"ctymoxoftp\"}]}") .toObject(RecoveryPointDiskConfiguration.class); - Assertions.assertEquals(1368173114, model.numberOfDisksIncludedInBackup()); - Assertions.assertEquals(127402982, model.numberOfDisksAttachedToVm()); - Assertions.assertEquals(492529805, model.includedDiskList().get(0).lun()); - Assertions.assertEquals("jtmvc", model.includedDiskList().get(0).name()); - Assertions.assertEquals(1557166482, model.excludedDiskList().get(0).lun()); - Assertions.assertEquals("sidfv", model.excludedDiskList().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPointDiskConfiguration model - = new RecoveryPointDiskConfiguration().withNumberOfDisksIncludedInBackup(1368173114) - .withNumberOfDisksAttachedToVm(127402982) - .withIncludedDiskList(Arrays.asList(new DiskInformation().withLun(492529805).withName("jtmvc"), - new DiskInformation().withLun(1046719550).withName("c"), - new DiskInformation().withLun(1309345071).withName("buhhlkyqlt"), - new DiskInformation().withLun(1949981472).withName("gtuwkff"))) - .withExcludedDiskList(Arrays.asList(new DiskInformation().withLun(1557166482).withName("sidfv"), - new DiskInformation().withLun(259560415).withName("xnfuijtkbusqogs"), - new DiskInformation().withLun(958455072).withName("yi"), - new DiskInformation().withLun(2036577427).withName("arujt"))); - model = BinaryData.fromObject(model).toObject(RecoveryPointDiskConfiguration.class); - Assertions.assertEquals(1368173114, model.numberOfDisksIncludedInBackup()); - Assertions.assertEquals(127402982, model.numberOfDisksAttachedToVm()); - Assertions.assertEquals(492529805, model.includedDiskList().get(0).lun()); - Assertions.assertEquals("jtmvc", model.includedDiskList().get(0).name()); - Assertions.assertEquals(1557166482, model.excludedDiskList().get(0).lun()); - Assertions.assertEquals("sidfv", model.excludedDiskList().get(0).name()); + Assertions.assertEquals(1622829877, model.numberOfDisksIncludedInBackup()); + Assertions.assertEquals(602738724, model.numberOfDisksAttachedToVm()); + Assertions.assertEquals(68719037, model.includedDiskList().get(0).lun()); + Assertions.assertEquals("dshf", model.includedDiskList().get(0).name()); + Assertions.assertEquals(2093197643, model.excludedDiskList().get(0).lun()); + Assertions.assertEquals("ctymoxoftp", model.excludedDiskList().get(0).name()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointMoveReadinessInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointMoveReadinessInfoTests.java index f625d52a4466..28b17736850a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointMoveReadinessInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointMoveReadinessInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,18 +12,9 @@ public final class RecoveryPointMoveReadinessInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RecoveryPointMoveReadinessInfo model - = BinaryData.fromString("{\"isReadyForMove\":true,\"additionalInfo\":\"k\"}") + = BinaryData.fromString("{\"isReadyForMove\":true,\"additionalInfo\":\"tw\"}") .toObject(RecoveryPointMoveReadinessInfo.class); - Assertions.assertEquals(true, model.isReadyForMove()); - Assertions.assertEquals("k", model.additionalInfo()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPointMoveReadinessInfo model - = new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("k"); - model = BinaryData.fromObject(model).toObject(RecoveryPointMoveReadinessInfo.class); - Assertions.assertEquals(true, model.isReadyForMove()); - Assertions.assertEquals("k", model.additionalInfo()); + Assertions.assertTrue(model.isReadyForMove()); + Assertions.assertEquals("tw", model.additionalInfo()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointPropertiesTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointPropertiesTests.java index cee114b33ec2..b0f07cf5a845 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointPropertiesTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,21 +11,11 @@ public final class RecoveryPointPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RecoveryPointProperties model - = BinaryData.fromString("{\"expiryTime\":\"oi\",\"ruleName\":\"ukry\",\"isSoftDeleted\":false}") - .toObject(RecoveryPointProperties.class); - Assertions.assertEquals("oi", model.expiryTime()); - Assertions.assertEquals("ukry", model.ruleName()); - Assertions.assertEquals(false, model.isSoftDeleted()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPointProperties model - = new RecoveryPointProperties().withExpiryTime("oi").withRuleName("ukry").withIsSoftDeleted(false); - model = BinaryData.fromObject(model).toObject(RecoveryPointProperties.class); - Assertions.assertEquals("oi", model.expiryTime()); - Assertions.assertEquals("ukry", model.ruleName()); - Assertions.assertEquals(false, model.isSoftDeleted()); + RecoveryPointProperties model = BinaryData + .fromString("{\"expiryTime\":\"zzewkfvhqcrai\",\"ruleName\":\"pnppfuf\",\"isSoftDeleted\":true}") + .toObject(RecoveryPointProperties.class); + Assertions.assertEquals("zzewkfvhqcrai", model.expiryTime()); + Assertions.assertEquals("pnppfuf", model.ruleName()); + Assertions.assertTrue(model.isSoftDeleted()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointRehydrationInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointRehydrationInfoTests.java index 2c98e7920f20..9fdab6b8258b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointRehydrationInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointRehydrationInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,18 +13,18 @@ public final class RecoveryPointRehydrationInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RecoveryPointRehydrationInfo model - = BinaryData.fromString("{\"rehydrationRetentionDuration\":\"cdp\",\"rehydrationPriority\":\"Standard\"}") + = BinaryData.fromString("{\"rehydrationRetentionDuration\":\"evkh\",\"rehydrationPriority\":\"High\"}") .toObject(RecoveryPointRehydrationInfo.class); - Assertions.assertEquals("cdp", model.rehydrationRetentionDuration()); - Assertions.assertEquals(RehydrationPriority.STANDARD, model.rehydrationPriority()); + Assertions.assertEquals("evkh", model.rehydrationRetentionDuration()); + Assertions.assertEquals(RehydrationPriority.HIGH, model.rehydrationPriority()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RecoveryPointRehydrationInfo model = new RecoveryPointRehydrationInfo().withRehydrationRetentionDuration("cdp") - .withRehydrationPriority(RehydrationPriority.STANDARD); + RecoveryPointRehydrationInfo model = new RecoveryPointRehydrationInfo().withRehydrationRetentionDuration("evkh") + .withRehydrationPriority(RehydrationPriority.HIGH); model = BinaryData.fromObject(model).toObject(RecoveryPointRehydrationInfo.class); - Assertions.assertEquals("cdp", model.rehydrationRetentionDuration()); - Assertions.assertEquals(RehydrationPriority.STANDARD, model.rehydrationPriority()); + Assertions.assertEquals("evkh", model.rehydrationRetentionDuration()); + Assertions.assertEquals(RehydrationPriority.HIGH, model.rehydrationPriority()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointResourceInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointResourceInnerTests.java index 89cb14158f53..1cf6bada62a8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointResourceInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointResourceInnerTests.java @@ -1,48 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.RecoveryPointResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPoint; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; import org.junit.jupiter.api.Assertions; public final class RecoveryPointResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RecoveryPointResourceInner model = BinaryData.fromString( - "{\"properties\":{\"objectType\":\"RecoveryPoint\"},\"eTag\":\"xjvuujqgidokg\",\"location\":\"ljyoxgvcltb\",\"tags\":{\"hkjeszzhbi\":\"c\",\"vecxgodebfqkk\":\"htxfvgxbfsmxnehm\"},\"id\":\"bmpukgriwflz\",\"name\":\"fbxzpuzycisp\",\"type\":\"qzahmgkbrp\"}") + "{\"properties\":{\"objectType\":\"RecoveryPoint\",\"threatStatus\":\"NotAvailable\",\"threatInfo\":[{\"threatTitle\":\"apnyiropuhpig\",\"threatDescription\":\"gylgqgitxmedjvcs\",\"lastUpdatedTime\":\"2021-02-26T17:22:44Z\",\"threatState\":\"Ignored\",\"threatStartTime\":\"2021-01-28T21:50:56Z\",\"threatEndTime\":\"2021-09-17T17:00:46Z\",\"threatURI\":\"zhxgktrmgucn\",\"threatSeverity\":\"Critical\"},{\"threatTitle\":\"eoellwptfdygp\",\"threatDescription\":\"b\",\"lastUpdatedTime\":\"2021-01-13T17:58:58Z\",\"threatState\":\"Active\",\"threatStartTime\":\"2021-09-04T05:04:19Z\",\"threatEndTime\":\"2021-04-15T23:44:21Z\",\"threatURI\":\"hhuao\",\"threatSeverity\":\"High\"},{\"threatTitle\":\"qeqxo\",\"threatDescription\":\"dahzxctobg\",\"lastUpdatedTime\":\"2021-09-01T00:32:36Z\",\"threatState\":\"Resolved\",\"threatStartTime\":\"2021-01-29T19:09:38Z\",\"threatEndTime\":\"2021-09-15T16:01:55Z\",\"threatURI\":\"tmgrcfbun\",\"threatSeverity\":\"Informational\"}]},\"tags\":{\"jy\":\"hhkxbp\",\"u\":\"jhxxjyn\"},\"location\":\"vkr\",\"eTag\":\"wbxqzvszjfau\",\"id\":\"fdxxivetvtcqaqtd\",\"name\":\"qmcbxvwvxyslqbhs\",\"type\":\"xoblytkbl\"}") .toObject(RecoveryPointResourceInner.class); - Assertions.assertEquals("ljyoxgvcltb", model.location()); - Assertions.assertEquals("c", model.tags().get("hkjeszzhbi")); - Assertions.assertEquals("xjvuujqgidokg", model.etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPointResourceInner model = new RecoveryPointResourceInner().withLocation("ljyoxgvcltb") - .withTags(mapOf("hkjeszzhbi", "c", "vecxgodebfqkk", "htxfvgxbfsmxnehm")) - .withProperties(new RecoveryPoint()) - .withEtag("xjvuujqgidokg"); - model = BinaryData.fromObject(model).toObject(RecoveryPointResourceInner.class); - Assertions.assertEquals("ljyoxgvcltb", model.location()); - Assertions.assertEquals("c", model.tags().get("hkjeszzhbi")); - Assertions.assertEquals("xjvuujqgidokg", model.etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(ThreatStatus.NOT_AVAILABLE, model.properties().threatStatus()); + Assertions.assertEquals(ThreatState.IGNORED, model.properties().threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.CRITICAL, model.properties().threatInfo().get(0).threatSeverity()); + Assertions.assertEquals("hhkxbp", model.tags().get("jy")); + Assertions.assertEquals("vkr", model.location()); + Assertions.assertEquals("wbxqzvszjfau", model.etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointResourceListTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointResourceListTests.java index e619cbb4b470..2e0369a407fb 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointResourceListTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointResourceListTests.java @@ -1,65 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.RecoveryPointResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPoint; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointResourceList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.RecoveryPointResourceList; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; import org.junit.jupiter.api.Assertions; public final class RecoveryPointResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RecoveryPointResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"objectType\":\"RecoveryPoint\"},\"eTag\":\"hslkevleggzf\",\"location\":\"u\",\"tags\":{\"vmezy\":\"vfaxkffeiith\",\"burvjxxjnspy\":\"shxmzsbbzoggigrx\",\"udwtiukbl\":\"ptkoenkoukn\",\"o\":\"ngkpocipazy\"},\"id\":\"gukgjnpiucgygevq\",\"name\":\"ntypmrbpizcdrqj\",\"type\":\"dpydn\"},{\"properties\":{\"objectType\":\"RecoveryPoint\"},\"eTag\":\"xdeoejzic\",\"location\":\"ifsjttgzfbishcb\",\"tags\":{\"alpbuxwgipwhon\":\"jdeyeamdpha\",\"kix\":\"wkgshwa\",\"eputtmrywnuzoqf\":\"bin\",\"qvyxlwhzlsicoho\":\"iyqzrnk\"},\"id\":\"qnwvlrya\",\"name\":\"w\",\"type\":\"heun\"},{\"properties\":{\"objectType\":\"RecoveryPoint\"},\"eTag\":\"hgyxzkonoc\",\"location\":\"koklya\",\"tags\":{\"zf\":\"onuq\",\"vjektcxsenh\":\"beypewrmjmw\",\"rzpwvlqdqgbiq\":\"lrsf\",\"vf\":\"lihkaetcktvfc\"},\"id\":\"nkymuctqhjfbebrj\",\"name\":\"xerf\",\"type\":\"wutttxfvjrbi\"}],\"nextLink\":\"hxepcyvahfnlj\"}") + "{\"value\":[{\"properties\":{\"objectType\":\"RecoveryPoint\",\"threatStatus\":\"NotAvailable\",\"threatInfo\":[{\"threatTitle\":\"slhs\",\"threatDescription\":\"deemao\",\"lastUpdatedTime\":\"2021-10-29T03:55:40Z\",\"threatState\":\"Resolved\",\"threatStartTime\":\"2021-01-24T19:42:44Z\",\"threatEndTime\":\"2021-08-09T06:17:33Z\",\"threatURI\":\"lmqkrhahvlj\",\"threatSeverity\":\"High\"}]},\"tags\":{\"ualaexqpvfadmw\":\"uhcdhm\",\"vgomz\":\"rcrgvx\",\"bnbbeldawkz\":\"fmisg\"},\"location\":\"liourqhak\",\"eTag\":\"hashsfwxosow\",\"id\":\"cugicjoox\",\"name\":\"j\",\"type\":\"bwpucwwfvovbv\"},{\"properties\":{\"objectType\":\"RecoveryPoint\",\"threatStatus\":\"Unknown\",\"threatInfo\":[{\"threatTitle\":\"yhz\",\"threatDescription\":\"uojgj\",\"lastUpdatedTime\":\"2021-01-13T06:34:52Z\",\"threatState\":\"Ignored\",\"threatStartTime\":\"2020-12-24T14:08:30Z\",\"threatEndTime\":\"2021-05-06T21:21:59Z\",\"threatURI\":\"cdytdxw\",\"threatSeverity\":\"Critical\"},{\"threatTitle\":\"rjaw\",\"threatDescription\":\"wgxhn\",\"lastUpdatedTime\":\"2021-10-10T16:17:48Z\",\"threatState\":\"Active\",\"threatStartTime\":\"2021-09-13T09:37:01Z\",\"threatEndTime\":\"2021-04-10T12:35:25Z\",\"threatURI\":\"gklwn\",\"threatSeverity\":\"Warning\"},{\"threatTitle\":\"dauwhvylwzbtd\",\"threatDescription\":\"ujznb\",\"lastUpdatedTime\":\"2021-07-30T07:39:19Z\",\"threatState\":\"InProgress\",\"threatStartTime\":\"2021-08-09T00:40Z\",\"threatEndTime\":\"2021-06-11T09:32:45Z\",\"threatURI\":\"lve\",\"threatSeverity\":\"Critical\"},{\"threatTitle\":\"pjmkhfxobbc\",\"threatDescription\":\"s\",\"lastUpdatedTime\":\"2021-04-25T18:58:37Z\",\"threatState\":\"Resolved\",\"threatStartTime\":\"2020-12-21T02:20:19Z\",\"threatEndTime\":\"2021-05-09T19:46:23Z\",\"threatURI\":\"bewtghfg\",\"threatSeverity\":\"Critical\"}]},\"tags\":{\"nmxiebwwaloayqc\":\"xzvlvqhjkbegib\",\"uzgwyzmhtx\":\"wrtz\",\"wxqpsrknftguvri\":\"ngmtsavjcb\"},\"location\":\"prwmdyvxqt\",\"eTag\":\"riwwroy\",\"id\":\"exrmcqibycnojvk\",\"name\":\"mefqsgzvahapjyzh\",\"type\":\"vgqzcjrvxd\"},{\"properties\":{\"objectType\":\"RecoveryPoint\",\"threatStatus\":\"Warning\",\"threatInfo\":[{\"threatTitle\":\"kvugfhzovawjvzun\",\"threatDescription\":\"thnnpr\",\"lastUpdatedTime\":\"2021-10-10T00:35:03Z\",\"threatState\":\"Resolved\",\"threatStartTime\":\"2021-10-08T13:40:42Z\",\"threatEndTime\":\"2021-07-12T01:35:59Z\",\"threatURI\":\"aejxd\",\"threatSeverity\":\"Informational\"},{\"threatTitle\":\"kzbbtd\",\"threatDescription\":\"mv\",\"lastUpdatedTime\":\"2021-02-24T15:47:12Z\",\"threatState\":\"Active\",\"threatStartTime\":\"2021-07-01T08:04:50Z\",\"threatEndTime\":\"2021-01-11T06:43:35Z\",\"threatURI\":\"kfpbs\",\"threatSeverity\":\"Critical\"}]},\"tags\":{\"us\":\"xl\",\"smv\":\"ttouwaboekqvkel\"},\"location\":\"wyjsflhhcaalnjix\",\"eTag\":\"xyawj\",\"id\":\"aq\",\"name\":\"slyjpkiid\",\"type\":\"yexz\"}],\"nextLink\":\"lixhnrztfol\"}") .toObject(RecoveryPointResourceList.class); - Assertions.assertEquals("hxepcyvahfnlj", model.nextLink()); - Assertions.assertEquals("u", model.value().get(0).location()); - Assertions.assertEquals("vfaxkffeiith", model.value().get(0).tags().get("vmezy")); - Assertions.assertEquals("hslkevleggzf", model.value().get(0).etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPointResourceList model = new RecoveryPointResourceList().withNextLink("hxepcyvahfnlj") - .withValue(Arrays.asList( - new RecoveryPointResourceInner().withLocation("u") - .withTags(mapOf("vmezy", "vfaxkffeiith", "burvjxxjnspy", "shxmzsbbzoggigrx", "udwtiukbl", - "ptkoenkoukn", "o", "ngkpocipazy")) - .withProperties(new RecoveryPoint()) - .withEtag("hslkevleggzf"), - new RecoveryPointResourceInner().withLocation("ifsjttgzfbishcb") - .withTags(mapOf("alpbuxwgipwhon", "jdeyeamdpha", "kix", "wkgshwa", "eputtmrywnuzoqf", "bin", - "qvyxlwhzlsicoho", "iyqzrnk")) - .withProperties(new RecoveryPoint()) - .withEtag("xdeoejzic"), - new RecoveryPointResourceInner().withLocation("koklya") - .withTags(mapOf("zf", "onuq", "vjektcxsenh", "beypewrmjmw", "rzpwvlqdqgbiq", "lrsf", "vf", - "lihkaetcktvfc")) - .withProperties(new RecoveryPoint()) - .withEtag("hgyxzkonoc"))); - model = BinaryData.fromObject(model).toObject(RecoveryPointResourceList.class); - Assertions.assertEquals("hxepcyvahfnlj", model.nextLink()); - Assertions.assertEquals("u", model.value().get(0).location()); - Assertions.assertEquals("vfaxkffeiith", model.value().get(0).tags().get("vmezy")); - Assertions.assertEquals("hslkevleggzf", model.value().get(0).etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("lixhnrztfol", model.nextLink()); + Assertions.assertEquals(ThreatStatus.NOT_AVAILABLE, model.value().get(0).properties().threatStatus()); + Assertions.assertEquals(ThreatState.RESOLVED, + model.value().get(0).properties().threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.HIGH, + model.value().get(0).properties().threatInfo().get(0).threatSeverity()); + Assertions.assertEquals("uhcdhm", model.value().get(0).tags().get("ualaexqpvfadmw")); + Assertions.assertEquals("liourqhak", model.value().get(0).location()); + Assertions.assertEquals("hashsfwxosow", model.value().get(0).etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointTests.java index 2ccf1030417b..d0720559c2a6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointTests.java @@ -1,21 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPoint; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; +import org.junit.jupiter.api.Assertions; public final class RecoveryPointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RecoveryPoint model = BinaryData.fromString("{\"objectType\":\"RecoveryPoint\"}").toObject(RecoveryPoint.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPoint model = new RecoveryPoint(); - model = BinaryData.fromObject(model).toObject(RecoveryPoint.class); + RecoveryPoint model = BinaryData.fromString( + "{\"objectType\":\"RecoveryPoint\",\"threatStatus\":\"Unknown\",\"threatInfo\":[{\"threatTitle\":\"fbkrvrnsvs\",\"threatDescription\":\"johxcrsb\",\"lastUpdatedTime\":\"2021-11-28T02:47:56Z\",\"threatState\":\"Resolved\",\"threatStartTime\":\"2021-03-15T09:55:13Z\",\"threatEndTime\":\"2021-11-24T07:21:32Z\",\"threatURI\":\"bhsqfsubcgjbirxb\",\"threatSeverity\":\"High\"},{\"threatTitle\":\"rfbjf\",\"threatDescription\":\"w\",\"lastUpdatedTime\":\"2021-01-25T00:48:06Z\",\"threatState\":\"Ignored\",\"threatStartTime\":\"2021-03-22T01:55:17Z\",\"threatEndTime\":\"2021-01-31T07:10:37Z\",\"threatURI\":\"bexilzznfqqnv\",\"threatSeverity\":\"Informational\"},{\"threatTitle\":\"taruoujmkcj\",\"threatDescription\":\"qytjrybnwjewgd\",\"lastUpdatedTime\":\"2021-04-13T17:49:37Z\",\"threatState\":\"Resolved\",\"threatStartTime\":\"2021-10-08T09:31:49Z\",\"threatEndTime\":\"2021-09-08T11:50:32Z\",\"threatURI\":\"pehindoygm\",\"threatSeverity\":\"High\"},{\"threatTitle\":\"nzdndslgna\",\"threatDescription\":\"igynduhavhqlk\",\"lastUpdatedTime\":\"2021-11-15T18:39:31Z\",\"threatState\":\"Resolved\",\"threatStartTime\":\"2021-08-13T06:24:50Z\",\"threatEndTime\":\"2021-04-19T22:18:17Z\",\"threatURI\":\"ycduier\",\"threatSeverity\":\"Informational\"}]}") + .toObject(RecoveryPoint.class); + Assertions.assertEquals(ThreatStatus.UNKNOWN, model.threatStatus()); + Assertions.assertEquals(ThreatState.RESOLVED, model.threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.HIGH, model.threatInfo().get(0).threatSeverity()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointTierInformationTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointTierInformationTests.java index fce555a3a6f8..2925648c69aa 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointTierInformationTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointTierInformationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -8,42 +8,16 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierInformation; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierStatus; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class RecoveryPointTierInformationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RecoveryPointTierInformation model = BinaryData.fromString( - "{\"type\":\"HardenedRP\",\"status\":\"Deleted\",\"extendedInfo\":{\"yaomtb\":\"orgguf\",\"pjbi\":\"hhavgrvkffovjz\"}}") + "{\"type\":\"Invalid\",\"status\":\"Deleted\",\"extendedInfo\":{\"wqapnedgfbcvk\":\"yjrxsagafcnih\",\"pkeqdcvdrhvoo\":\"vq\",\"dopcjwvnh\":\"sotbob\",\"mgxcxrslpm\":\"ld\"}}") .toObject(RecoveryPointTierInformation.class); - Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.type()); + Assertions.assertEquals(RecoveryPointTierType.INVALID, model.type()); Assertions.assertEquals(RecoveryPointTierStatus.DELETED, model.status()); - Assertions.assertEquals("orgguf", model.extendedInfo().get("yaomtb")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPointTierInformation model - = new RecoveryPointTierInformation().withType(RecoveryPointTierType.HARDENED_RP) - .withStatus(RecoveryPointTierStatus.DELETED) - .withExtendedInfo(mapOf("yaomtb", "orgguf", "pjbi", "hhavgrvkffovjz")); - model = BinaryData.fromObject(model).toObject(RecoveryPointTierInformation.class); - Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.type()); - Assertions.assertEquals(RecoveryPointTierStatus.DELETED, model.status()); - Assertions.assertEquals("orgguf", model.extendedInfo().get("yaomtb")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("yjrxsagafcnih", model.extendedInfo().get("wqapnedgfbcvk")); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointTierInformationV2Tests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointTierInformationV2Tests.java index 9e7ad65de756..9104711edaa9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointTierInformationV2Tests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointTierInformationV2Tests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -8,42 +8,16 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierInformationV2; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierStatus; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class RecoveryPointTierInformationV2Tests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RecoveryPointTierInformationV2 model = BinaryData.fromString( - "{\"type\":\"InstantRP\",\"status\":\"Rehydrated\",\"extendedInfo\":{\"rxvxcjzh\":\"mmbcxfhbcp\",\"qscjavftjuh\":\"izxfpxt\"}}") + "{\"type\":\"HardenedRP\",\"status\":\"Disabled\",\"extendedInfo\":{\"xfrdd\":\"k\",\"atiz\":\"c\",\"zq\":\"ronasxift\"}}") .toObject(RecoveryPointTierInformationV2.class); - Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.type()); - Assertions.assertEquals(RecoveryPointTierStatus.REHYDRATED, model.status()); - Assertions.assertEquals("mmbcxfhbcp", model.extendedInfo().get("rxvxcjzh")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoveryPointTierInformationV2 model - = new RecoveryPointTierInformationV2().withType(RecoveryPointTierType.INSTANT_RP) - .withStatus(RecoveryPointTierStatus.REHYDRATED) - .withExtendedInfo(mapOf("rxvxcjzh", "mmbcxfhbcp", "qscjavftjuh", "izxfpxt")); - model = BinaryData.fromObject(model).toObject(RecoveryPointTierInformationV2.class); - Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.type()); - Assertions.assertEquals(RecoveryPointTierStatus.REHYDRATED, model.status()); - Assertions.assertEquals("mmbcxfhbcp", model.extendedInfo().get("rxvxcjzh")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("k", model.extendedInfo().get("xfrdd")); + Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.type()); + Assertions.assertEquals(RecoveryPointTierStatus.DISABLED, model.status()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsGetWithResponseMockTests.java index 7c216e1cfc7c..242acc469afd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsGetWithResponseMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,6 +11,9 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointResource; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -21,7 +24,7 @@ public final class RecoveryPointsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"objectType\":\"RecoveryPoint\"},\"eTag\":\"runfhiucnmfb\",\"location\":\"paqkt\",\"tags\":{\"xiuxqggvqrnhy\":\"mzuedkyzbfvxovq\",\"rqrkijpeuqlsdx\":\"lwcjsqggjhffb\"},\"id\":\"qztvx\",\"name\":\"mwwmjswenaww\",\"type\":\"me\"}"; + = "{\"properties\":{\"objectType\":\"RecoveryPoint\",\"threatStatus\":\"UnHealthy\",\"threatInfo\":[{\"threatTitle\":\"gftcvbiiftksdwg\",\"threatDescription\":\"kefgmwdhce\",\"lastUpdatedTime\":\"2021-07-30T07:38:02Z\",\"threatState\":\"Resolved\",\"threatStartTime\":\"2021-09-27T11:55:39Z\",\"threatEndTime\":\"2021-03-24T17:25:13Z\",\"threatURI\":\"zoutb\",\"threatSeverity\":\"Critical\"},{\"threatTitle\":\"zeka\",\"threatDescription\":\"lyzgsnor\",\"lastUpdatedTime\":\"2021-01-09T01:50:27Z\",\"threatState\":\"InProgress\",\"threatStartTime\":\"2021-08-18T09:31:15Z\",\"threatEndTime\":\"2021-09-03T19:01:34Z\",\"threatURI\":\"mrxkhlobvv\",\"threatSeverity\":\"Critical\"}]},\"tags\":{\"iyu\":\"diqayfl\",\"rswhbuubpyro\":\"snuudtelvhyibdr\"},\"location\":\"joxztfwfqchvczev\",\"eTag\":\"nctagfyvrtpqpem\",\"id\":\"cgkrepdqhqy\",\"name\":\"wqwemvxqabckmze\",\"type\":\"xin\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +34,15 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RecoveryPointResource response = manager.recoveryPoints() - .getWithResponse("guhfupe", "asvvoqsbpkfl", "nfkgxsyaowuzowpu", "hdkcprgu", "xrztiochlu", "ixmqrudjizcbf", + .getWithResponse("kqv", "qepdx", "ltuubw", "vpjbowcpjqduq", "ixexkydfbwljavhu", "rkjd", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("paqkt", response.location()); - Assertions.assertEquals("mzuedkyzbfvxovq", response.tags().get("xiuxqggvqrnhy")); - Assertions.assertEquals("runfhiucnmfb", response.etag()); + Assertions.assertEquals(ThreatStatus.UN_HEALTHY, response.properties().threatStatus()); + Assertions.assertEquals(ThreatState.RESOLVED, response.properties().threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.CRITICAL, response.properties().threatInfo().get(0).threatSeverity()); + Assertions.assertEquals("diqayfl", response.tags().get("iyu")); + Assertions.assertEquals("joxztfwfqchvczev", response.location()); + Assertions.assertEquals("nctagfyvrtpqpem", response.etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsListMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsListMockTests.java index 4f19efc2a037..77e42b1f01cd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsListMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,6 +12,9 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointResource; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -22,7 +25,7 @@ public final class RecoveryPointsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"objectType\":\"RecoveryPoint\"},\"eTag\":\"xtlt\",\"location\":\"lkrdpqgfhy\",\"tags\":{\"jajqmatxjt\":\"akkldgrcwfcmfcn\",\"pqagynoiprn\":\"elnzqgxxgfbbmt\"},\"id\":\"calincryqxz\",\"name\":\"aqzi\",\"type\":\"mqimiymqru\"}]}"; + = "{\"value\":[{\"properties\":{\"objectType\":\"RecoveryPoint\",\"threatStatus\":\"Unknown\",\"threatInfo\":[{\"threatTitle\":\"pkrietbgni\",\"threatDescription\":\"owwzkyfwnwpi\",\"lastUpdatedTime\":\"2021-12-08T12:27:35Z\",\"threatState\":\"Resolved\",\"threatStartTime\":\"2021-10-21T18:59:22Z\",\"threatEndTime\":\"2021-11-02T13:52:08Z\",\"threatURI\":\"pk\",\"threatSeverity\":\"Informational\"},{\"threatTitle\":\"xxij\",\"threatDescription\":\"kwsdgkj\",\"lastUpdatedTime\":\"2021-06-14T02:30:10Z\",\"threatState\":\"InProgress\",\"threatStartTime\":\"2021-07-20T04:54:29Z\",\"threatEndTime\":\"2021-10-18T10:28:50Z\",\"threatURI\":\"wefcvoinw\",\"threatSeverity\":\"Warning\"}]},\"tags\":{\"atdavuqmcbyms\":\"wyxqiclad\"},\"location\":\"bjlquv\",\"eTag\":\"zcjumvpsimioyoig\",\"id\":\"miqwnnrac\",\"name\":\"ibb\",\"type\":\"qpspkladydgnha\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +35,16 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.recoveryPoints() - .list("n", "oywsxvjabjqqaxu", "vym", "nudn", "oabhjxwxqweuip", "pvksmit", com.azure.core.util.Context.NONE); + .list("greohtwhlpuzjp", "eezn", "angp", "bfaxyxzlbc", "phmsexroq", "ndktxfv", + com.azure.core.util.Context.NONE); - Assertions.assertEquals("lkrdpqgfhy", response.iterator().next().location()); - Assertions.assertEquals("akkldgrcwfcmfcn", response.iterator().next().tags().get("jajqmatxjt")); - Assertions.assertEquals("xtlt", response.iterator().next().etag()); + Assertions.assertEquals(ThreatStatus.UNKNOWN, response.iterator().next().properties().threatStatus()); + Assertions.assertEquals(ThreatState.RESOLVED, + response.iterator().next().properties().threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.INFORMATIONAL, + response.iterator().next().properties().threatInfo().get(0).threatSeverity()); + Assertions.assertEquals("wyxqiclad", response.iterator().next().tags().get("atdavuqmcbyms")); + Assertions.assertEquals("bjlquv", response.iterator().next().location()); + Assertions.assertEquals("zcjumvpsimioyoig", response.iterator().next().etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsRecommendedForMovesListMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsRecommendedForMovesListMockTests.java index e72152e62662..116f9bfe67ec 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsRecommendedForMovesListMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsRecommendedForMovesListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,6 +13,9 @@ import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; import com.azure.resourcemanager.recoveryservicesbackup.models.ListRecoveryPointsRecommendedForMoveRequest; import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointResource; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; @@ -24,7 +27,7 @@ public final class RecoveryPointsRecommendedForMovesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"objectType\":\"RecoveryPoint\"},\"eTag\":\"ubz\",\"location\":\"vpvdylytcovqse\",\"tags\":{\"xzfxn\":\"fjb\"},\"id\":\"mlbmuoswkjm\",\"name\":\"ihdcyyyzlw\",\"type\":\"bwzjnufzrf\"}]}"; + = "{\"value\":[{\"properties\":{\"objectType\":\"RecoveryPoint\",\"threatStatus\":\"Unknown\",\"threatInfo\":[{\"threatTitle\":\"pdgzigjsugswhg\",\"threatDescription\":\"odkwwnbafocto\",\"lastUpdatedTime\":\"2021-09-23T12:44:57Z\",\"threatState\":\"Ignored\",\"threatStartTime\":\"2021-08-24T11:15:50Z\",\"threatEndTime\":\"2021-08-10T05:22:16Z\",\"threatURI\":\"bgnvkervqchoadh\",\"threatSeverity\":\"Critical\"},{\"threatTitle\":\"vzvsp\",\"threatDescription\":\"dsrgfajg\",\"lastUpdatedTime\":\"2021-10-09T22:42:19Z\",\"threatState\":\"InProgress\",\"threatStartTime\":\"2021-10-24T09:16:19Z\",\"threatEndTime\":\"2021-01-24T12:34:05Z\",\"threatURI\":\"hjnlt\",\"threatSeverity\":\"Informational\"},{\"threatTitle\":\"dvqydie\",\"threatDescription\":\"kw\",\"lastUpdatedTime\":\"2021-06-23T11:12:51Z\",\"threatState\":\"InProgress\",\"threatStartTime\":\"2021-01-03T14:13:55Z\",\"threatEndTime\":\"2021-05-03T09:58:46Z\",\"threatURI\":\"oebw\",\"threatSeverity\":\"Warning\"}]},\"tags\":{\"aklozk\":\"banbaupwtzv\",\"ssanbtttkgsuxun\":\"bzrpejp\"},\"location\":\"wgkpjhboyikebh\",\"eTag\":\"ksl\",\"id\":\"lokhueoijyzcqyp\",\"name\":\"qzufgsyfejyvdwt\",\"type\":\"xptpqaya\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,13 +37,18 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.recoveryPointsRecommendedForMoves() - .list("iuomzczfkiceevs", "axwspcaxikhfjqeb", "lcxkxgzzromv", "g", "sem", - new ListRecoveryPointsRecommendedForMoveRequest().withObjectType("esrfsvpinkzpatq") - .withExcludedRPList(Arrays.asList("swxspvckojaz", "bgspf")), + .list("wzm", "ilrixysf", "imsqywwwmhk", "uwaedrympmlqoi", "hzdue", + new ListRecoveryPointsRecommendedForMoveRequest().withObjectType("hapfjiik") + .withExcludedRPList(Arrays.asList("iqfl", "ejhpclbiedfsbwc", "ivbvzi", "bwxgoooxzpra")), com.azure.core.util.Context.NONE); - Assertions.assertEquals("vpvdylytcovqse", response.iterator().next().location()); - Assertions.assertEquals("fjb", response.iterator().next().tags().get("xzfxn")); - Assertions.assertEquals("ubz", response.iterator().next().etag()); + Assertions.assertEquals(ThreatStatus.UNKNOWN, response.iterator().next().properties().threatStatus()); + Assertions.assertEquals(ThreatState.IGNORED, + response.iterator().next().properties().threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.CRITICAL, + response.iterator().next().properties().threatInfo().get(0).threatSeverity()); + Assertions.assertEquals("banbaupwtzv", response.iterator().next().tags().get("aklozk")); + Assertions.assertEquals("wgkpjhboyikebh", response.iterator().next().location()); + Assertions.assertEquals("ksl", response.iterator().next().etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsUpdateWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsUpdateWithResponseMockTests.java new file mode 100644 index 000000000000..2199a3b424e3 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsUpdateWithResponseMockTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; +import com.azure.resourcemanager.recoveryservicesbackup.models.PatchRecoveryPointInput; +import com.azure.resourcemanager.recoveryservicesbackup.models.PatchRecoveryPointPropertiesInput; +import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointResource; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatStatus; +import com.azure.resourcemanager.recoveryservicesbackup.models.UpdateRecoveryPointRequest; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class RecoveryPointsUpdateWithResponseMockTests { + @Test + public void testUpdateWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"objectType\":\"RecoveryPoint\",\"threatStatus\":\"Unknown\",\"threatInfo\":[{\"threatTitle\":\"qhs\",\"threatDescription\":\"tfpwpqbyejuw\",\"lastUpdatedTime\":\"2021-01-31T13:34:24Z\",\"threatState\":\"InProgress\",\"threatStartTime\":\"2021-08-13T22:30:52Z\",\"threatEndTime\":\"2021-08-02T20:37:02Z\",\"threatURI\":\"ginz\",\"threatSeverity\":\"High\"},{\"threatTitle\":\"jkhnjcmr\",\"threatDescription\":\"fmkhcqtwmlmhjnqt\",\"lastUpdatedTime\":\"2021-08-28T07:53:40Z\",\"threatState\":\"Active\",\"threatStartTime\":\"2021-03-23T21:46:18Z\",\"threatEndTime\":\"2021-11-25T13:43:37Z\",\"threatURI\":\"gpokddxejhhkvgu\",\"threatSeverity\":\"Critical\"}]},\"tags\":{\"qynspgbvoffb\":\"bkew\",\"xqokmyrlji\":\"kwvdxa\",\"pzuyudivbxnh\":\"lzbnobrqlpbcjt\"},\"location\":\"eaeonqelwgdh\",\"eTag\":\"uzytz\",\"id\":\"ogatmoljiy\",\"name\":\"mpinmzvfkneerzzt\",\"type\":\"knsjulugd\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + RecoveryServicesBackupManager manager = RecoveryServicesBackupManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + RecoveryPointResource response = manager.recoveryPoints() + .updateWithResponse("twukex", "gpmnmabe", "dqilwgdfpf", "fpcvstclgqrvwerf", "xbsmtbljje", "hci", + new UpdateRecoveryPointRequest().withProperties( + new PatchRecoveryPointInput().withRecoveryPointProperties(new PatchRecoveryPointPropertiesInput() + .withExpiryTime(OffsetDateTime.parse("2020-12-23T04:39:51Z")))), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(ThreatStatus.UNKNOWN, response.properties().threatStatus()); + Assertions.assertEquals(ThreatState.IN_PROGRESS, response.properties().threatInfo().get(0).threatState()); + Assertions.assertEquals(ThreatSeverity.HIGH, response.properties().threatInfo().get(0).threatSeverity()); + Assertions.assertEquals("bkew", response.tags().get("qynspgbvoffb")); + Assertions.assertEquals("eaeonqelwgdh", response.location()); + Assertions.assertEquals("uzytz", response.etag()); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardOperationDetailTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardOperationDetailTests.java index 9c79c8810720..074238b8ea29 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardOperationDetailTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardOperationDetailTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,19 +12,18 @@ public final class ResourceGuardOperationDetailTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceGuardOperationDetail model = BinaryData - .fromString("{\"vaultCriticalOperation\":\"aysjkixqtnqttez\",\"defaultResourceRequest\":\"fffiak\"}") + .fromString("{\"vaultCriticalOperation\":\"fkx\",\"defaultResourceRequest\":\"cbrwjiutgnjizbe\"}") .toObject(ResourceGuardOperationDetail.class); - Assertions.assertEquals("aysjkixqtnqttez", model.vaultCriticalOperation()); - Assertions.assertEquals("fffiak", model.defaultResourceRequest()); + Assertions.assertEquals("fkx", model.vaultCriticalOperation()); + Assertions.assertEquals("cbrwjiutgnjizbe", model.defaultResourceRequest()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceGuardOperationDetail model - = new ResourceGuardOperationDetail().withVaultCriticalOperation("aysjkixqtnqttez") - .withDefaultResourceRequest("fffiak"); + ResourceGuardOperationDetail model = new ResourceGuardOperationDetail().withVaultCriticalOperation("fkx") + .withDefaultResourceRequest("cbrwjiutgnjizbe"); model = BinaryData.fromObject(model).toObject(ResourceGuardOperationDetail.class); - Assertions.assertEquals("aysjkixqtnqttez", model.vaultCriticalOperation()); - Assertions.assertEquals("fffiak", model.defaultResourceRequest()); + Assertions.assertEquals("fkx", model.vaultCriticalOperation()); + Assertions.assertEquals("cbrwjiutgnjizbe", model.defaultResourceRequest()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxiesGetMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxiesGetMockTests.java deleted file mode 100644 index 6bcd64e99e96..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxiesGetMockTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBaseResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ResourceGuardProxiesGetMockTests { - @Test - public void testGet() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"resourceGuardResourceId\":\"ftedzuubjtvgjsx\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"jvavdpwwo\",\"defaultResourceRequest\":\"d\"}],\"lastUpdatedTime\":\"titsf\",\"description\":\"fwanm\"},\"eTag\":\"scauwazcgwdfr\",\"location\":\"wgybj\",\"tags\":{\"cvgllixdg\":\"ok\",\"xprwpxs\":\"yfgwewqkj\"},\"id\":\"ohutxlcsk\",\"name\":\"tezuug\",\"type\":\"gzlf\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - RecoveryServicesBackupManager manager = RecoveryServicesBackupManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.resourceGuardProxies().get("m", "qgnnbz", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wgybj", response.iterator().next().location()); - Assertions.assertEquals("ok", response.iterator().next().tags().get("cvgllixdg")); - Assertions.assertEquals("ftedzuubjtvgjsx", response.iterator().next().properties().resourceGuardResourceId()); - Assertions.assertEquals("jvavdpwwo", - response.iterator().next().properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions.assertEquals("d", - response.iterator().next().properties().resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("titsf", response.iterator().next().properties().lastUpdatedTime()); - Assertions.assertEquals("fwanm", response.iterator().next().properties().description()); - Assertions.assertEquals("scauwazcgwdfr", response.iterator().next().etag()); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyBaseResourceInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyBaseResourceInnerTests.java index 680bed47febc..8fd98fbcf0f7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyBaseResourceInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyBaseResourceInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -17,43 +17,44 @@ public final class ResourceGuardProxyBaseResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceGuardProxyBaseResourceInner model = BinaryData.fromString( - "{\"properties\":{\"resourceGuardResourceId\":\"ejvegrhbpnaixex\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"reaxhcexdr\",\"defaultResourceRequest\":\"qahqkghtpwijn\"}],\"lastUpdatedTime\":\"jsvfycxzbfvoowv\",\"description\":\"mtg\"},\"eTag\":\"ppyostronzmyhgf\",\"location\":\"pnsxkmcwaek\",\"tags\":{\"ikkx\":\"reafxtsgumhjg\",\"qpvuzlmvfelf\":\"slol\",\"crpw\":\"tgp\"},\"id\":\"xeznoi\",\"name\":\"brnjwmw\",\"type\":\"pn\"}") + "{\"properties\":{\"resourceGuardResourceId\":\"frgnawbabgfbktyj\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"l\",\"defaultResourceRequest\":\"yq\"},{\"vaultCriticalOperation\":\"rbzg\",\"defaultResourceRequest\":\"oxqmjeajc\"}],\"lastUpdatedTime\":\"yqgxhlus\",\"description\":\"xisimjceagbj\"},\"tags\":{\"qipubyz\":\"sumywzashxgonoyj\",\"gv\":\"clkfkee\",\"l\":\"pemtuoqu\"},\"location\":\"gqa\",\"eTag\":\"igflqqbtnyjp\",\"id\":\"xdb\",\"name\":\"vabm\",\"type\":\"msxbaevwjcnkott\"}") .toObject(ResourceGuardProxyBaseResourceInner.class); - Assertions.assertEquals("pnsxkmcwaek", model.location()); - Assertions.assertEquals("reafxtsgumhjg", model.tags().get("ikkx")); - Assertions.assertEquals("ejvegrhbpnaixex", model.properties().resourceGuardResourceId()); - Assertions.assertEquals("reaxhcexdr", + Assertions.assertEquals("frgnawbabgfbktyj", model.properties().resourceGuardResourceId()); + Assertions.assertEquals("l", model.properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions.assertEquals("qahqkghtpwijn", + Assertions.assertEquals("yq", model.properties().resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("jsvfycxzbfvoowv", model.properties().lastUpdatedTime()); - Assertions.assertEquals("mtg", model.properties().description()); - Assertions.assertEquals("ppyostronzmyhgf", model.etag()); + Assertions.assertEquals("yqgxhlus", model.properties().lastUpdatedTime()); + Assertions.assertEquals("xisimjceagbj", model.properties().description()); + Assertions.assertEquals("sumywzashxgonoyj", model.tags().get("qipubyz")); + Assertions.assertEquals("gqa", model.location()); + Assertions.assertEquals("igflqqbtnyjp", model.etag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceGuardProxyBaseResourceInner model - = new ResourceGuardProxyBaseResourceInner().withLocation("pnsxkmcwaek") - .withTags(mapOf("ikkx", "reafxtsgumhjg", "qpvuzlmvfelf", "slol", "crpw", "tgp")) - .withProperties(new ResourceGuardProxyBase().withResourceGuardResourceId("ejvegrhbpnaixex") - .withResourceGuardOperationDetails( - Arrays.asList(new ResourceGuardOperationDetail().withVaultCriticalOperation("reaxhcexdr") - .withDefaultResourceRequest("qahqkghtpwijn"))) - .withLastUpdatedTime("jsvfycxzbfvoowv") - .withDescription("mtg")) - .withEtag("ppyostronzmyhgf"); + ResourceGuardProxyBaseResourceInner model = new ResourceGuardProxyBaseResourceInner() + .withProperties(new ResourceGuardProxyBase().withResourceGuardResourceId("frgnawbabgfbktyj") + .withResourceGuardOperationDetails(Arrays.asList( + new ResourceGuardOperationDetail().withVaultCriticalOperation("l").withDefaultResourceRequest("yq"), + new ResourceGuardOperationDetail().withVaultCriticalOperation("rbzg") + .withDefaultResourceRequest("oxqmjeajc"))) + .withLastUpdatedTime("yqgxhlus") + .withDescription("xisimjceagbj")) + .withTags(mapOf("qipubyz", "sumywzashxgonoyj", "gv", "clkfkee", "l", "pemtuoqu")) + .withLocation("gqa") + .withEtag("igflqqbtnyjp"); model = BinaryData.fromObject(model).toObject(ResourceGuardProxyBaseResourceInner.class); - Assertions.assertEquals("pnsxkmcwaek", model.location()); - Assertions.assertEquals("reafxtsgumhjg", model.tags().get("ikkx")); - Assertions.assertEquals("ejvegrhbpnaixex", model.properties().resourceGuardResourceId()); - Assertions.assertEquals("reaxhcexdr", + Assertions.assertEquals("frgnawbabgfbktyj", model.properties().resourceGuardResourceId()); + Assertions.assertEquals("l", model.properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions.assertEquals("qahqkghtpwijn", + Assertions.assertEquals("yq", model.properties().resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("jsvfycxzbfvoowv", model.properties().lastUpdatedTime()); - Assertions.assertEquals("mtg", model.properties().description()); - Assertions.assertEquals("ppyostronzmyhgf", model.etag()); + Assertions.assertEquals("yqgxhlus", model.properties().lastUpdatedTime()); + Assertions.assertEquals("xisimjceagbj", model.properties().description()); + Assertions.assertEquals("sumywzashxgonoyj", model.tags().get("qipubyz")); + Assertions.assertEquals("gqa", model.location()); + Assertions.assertEquals("igflqqbtnyjp", model.etag()); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyBaseResourceListTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyBaseResourceListTests.java index e44e4e604878..e529b122745b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyBaseResourceListTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyBaseResourceListTests.java @@ -1,80 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ResourceGuardProxyBaseResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardOperationDetail; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBase; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBaseResourceList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.ResourceGuardProxyBaseResourceList; import org.junit.jupiter.api.Assertions; public final class ResourceGuardProxyBaseResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceGuardProxyBaseResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"resourceGuardResourceId\":\"owepbqpcrfkb\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"njv\",\"defaultResourceRequest\":\"wxlp\"},{\"vaultCriticalOperation\":\"kftnkhtjsyin\",\"defaultResourceRequest\":\"fq\"},{\"vaultCriticalOperation\":\"mtdh\",\"defaultResourceRequest\":\"dvypgikdgsz\"},{\"vaultCriticalOperation\":\"kbir\",\"defaultResourceRequest\":\"uzhlhkjoqrv\"}],\"lastUpdatedTime\":\"aatjinrvgoupmfi\",\"description\":\"fggjioolvr\"},\"eTag\":\"kvtkkg\",\"location\":\"lqwjygvjayvblm\",\"tags\":{\"rqufegxuvwz\":\"zuhbxvvyhgsopb\"},\"id\":\"bnhlmc\",\"name\":\"l\",\"type\":\"dn\"}],\"nextLink\":\"tvgbmhrixkwmy\"}") + "{\"value\":[{\"properties\":{\"resourceGuardResourceId\":\"iuiyqvldas\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"i\",\"defaultResourceRequest\":\"qzlgcndhzxrrfcfs\"},{\"vaultCriticalOperation\":\"khgsnxuwwkpphefs\",\"defaultResourceRequest\":\"xlb\"},{\"vaultCriticalOperation\":\"omeikjcl\",\"defaultResourceRequest\":\"acnmwpfsuqtaaz\"},{\"vaultCriticalOperation\":\"bxyxoy\",\"defaultResourceRequest\":\"uqqiqezxlhd\"}],\"lastUpdatedTime\":\"qdcadwvps\",\"description\":\"j\"},\"tags\":{\"rz\":\"jriyb\",\"wnjkgvfn\":\"epnxwd\"},\"location\":\"aursqftibtyi\",\"eTag\":\"yvp\",\"id\":\"fqjpnqno\",\"name\":\"w\",\"type\":\"bedenrexkx\"},{\"properties\":{\"resourceGuardResourceId\":\"xvucnul\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"jevdyznf\",\"defaultResourceRequest\":\"svkskmqoz\"}],\"lastUpdatedTime\":\"ivyhjrliizjixlqf\",\"description\":\"fkwa\"},\"tags\":{\"lqxsjxtelex\":\"lronqqlmg\"},\"location\":\"uqbo\",\"eTag\":\"o\",\"id\":\"qocarkuzlbc\",\"name\":\"ndtsnxawqytll\",\"type\":\"dyz\"},{\"properties\":{\"resourceGuardResourceId\":\"ckze\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"kck\",\"defaultResourceRequest\":\"ymx\"}],\"lastUpdatedTime\":\"abjkdtfohfao\",\"description\":\"vkiwrsiwdyjqu\"},\"tags\":{\"h\":\"crraueekcsu\"},\"location\":\"ddacbcbgydlqidy\",\"eTag\":\"hmptyrilkfbn\",\"id\":\"qxvztpbnfnqtxjt\",\"name\":\"m\",\"type\":\"lswbnf\"},{\"properties\":{\"resourceGuardResourceId\":\"epl\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"ns\",\"defaultResourceRequest\":\"ygleexa\"}],\"lastUpdatedTime\":\"mywhsb\",\"description\":\"arycsjjzyvoaqa\"},\"tags\":{\"rbhmpfulubef\":\"ehzptdmk\",\"fununmpzk\":\"ybpmf\"},\"location\":\"fyif\",\"eTag\":\"schlzvfictnkj\",\"id\":\"gcwn\",\"name\":\"hbkgfyrt\",\"type\":\"gm\"}],\"nextLink\":\"j\"}") .toObject(ResourceGuardProxyBaseResourceList.class); - Assertions.assertEquals("tvgbmhrixkwmy", model.nextLink()); - Assertions.assertEquals("lqwjygvjayvblm", model.value().get(0).location()); - Assertions.assertEquals("zuhbxvvyhgsopb", model.value().get(0).tags().get("rqufegxuvwz")); - Assertions.assertEquals("owepbqpcrfkb", model.value().get(0).properties().resourceGuardResourceId()); - Assertions.assertEquals("njv", + Assertions.assertEquals("j", model.nextLink()); + Assertions.assertEquals("iuiyqvldas", model.value().get(0).properties().resourceGuardResourceId()); + Assertions.assertEquals("i", model.value().get(0).properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions.assertEquals("wxlp", + Assertions.assertEquals("qzlgcndhzxrrfcfs", model.value().get(0).properties().resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("aatjinrvgoupmfi", model.value().get(0).properties().lastUpdatedTime()); - Assertions.assertEquals("fggjioolvr", model.value().get(0).properties().description()); - Assertions.assertEquals("kvtkkg", model.value().get(0).etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceGuardProxyBaseResourceList model - = new ResourceGuardProxyBaseResourceList().withNextLink("tvgbmhrixkwmy") - .withValue(Arrays.asList(new ResourceGuardProxyBaseResourceInner().withLocation("lqwjygvjayvblm") - .withTags(mapOf("rqufegxuvwz", "zuhbxvvyhgsopb")) - .withProperties(new ResourceGuardProxyBase().withResourceGuardResourceId("owepbqpcrfkb") - .withResourceGuardOperationDetails(Arrays.asList( - new ResourceGuardOperationDetail().withVaultCriticalOperation("njv") - .withDefaultResourceRequest("wxlp"), - new ResourceGuardOperationDetail().withVaultCriticalOperation("kftnkhtjsyin") - .withDefaultResourceRequest("fq"), - new ResourceGuardOperationDetail().withVaultCriticalOperation("mtdh") - .withDefaultResourceRequest("dvypgikdgsz"), - new ResourceGuardOperationDetail().withVaultCriticalOperation("kbir") - .withDefaultResourceRequest("uzhlhkjoqrv"))) - .withLastUpdatedTime("aatjinrvgoupmfi") - .withDescription("fggjioolvr")) - .withEtag("kvtkkg"))); - model = BinaryData.fromObject(model).toObject(ResourceGuardProxyBaseResourceList.class); - Assertions.assertEquals("tvgbmhrixkwmy", model.nextLink()); - Assertions.assertEquals("lqwjygvjayvblm", model.value().get(0).location()); - Assertions.assertEquals("zuhbxvvyhgsopb", model.value().get(0).tags().get("rqufegxuvwz")); - Assertions.assertEquals("owepbqpcrfkb", model.value().get(0).properties().resourceGuardResourceId()); - Assertions.assertEquals("njv", - model.value().get(0).properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions.assertEquals("wxlp", - model.value().get(0).properties().resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("aatjinrvgoupmfi", model.value().get(0).properties().lastUpdatedTime()); - Assertions.assertEquals("fggjioolvr", model.value().get(0).properties().description()); - Assertions.assertEquals("kvtkkg", model.value().get(0).etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("qdcadwvps", model.value().get(0).properties().lastUpdatedTime()); + Assertions.assertEquals("j", model.value().get(0).properties().description()); + Assertions.assertEquals("jriyb", model.value().get(0).tags().get("rz")); + Assertions.assertEquals("aursqftibtyi", model.value().get(0).location()); + Assertions.assertEquals("yvp", model.value().get(0).etag()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyBaseTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyBaseTests.java index cb6b663c82e2..1b8adbcc2480 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyBaseTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,31 +14,32 @@ public final class ResourceGuardProxyBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceGuardProxyBase model = BinaryData.fromString( - "{\"resourceGuardResourceId\":\"saz\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"qkagfhsxt\",\"defaultResourceRequest\":\"ugzxnf\"},{\"vaultCriticalOperation\":\"zpxdt\",\"defaultResourceRequest\":\"dm\"},{\"vaultCriticalOperation\":\"j\",\"defaultResourceRequest\":\"wuenvr\"}],\"lastUpdatedTime\":\"yo\",\"description\":\"ibreb\"}") + "{\"resourceGuardResourceId\":\"wuhvaj\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"fem\",\"defaultResourceRequest\":\"zakzwjiqullqxbd\"},{\"vaultCriticalOperation\":\"rscmqerndbrnye\",\"defaultResourceRequest\":\"ltfnnxrkad\"}],\"lastUpdatedTime\":\"ynnfmuiii\",\"description\":\"pfoh\"}") .toObject(ResourceGuardProxyBase.class); - Assertions.assertEquals("saz", model.resourceGuardResourceId()); - Assertions.assertEquals("qkagfhsxt", model.resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions.assertEquals("ugzxnf", model.resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("yo", model.lastUpdatedTime()); - Assertions.assertEquals("ibreb", model.description()); + Assertions.assertEquals("wuhvaj", model.resourceGuardResourceId()); + Assertions.assertEquals("fem", model.resourceGuardOperationDetails().get(0).vaultCriticalOperation()); + Assertions.assertEquals("zakzwjiqullqxbd", + model.resourceGuardOperationDetails().get(0).defaultResourceRequest()); + Assertions.assertEquals("ynnfmuiii", model.lastUpdatedTime()); + Assertions.assertEquals("pfoh", model.description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceGuardProxyBase model = new ResourceGuardProxyBase().withResourceGuardResourceId("saz") + ResourceGuardProxyBase model = new ResourceGuardProxyBase().withResourceGuardResourceId("wuhvaj") .withResourceGuardOperationDetails(Arrays.asList( - new ResourceGuardOperationDetail().withVaultCriticalOperation("qkagfhsxt") - .withDefaultResourceRequest("ugzxnf"), - new ResourceGuardOperationDetail().withVaultCriticalOperation("zpxdt").withDefaultResourceRequest("dm"), - new ResourceGuardOperationDetail().withVaultCriticalOperation("j") - .withDefaultResourceRequest("wuenvr"))) - .withLastUpdatedTime("yo") - .withDescription("ibreb"); + new ResourceGuardOperationDetail().withVaultCriticalOperation("fem") + .withDefaultResourceRequest("zakzwjiqullqxbd"), + new ResourceGuardOperationDetail().withVaultCriticalOperation("rscmqerndbrnye") + .withDefaultResourceRequest("ltfnnxrkad"))) + .withLastUpdatedTime("ynnfmuiii") + .withDescription("pfoh"); model = BinaryData.fromObject(model).toObject(ResourceGuardProxyBase.class); - Assertions.assertEquals("saz", model.resourceGuardResourceId()); - Assertions.assertEquals("qkagfhsxt", model.resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions.assertEquals("ugzxnf", model.resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("yo", model.lastUpdatedTime()); - Assertions.assertEquals("ibreb", model.description()); + Assertions.assertEquals("wuhvaj", model.resourceGuardResourceId()); + Assertions.assertEquals("fem", model.resourceGuardOperationDetails().get(0).vaultCriticalOperation()); + Assertions.assertEquals("zakzwjiqullqxbd", + model.resourceGuardOperationDetails().get(0).defaultResourceRequest()); + Assertions.assertEquals("ynnfmuiii", model.lastUpdatedTime()); + Assertions.assertEquals("pfoh", model.description()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationsDeleteWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationsDeleteWithResponseMockTests.java deleted file mode 100644 index 20bdf334bd21..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ResourceGuardProxyOperationsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - RecoveryServicesBackupManager manager = RecoveryServicesBackupManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.resourceGuardProxyOperations() - .deleteWithResponse("cqvhoejgoiutgwrm", "a", "p", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationsGetWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationsGetWithResponseMockTests.java deleted file mode 100644 index 2f1a3919035d..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationsGetWithResponseMockTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBaseResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ResourceGuardProxyOperationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"resourceGuardResourceId\":\"fcm\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"ode\",\"defaultResourceRequest\":\"esrgvtshuvftwai\"},{\"vaultCriticalOperation\":\"uqk\",\"defaultResourceRequest\":\"zgjypanhxmpdxxz\"},{\"vaultCriticalOperation\":\"wwzjwotnxlkfhglh\",\"defaultResourceRequest\":\"oxqwecrsnhpcse\"},{\"vaultCriticalOperation\":\"xovppqibukklvzr\",\"defaultResourceRequest\":\"mlccmetjscz\"}],\"lastUpdatedTime\":\"fqbqnasd\",\"description\":\"enz\"},\"eTag\":\"euscplhyv\",\"location\":\"gxlyzkxitdshezs\",\"tags\":{\"sayebra\":\"lrupjovmo\",\"ykykip\":\"wzlpzbtz\",\"mbezacfpztg\":\"sdyepfno\"},\"id\":\"zwyqejga\",\"name\":\"okctgkppgkqzkc\",\"type\":\"zmffngdyfcixrh\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - RecoveryServicesBackupManager manager = RecoveryServicesBackupManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - ResourceGuardProxyBaseResource response = manager.resourceGuardProxyOperations() - .getWithResponse("grdcgubsrtmdy", "perpi", "ttjzg", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("gxlyzkxitdshezs", response.location()); - Assertions.assertEquals("lrupjovmo", response.tags().get("sayebra")); - Assertions.assertEquals("fcm", response.properties().resourceGuardResourceId()); - Assertions.assertEquals("ode", - response.properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions.assertEquals("esrgvtshuvftwai", - response.properties().resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("fqbqnasd", response.properties().lastUpdatedTime()); - Assertions.assertEquals("enz", response.properties().description()); - Assertions.assertEquals("euscplhyv", response.etag()); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationsPutWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationsPutWithResponseMockTests.java deleted file mode 100644 index 25fb701f4daa..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationsPutWithResponseMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardOperationDetail; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBase; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBaseResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ResourceGuardProxyOperationsPutWithResponseMockTests { - @Test - public void testPutWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"resourceGuardResourceId\":\"niucbdaombwiinj\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"ktl\",\"defaultResourceRequest\":\"owavvqxuajgcqw\"}],\"lastUpdatedTime\":\"ynkgfcfd\",\"description\":\"wsikxxtclhuulr\"},\"eTag\":\"byokvjgbzsxe\",\"location\":\"rsltt\",\"tags\":{\"ardnagttpufpbpgn\":\"cdjwsu\",\"iplkysolsyjprxs\":\"holhujbfw\",\"hfvhuwzbxpcqz\":\"whdmcvhtbbz\",\"lrrskap\":\"ihotjecohmxv\"},\"id\":\"xwieexuyade\",\"name\":\"ltfokyksyim\",\"type\":\"ccgrvkcxzznn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - RecoveryServicesBackupManager manager = RecoveryServicesBackupManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - ResourceGuardProxyBaseResource response = manager.resourceGuardProxyOperations() - .define("bwwzvdajf") - .withRegion("pb") - .withExistingVault("mpyzgleo", "jsb") - .withTags(mapOf("pu", "vzfjm", "zjljmphfk", "zfe")) - .withProperties(new ResourceGuardProxyBase().withResourceGuardResourceId("n") - .withResourceGuardOperationDetails(Arrays.asList( - new ResourceGuardOperationDetail().withVaultCriticalOperation("ciqgjjrlhiqlwixv") - .withDefaultResourceRequest("ougu"), - new ResourceGuardOperationDetail().withVaultCriticalOperation("n").withDefaultResourceRequest("pg"), - new ResourceGuardOperationDetail().withVaultCriticalOperation("tbasu") - .withDefaultResourceRequest("ap"))) - .withLastUpdatedTime("n") - .withDescription("eaqbkixv")) - .withEtag("wy") - .create(); - - Assertions.assertEquals("rsltt", response.location()); - Assertions.assertEquals("cdjwsu", response.tags().get("ardnagttpufpbpgn")); - Assertions.assertEquals("niucbdaombwiinj", response.properties().resourceGuardResourceId()); - Assertions.assertEquals("ktl", - response.properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions.assertEquals("owavvqxuajgcqw", - response.properties().resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("ynkgfcfd", response.properties().lastUpdatedTime()); - Assertions.assertEquals("wsikxxtclhuulr", response.properties().description()); - Assertions.assertEquals("byokvjgbzsxe", response.etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationsUnlockDeleteWithResponseMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationsUnlockDeleteWithResponseMockTests.java deleted file mode 100644 index afc9860068b8..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyOperationsUnlockDeleteWithResponseMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.UnlockDeleteRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.UnlockDeleteResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ResourceGuardProxyOperationsUnlockDeleteWithResponseMockTests { - @Test - public void testUnlockDeleteWithResponse() throws Exception { - String responseStr = "{\"unlockDeleteExpiryTime\":\"esocwiqbuou\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - RecoveryServicesBackupManager manager = RecoveryServicesBackupManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - UnlockDeleteResponse response = manager.resourceGuardProxyOperations() - .unlockDeleteWithResponse("hazyntacihnco", "mip", "mliqmvlb", - new UnlockDeleteRequest().withResourceGuardOperationRequests(Arrays.asList("eaqgrvgpomxpupd")) - .withResourceToBeDeleted("dfj"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("esocwiqbuou", response.unlockDeleteExpiryTime()); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceListTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceListTests.java index c1abf713dd58..9989cfe13503 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceListTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceListTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,14 +11,7 @@ public final class ResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ResourceList model = BinaryData.fromString("{\"nextLink\":\"bkzgcwrwclx\"}").toObject(ResourceList.class); - Assertions.assertEquals("bkzgcwrwclx", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceList model = new ResourceList().withNextLink("bkzgcwrwclx"); - model = BinaryData.fromObject(model).toObject(ResourceList.class); - Assertions.assertEquals("bkzgcwrwclx", model.nextLink()); + ResourceList model = BinaryData.fromString("{\"nextLink\":\"nxknalaulp\"}").toObject(ResourceList.class); + Assertions.assertEquals("nxknalaulp", model.nextLink()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProvidersBmsPrepareDataMoveMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProvidersBmsPrepareDataMoveMockTests.java index 42a599dbc12d..05399c405fa8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProvidersBmsPrepareDataMoveMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProvidersBmsPrepareDataMoveMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,6 +11,7 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; import com.azure.resourcemanager.recoveryservicesbackup.models.DataMoveLevel; +import com.azure.resourcemanager.recoveryservicesbackup.models.OkResponse; import com.azure.resourcemanager.recoveryservicesbackup.models.PrepareDataMoveRequest; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -30,12 +31,12 @@ public void testBmsPrepareDataMove() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.resourceProviders() - .bmsPrepareDataMove("fnqt", "jtoma", - new PrepareDataMoveRequest().withTargetResourceId("swbnfddepldwqjns") - .withTargetRegion("zygleexahvm") + OkResponse response = manager.resourceProviders() + .bmsPrepareDataMove("jsc", "fp", + new PrepareDataMoveRequest().withTargetResourceId("qwtygevgwmseharx") + .withTargetRegion("fv") .withDataMoveLevel(DataMoveLevel.VAULT) - .withSourceContainerArmIds(Arrays.asList("brcary", "sjjzyvoaqajuveh")) + .withSourceContainerArmIds(Arrays.asList("tmbpjp")) .withIgnoreMoved(true), com.azure.core.util.Context.NONE); diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProvidersBmsTriggerDataMoveMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProvidersBmsTriggerDataMoveMockTests.java index 926c6980a5f3..c55f5928befe 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProvidersBmsTriggerDataMoveMockTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProvidersBmsTriggerDataMoveMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,6 +11,7 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; import com.azure.resourcemanager.recoveryservicesbackup.models.DataMoveLevel; +import com.azure.resourcemanager.recoveryservicesbackup.models.OkResponse; import com.azure.resourcemanager.recoveryservicesbackup.models.TriggerDataMoveRequest; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -30,14 +31,14 @@ public void testBmsTriggerDataMove() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.resourceProviders() - .bmsTriggerDataMove("dmkrrb", "mpfu", - new TriggerDataMoveRequest().withSourceResourceId("ubefgybpmfbfunu") - .withSourceRegion("mpzkrvfyifkd") - .withDataMoveLevel(DataMoveLevel.INVALID) - .withCorrelationId("hlzvfictnkjj") - .withSourceContainerArmIds(Arrays.asList("wnphbkgfyrto", "mhmjpjs", "dfpdqwtygevg", "mseharx")) - .withPauseGC(true), + OkResponse response = manager.resourceProviders() + .bmsTriggerDataMove("wjhrsidqpxlbtpa", "f", + new TriggerDataMoveRequest().withSourceResourceId("ngatwmy") + .withSourceRegion("yutrymd") + .withDataMoveLevel(DataMoveLevel.CONTAINER) + .withCorrelationId("fj") + .withSourceContainerArmIds(Arrays.asList("cvjqdv")) + .withPauseGC(false), com.azure.core.util.Context.NONE); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoreFileSpecsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoreFileSpecsTests.java index 3c0a1b93a0a3..40b2df70eebf 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoreFileSpecsTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoreFileSpecsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,21 +11,23 @@ public final class RestoreFileSpecsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RestoreFileSpecs model - = BinaryData.fromString("{\"path\":\"txifqj\",\"fileSpecType\":\"xmrhu\",\"targetFolderPath\":\"wp\"}") - .toObject(RestoreFileSpecs.class); - Assertions.assertEquals("txifqj", model.path()); - Assertions.assertEquals("xmrhu", model.fileSpecType()); - Assertions.assertEquals("wp", model.targetFolderPath()); + RestoreFileSpecs model = BinaryData + .fromString( + "{\"path\":\"dnqqskawaoqvmmb\",\"fileSpecType\":\"qfr\",\"targetFolderPath\":\"lkzmegnitgvkxl\"}") + .toObject(RestoreFileSpecs.class); + Assertions.assertEquals("dnqqskawaoqvmmb", model.path()); + Assertions.assertEquals("qfr", model.fileSpecType()); + Assertions.assertEquals("lkzmegnitgvkxl", model.targetFolderPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RestoreFileSpecs model - = new RestoreFileSpecs().withPath("txifqj").withFileSpecType("xmrhu").withTargetFolderPath("wp"); + RestoreFileSpecs model = new RestoreFileSpecs().withPath("dnqqskawaoqvmmb") + .withFileSpecType("qfr") + .withTargetFolderPath("lkzmegnitgvkxl"); model = BinaryData.fromObject(model).toObject(RestoreFileSpecs.class); - Assertions.assertEquals("txifqj", model.path()); - Assertions.assertEquals("xmrhu", model.fileSpecType()); - Assertions.assertEquals("wp", model.targetFolderPath()); + Assertions.assertEquals("dnqqskawaoqvmmb", model.path()); + Assertions.assertEquals("qfr", model.fileSpecType()); + Assertions.assertEquals("lkzmegnitgvkxl", model.targetFolderPath()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoreRequestResourceTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoreRequestResourceTests.java index 158b16c34c68..ff4ea95fdc40 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoreRequestResourceTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoreRequestResourceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -16,27 +16,26 @@ public final class RestoreRequestResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RestoreRequestResource model = BinaryData.fromString( - "{\"properties\":{\"objectType\":\"RestoreRequest\",\"resourceGuardOperationRequests\":[\"ibnuqqkpik\",\"drgvtqagn\",\"uynhijg\"]},\"eTag\":\"ebf\",\"location\":\"iarbutrcvpna\",\"tags\":{\"unmpxttd\":\"hj\",\"nbtkcxywnytnr\":\"hrbnlankxmyskpbh\",\"qidybyx\":\"yn\",\"aaxdbabphlwrq\":\"zfcl\"},\"id\":\"fkts\",\"name\":\"hsucoc\",\"type\":\"nyyazttbtwwrqpue\"}") + "{\"location\":\"cjzhqi\",\"tags\":{\"t\":\"pxtgqscjav\",\"tgguwpijrajcivmm\":\"uhdqazk\"},\"eTag\":\"f\",\"properties\":{\"objectType\":\"RestoreRequest\",\"resourceGuardOperationRequests\":[\"rxgkne\",\"vyi\",\"zqodfvpgshox\"]},\"id\":\"gbpfgz\",\"name\":\"jtxvzflbqvgaq\",\"type\":\"lgafcqusrdve\"}") .toObject(RestoreRequestResource.class); - Assertions.assertEquals("iarbutrcvpna", model.location()); - Assertions.assertEquals("hj", model.tags().get("unmpxttd")); - Assertions.assertEquals("ibnuqqkpik", model.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("ebf", model.etag()); + Assertions.assertEquals("cjzhqi", model.location()); + Assertions.assertEquals("pxtgqscjav", model.tags().get("t")); + Assertions.assertEquals("f", model.eTag()); + Assertions.assertEquals("rxgkne", model.properties().resourceGuardOperationRequests().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RestoreRequestResource model = new RestoreRequestResource().withLocation("iarbutrcvpna") - .withTags( - mapOf("unmpxttd", "hj", "nbtkcxywnytnr", "hrbnlankxmyskpbh", "qidybyx", "yn", "aaxdbabphlwrq", "zfcl")) + RestoreRequestResource model = new RestoreRequestResource().withLocation("cjzhqi") + .withTags(mapOf("t", "pxtgqscjav", "tgguwpijrajcivmm", "uhdqazk")) + .withETag("f") .withProperties(new RestoreRequest() - .withResourceGuardOperationRequests(Arrays.asList("ibnuqqkpik", "drgvtqagn", "uynhijg"))) - .withEtag("ebf"); + .withResourceGuardOperationRequests(Arrays.asList("rxgkne", "vyi", "zqodfvpgshox"))); model = BinaryData.fromObject(model).toObject(RestoreRequestResource.class); - Assertions.assertEquals("iarbutrcvpna", model.location()); - Assertions.assertEquals("hj", model.tags().get("unmpxttd")); - Assertions.assertEquals("ibnuqqkpik", model.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("ebf", model.etag()); + Assertions.assertEquals("cjzhqi", model.location()); + Assertions.assertEquals("pxtgqscjav", model.tags().get("t")); + Assertions.assertEquals("f", model.eTag()); + Assertions.assertEquals("rxgkne", model.properties().resourceGuardOperationRequests().get(0)); } // Use "Map.of" if available diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoreRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoreRequestTests.java index 9de2c951c847..2ddf326c2c03 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoreRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoreRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,16 +12,17 @@ public final class RestoreRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RestoreRequest model = BinaryData - .fromString("{\"objectType\":\"RestoreRequest\",\"resourceGuardOperationRequests\":[\"zywbiex\",\"fey\"]}") + RestoreRequest model = BinaryData.fromString( + "{\"objectType\":\"RestoreRequest\",\"resourceGuardOperationRequests\":[\"sdtutnwlduyc\",\"uzhyrmewipmvekdx\",\"kuqgsjjxundxgket\"]}") .toObject(RestoreRequest.class); - Assertions.assertEquals("zywbiex", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("sdtutnwlduyc", model.resourceGuardOperationRequests().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RestoreRequest model = new RestoreRequest().withResourceGuardOperationRequests(Arrays.asList("zywbiex", "fey")); + RestoreRequest model = new RestoreRequest() + .withResourceGuardOperationRequests(Arrays.asList("sdtutnwlduyc", "uzhyrmewipmvekdx", "kuqgsjjxundxgket")); model = BinaryData.fromObject(model).toObject(RestoreRequest.class); - Assertions.assertEquals("zywbiex", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("sdtutnwlduyc", model.resourceGuardOperationRequests().get(0)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RetentionDurationTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RetentionDurationTests.java index 243ec1e5ce49..75460dbb3385 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RetentionDurationTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RetentionDurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,18 +12,18 @@ public final class RetentionDurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RetentionDuration model = BinaryData.fromString("{\"count\":156341242,\"durationType\":\"Months\"}") + RetentionDuration model = BinaryData.fromString("{\"count\":781083421,\"durationType\":\"Weeks\"}") .toObject(RetentionDuration.class); - Assertions.assertEquals(156341242, model.count()); - Assertions.assertEquals(RetentionDurationType.MONTHS, model.durationType()); + Assertions.assertEquals(781083421, model.count()); + Assertions.assertEquals(RetentionDurationType.WEEKS, model.durationType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RetentionDuration model - = new RetentionDuration().withCount(156341242).withDurationType(RetentionDurationType.MONTHS); + = new RetentionDuration().withCount(781083421).withDurationType(RetentionDurationType.WEEKS); model = BinaryData.fromObject(model).toObject(RetentionDuration.class); - Assertions.assertEquals(156341242, model.count()); - Assertions.assertEquals(RetentionDurationType.MONTHS, model.durationType()); + Assertions.assertEquals(781083421, model.count()); + Assertions.assertEquals(RetentionDurationType.WEEKS, model.durationType()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RetentionPolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RetentionPolicyTests.java index fd628d15d053..704d88891a4c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RetentionPolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RetentionPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SchedulePolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SchedulePolicyTests.java index 392ae96f0546..d80ed3e3d10d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SchedulePolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SchedulePolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SecuredVMDetailsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SecuredVMDetailsTests.java index 44e0b374d566..2ca6ba5f300d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SecuredVMDetailsTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SecuredVMDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,15 +11,15 @@ public final class SecuredVMDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SecuredVMDetails model = BinaryData.fromString("{\"securedVMOsDiskEncryptionSetId\":\"qekewvnqvcd\"}") + SecuredVMDetails model = BinaryData.fromString("{\"securedVMOsDiskEncryptionSetId\":\"qjtwhauu\"}") .toObject(SecuredVMDetails.class); - Assertions.assertEquals("qekewvnqvcd", model.securedVmosDiskEncryptionSetId()); + Assertions.assertEquals("qjtwhauu", model.securedVmosDiskEncryptionSetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SecuredVMDetails model = new SecuredVMDetails().withSecuredVmosDiskEncryptionSetId("qekewvnqvcd"); + SecuredVMDetails model = new SecuredVMDetails().withSecuredVmosDiskEncryptionSetId("qjtwhauu"); model = BinaryData.fromObject(model).toObject(SecuredVMDetails.class); - Assertions.assertEquals("qekewvnqvcd", model.securedVmosDiskEncryptionSetId()); + Assertions.assertEquals("qjtwhauu", model.securedVmosDiskEncryptionSetId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SecurityPinBaseTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SecurityPinBaseTests.java index 9f57155895c8..2835aff68768 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SecurityPinBaseTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SecurityPinBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,17 +12,17 @@ public final class SecurityPinBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SecurityPinBase model - = BinaryData.fromString("{\"resourceGuardOperationRequests\":[\"yajguqfhwygzlv\",\"nk\"]}") - .toObject(SecurityPinBase.class); - Assertions.assertEquals("yajguqfhwygzlv", model.resourceGuardOperationRequests().get(0)); + SecurityPinBase model = BinaryData.fromString( + "{\"resourceGuardOperationRequests\":[\"lqwa\",\"frqulhmzyqbhd\",\"afjrqpjiyrqjcrg\",\"xwmzwdfkbnrz\"]}") + .toObject(SecurityPinBase.class); + Assertions.assertEquals("lqwa", model.resourceGuardOperationRequests().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SecurityPinBase model - = new SecurityPinBase().withResourceGuardOperationRequests(Arrays.asList("yajguqfhwygzlv", "nk")); + SecurityPinBase model = new SecurityPinBase().withResourceGuardOperationRequests( + Arrays.asList("lqwa", "frqulhmzyqbhd", "afjrqpjiyrqjcrg", "xwmzwdfkbnrz")); model = BinaryData.fromObject(model).toObject(SecurityPinBase.class); - Assertions.assertEquals("yajguqfhwygzlv", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("lqwa", model.resourceGuardOperationRequests().get(0)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SettingsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SettingsTests.java index 257b269f197e..ba9260882d6c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SettingsTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,20 +11,21 @@ public final class SettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Settings model - = BinaryData.fromString("{\"timeZone\":\"cvdsrhnj\",\"issqlcompression\":true,\"isCompression\":false}") - .toObject(Settings.class); - Assertions.assertEquals("cvdsrhnj", model.timeZone()); - Assertions.assertEquals(true, model.issqlcompression()); - Assertions.assertEquals(false, model.isCompression()); + Settings model = BinaryData + .fromString("{\"timeZone\":\"ngajinnixjawrtmj\",\"issqlcompression\":false,\"isCompression\":true}") + .toObject(Settings.class); + Assertions.assertEquals("ngajinnixjawrtmj", model.timeZone()); + Assertions.assertFalse(model.issqlcompression()); + Assertions.assertTrue(model.isCompression()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Settings model = new Settings().withTimeZone("cvdsrhnj").withIssqlcompression(true).withIsCompression(false); + Settings model + = new Settings().withTimeZone("ngajinnixjawrtmj").withIssqlcompression(false).withIsCompression(true); model = BinaryData.fromObject(model).toObject(Settings.class); - Assertions.assertEquals("cvdsrhnj", model.timeZone()); - Assertions.assertEquals(true, model.issqlcompression()); - Assertions.assertEquals(false, model.isCompression()); + Assertions.assertEquals("ngajinnixjawrtmj", model.timeZone()); + Assertions.assertFalse(model.issqlcompression()); + Assertions.assertTrue(model.isCompression()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SimpleRetentionPolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SimpleRetentionPolicyTests.java index fd1d2f9ef7cc..a81ebec59239 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SimpleRetentionPolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SimpleRetentionPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,18 +14,18 @@ public final class SimpleRetentionPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SimpleRetentionPolicy model = BinaryData.fromString( - "{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":458551614,\"durationType\":\"Invalid\"}}") + "{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":1408895656,\"durationType\":\"Months\"}}") .toObject(SimpleRetentionPolicy.class); - Assertions.assertEquals(458551614, model.retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.INVALID, model.retentionDuration().durationType()); + Assertions.assertEquals(1408895656, model.retentionDuration().count()); + Assertions.assertEquals(RetentionDurationType.MONTHS, model.retentionDuration().durationType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SimpleRetentionPolicy model = new SimpleRetentionPolicy().withRetentionDuration( - new RetentionDuration().withCount(458551614).withDurationType(RetentionDurationType.INVALID)); + new RetentionDuration().withCount(1408895656).withDurationType(RetentionDurationType.MONTHS)); model = BinaryData.fromObject(model).toObject(SimpleRetentionPolicy.class); - Assertions.assertEquals(458551614, model.retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.INVALID, model.retentionDuration().durationType()); + Assertions.assertEquals(1408895656, model.retentionDuration().count()); + Assertions.assertEquals(RetentionDurationType.MONTHS, model.retentionDuration().durationType()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SimpleSchedulePolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SimpleSchedulePolicyTests.java index 48e0b7e58ef0..207ccf8f15e9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SimpleSchedulePolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SimpleSchedulePolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -17,37 +17,36 @@ public final class SimpleSchedulePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SimpleSchedulePolicy model = BinaryData.fromString( - "{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Invalid\",\"scheduleRunDays\":[\"Saturday\"],\"scheduleRunTimes\":[\"2021-05-16T22:30:08Z\",\"2021-01-26T08:41:32Z\",\"2021-05-14T20:37:03Z\",\"2021-04-07T00:27:16Z\"],\"hourlySchedule\":{\"interval\":1991084835,\"scheduleWindowStartTime\":\"2021-04-28T06:19:31Z\",\"scheduleWindowDuration\":232230684},\"scheduleWeeklyFrequency\":1718523407}") + "{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Hourly\",\"scheduleRunDays\":[\"Wednesday\",\"Wednesday\",\"Wednesday\"],\"scheduleRunTimes\":[\"2021-07-26T03:57:34Z\",\"2021-03-02T03:48:17Z\"],\"hourlySchedule\":{\"interval\":448724007,\"scheduleWindowStartTime\":\"2021-11-21T23:19:33Z\",\"scheduleWindowDuration\":446145648},\"scheduleWeeklyFrequency\":632316037}") .toObject(SimpleSchedulePolicy.class); - Assertions.assertEquals(ScheduleRunType.INVALID, model.scheduleRunFrequency()); - Assertions.assertEquals(DayOfWeek.SATURDAY, model.scheduleRunDays().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-16T22:30:08Z"), model.scheduleRunTimes().get(0)); - Assertions.assertEquals(1991084835, model.hourlySchedule().interval()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-28T06:19:31Z"), + Assertions.assertEquals(ScheduleRunType.HOURLY, model.scheduleRunFrequency()); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.scheduleRunDays().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T03:57:34Z"), model.scheduleRunTimes().get(0)); + Assertions.assertEquals(448724007, model.hourlySchedule().interval()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-21T23:19:33Z"), model.hourlySchedule().scheduleWindowStartTime()); - Assertions.assertEquals(232230684, model.hourlySchedule().scheduleWindowDuration()); - Assertions.assertEquals(1718523407, model.scheduleWeeklyFrequency()); + Assertions.assertEquals(446145648, model.hourlySchedule().scheduleWindowDuration()); + Assertions.assertEquals(632316037, model.scheduleWeeklyFrequency()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SimpleSchedulePolicy model = new SimpleSchedulePolicy().withScheduleRunFrequency(ScheduleRunType.INVALID) - .withScheduleRunDays(Arrays.asList(DayOfWeek.SATURDAY)) - .withScheduleRunTimes(Arrays.asList(OffsetDateTime.parse("2021-05-16T22:30:08Z"), - OffsetDateTime.parse("2021-01-26T08:41:32Z"), OffsetDateTime.parse("2021-05-14T20:37:03Z"), - OffsetDateTime.parse("2021-04-07T00:27:16Z"))) - .withHourlySchedule(new HourlySchedule().withInterval(1991084835) - .withScheduleWindowStartTime(OffsetDateTime.parse("2021-04-28T06:19:31Z")) - .withScheduleWindowDuration(232230684)) - .withScheduleWeeklyFrequency(1718523407); + SimpleSchedulePolicy model = new SimpleSchedulePolicy().withScheduleRunFrequency(ScheduleRunType.HOURLY) + .withScheduleRunDays(Arrays.asList(DayOfWeek.WEDNESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.WEDNESDAY)) + .withScheduleRunTimes(Arrays.asList(OffsetDateTime.parse("2021-07-26T03:57:34Z"), + OffsetDateTime.parse("2021-03-02T03:48:17Z"))) + .withHourlySchedule(new HourlySchedule().withInterval(448724007) + .withScheduleWindowStartTime(OffsetDateTime.parse("2021-11-21T23:19:33Z")) + .withScheduleWindowDuration(446145648)) + .withScheduleWeeklyFrequency(632316037); model = BinaryData.fromObject(model).toObject(SimpleSchedulePolicy.class); - Assertions.assertEquals(ScheduleRunType.INVALID, model.scheduleRunFrequency()); - Assertions.assertEquals(DayOfWeek.SATURDAY, model.scheduleRunDays().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-16T22:30:08Z"), model.scheduleRunTimes().get(0)); - Assertions.assertEquals(1991084835, model.hourlySchedule().interval()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-28T06:19:31Z"), + Assertions.assertEquals(ScheduleRunType.HOURLY, model.scheduleRunFrequency()); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.scheduleRunDays().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T03:57:34Z"), model.scheduleRunTimes().get(0)); + Assertions.assertEquals(448724007, model.hourlySchedule().interval()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-21T23:19:33Z"), model.hourlySchedule().scheduleWindowStartTime()); - Assertions.assertEquals(232230684, model.hourlySchedule().scheduleWindowDuration()); - Assertions.assertEquals(1718523407, model.scheduleWeeklyFrequency()); + Assertions.assertEquals(446145648, model.hourlySchedule().scheduleWindowDuration()); + Assertions.assertEquals(632316037, model.scheduleWeeklyFrequency()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SimpleSchedulePolicyV2Tests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SimpleSchedulePolicyV2Tests.java index 47c56643c7e0..9d7d0c6d09c8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SimpleSchedulePolicyV2Tests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SimpleSchedulePolicyV2Tests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -19,43 +19,42 @@ public final class SimpleSchedulePolicyV2Tests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SimpleSchedulePolicyV2 model = BinaryData.fromString( - "{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Hourly\",\"hourlySchedule\":{\"interval\":1519460309,\"scheduleWindowStartTime\":\"2021-08-12T09:03:14Z\",\"scheduleWindowDuration\":2068252791},\"dailySchedule\":{\"scheduleRunTimes\":[\"2021-08-16T19:50:42Z\",\"2021-05-19T16:06:50Z\",\"2021-02-24T19:35:53Z\",\"2021-08-08T10:32:46Z\"]},\"weeklySchedule\":{\"scheduleRunDays\":[\"Friday\",\"Friday\",\"Thursday\",\"Saturday\"],\"scheduleRunTimes\":[\"2021-06-30T21:10:11Z\"]}}") + "{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Hourly\",\"hourlySchedule\":{\"interval\":1297509585,\"scheduleWindowStartTime\":\"2021-12-09T15:23:54Z\",\"scheduleWindowDuration\":1689261943},\"dailySchedule\":{\"scheduleRunTimes\":[\"2021-07-24T09:18:55Z\",\"2021-08-22T12:15:42Z\"]},\"weeklySchedule\":{\"scheduleRunDays\":[\"Wednesday\",\"Sunday\",\"Thursday\"],\"scheduleRunTimes\":[\"2021-05-02T03:25:22Z\",\"2021-06-27T01:54:55Z\"]}}") .toObject(SimpleSchedulePolicyV2.class); Assertions.assertEquals(ScheduleRunType.HOURLY, model.scheduleRunFrequency()); - Assertions.assertEquals(1519460309, model.hourlySchedule().interval()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T09:03:14Z"), + Assertions.assertEquals(1297509585, model.hourlySchedule().interval()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-09T15:23:54Z"), model.hourlySchedule().scheduleWindowStartTime()); - Assertions.assertEquals(2068252791, model.hourlySchedule().scheduleWindowDuration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-16T19:50:42Z"), + Assertions.assertEquals(1689261943, model.hourlySchedule().scheduleWindowDuration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-24T09:18:55Z"), model.dailySchedule().scheduleRunTimes().get(0)); - Assertions.assertEquals(DayOfWeek.FRIDAY, model.weeklySchedule().scheduleRunDays().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-30T21:10:11Z"), + Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.weeklySchedule().scheduleRunDays().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-02T03:25:22Z"), model.weeklySchedule().scheduleRunTimes().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SimpleSchedulePolicyV2 model = new SimpleSchedulePolicyV2().withScheduleRunFrequency(ScheduleRunType.HOURLY) - .withHourlySchedule(new HourlySchedule().withInterval(1519460309) - .withScheduleWindowStartTime(OffsetDateTime.parse("2021-08-12T09:03:14Z")) - .withScheduleWindowDuration(2068252791)) - .withDailySchedule(new DailySchedule().withScheduleRunTimes(Arrays.asList( - OffsetDateTime.parse("2021-08-16T19:50:42Z"), OffsetDateTime.parse("2021-05-19T16:06:50Z"), - OffsetDateTime.parse("2021-02-24T19:35:53Z"), OffsetDateTime.parse("2021-08-08T10:32:46Z")))) + .withHourlySchedule(new HourlySchedule().withInterval(1297509585) + .withScheduleWindowStartTime(OffsetDateTime.parse("2021-12-09T15:23:54Z")) + .withScheduleWindowDuration(1689261943)) + .withDailySchedule(new DailySchedule().withScheduleRunTimes(Arrays + .asList(OffsetDateTime.parse("2021-07-24T09:18:55Z"), OffsetDateTime.parse("2021-08-22T12:15:42Z")))) .withWeeklySchedule(new WeeklySchedule() - .withScheduleRunDays( - Arrays.asList(DayOfWeek.FRIDAY, DayOfWeek.FRIDAY, DayOfWeek.THURSDAY, DayOfWeek.SATURDAY)) - .withScheduleRunTimes(Arrays.asList(OffsetDateTime.parse("2021-06-30T21:10:11Z")))); + .withScheduleRunDays(Arrays.asList(DayOfWeek.WEDNESDAY, DayOfWeek.SUNDAY, DayOfWeek.THURSDAY)) + .withScheduleRunTimes(Arrays.asList(OffsetDateTime.parse("2021-05-02T03:25:22Z"), + OffsetDateTime.parse("2021-06-27T01:54:55Z")))); model = BinaryData.fromObject(model).toObject(SimpleSchedulePolicyV2.class); Assertions.assertEquals(ScheduleRunType.HOURLY, model.scheduleRunFrequency()); - Assertions.assertEquals(1519460309, model.hourlySchedule().interval()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T09:03:14Z"), + Assertions.assertEquals(1297509585, model.hourlySchedule().interval()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-09T15:23:54Z"), model.hourlySchedule().scheduleWindowStartTime()); - Assertions.assertEquals(2068252791, model.hourlySchedule().scheduleWindowDuration()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-16T19:50:42Z"), + Assertions.assertEquals(1689261943, model.hourlySchedule().scheduleWindowDuration()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-24T09:18:55Z"), model.dailySchedule().scheduleRunTimes().get(0)); - Assertions.assertEquals(DayOfWeek.FRIDAY, model.weeklySchedule().scheduleRunDays().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-30T21:10:11Z"), + Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.weeklySchedule().scheduleRunDays().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-02T03:25:22Z"), model.weeklySchedule().scheduleRunTimes().get(0)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SnapshotBackupAdditionalDetailsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SnapshotBackupAdditionalDetailsTests.java index a462c18faaee..0eeb4fab31dc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SnapshotBackupAdditionalDetailsTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SnapshotBackupAdditionalDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,36 +14,35 @@ public final class SnapshotBackupAdditionalDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotBackupAdditionalDetails model = BinaryData.fromString( - "{\"instantRpRetentionRangeInDays\":524680213,\"instantRPDetails\":\"ql\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"gtczheydb\",\"identityName\":\"shmkxmaehvbbxur\",\"userAssignedIdentityProperties\":{\"clientId\":\"tfnhtbaxkgxywr\",\"principalId\":\"pyklyhpluodpvru\"}}}") + "{\"instantRpRetentionRangeInDays\":1773834271,\"instantRPDetails\":\"xpunjqi\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"vvi\",\"identityName\":\"cgx\",\"userAssignedIdentityProperties\":{\"clientId\":\"sserxhtvsoxhlwn\",\"principalId\":\"j\"}}}") .toObject(SnapshotBackupAdditionalDetails.class); - Assertions.assertEquals(524680213, model.instantRpRetentionRangeInDays()); - Assertions.assertEquals("ql", model.instantRPDetails()); - Assertions.assertEquals("gtczheydb", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("shmkxmaehvbbxur", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("tfnhtbaxkgxywr", + Assertions.assertEquals(1773834271, model.instantRpRetentionRangeInDays()); + Assertions.assertEquals("xpunjqi", model.instantRPDetails()); + Assertions.assertEquals("vvi", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("cgx", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("sserxhtvsoxhlwn", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("pyklyhpluodpvru", + Assertions.assertEquals("j", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SnapshotBackupAdditionalDetails model = new SnapshotBackupAdditionalDetails() - .withInstantRpRetentionRangeInDays(524680213) - .withInstantRPDetails("ql") - .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails() - .withIdentityArmId("gtczheydb") - .withIdentityName("shmkxmaehvbbxur") - .withUserAssignedIdentityProperties(new UserAssignedIdentityProperties().withClientId("tfnhtbaxkgxywr") - .withPrincipalId("pyklyhpluodpvru"))); + .withInstantRpRetentionRangeInDays(1773834271) + .withInstantRPDetails("xpunjqi") + .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails().withIdentityArmId("vvi") + .withIdentityName("cgx") + .withUserAssignedIdentityProperties( + new UserAssignedIdentityProperties().withClientId("sserxhtvsoxhlwn").withPrincipalId("j"))); model = BinaryData.fromObject(model).toObject(SnapshotBackupAdditionalDetails.class); - Assertions.assertEquals(524680213, model.instantRpRetentionRangeInDays()); - Assertions.assertEquals("ql", model.instantRPDetails()); - Assertions.assertEquals("gtczheydb", model.userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("shmkxmaehvbbxur", model.userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("tfnhtbaxkgxywr", + Assertions.assertEquals(1773834271, model.instantRpRetentionRangeInDays()); + Assertions.assertEquals("xpunjqi", model.instantRPDetails()); + Assertions.assertEquals("vvi", model.userAssignedManagedIdentityDetails().identityArmId()); + Assertions.assertEquals("cgx", model.userAssignedManagedIdentityDetails().identityName()); + Assertions.assertEquals("sserxhtvsoxhlwn", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("pyklyhpluodpvru", + Assertions.assertEquals("j", model.userAssignedManagedIdentityDetails().userAssignedIdentityProperties().principalId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SnapshotRestoreParametersTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SnapshotRestoreParametersTests.java index f780915a9a97..da0584b04f71 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SnapshotRestoreParametersTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SnapshotRestoreParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,19 +11,19 @@ public final class SnapshotRestoreParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SnapshotRestoreParameters model = BinaryData - .fromString("{\"skipAttachAndMount\":false,\"logPointInTimeForDBRecovery\":\"icddyvvjskgfmocw\"}") - .toObject(SnapshotRestoreParameters.class); - Assertions.assertEquals(false, model.skipAttachAndMount()); - Assertions.assertEquals("icddyvvjskgfmocw", model.logPointInTimeForDBRecovery()); + SnapshotRestoreParameters model + = BinaryData.fromString("{\"skipAttachAndMount\":false,\"logPointInTimeForDBRecovery\":\"fcpfnznth\"}") + .toObject(SnapshotRestoreParameters.class); + Assertions.assertFalse(model.skipAttachAndMount()); + Assertions.assertEquals("fcpfnznth", model.logPointInTimeForDBRecovery()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SnapshotRestoreParameters model = new SnapshotRestoreParameters().withSkipAttachAndMount(false) - .withLogPointInTimeForDBRecovery("icddyvvjskgfmocw"); + .withLogPointInTimeForDBRecovery("fcpfnznth"); model = BinaryData.fromObject(model).toObject(SnapshotRestoreParameters.class); - Assertions.assertEquals(false, model.skipAttachAndMount()); - Assertions.assertEquals("icddyvvjskgfmocw", model.logPointInTimeForDBRecovery()); + Assertions.assertFalse(model.skipAttachAndMount()); + Assertions.assertEquals("fcpfnznth", model.logPointInTimeForDBRecovery()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SourceSideScanInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SourceSideScanInfoTests.java new file mode 100644 index 000000000000..046ba85a48b6 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SourceSideScanInfoTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanInfo; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanStatus; +import com.azure.resourcemanager.recoveryservicesbackup.models.SourceSideScanSummary; +import org.junit.jupiter.api.Assertions; + +public final class SourceSideScanInfoTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SourceSideScanInfo model + = BinaryData.fromString("{\"sourceSideScanStatus\":\"Configured\",\"sourceSideScanSummary\":\"Healthy\"}") + .toObject(SourceSideScanInfo.class); + Assertions.assertEquals(SourceSideScanStatus.CONFIGURED, model.sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.HEALTHY, model.sourceSideScanSummary()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SourceSideScanInfo model = new SourceSideScanInfo().withSourceSideScanStatus(SourceSideScanStatus.CONFIGURED) + .withSourceSideScanSummary(SourceSideScanSummary.HEALTHY); + model = BinaryData.fromObject(model).toObject(SourceSideScanInfo.class); + Assertions.assertEquals(SourceSideScanStatus.CONFIGURED, model.sourceSideScanStatus()); + Assertions.assertEquals(SourceSideScanSummary.HEALTHY, model.sourceSideScanSummary()); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SqlDataDirectoryMappingTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SqlDataDirectoryMappingTests.java index e8845e882042..6d27b8833275 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SqlDataDirectoryMappingTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SqlDataDirectoryMappingTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,24 +13,24 @@ public final class SqlDataDirectoryMappingTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SqlDataDirectoryMapping model = BinaryData.fromString( - "{\"mappingType\":\"Log\",\"sourceLogicalName\":\"gstmninwjizciln\",\"sourcePath\":\"gshejjtbxqmulux\",\"targetPath\":\"qzvnersbycucr\"}") + "{\"mappingType\":\"Log\",\"sourceLogicalName\":\"ohdjhhflzok\",\"sourcePath\":\"ox\",\"targetPath\":\"lnjetaglt\"}") .toObject(SqlDataDirectoryMapping.class); Assertions.assertEquals(SqlDataDirectoryType.LOG, model.mappingType()); - Assertions.assertEquals("gstmninwjizciln", model.sourceLogicalName()); - Assertions.assertEquals("gshejjtbxqmulux", model.sourcePath()); - Assertions.assertEquals("qzvnersbycucr", model.targetPath()); + Assertions.assertEquals("ohdjhhflzok", model.sourceLogicalName()); + Assertions.assertEquals("ox", model.sourcePath()); + Assertions.assertEquals("lnjetaglt", model.targetPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SqlDataDirectoryMapping model = new SqlDataDirectoryMapping().withMappingType(SqlDataDirectoryType.LOG) - .withSourceLogicalName("gstmninwjizciln") - .withSourcePath("gshejjtbxqmulux") - .withTargetPath("qzvnersbycucr"); + .withSourceLogicalName("ohdjhhflzok") + .withSourcePath("ox") + .withTargetPath("lnjetaglt"); model = BinaryData.fromObject(model).toObject(SqlDataDirectoryMapping.class); Assertions.assertEquals(SqlDataDirectoryType.LOG, model.mappingType()); - Assertions.assertEquals("gstmninwjizciln", model.sourceLogicalName()); - Assertions.assertEquals("gshejjtbxqmulux", model.sourcePath()); - Assertions.assertEquals("qzvnersbycucr", model.targetPath()); + Assertions.assertEquals("ohdjhhflzok", model.sourceLogicalName()); + Assertions.assertEquals("ox", model.sourcePath()); + Assertions.assertEquals("lnjetaglt", model.targetPath()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SqlDataDirectoryTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SqlDataDirectoryTests.java index 19ced7d71119..d18622ac6f26 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SqlDataDirectoryTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SqlDataDirectoryTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,22 +12,11 @@ public final class SqlDataDirectoryTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SqlDataDirectory model - = BinaryData.fromString("{\"type\":\"Invalid\",\"path\":\"mwabzxrvxc\",\"logicalName\":\"hsphaivmxyas\"}") - .toObject(SqlDataDirectory.class); + SqlDataDirectory model = BinaryData + .fromString("{\"type\":\"Invalid\",\"path\":\"luudfdlwggytsb\",\"logicalName\":\"ovvtgseinqfiu\"}") + .toObject(SqlDataDirectory.class); Assertions.assertEquals(SqlDataDirectoryType.INVALID, model.type()); - Assertions.assertEquals("mwabzxrvxc", model.path()); - Assertions.assertEquals("hsphaivmxyas", model.logicalName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlDataDirectory model = new SqlDataDirectory().withType(SqlDataDirectoryType.INVALID) - .withPath("mwabzxrvxc") - .withLogicalName("hsphaivmxyas"); - model = BinaryData.fromObject(model).toObject(SqlDataDirectory.class); - Assertions.assertEquals(SqlDataDirectoryType.INVALID, model.type()); - Assertions.assertEquals("mwabzxrvxc", model.path()); - Assertions.assertEquals("hsphaivmxyas", model.logicalName()); + Assertions.assertEquals("luudfdlwggytsb", model.path()); + Assertions.assertEquals("ovvtgseinqfiu", model.logicalName()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SubProtectionPolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SubProtectionPolicyTests.java index 5b58427885d1..7b5805d5a9d5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SubProtectionPolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SubProtectionPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -23,24 +23,24 @@ public final class SubProtectionPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubProtectionPolicy model = BinaryData.fromString( - "{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{\"ftul\":{\"tieringMode\":\"DoNotTier\",\"duration\":1600023368,\"durationType\":\"Weeks\"}},\"snapshotBackupAdditionalDetails\":{\"instantRpRetentionRangeInDays\":184092911,\"instantRPDetails\":\"ceamtm\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"o\",\"identityName\":\"jw\",\"userAssignedIdentityProperties\":{\"clientId\":\"qioknssxmojm\",\"principalId\":\"p\"}}}}") + "{\"policyType\":\"SnapshotFull\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{\"khenlus\":{\"tieringMode\":\"Invalid\",\"duration\":1960080516,\"durationType\":\"Months\"},\"txrdcqtjvi\":{\"tieringMode\":\"Invalid\",\"duration\":1567868178,\"durationType\":\"Weeks\"}},\"snapshotBackupAdditionalDetails\":{\"instantRpRetentionRangeInDays\":613536314,\"instantRPDetails\":\"puslvyj\",\"userAssignedManagedIdentityDetails\":{\"identityArmId\":\"uwkasiz\",\"identityName\":\"sfuughtuqfecjx\",\"userAssignedIdentityProperties\":{\"clientId\":\"tuhxuicb\",\"principalId\":\"wmrswnjlxuzrh\"}}}}") .toObject(SubProtectionPolicy.class); - Assertions.assertEquals(PolicyType.LOG, model.policyType()); - Assertions.assertEquals(TieringMode.DO_NOT_TIER, model.tieringPolicy().get("ftul").tieringMode()); - Assertions.assertEquals(1600023368, model.tieringPolicy().get("ftul").duration()); - Assertions.assertEquals(RetentionDurationType.WEEKS, model.tieringPolicy().get("ftul").durationType()); - Assertions.assertEquals(184092911, model.snapshotBackupAdditionalDetails().instantRpRetentionRangeInDays()); - Assertions.assertEquals("ceamtm", model.snapshotBackupAdditionalDetails().instantRPDetails()); - Assertions.assertEquals("o", + Assertions.assertEquals(PolicyType.SNAPSHOT_FULL, model.policyType()); + Assertions.assertEquals(TieringMode.INVALID, model.tieringPolicy().get("khenlus").tieringMode()); + Assertions.assertEquals(1960080516, model.tieringPolicy().get("khenlus").duration()); + Assertions.assertEquals(RetentionDurationType.MONTHS, model.tieringPolicy().get("khenlus").durationType()); + Assertions.assertEquals(613536314, model.snapshotBackupAdditionalDetails().instantRpRetentionRangeInDays()); + Assertions.assertEquals("puslvyj", model.snapshotBackupAdditionalDetails().instantRPDetails()); + Assertions.assertEquals("uwkasiz", model.snapshotBackupAdditionalDetails().userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("jw", + Assertions.assertEquals("sfuughtuqfecjx", model.snapshotBackupAdditionalDetails().userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("qioknssxmojm", + Assertions.assertEquals("tuhxuicb", model.snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .userAssignedIdentityProperties() .clientId()); - Assertions.assertEquals("p", + Assertions.assertEquals("wmrswnjlxuzrh", model.snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .userAssignedIdentityProperties() @@ -49,37 +49,42 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubProtectionPolicy model = new SubProtectionPolicy().withPolicyType(PolicyType.LOG) + SubProtectionPolicy model = new SubProtectionPolicy().withPolicyType(PolicyType.SNAPSHOT_FULL) .withSchedulePolicy(new SchedulePolicy()) .withRetentionPolicy(new RetentionPolicy()) - .withTieringPolicy(mapOf("ftul", - new TieringPolicy().withTieringMode(TieringMode.DO_NOT_TIER) - .withDuration(1600023368) + .withTieringPolicy(mapOf("khenlus", + new TieringPolicy().withTieringMode(TieringMode.INVALID) + .withDuration(1960080516) + .withDurationType(RetentionDurationType.MONTHS), + "txrdcqtjvi", + new TieringPolicy().withTieringMode(TieringMode.INVALID) + .withDuration(1567868178) .withDurationType(RetentionDurationType.WEEKS))) .withSnapshotBackupAdditionalDetails(new SnapshotBackupAdditionalDetails() - .withInstantRpRetentionRangeInDays(184092911) - .withInstantRPDetails("ceamtm") - .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails().withIdentityArmId("o") - .withIdentityName("jw") - .withUserAssignedIdentityProperties( - new UserAssignedIdentityProperties().withClientId("qioknssxmojm").withPrincipalId("p")))); + .withInstantRpRetentionRangeInDays(613536314) + .withInstantRPDetails("puslvyj") + .withUserAssignedManagedIdentityDetails(new UserAssignedManagedIdentityDetails() + .withIdentityArmId("uwkasiz") + .withIdentityName("sfuughtuqfecjx") + .withUserAssignedIdentityProperties(new UserAssignedIdentityProperties().withClientId("tuhxuicb") + .withPrincipalId("wmrswnjlxuzrh")))); model = BinaryData.fromObject(model).toObject(SubProtectionPolicy.class); - Assertions.assertEquals(PolicyType.LOG, model.policyType()); - Assertions.assertEquals(TieringMode.DO_NOT_TIER, model.tieringPolicy().get("ftul").tieringMode()); - Assertions.assertEquals(1600023368, model.tieringPolicy().get("ftul").duration()); - Assertions.assertEquals(RetentionDurationType.WEEKS, model.tieringPolicy().get("ftul").durationType()); - Assertions.assertEquals(184092911, model.snapshotBackupAdditionalDetails().instantRpRetentionRangeInDays()); - Assertions.assertEquals("ceamtm", model.snapshotBackupAdditionalDetails().instantRPDetails()); - Assertions.assertEquals("o", + Assertions.assertEquals(PolicyType.SNAPSHOT_FULL, model.policyType()); + Assertions.assertEquals(TieringMode.INVALID, model.tieringPolicy().get("khenlus").tieringMode()); + Assertions.assertEquals(1960080516, model.tieringPolicy().get("khenlus").duration()); + Assertions.assertEquals(RetentionDurationType.MONTHS, model.tieringPolicy().get("khenlus").durationType()); + Assertions.assertEquals(613536314, model.snapshotBackupAdditionalDetails().instantRpRetentionRangeInDays()); + Assertions.assertEquals("puslvyj", model.snapshotBackupAdditionalDetails().instantRPDetails()); + Assertions.assertEquals("uwkasiz", model.snapshotBackupAdditionalDetails().userAssignedManagedIdentityDetails().identityArmId()); - Assertions.assertEquals("jw", + Assertions.assertEquals("sfuughtuqfecjx", model.snapshotBackupAdditionalDetails().userAssignedManagedIdentityDetails().identityName()); - Assertions.assertEquals("qioknssxmojm", + Assertions.assertEquals("tuhxuicb", model.snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .userAssignedIdentityProperties() .clientId()); - Assertions.assertEquals("p", + Assertions.assertEquals("wmrswnjlxuzrh", model.snapshotBackupAdditionalDetails() .userAssignedManagedIdentityDetails() .userAssignedIdentityProperties() diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TargetAfsRestoreInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TargetAfsRestoreInfoTests.java index 083aa968d9de..67cd8d9fe765 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TargetAfsRestoreInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TargetAfsRestoreInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,18 +12,18 @@ public final class TargetAfsRestoreInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TargetAfsRestoreInfo model - = BinaryData.fromString("{\"name\":\"sutrgjup\",\"targetResourceId\":\"utpwoqhihejqgw\"}") + = BinaryData.fromString("{\"name\":\"qdrfegcealzxwhc\",\"targetResourceId\":\"symoyq\"}") .toObject(TargetAfsRestoreInfo.class); - Assertions.assertEquals("sutrgjup", model.name()); - Assertions.assertEquals("utpwoqhihejqgw", model.targetResourceId()); + Assertions.assertEquals("qdrfegcealzxwhc", model.name()); + Assertions.assertEquals("symoyq", model.targetResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { TargetAfsRestoreInfo model - = new TargetAfsRestoreInfo().withName("sutrgjup").withTargetResourceId("utpwoqhihejqgw"); + = new TargetAfsRestoreInfo().withName("qdrfegcealzxwhc").withTargetResourceId("symoyq"); model = BinaryData.fromObject(model).toObject(TargetAfsRestoreInfo.class); - Assertions.assertEquals("sutrgjup", model.name()); - Assertions.assertEquals("utpwoqhihejqgw", model.targetResourceId()); + Assertions.assertEquals("qdrfegcealzxwhc", model.name()); + Assertions.assertEquals("symoyq", model.targetResourceId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TargetDiskNetworkAccessSettingsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TargetDiskNetworkAccessSettingsTests.java index affda6baf917..999dff46e805 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TargetDiskNetworkAccessSettingsTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TargetDiskNetworkAccessSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,22 +12,23 @@ public final class TargetDiskNetworkAccessSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TargetDiskNetworkAccessSettings model = BinaryData.fromString( - "{\"targetDiskNetworkAccessOption\":\"EnablePublicAccessForAllDisks\",\"targetDiskAccessId\":\"ucmfdj\"}") + TargetDiskNetworkAccessSettings model = BinaryData + .fromString( + "{\"targetDiskNetworkAccessOption\":\"EnablePublicAccessForAllDisks\",\"targetDiskAccessId\":\"njle\"}") .toObject(TargetDiskNetworkAccessSettings.class); Assertions.assertEquals(TargetDiskNetworkAccessOption.ENABLE_PUBLIC_ACCESS_FOR_ALL_DISKS, model.targetDiskNetworkAccessOption()); - Assertions.assertEquals("ucmfdj", model.targetDiskAccessId()); + Assertions.assertEquals("njle", model.targetDiskAccessId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { TargetDiskNetworkAccessSettings model = new TargetDiskNetworkAccessSettings() .withTargetDiskNetworkAccessOption(TargetDiskNetworkAccessOption.ENABLE_PUBLIC_ACCESS_FOR_ALL_DISKS) - .withTargetDiskAccessId("ucmfdj"); + .withTargetDiskAccessId("njle"); model = BinaryData.fromObject(model).toObject(TargetDiskNetworkAccessSettings.class); Assertions.assertEquals(TargetDiskNetworkAccessOption.ENABLE_PUBLIC_ACCESS_FOR_ALL_DISKS, model.targetDiskNetworkAccessOption()); - Assertions.assertEquals("ucmfdj", model.targetDiskAccessId()); + Assertions.assertEquals("njle", model.targetDiskAccessId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TargetRestoreInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TargetRestoreInfoTests.java index 3a5f1a29db79..72ac2878e9db 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TargetRestoreInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TargetRestoreInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,24 +13,24 @@ public final class TargetRestoreInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TargetRestoreInfo model = BinaryData.fromString( - "{\"overwriteOption\":\"FailOnConflict\",\"containerId\":\"e\",\"databaseName\":\"guxak\",\"targetDirectoryForFileRestore\":\"qzhzbezkgimsi\"}") + "{\"overwriteOption\":\"Overwrite\",\"containerId\":\"tft\",\"databaseName\":\"pnpbswveflocc\",\"targetDirectoryForFileRestore\":\"mozi\"}") .toObject(TargetRestoreInfo.class); - Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.overwriteOption()); - Assertions.assertEquals("e", model.containerId()); - Assertions.assertEquals("guxak", model.databaseName()); - Assertions.assertEquals("qzhzbezkgimsi", model.targetDirectoryForFileRestore()); + Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.overwriteOption()); + Assertions.assertEquals("tft", model.containerId()); + Assertions.assertEquals("pnpbswveflocc", model.databaseName()); + Assertions.assertEquals("mozi", model.targetDirectoryForFileRestore()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TargetRestoreInfo model = new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.FAIL_ON_CONFLICT) - .withContainerId("e") - .withDatabaseName("guxak") - .withTargetDirectoryForFileRestore("qzhzbezkgimsi"); + TargetRestoreInfo model = new TargetRestoreInfo().withOverwriteOption(OverwriteOptions.OVERWRITE) + .withContainerId("tft") + .withDatabaseName("pnpbswveflocc") + .withTargetDirectoryForFileRestore("mozi"); model = BinaryData.fromObject(model).toObject(TargetRestoreInfo.class); - Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.overwriteOption()); - Assertions.assertEquals("e", model.containerId()); - Assertions.assertEquals("guxak", model.databaseName()); - Assertions.assertEquals("qzhzbezkgimsi", model.targetDirectoryForFileRestore()); + Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.overwriteOption()); + Assertions.assertEquals("tft", model.containerId()); + Assertions.assertEquals("pnpbswveflocc", model.databaseName()); + Assertions.assertEquals("mozi", model.targetDirectoryForFileRestore()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ThreatInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ThreatInfoTests.java new file mode 100644 index 000000000000..4bf05f0ea30b --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ThreatInfoTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatInfo; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatSeverity; +import com.azure.resourcemanager.recoveryservicesbackup.models.ThreatState; +import org.junit.jupiter.api.Assertions; + +public final class ThreatInfoTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ThreatInfo model = BinaryData.fromString( + "{\"threatTitle\":\"cvpa\",\"threatDescription\":\"sreuzvxurisjnh\",\"lastUpdatedTime\":\"2021-02-28T18:44:38Z\",\"threatState\":\"InProgress\",\"threatStartTime\":\"2021-08-30T04:18:03Z\",\"threatEndTime\":\"2021-04-19T17:28:41Z\",\"threatURI\":\"xmrhu\",\"threatSeverity\":\"Critical\"}") + .toObject(ThreatInfo.class); + Assertions.assertEquals(ThreatState.IN_PROGRESS, model.threatState()); + Assertions.assertEquals(ThreatSeverity.CRITICAL, model.threatSeverity()); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringCostInfoInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringCostInfoInnerTests.java index 9d1ad2801a15..217ef5762d4e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringCostInfoInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringCostInfoInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,10 +13,4 @@ public void testDeserialize() throws Exception { TieringCostInfoInner model = BinaryData.fromString("{\"objectType\":\"TieringCostInfo\"}").toObject(TieringCostInfoInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TieringCostInfoInner model = new TieringCostInfoInner(); - model = BinaryData.fromObject(model).toObject(TieringCostInfoInner.class); - } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringCostRehydrationInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringCostRehydrationInfoTests.java index eab1e7a52db7..36ac0095d083 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringCostRehydrationInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringCostRehydrationInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,19 +12,9 @@ public final class TieringCostRehydrationInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TieringCostRehydrationInfo model = BinaryData.fromString( - "{\"objectType\":\"TieringCostRehydrationInfo\",\"rehydrationSizeInBytes\":5753434754911669837,\"retailRehydrationCostPerGBPerMonth\":14.712435267029655}") + "{\"objectType\":\"TieringCostRehydrationInfo\",\"rehydrationSizeInBytes\":6838146046681775912,\"retailRehydrationCostPerGBPerMonth\":71.71010555949356}") .toObject(TieringCostRehydrationInfo.class); - Assertions.assertEquals(5753434754911669837L, model.rehydrationSizeInBytes()); - Assertions.assertEquals(14.712435267029655, model.retailRehydrationCostPerGBPerMonth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TieringCostRehydrationInfo model - = new TieringCostRehydrationInfo().withRehydrationSizeInBytes(5753434754911669837L) - .withRetailRehydrationCostPerGBPerMonth(14.712435267029655); - model = BinaryData.fromObject(model).toObject(TieringCostRehydrationInfo.class); - Assertions.assertEquals(5753434754911669837L, model.rehydrationSizeInBytes()); - Assertions.assertEquals(14.712435267029655, model.retailRehydrationCostPerGBPerMonth()); + Assertions.assertEquals(6838146046681775912L, model.rehydrationSizeInBytes()); + Assertions.assertEquals(71.71010555949356, model.retailRehydrationCostPerGBPerMonth()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringCostSavingInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringCostSavingInfoTests.java index fb359fc4e3ab..91497c3777d1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringCostSavingInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringCostSavingInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,25 +12,11 @@ public final class TieringCostSavingInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TieringCostSavingInfo model = BinaryData.fromString( - "{\"objectType\":\"TieringCostSavingInfo\",\"sourceTierSizeReductionInBytes\":8383154283604119865,\"targetTierSizeIncreaseInBytes\":3826976009885862346,\"retailSourceTierCostPerGBPerMonth\":76.2222883873025,\"retailTargetTierCostPerGBPerMonth\":0.48473291717016087}") + "{\"objectType\":\"TieringCostSavingInfo\",\"sourceTierSizeReductionInBytes\":955869572885805880,\"targetTierSizeIncreaseInBytes\":291363591184248126,\"retailSourceTierCostPerGBPerMonth\":21.610865525134827,\"retailTargetTierCostPerGBPerMonth\":95.62502560178775}") .toObject(TieringCostSavingInfo.class); - Assertions.assertEquals(8383154283604119865L, model.sourceTierSizeReductionInBytes()); - Assertions.assertEquals(3826976009885862346L, model.targetTierSizeIncreaseInBytes()); - Assertions.assertEquals(76.2222883873025, model.retailSourceTierCostPerGBPerMonth()); - Assertions.assertEquals(0.48473291717016087, model.retailTargetTierCostPerGBPerMonth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TieringCostSavingInfo model - = new TieringCostSavingInfo().withSourceTierSizeReductionInBytes(8383154283604119865L) - .withTargetTierSizeIncreaseInBytes(3826976009885862346L) - .withRetailSourceTierCostPerGBPerMonth(76.2222883873025) - .withRetailTargetTierCostPerGBPerMonth(0.48473291717016087); - model = BinaryData.fromObject(model).toObject(TieringCostSavingInfo.class); - Assertions.assertEquals(8383154283604119865L, model.sourceTierSizeReductionInBytes()); - Assertions.assertEquals(3826976009885862346L, model.targetTierSizeIncreaseInBytes()); - Assertions.assertEquals(76.2222883873025, model.retailSourceTierCostPerGBPerMonth()); - Assertions.assertEquals(0.48473291717016087, model.retailTargetTierCostPerGBPerMonth()); + Assertions.assertEquals(955869572885805880L, model.sourceTierSizeReductionInBytes()); + Assertions.assertEquals(291363591184248126L, model.targetTierSizeIncreaseInBytes()); + Assertions.assertEquals(21.610865525134827, model.retailSourceTierCostPerGBPerMonth()); + Assertions.assertEquals(95.62502560178775, model.retailTargetTierCostPerGBPerMonth()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringPolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringPolicyTests.java index bf67c251c454..c9afcaa3b11e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringPolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,22 +13,22 @@ public final class TieringPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TieringPolicy model - = BinaryData.fromString("{\"tieringMode\":\"DoNotTier\",\"duration\":473129679,\"durationType\":\"Days\"}") - .toObject(TieringPolicy.class); - Assertions.assertEquals(TieringMode.DO_NOT_TIER, model.tieringMode()); - Assertions.assertEquals(473129679, model.duration()); - Assertions.assertEquals(RetentionDurationType.DAYS, model.durationType()); + TieringPolicy model = BinaryData + .fromString("{\"tieringMode\":\"TierRecommended\",\"duration\":1323683698,\"durationType\":\"Invalid\"}") + .toObject(TieringPolicy.class); + Assertions.assertEquals(TieringMode.TIER_RECOMMENDED, model.tieringMode()); + Assertions.assertEquals(1323683698, model.duration()); + Assertions.assertEquals(RetentionDurationType.INVALID, model.durationType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TieringPolicy model = new TieringPolicy().withTieringMode(TieringMode.DO_NOT_TIER) - .withDuration(473129679) - .withDurationType(RetentionDurationType.DAYS); + TieringPolicy model = new TieringPolicy().withTieringMode(TieringMode.TIER_RECOMMENDED) + .withDuration(1323683698) + .withDurationType(RetentionDurationType.INVALID); model = BinaryData.fromObject(model).toObject(TieringPolicy.class); - Assertions.assertEquals(TieringMode.DO_NOT_TIER, model.tieringMode()); - Assertions.assertEquals(473129679, model.duration()); - Assertions.assertEquals(RetentionDurationType.DAYS, model.durationType()); + Assertions.assertEquals(TieringMode.TIER_RECOMMENDED, model.tieringMode()); + Assertions.assertEquals(1323683698, model.duration()); + Assertions.assertEquals(RetentionDurationType.INVALID, model.durationType()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TriggerDataMoveRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TriggerDataMoveRequestTests.java index 5906b717d6ad..f35ddbdb92ac 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TriggerDataMoveRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TriggerDataMoveRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,30 +14,30 @@ public final class TriggerDataMoveRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TriggerDataMoveRequest model = BinaryData.fromString( - "{\"sourceResourceId\":\"amdecte\",\"sourceRegion\":\"f\",\"dataMoveLevel\":\"Container\",\"correlationId\":\"scjeypv\",\"sourceContainerArmIds\":[\"rkgqhcjrefo\",\"gm\",\"qsl\",\"yyvxyqjpkcattpn\"],\"pauseGC\":false}") + "{\"sourceResourceId\":\"hdxbmtqio\",\"sourceRegion\":\"jzehtb\",\"dataMoveLevel\":\"Invalid\",\"correlationId\":\"fpownoizhwlr\",\"sourceContainerArmIds\":[\"qsoqijgkd\",\"bpazlobcufpdzn\"],\"pauseGC\":false}") .toObject(TriggerDataMoveRequest.class); - Assertions.assertEquals("amdecte", model.sourceResourceId()); - Assertions.assertEquals("f", model.sourceRegion()); - Assertions.assertEquals(DataMoveLevel.CONTAINER, model.dataMoveLevel()); - Assertions.assertEquals("scjeypv", model.correlationId()); - Assertions.assertEquals("rkgqhcjrefo", model.sourceContainerArmIds().get(0)); - Assertions.assertEquals(false, model.pauseGC()); + Assertions.assertEquals("hdxbmtqio", model.sourceResourceId()); + Assertions.assertEquals("jzehtb", model.sourceRegion()); + Assertions.assertEquals(DataMoveLevel.INVALID, model.dataMoveLevel()); + Assertions.assertEquals("fpownoizhwlr", model.correlationId()); + Assertions.assertEquals("qsoqijgkd", model.sourceContainerArmIds().get(0)); + Assertions.assertFalse(model.pauseGC()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TriggerDataMoveRequest model = new TriggerDataMoveRequest().withSourceResourceId("amdecte") - .withSourceRegion("f") - .withDataMoveLevel(DataMoveLevel.CONTAINER) - .withCorrelationId("scjeypv") - .withSourceContainerArmIds(Arrays.asList("rkgqhcjrefo", "gm", "qsl", "yyvxyqjpkcattpn")) + TriggerDataMoveRequest model = new TriggerDataMoveRequest().withSourceResourceId("hdxbmtqio") + .withSourceRegion("jzehtb") + .withDataMoveLevel(DataMoveLevel.INVALID) + .withCorrelationId("fpownoizhwlr") + .withSourceContainerArmIds(Arrays.asList("qsoqijgkd", "bpazlobcufpdzn")) .withPauseGC(false); model = BinaryData.fromObject(model).toObject(TriggerDataMoveRequest.class); - Assertions.assertEquals("amdecte", model.sourceResourceId()); - Assertions.assertEquals("f", model.sourceRegion()); - Assertions.assertEquals(DataMoveLevel.CONTAINER, model.dataMoveLevel()); - Assertions.assertEquals("scjeypv", model.correlationId()); - Assertions.assertEquals("rkgqhcjrefo", model.sourceContainerArmIds().get(0)); - Assertions.assertEquals(false, model.pauseGC()); + Assertions.assertEquals("hdxbmtqio", model.sourceResourceId()); + Assertions.assertEquals("jzehtb", model.sourceRegion()); + Assertions.assertEquals(DataMoveLevel.INVALID, model.dataMoveLevel()); + Assertions.assertEquals("fpownoizhwlr", model.correlationId()); + Assertions.assertEquals("qsoqijgkd", model.sourceContainerArmIds().get(0)); + Assertions.assertFalse(model.pauseGC()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UnlockDeleteRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UnlockDeleteRequestTests.java index ce51430fa3ca..9b438e29d883 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UnlockDeleteRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UnlockDeleteRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,19 +13,19 @@ public final class UnlockDeleteRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UnlockDeleteRequest model = BinaryData.fromString( - "{\"resourceGuardOperationRequests\":[\"qqmtedltmmji\",\"yeozphvwauyqncy\"],\"resourceToBeDeleted\":\"p\"}") + "{\"resourceGuardOperationRequests\":[\"iy\",\"rvzb\",\"uyrsrziuctix\",\"bdsuifr\"],\"resourceToBeDeleted\":\"kaapezkiswqjmdg\"}") .toObject(UnlockDeleteRequest.class); - Assertions.assertEquals("qqmtedltmmji", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("p", model.resourceToBeDeleted()); + Assertions.assertEquals("iy", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("kaapezkiswqjmdg", model.resourceToBeDeleted()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UnlockDeleteRequest model = new UnlockDeleteRequest() - .withResourceGuardOperationRequests(Arrays.asList("qqmtedltmmji", "yeozphvwauyqncy")) - .withResourceToBeDeleted("p"); + .withResourceGuardOperationRequests(Arrays.asList("iy", "rvzb", "uyrsrziuctix", "bdsuifr")) + .withResourceToBeDeleted("kaapezkiswqjmdg"); model = BinaryData.fromObject(model).toObject(UnlockDeleteRequest.class); - Assertions.assertEquals("qqmtedltmmji", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("p", model.resourceToBeDeleted()); + Assertions.assertEquals("iy", model.resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("kaapezkiswqjmdg", model.resourceToBeDeleted()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UnlockDeleteResponseInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UnlockDeleteResponseInnerTests.java index 0dfef95e4edd..8cea438f0e88 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UnlockDeleteResponseInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UnlockDeleteResponseInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -11,15 +11,8 @@ public final class UnlockDeleteResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UnlockDeleteResponseInner model = BinaryData.fromString("{\"unlockDeleteExpiryTime\":\"ipmdscwx\"}") + UnlockDeleteResponseInner model = BinaryData.fromString("{\"unlockDeleteExpiryTime\":\"yparybjufptbjc\"}") .toObject(UnlockDeleteResponseInner.class); - Assertions.assertEquals("ipmdscwx", model.unlockDeleteExpiryTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UnlockDeleteResponseInner model = new UnlockDeleteResponseInner().withUnlockDeleteExpiryTime("ipmdscwx"); - model = BinaryData.fromObject(model).toObject(UnlockDeleteResponseInner.class); - Assertions.assertEquals("ipmdscwx", model.unlockDeleteExpiryTime()); + Assertions.assertEquals("yparybjufptbjc", model.unlockDeleteExpiryTime()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UpdateRecoveryPointRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UpdateRecoveryPointRequestTests.java new file mode 100644 index 000000000000..1f201edba84f --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UpdateRecoveryPointRequestTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.recoveryservicesbackup.models.PatchRecoveryPointInput; +import com.azure.resourcemanager.recoveryservicesbackup.models.PatchRecoveryPointPropertiesInput; +import com.azure.resourcemanager.recoveryservicesbackup.models.UpdateRecoveryPointRequest; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class UpdateRecoveryPointRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UpdateRecoveryPointRequest model = BinaryData + .fromString("{\"properties\":{\"recoveryPointProperties\":{\"expiryTime\":\"2021-02-16T23:35:43Z\"}}}") + .toObject(UpdateRecoveryPointRequest.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-16T23:35:43Z"), + model.properties().recoveryPointProperties().expiryTime()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + UpdateRecoveryPointRequest model + = new UpdateRecoveryPointRequest().withProperties(new PatchRecoveryPointInput().withRecoveryPointProperties( + new PatchRecoveryPointPropertiesInput().withExpiryTime(OffsetDateTime.parse("2021-02-16T23:35:43Z")))); + model = BinaryData.fromObject(model).toObject(UpdateRecoveryPointRequest.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-16T23:35:43Z"), + model.properties().recoveryPointProperties().expiryTime()); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UserAssignedIdentityPropertiesTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UserAssignedIdentityPropertiesTests.java index 3cbda767b017..986cfc930841 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UserAssignedIdentityPropertiesTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UserAssignedIdentityPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -12,18 +12,18 @@ public final class UserAssignedIdentityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserAssignedIdentityProperties model - = BinaryData.fromString("{\"clientId\":\"jfsmlmbtxhwgfwsr\",\"principalId\":\"wcoezbrhub\"}") + = BinaryData.fromString("{\"clientId\":\"lrmcaykg\",\"principalId\":\"oxuztrksx\"}") .toObject(UserAssignedIdentityProperties.class); - Assertions.assertEquals("jfsmlmbtxhwgfwsr", model.clientId()); - Assertions.assertEquals("wcoezbrhub", model.principalId()); + Assertions.assertEquals("lrmcaykg", model.clientId()); + Assertions.assertEquals("oxuztrksx", model.principalId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UserAssignedIdentityProperties model - = new UserAssignedIdentityProperties().withClientId("jfsmlmbtxhwgfwsr").withPrincipalId("wcoezbrhub"); + = new UserAssignedIdentityProperties().withClientId("lrmcaykg").withPrincipalId("oxuztrksx"); model = BinaryData.fromObject(model).toObject(UserAssignedIdentityProperties.class); - Assertions.assertEquals("jfsmlmbtxhwgfwsr", model.clientId()); - Assertions.assertEquals("wcoezbrhub", model.principalId()); + Assertions.assertEquals("lrmcaykg", model.clientId()); + Assertions.assertEquals("oxuztrksx", model.principalId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UserAssignedManagedIdentityDetailsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UserAssignedManagedIdentityDetailsTests.java index 5f6d155deeb0..2f757c24dcb7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UserAssignedManagedIdentityDetailsTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UserAssignedManagedIdentityDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,24 +13,25 @@ public final class UserAssignedManagedIdentityDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserAssignedManagedIdentityDetails model = BinaryData.fromString( - "{\"identityArmId\":\"lgzi\",\"identityName\":\"hostgktstvdxecl\",\"userAssignedIdentityProperties\":{\"clientId\":\"qbcvhzlhplod\",\"principalId\":\"dlwwqfbumlkxt\"}}") + "{\"identityArmId\":\"ipgawtxx\",\"identityName\":\"y\",\"userAssignedIdentityProperties\":{\"clientId\":\"cjxgrytf\",\"principalId\":\"cy\"}}") .toObject(UserAssignedManagedIdentityDetails.class); - Assertions.assertEquals("lgzi", model.identityArmId()); - Assertions.assertEquals("hostgktstvdxecl", model.identityName()); - Assertions.assertEquals("qbcvhzlhplod", model.userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("dlwwqfbumlkxt", model.userAssignedIdentityProperties().principalId()); + Assertions.assertEquals("ipgawtxx", model.identityArmId()); + Assertions.assertEquals("y", model.identityName()); + Assertions.assertEquals("cjxgrytf", model.userAssignedIdentityProperties().clientId()); + Assertions.assertEquals("cy", model.userAssignedIdentityProperties().principalId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UserAssignedManagedIdentityDetails model = new UserAssignedManagedIdentityDetails().withIdentityArmId("lgzi") - .withIdentityName("hostgktstvdxecl") - .withUserAssignedIdentityProperties( - new UserAssignedIdentityProperties().withClientId("qbcvhzlhplod").withPrincipalId("dlwwqfbumlkxt")); + UserAssignedManagedIdentityDetails model + = new UserAssignedManagedIdentityDetails().withIdentityArmId("ipgawtxx") + .withIdentityName("y") + .withUserAssignedIdentityProperties( + new UserAssignedIdentityProperties().withClientId("cjxgrytf").withPrincipalId("cy")); model = BinaryData.fromObject(model).toObject(UserAssignedManagedIdentityDetails.class); - Assertions.assertEquals("lgzi", model.identityArmId()); - Assertions.assertEquals("hostgktstvdxecl", model.identityName()); - Assertions.assertEquals("qbcvhzlhplod", model.userAssignedIdentityProperties().clientId()); - Assertions.assertEquals("dlwwqfbumlkxt", model.userAssignedIdentityProperties().principalId()); + Assertions.assertEquals("ipgawtxx", model.identityArmId()); + Assertions.assertEquals("y", model.identityName()); + Assertions.assertEquals("cjxgrytf", model.userAssignedIdentityProperties().clientId()); + Assertions.assertEquals("cy", model.userAssignedIdentityProperties().principalId()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateIaasVMRestoreOperationRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateIaasVMRestoreOperationRequestTests.java index a04bc9530363..c100f95980b3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateIaasVMRestoreOperationRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateIaasVMRestoreOperationRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,16 +14,17 @@ public final class ValidateIaasVMRestoreOperationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidateIaasVMRestoreOperationRequest model = BinaryData.fromString( - "{\"objectType\":\"ValidateIaasVMRestoreOperationRequest\",\"restoreRequest\":{\"objectType\":\"RestoreRequest\",\"resourceGuardOperationRequests\":[\"a\"]}}") + "{\"objectType\":\"ValidateIaasVMRestoreOperationRequest\",\"restoreRequest\":{\"objectType\":\"RestoreRequest\",\"resourceGuardOperationRequests\":[\"dgxvco\",\"raswugyxpqit\",\"eialwvskb\",\"hzacaqtyltco\"]}}") .toObject(ValidateIaasVMRestoreOperationRequest.class); - Assertions.assertEquals("a", model.restoreRequest().resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("dgxvco", model.restoreRequest().resourceGuardOperationRequests().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ValidateIaasVMRestoreOperationRequest model = new ValidateIaasVMRestoreOperationRequest() - .withRestoreRequest(new RestoreRequest().withResourceGuardOperationRequests(Arrays.asList("a"))); + .withRestoreRequest(new RestoreRequest().withResourceGuardOperationRequests( + Arrays.asList("dgxvco", "raswugyxpqit", "eialwvskb", "hzacaqtyltco"))); model = BinaryData.fromObject(model).toObject(ValidateIaasVMRestoreOperationRequest.class); - Assertions.assertEquals("a", model.restoreRequest().resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("dgxvco", model.restoreRequest().resourceGuardOperationRequests().get(0)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationRequestResourceTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationRequestResourceTests.java index d26d6250da03..4dd72cb091e3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationRequestResourceTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationRequestResourceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,16 +13,16 @@ public final class ValidateOperationRequestResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidateOperationRequestResource model = BinaryData - .fromString("{\"id\":\"uvwbhsqfs\",\"properties\":{\"objectType\":\"ValidateOperationRequest\"}}") + .fromString("{\"id\":\"jfoknubnoitpkp\",\"properties\":{\"objectType\":\"ValidateOperationRequest\"}}") .toObject(ValidateOperationRequestResource.class); - Assertions.assertEquals("uvwbhsqfs", model.id()); + Assertions.assertEquals("jfoknubnoitpkp", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ValidateOperationRequestResource model - = new ValidateOperationRequestResource().withId("uvwbhsqfs").withProperties(new ValidateOperationRequest()); + ValidateOperationRequestResource model = new ValidateOperationRequestResource().withId("jfoknubnoitpkp") + .withProperties(new ValidateOperationRequest()); model = BinaryData.fromObject(model).toObject(ValidateOperationRequestResource.class); - Assertions.assertEquals("uvwbhsqfs", model.id()); + Assertions.assertEquals("jfoknubnoitpkp", model.id()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationRequestTests.java index 9e3f165e3823..f23f632427b4 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateRestoreOperationRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateRestoreOperationRequestTests.java index 016c6bc397af..c5c12b4ed0b5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateRestoreOperationRequestTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateRestoreOperationRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,17 +14,16 @@ public final class ValidateRestoreOperationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ValidateRestoreOperationRequest model = BinaryData.fromString( - "{\"objectType\":\"ValidateRestoreOperationRequest\",\"restoreRequest\":{\"objectType\":\"RestoreRequest\",\"resourceGuardOperationRequests\":[\"jchcsrlzknmzla\",\"rupdwvnphcnzq\",\"pjhmqrhvthl\"]}}") + "{\"objectType\":\"ValidateRestoreOperationRequest\",\"restoreRequest\":{\"objectType\":\"RestoreRequest\",\"resourceGuardOperationRequests\":[\"pdsxzakuejkm\"]}}") .toObject(ValidateRestoreOperationRequest.class); - Assertions.assertEquals("jchcsrlzknmzla", model.restoreRequest().resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("pdsxzakuejkm", model.restoreRequest().resourceGuardOperationRequests().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ValidateRestoreOperationRequest model - = new ValidateRestoreOperationRequest().withRestoreRequest(new RestoreRequest() - .withResourceGuardOperationRequests(Arrays.asList("jchcsrlzknmzla", "rupdwvnphcnzq", "pjhmqrhvthl"))); + ValidateRestoreOperationRequest model = new ValidateRestoreOperationRequest() + .withRestoreRequest(new RestoreRequest().withResourceGuardOperationRequests(Arrays.asList("pdsxzakuejkm"))); model = BinaryData.fromObject(model).toObject(ValidateRestoreOperationRequest.class); - Assertions.assertEquals("jchcsrlzknmzla", model.restoreRequest().resourceGuardOperationRequests().get(0)); + Assertions.assertEquals("pdsxzakuejkm", model.restoreRequest().resourceGuardOperationRequests().get(0)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/VaultJobExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/VaultJobExtendedInfoTests.java index b211f70ea1c8..994dc16f89ec 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/VaultJobExtendedInfoTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/VaultJobExtendedInfoTests.java @@ -1,42 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.models.VaultJobExtendedInfo; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class VaultJobExtendedInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VaultJobExtendedInfo model = BinaryData - .fromString( - "{\"propertyBag\":{\"qvlnnpxybafiqgea\":\"txetlgydl\",\"yulidwcwvm\":\"rbgjekglkl\",\"o\":\"eg\"}}") + .fromString("{\"propertyBag\":{\"afcbqw\":\"md\",\"jelaqacigele\":\"e\",\"beonrlkwzdq\":\"hdbvqvwzkjop\"}}") .toObject(VaultJobExtendedInfo.class); - Assertions.assertEquals("txetlgydl", model.propertyBag().get("qvlnnpxybafiqgea")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VaultJobExtendedInfo model = new VaultJobExtendedInfo() - .withPropertyBag(mapOf("qvlnnpxybafiqgea", "txetlgydl", "yulidwcwvm", "rbgjekglkl", "o", "eg")); - model = BinaryData.fromObject(model).toObject(VaultJobExtendedInfo.class); - Assertions.assertEquals("txetlgydl", model.propertyBag().get("qvlnnpxybafiqgea")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("md", model.propertyBag().get("afcbqw")); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/VaultRetentionPolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/VaultRetentionPolicyTests.java index dc68a52b7336..a926843ac393 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/VaultRetentionPolicyTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/VaultRetentionPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,16 +13,16 @@ public final class VaultRetentionPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VaultRetentionPolicy model = BinaryData.fromString( - "{\"vaultRetention\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"snapshotRetentionInDays\":1811866943}") + "{\"vaultRetention\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"snapshotRetentionInDays\":1952493795}") .toObject(VaultRetentionPolicy.class); - Assertions.assertEquals(1811866943, model.snapshotRetentionInDays()); + Assertions.assertEquals(1952493795, model.snapshotRetentionInDays()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VaultRetentionPolicy model = new VaultRetentionPolicy().withVaultRetention(new RetentionPolicy()) - .withSnapshotRetentionInDays(1811866943); + .withSnapshotRetentionInDays(1952493795); model = BinaryData.fromObject(model).toObject(VaultRetentionPolicy.class); - Assertions.assertEquals(1811866943, model.snapshotRetentionInDays()); + Assertions.assertEquals(1952493795, model.snapshotRetentionInDays()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/VaultStorageConfigOperationResultResponseInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/VaultStorageConfigOperationResultResponseInnerTests.java index c881e7f198e8..806a4c94f5d3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/VaultStorageConfigOperationResultResponseInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/VaultStorageConfigOperationResultResponseInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,10 +14,4 @@ public void testDeserialize() throws Exception { = BinaryData.fromString("{\"objectType\":\"VaultStorageConfigOperationResultResponse\"}") .toObject(VaultStorageConfigOperationResultResponseInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VaultStorageConfigOperationResultResponseInner model = new VaultStorageConfigOperationResultResponseInner(); - model = BinaryData.fromObject(model).toObject(VaultStorageConfigOperationResultResponseInner.class); - } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WeeklyRetentionFormatTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WeeklyRetentionFormatTests.java index 0f2d38bf1c7c..8dfd60cbb68e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WeeklyRetentionFormatTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WeeklyRetentionFormatTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -15,20 +15,19 @@ public final class WeeklyRetentionFormatTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WeeklyRetentionFormat model = BinaryData.fromString( - "{\"daysOfTheWeek\":[\"Thursday\",\"Friday\",\"Wednesday\"],\"weeksOfTheMonth\":[\"Invalid\",\"Invalid\",\"Second\",\"Fourth\"]}") + "{\"daysOfTheWeek\":[\"Monday\",\"Monday\",\"Monday\",\"Friday\"],\"weeksOfTheMonth\":[\"Invalid\",\"Invalid\"]}") .toObject(WeeklyRetentionFormat.class); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.daysOfTheWeek().get(0)); + Assertions.assertEquals(DayOfWeek.MONDAY, model.daysOfTheWeek().get(0)); Assertions.assertEquals(WeekOfMonth.INVALID, model.weeksOfTheMonth().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WeeklyRetentionFormat model = new WeeklyRetentionFormat() - .withDaysOfTheWeek(Arrays.asList(DayOfWeek.THURSDAY, DayOfWeek.FRIDAY, DayOfWeek.WEDNESDAY)) - .withWeeksOfTheMonth( - Arrays.asList(WeekOfMonth.INVALID, WeekOfMonth.INVALID, WeekOfMonth.SECOND, WeekOfMonth.FOURTH)); + .withDaysOfTheWeek(Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.MONDAY, DayOfWeek.MONDAY, DayOfWeek.FRIDAY)) + .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.INVALID, WeekOfMonth.INVALID)); model = BinaryData.fromObject(model).toObject(WeeklyRetentionFormat.class); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.daysOfTheWeek().get(0)); + Assertions.assertEquals(DayOfWeek.MONDAY, model.daysOfTheWeek().get(0)); Assertions.assertEquals(WeekOfMonth.INVALID, model.weeksOfTheMonth().get(0)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WeeklyRetentionScheduleTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WeeklyRetentionScheduleTests.java index d9f3cdd0ec2e..a8916de6d749 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WeeklyRetentionScheduleTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WeeklyRetentionScheduleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -17,26 +17,27 @@ public final class WeeklyRetentionScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WeeklyRetentionSchedule model = BinaryData.fromString( - "{\"daysOfTheWeek\":[\"Saturday\",\"Wednesday\",\"Friday\",\"Tuesday\"],\"retentionTimes\":[\"2021-05-12T21:16:31Z\"],\"retentionDuration\":{\"count\":1930169627,\"durationType\":\"Weeks\"}}") + "{\"daysOfTheWeek\":[\"Thursday\",\"Sunday\",\"Thursday\",\"Wednesday\"],\"retentionTimes\":[\"2021-05-05T16:13:23Z\",\"2021-10-16T20:22Z\",\"2020-12-30T22:06:45Z\"],\"retentionDuration\":{\"count\":989951031,\"durationType\":\"Invalid\"}}") .toObject(WeeklyRetentionSchedule.class); - Assertions.assertEquals(DayOfWeek.SATURDAY, model.daysOfTheWeek().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-12T21:16:31Z"), model.retentionTimes().get(0)); - Assertions.assertEquals(1930169627, model.retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.WEEKS, model.retentionDuration().durationType()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.daysOfTheWeek().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-05T16:13:23Z"), model.retentionTimes().get(0)); + Assertions.assertEquals(989951031, model.retentionDuration().count()); + Assertions.assertEquals(RetentionDurationType.INVALID, model.retentionDuration().durationType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WeeklyRetentionSchedule model = new WeeklyRetentionSchedule() .withDaysOfTheWeek( - Arrays.asList(DayOfWeek.SATURDAY, DayOfWeek.WEDNESDAY, DayOfWeek.FRIDAY, DayOfWeek.TUESDAY)) - .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-05-12T21:16:31Z"))) + Arrays.asList(DayOfWeek.THURSDAY, DayOfWeek.SUNDAY, DayOfWeek.THURSDAY, DayOfWeek.WEDNESDAY)) + .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-05-05T16:13:23Z"), + OffsetDateTime.parse("2021-10-16T20:22Z"), OffsetDateTime.parse("2020-12-30T22:06:45Z"))) .withRetentionDuration( - new RetentionDuration().withCount(1930169627).withDurationType(RetentionDurationType.WEEKS)); + new RetentionDuration().withCount(989951031).withDurationType(RetentionDurationType.INVALID)); model = BinaryData.fromObject(model).toObject(WeeklyRetentionSchedule.class); - Assertions.assertEquals(DayOfWeek.SATURDAY, model.daysOfTheWeek().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-12T21:16:31Z"), model.retentionTimes().get(0)); - Assertions.assertEquals(1930169627, model.retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.WEEKS, model.retentionDuration().durationType()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.daysOfTheWeek().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-05T16:13:23Z"), model.retentionTimes().get(0)); + Assertions.assertEquals(989951031, model.retentionDuration().count()); + Assertions.assertEquals(RetentionDurationType.INVALID, model.retentionDuration().durationType()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WeeklyScheduleTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WeeklyScheduleTests.java index 315e115e78c6..77fafccfd41f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WeeklyScheduleTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WeeklyScheduleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -14,21 +14,21 @@ public final class WeeklyScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WeeklySchedule model = BinaryData.fromString( - "{\"scheduleRunDays\":[\"Thursday\",\"Thursday\",\"Saturday\"],\"scheduleRunTimes\":[\"2021-06-25T03:22:55Z\",\"2021-01-26T03:37:20Z\",\"2021-01-15T14:04:55Z\"]}") + WeeklySchedule model = BinaryData + .fromString( + "{\"scheduleRunDays\":[\"Saturday\",\"Thursday\"],\"scheduleRunTimes\":[\"2021-08-17T11:36:27Z\"]}") .toObject(WeeklySchedule.class); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.scheduleRunDays().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-25T03:22:55Z"), model.scheduleRunTimes().get(0)); + Assertions.assertEquals(DayOfWeek.SATURDAY, model.scheduleRunDays().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-17T11:36:27Z"), model.scheduleRunTimes().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WeeklySchedule model = new WeeklySchedule() - .withScheduleRunDays(Arrays.asList(DayOfWeek.THURSDAY, DayOfWeek.THURSDAY, DayOfWeek.SATURDAY)) - .withScheduleRunTimes(Arrays.asList(OffsetDateTime.parse("2021-06-25T03:22:55Z"), - OffsetDateTime.parse("2021-01-26T03:37:20Z"), OffsetDateTime.parse("2021-01-15T14:04:55Z"))); + WeeklySchedule model + = new WeeklySchedule().withScheduleRunDays(Arrays.asList(DayOfWeek.SATURDAY, DayOfWeek.THURSDAY)) + .withScheduleRunTimes(Arrays.asList(OffsetDateTime.parse("2021-08-17T11:36:27Z"))); model = BinaryData.fromObject(model).toObject(WeeklySchedule.class); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.scheduleRunDays().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-25T03:22:55Z"), model.scheduleRunTimes().get(0)); + Assertions.assertEquals(DayOfWeek.SATURDAY, model.scheduleRunDays().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-17T11:36:27Z"), model.scheduleRunTimes().get(0)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadItemResourceInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadItemResourceInnerTests.java index 5a34227bc240..4d01ef551583 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadItemResourceInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadItemResourceInnerTests.java @@ -1,60 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadItemResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadItem; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class WorkloadItemResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadItemResourceInner model = BinaryData.fromString( - "{\"properties\":{\"workloadItemType\":\"WorkloadItem\",\"backupManagementType\":\"patdooaojkniodko\",\"workloadType\":\"bw\",\"friendlyName\":\"jhemms\",\"protectionState\":\"Protected\"},\"eTag\":\"c\",\"location\":\"odtji\",\"tags\":{\"akggkfpag\":\"jlfltkacjvefkdlf\"},\"id\":\"owpulpq\",\"name\":\"lyls\",\"type\":\"xkqjnsjervt\"}") + "{\"location\":\"xmprafwg\",\"tags\":{\"udaspavehh\":\"ocxvdfffwafqr\",\"xg\":\"vkbunzozudh\",\"cdyuibhmfdnbzyd\":\"moy\",\"fcjnaeoisrvhmgor\":\"f\"},\"eTag\":\"ukiscvwmzhw\",\"properties\":{\"workloadItemType\":\"WorkloadItem\",\"backupManagementType\":\"faxvxil\",\"workloadType\":\"tg\",\"friendlyName\":\"nzeyqxtjj\",\"protectionState\":\"NotProtected\"},\"id\":\"qhycavodggxdbees\",\"name\":\"ieknl\",\"type\":\"ariaawi\"}") .toObject(WorkloadItemResourceInner.class); - Assertions.assertEquals("odtji", model.location()); - Assertions.assertEquals("jlfltkacjvefkdlf", model.tags().get("akggkfpag")); - Assertions.assertEquals("patdooaojkniodko", model.properties().backupManagementType()); - Assertions.assertEquals("bw", model.properties().workloadType()); - Assertions.assertEquals("jhemms", model.properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.properties().protectionState()); - Assertions.assertEquals("c", model.etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadItemResourceInner model = new WorkloadItemResourceInner().withLocation("odtji") - .withTags(mapOf("akggkfpag", "jlfltkacjvefkdlf")) - .withProperties(new WorkloadItem().withBackupManagementType("patdooaojkniodko") - .withWorkloadType("bw") - .withFriendlyName("jhemms") - .withProtectionState(ProtectionStatus.PROTECTED)) - .withEtag("c"); - model = BinaryData.fromObject(model).toObject(WorkloadItemResourceInner.class); - Assertions.assertEquals("odtji", model.location()); - Assertions.assertEquals("jlfltkacjvefkdlf", model.tags().get("akggkfpag")); - Assertions.assertEquals("patdooaojkniodko", model.properties().backupManagementType()); - Assertions.assertEquals("bw", model.properties().workloadType()); - Assertions.assertEquals("jhemms", model.properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.properties().protectionState()); - Assertions.assertEquals("c", model.etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("xmprafwg", model.location()); + Assertions.assertEquals("ocxvdfffwafqr", model.tags().get("udaspavehh")); + Assertions.assertEquals("ukiscvwmzhw", model.eTag()); + Assertions.assertEquals("faxvxil", model.properties().backupManagementType()); + Assertions.assertEquals("tg", model.properties().workloadType()); + Assertions.assertEquals("nzeyqxtjj", model.properties().friendlyName()); + Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.properties().protectionState()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadItemResourceListTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadItemResourceListTests.java index b83f8bc1c599..3868d53480ba 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadItemResourceListTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadItemResourceListTests.java @@ -1,68 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadItemResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.WorkloadItemResourceList; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadItemResourceList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class WorkloadItemResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadItemResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"workloadItemType\":\"WorkloadItem\",\"backupManagementType\":\"qugjhkycube\",\"workloadType\":\"gssofwq\",\"friendlyName\":\"qal\",\"protectionState\":\"ProtectionFailed\"},\"eTag\":\"jijpxac\",\"location\":\"qudf\",\"tags\":{\"yffimrzrtuzqogs\":\"xbaaabjyv\",\"mewzsyyc\":\"xnevfdnwn\",\"judpfrxt\":\"uzsoi\",\"paxh\":\"thzvaytdwkqbrqu\"},\"id\":\"xiilivpdtiirqt\",\"name\":\"qoaxoruzfgs\",\"type\":\"uyfxrxxleptramxj\"}],\"nextLink\":\"wlwnwxuqlcv\"}") + "{\"value\":[{\"location\":\"gvmnvuqeq\",\"tags\":{\"vestmjl\":\"spastjbkkdmf\",\"peewchpxlkt\":\"rriloz\",\"ufuztcktyhjtq\":\"kuziycsle\",\"mmrqz\":\"dcgzul\"},\"eTag\":\"rjvpglydzgkrvqee\",\"properties\":{\"workloadItemType\":\"WorkloadItem\",\"backupManagementType\":\"epr\",\"workloadType\":\"t\",\"friendlyName\":\"ytp\",\"protectionState\":\"Protected\"},\"id\":\"vzvfvaawzqadfl\",\"name\":\"z\",\"type\":\"riglaec\"},{\"location\":\"dticokpvzml\",\"tags\":{\"x\":\"ld\",\"rclnpkc\":\"bf\",\"khyawfvjlboxqv\":\"ayzri\"},\"eTag\":\"lmxhomdyn\",\"properties\":{\"workloadItemType\":\"WorkloadItem\",\"backupManagementType\":\"digumbnr\",\"workloadType\":\"uzzptjazysdz\",\"friendlyName\":\"zwwva\",\"protectionState\":\"Protected\"},\"id\":\"vv\",\"name\":\"onkp\",\"type\":\"hqyikvy\"},{\"location\":\"uyav\",\"tags\":{\"ekrsgs\":\"mncsttijfybvp\"},\"eTag\":\"dhuzqgnjdgk\",\"properties\":{\"workloadItemType\":\"WorkloadItem\",\"backupManagementType\":\"cli\",\"workloadType\":\"zvhxnk\",\"friendlyName\":\"tkubotppn\",\"protectionState\":\"Protected\"},\"id\":\"xhihfrbbcevqagtl\",\"name\":\"dhlfkqojpykvgt\",\"type\":\"dcnifmz\"}],\"nextLink\":\"dymbrny\"}") .toObject(WorkloadItemResourceList.class); - Assertions.assertEquals("wlwnwxuqlcv", model.nextLink()); - Assertions.assertEquals("qudf", model.value().get(0).location()); - Assertions.assertEquals("xbaaabjyv", model.value().get(0).tags().get("yffimrzrtuzqogs")); - Assertions.assertEquals("qugjhkycube", model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("gssofwq", model.value().get(0).properties().workloadType()); - Assertions.assertEquals("qal", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, - model.value().get(0).properties().protectionState()); - Assertions.assertEquals("jijpxac", model.value().get(0).etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadItemResourceList model = new WorkloadItemResourceList().withNextLink("wlwnwxuqlcv") - .withValue(Arrays.asList(new WorkloadItemResourceInner().withLocation("qudf") - .withTags(mapOf("yffimrzrtuzqogs", "xbaaabjyv", "mewzsyyc", "xnevfdnwn", "judpfrxt", "uzsoi", "paxh", - "thzvaytdwkqbrqu")) - .withProperties(new WorkloadItem().withBackupManagementType("qugjhkycube") - .withWorkloadType("gssofwq") - .withFriendlyName("qal") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED)) - .withEtag("jijpxac"))); - model = BinaryData.fromObject(model).toObject(WorkloadItemResourceList.class); - Assertions.assertEquals("wlwnwxuqlcv", model.nextLink()); - Assertions.assertEquals("qudf", model.value().get(0).location()); - Assertions.assertEquals("xbaaabjyv", model.value().get(0).tags().get("yffimrzrtuzqogs")); - Assertions.assertEquals("qugjhkycube", model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("gssofwq", model.value().get(0).properties().workloadType()); - Assertions.assertEquals("qal", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, - model.value().get(0).properties().protectionState()); - Assertions.assertEquals("jijpxac", model.value().get(0).etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("dymbrny", model.nextLink()); + Assertions.assertEquals("gvmnvuqeq", model.value().get(0).location()); + Assertions.assertEquals("spastjbkkdmf", model.value().get(0).tags().get("vestmjl")); + Assertions.assertEquals("rjvpglydzgkrvqee", model.value().get(0).eTag()); + Assertions.assertEquals("epr", model.value().get(0).properties().backupManagementType()); + Assertions.assertEquals("t", model.value().get(0).properties().workloadType()); + Assertions.assertEquals("ytp", model.value().get(0).properties().friendlyName()); + Assertions.assertEquals(ProtectionStatus.PROTECTED, model.value().get(0).properties().protectionState()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadItemTests.java index e2a3a385782c..938965cc060d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,24 +13,11 @@ public final class WorkloadItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadItem model = BinaryData.fromString( - "{\"workloadItemType\":\"WorkloadItem\",\"backupManagementType\":\"gxsds\",\"workloadType\":\"e\",\"friendlyName\":\"sbzkf\",\"protectionState\":\"Protecting\"}") + "{\"workloadItemType\":\"WorkloadItem\",\"backupManagementType\":\"gy\",\"workloadType\":\"qfby\",\"friendlyName\":\"rfgi\",\"protectionState\":\"Invalid\"}") .toObject(WorkloadItem.class); - Assertions.assertEquals("gxsds", model.backupManagementType()); - Assertions.assertEquals("e", model.workloadType()); - Assertions.assertEquals("sbzkf", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadItem model = new WorkloadItem().withBackupManagementType("gxsds") - .withWorkloadType("e") - .withFriendlyName("sbzkf") - .withProtectionState(ProtectionStatus.PROTECTING); - model = BinaryData.fromObject(model).toObject(WorkloadItem.class); - Assertions.assertEquals("gxsds", model.backupManagementType()); - Assertions.assertEquals("e", model.workloadType()); - Assertions.assertEquals("sbzkf", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); + Assertions.assertEquals("gy", model.backupManagementType()); + Assertions.assertEquals("qfby", model.workloadType()); + Assertions.assertEquals("rfgi", model.friendlyName()); + Assertions.assertEquals(ProtectionStatus.INVALID, model.protectionState()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadProtectableItemResourceInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadProtectableItemResourceInnerTests.java index 1fa373ec2bb3..683c375f208e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadProtectableItemResourceInnerTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadProtectableItemResourceInnerTests.java @@ -1,61 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadProtectableItemResourceInner; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadProtectableItem; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class WorkloadProtectableItemResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadProtectableItemResourceInner model = BinaryData.fromString( - "{\"properties\":{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"cxnavv\",\"workloadType\":\"qiby\",\"friendlyName\":\"nyowxwlmdjrkvfg\",\"protectionState\":\"Invalid\"},\"eTag\":\"p\",\"location\":\"bodacizsjq\",\"tags\":{\"ibqipqkg\":\"rribd\",\"mkrefajpjorwkq\":\"vxndz\",\"sjabibs\":\"yhgbijtjivfx\"},\"id\":\"stawfsdjpvkv\",\"name\":\"bjxbkzbzk\",\"type\":\"vncjabudurgk\"}") + "{\"location\":\"fyzyzeyuub\",\"tags\":{\"ith\":\"szlfyt\"},\"eTag\":\"gvfltgvdihoynkr\",\"properties\":{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"twk\",\"workloadType\":\"cy\",\"friendlyName\":\"cpcunnuzdqum\",\"protectionState\":\"NotProtected\"},\"id\":\"dnaienhqhskndnel\",\"name\":\"kaa\",\"type\":\"lknwfoanniyop\"}") .toObject(WorkloadProtectableItemResourceInner.class); - Assertions.assertEquals("bodacizsjq", model.location()); - Assertions.assertEquals("rribd", model.tags().get("ibqipqkg")); - Assertions.assertEquals("cxnavv", model.properties().backupManagementType()); - Assertions.assertEquals("qiby", model.properties().workloadType()); - Assertions.assertEquals("nyowxwlmdjrkvfg", model.properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.INVALID, model.properties().protectionState()); - Assertions.assertEquals("p", model.etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProtectableItemResourceInner model - = new WorkloadProtectableItemResourceInner().withLocation("bodacizsjq") - .withTags(mapOf("ibqipqkg", "rribd", "mkrefajpjorwkq", "vxndz", "sjabibs", "yhgbijtjivfx")) - .withProperties(new WorkloadProtectableItem().withBackupManagementType("cxnavv") - .withWorkloadType("qiby") - .withFriendlyName("nyowxwlmdjrkvfg") - .withProtectionState(ProtectionStatus.INVALID)) - .withEtag("p"); - model = BinaryData.fromObject(model).toObject(WorkloadProtectableItemResourceInner.class); - Assertions.assertEquals("bodacizsjq", model.location()); - Assertions.assertEquals("rribd", model.tags().get("ibqipqkg")); - Assertions.assertEquals("cxnavv", model.properties().backupManagementType()); - Assertions.assertEquals("qiby", model.properties().workloadType()); - Assertions.assertEquals("nyowxwlmdjrkvfg", model.properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.INVALID, model.properties().protectionState()); - Assertions.assertEquals("p", model.etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("fyzyzeyuub", model.location()); + Assertions.assertEquals("szlfyt", model.tags().get("ith")); + Assertions.assertEquals("gvfltgvdihoynkr", model.eTag()); + Assertions.assertEquals("twk", model.properties().backupManagementType()); + Assertions.assertEquals("cy", model.properties().workloadType()); + Assertions.assertEquals("cpcunnuzdqum", model.properties().friendlyName()); + Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.properties().protectionState()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadProtectableItemResourceListTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadProtectableItemResourceListTests.java index 3efd64a15cd9..b7396e2caeb6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadProtectableItemResourceListTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadProtectableItemResourceListTests.java @@ -1,87 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.WorkloadProtectableItemResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.models.WorkloadProtectableItemResourceList; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadProtectableItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadProtectableItemResourceList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class WorkloadProtectableItemResourceListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadProtectableItemResourceList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"hmk\",\"workloadType\":\"grauwjuetaebur\",\"friendlyName\":\"dmovsm\",\"protectionState\":\"NotProtected\"},\"eTag\":\"ab\",\"location\":\"q\",\"tags\":{\"vtpuqujmqlgk\":\"kif\",\"ongbjcnt\":\"btndo\"},\"id\":\"jitcjedftwwaez\",\"name\":\"ojvdcpzfoqo\",\"type\":\"i\"},{\"properties\":{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"xarzgszufoxciq\",\"workloadType\":\"idoamciodhkha\",\"friendlyName\":\"khnzbonlw\",\"protectionState\":\"ProtectionFailed\"},\"eTag\":\"gokdwbwhks\",\"location\":\"zcmrvexztvb\",\"tags\":{\"wtl\":\"sfraoyzko\",\"uximerqfobw\":\"nguxawqaldsy\",\"r\":\"znkbykutwpfhpagm\"},\"id\":\"kdsnfdsdoakgtdl\",\"name\":\"kkze\",\"type\":\"dlhewp\"},{\"properties\":{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"sttwvogvbbe\",\"workloadType\":\"cngqqmoakufgmjz\",\"friendlyName\":\"rdgrtw\",\"protectionState\":\"NotProtected\"},\"eTag\":\"uzkopbminrfd\",\"location\":\"oyuhhziui\",\"tags\":{\"smlmzqhoftrm\":\"zbhd\",\"hxicslfaoqz\":\"equi\",\"kaivwit\":\"iyylhalnswhccsp\"},\"id\":\"scywuggwoluhc\",\"name\":\"bwemhairs\",\"type\":\"rgzdwmsweyp\"},{\"properties\":{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"xggicccnxqhuexmk\",\"workloadType\":\"lstvlzywe\",\"friendlyName\":\"zrncsdt\",\"protectionState\":\"Protected\"},\"eTag\":\"iypbsfgytgusl\",\"location\":\"eadcygqukyhejhz\",\"tags\":{\"jzraehtwdwrf\":\"gfpelolppvksrpqv\",\"dl\":\"swibyr\",\"hfwpracstwit\":\"h\"},\"id\":\"khevxccedc\",\"name\":\"nmdyodnwzxl\",\"type\":\"jc\"}],\"nextLink\":\"hlt\"}") + "{\"value\":[{\"location\":\"vdimwrzregzgy\",\"tags\":{\"ryekzkd\":\"trwpw\",\"osxw\":\"meottawj\",\"jpnwynudql\":\"hnhjtfvpndpmi\"},\"eTag\":\"sauzpjlx\",\"properties\":{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"uxiqhzlraymezxl\",\"workloadType\":\"ihmxrfdsajredn\",\"friendlyName\":\"yshtuwgmev\",\"protectionState\":\"Invalid\"},\"id\":\"wzyif\",\"name\":\"kgwl\",\"type\":\"xeqipx\"},{\"location\":\"dyimsfay\",\"tags\":{\"vk\":\"r\"},\"eTag\":\"geslabnsmj\",\"properties\":{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"nqxaekqsyk\",\"workloadType\":\"jtqpkevmyltjcrsp\",\"friendlyName\":\"l\",\"protectionState\":\"Invalid\"},\"id\":\"lfg\",\"name\":\"annnoytzposewx\",\"type\":\"gpxvkqmaupxvpi\"}],\"nextLink\":\"f\"}") .toObject(WorkloadProtectableItemResourceList.class); - Assertions.assertEquals("hlt", model.nextLink()); - Assertions.assertEquals("q", model.value().get(0).location()); - Assertions.assertEquals("kif", model.value().get(0).tags().get("vtpuqujmqlgk")); - Assertions.assertEquals("hmk", model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("grauwjuetaebur", model.value().get(0).properties().workloadType()); - Assertions.assertEquals("dmovsm", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.value().get(0).properties().protectionState()); - Assertions.assertEquals("ab", model.value().get(0).etag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProtectableItemResourceList model = new WorkloadProtectableItemResourceList().withNextLink("hlt") - .withValue(Arrays.asList( - new WorkloadProtectableItemResourceInner().withLocation("q") - .withTags(mapOf("vtpuqujmqlgk", "kif", "ongbjcnt", "btndo")) - .withProperties(new WorkloadProtectableItem().withBackupManagementType("hmk") - .withWorkloadType("grauwjuetaebur") - .withFriendlyName("dmovsm") - .withProtectionState(ProtectionStatus.NOT_PROTECTED)) - .withEtag("ab"), - new WorkloadProtectableItemResourceInner().withLocation("zcmrvexztvb") - .withTags(mapOf("wtl", "sfraoyzko", "uximerqfobw", "nguxawqaldsy", "r", "znkbykutwpfhpagm")) - .withProperties(new WorkloadProtectableItem().withBackupManagementType("xarzgszufoxciq") - .withWorkloadType("idoamciodhkha") - .withFriendlyName("khnzbonlw") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED)) - .withEtag("gokdwbwhks"), - new WorkloadProtectableItemResourceInner().withLocation("oyuhhziui") - .withTags(mapOf("smlmzqhoftrm", "zbhd", "hxicslfaoqz", "equi", "kaivwit", "iyylhalnswhccsp")) - .withProperties(new WorkloadProtectableItem().withBackupManagementType("sttwvogvbbe") - .withWorkloadType("cngqqmoakufgmjz") - .withFriendlyName("rdgrtw") - .withProtectionState(ProtectionStatus.NOT_PROTECTED)) - .withEtag("uzkopbminrfd"), - new WorkloadProtectableItemResourceInner().withLocation("eadcygqukyhejhz") - .withTags(mapOf("jzraehtwdwrf", "gfpelolppvksrpqv", "dl", "swibyr", "hfwpracstwit", "h")) - .withProperties(new WorkloadProtectableItem().withBackupManagementType("xggicccnxqhuexmk") - .withWorkloadType("lstvlzywe") - .withFriendlyName("zrncsdt") - .withProtectionState(ProtectionStatus.PROTECTED)) - .withEtag("iypbsfgytgusl"))); - model = BinaryData.fromObject(model).toObject(WorkloadProtectableItemResourceList.class); - Assertions.assertEquals("hlt", model.nextLink()); - Assertions.assertEquals("q", model.value().get(0).location()); - Assertions.assertEquals("kif", model.value().get(0).tags().get("vtpuqujmqlgk")); - Assertions.assertEquals("hmk", model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("grauwjuetaebur", model.value().get(0).properties().workloadType()); - Assertions.assertEquals("dmovsm", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.value().get(0).properties().protectionState()); - Assertions.assertEquals("ab", model.value().get(0).etag()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("f", model.nextLink()); + Assertions.assertEquals("vdimwrzregzgy", model.value().get(0).location()); + Assertions.assertEquals("trwpw", model.value().get(0).tags().get("ryekzkd")); + Assertions.assertEquals("sauzpjlx", model.value().get(0).eTag()); + Assertions.assertEquals("uxiqhzlraymezxl", model.value().get(0).properties().backupManagementType()); + Assertions.assertEquals("ihmxrfdsajredn", model.value().get(0).properties().workloadType()); + Assertions.assertEquals("yshtuwgmev", model.value().get(0).properties().friendlyName()); + Assertions.assertEquals(ProtectionStatus.INVALID, model.value().get(0).properties().protectionState()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadProtectableItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadProtectableItemTests.java index 0825f2bf83af..e5cd60254c55 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadProtectableItemTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadProtectableItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -13,24 +13,11 @@ public final class WorkloadProtectableItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkloadProtectableItem model = BinaryData.fromString( - "{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"mokzhjjklf\",\"workloadType\":\"mouwqlgzrfzeey\",\"friendlyName\":\"izikayuhq\",\"protectionState\":\"ProtectionFailed\"}") + "{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"xivcnrlyxnu\",\"workloadType\":\"ephblkwqpatvbqs\",\"friendlyName\":\"cjbctviv\",\"protectionState\":\"Protected\"}") .toObject(WorkloadProtectableItem.class); - Assertions.assertEquals("mokzhjjklf", model.backupManagementType()); - Assertions.assertEquals("mouwqlgzrfzeey", model.workloadType()); - Assertions.assertEquals("izikayuhq", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProtectableItem model = new WorkloadProtectableItem().withBackupManagementType("mokzhjjklf") - .withWorkloadType("mouwqlgzrfzeey") - .withFriendlyName("izikayuhq") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED); - model = BinaryData.fromObject(model).toObject(WorkloadProtectableItem.class); - Assertions.assertEquals("mokzhjjklf", model.backupManagementType()); - Assertions.assertEquals("mouwqlgzrfzeey", model.workloadType()); - Assertions.assertEquals("izikayuhq", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); + Assertions.assertEquals("xivcnrlyxnu", model.backupManagementType()); + Assertions.assertEquals("ephblkwqpatvbqs", model.workloadType()); + Assertions.assertEquals("cjbctviv", model.friendlyName()); + Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/YearlyRetentionScheduleTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/YearlyRetentionScheduleTests.java index 85e5361bd15f..691acec0a6a3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/YearlyRetentionScheduleTests.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/YearlyRetentionScheduleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.recoveryservicesbackup.generated; @@ -23,43 +23,44 @@ public final class YearlyRetentionScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { YearlyRetentionSchedule model = BinaryData.fromString( - "{\"retentionScheduleFormatType\":\"Invalid\",\"monthsOfYear\":[\"October\",\"November\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1046360086,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Saturday\",\"Sunday\",\"Saturday\"],\"weeksOfTheMonth\":[\"Third\",\"Third\",\"Fourth\",\"Third\"]},\"retentionTimes\":[\"2021-03-22T04:29:22Z\"],\"retentionDuration\":{\"count\":328440164,\"durationType\":\"Weeks\"}}") + "{\"retentionScheduleFormatType\":\"Invalid\",\"monthsOfYear\":[\"May\",\"December\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1427388338,\"isLast\":true},{\"date\":870131918,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Thursday\",\"Monday\",\"Sunday\",\"Friday\"],\"weeksOfTheMonth\":[\"Last\"]},\"retentionTimes\":[\"2021-10-02T09:18:08Z\",\"2021-05-11T11:42:40Z\",\"2021-08-25T16:59:16Z\",\"2021-10-10T04:29:48Z\"],\"retentionDuration\":{\"count\":1171574228,\"durationType\":\"Invalid\"}}") .toObject(YearlyRetentionSchedule.class); Assertions.assertEquals(RetentionScheduleFormat.INVALID, model.retentionScheduleFormatType()); - Assertions.assertEquals(MonthOfYear.OCTOBER, model.monthsOfYear().get(0)); - Assertions.assertEquals(1046360086, model.retentionScheduleDaily().daysOfTheMonth().get(0).date()); - Assertions.assertEquals(false, model.retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); - Assertions.assertEquals(DayOfWeek.MONDAY, model.retentionScheduleWeekly().daysOfTheWeek().get(0)); - Assertions.assertEquals(WeekOfMonth.THIRD, model.retentionScheduleWeekly().weeksOfTheMonth().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-22T04:29:22Z"), model.retentionTimes().get(0)); - Assertions.assertEquals(328440164, model.retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.WEEKS, model.retentionDuration().durationType()); + Assertions.assertEquals(MonthOfYear.MAY, model.monthsOfYear().get(0)); + Assertions.assertEquals(1427388338, model.retentionScheduleDaily().daysOfTheMonth().get(0).date()); + Assertions.assertTrue(model.retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.retentionScheduleWeekly().daysOfTheWeek().get(0)); + Assertions.assertEquals(WeekOfMonth.LAST, model.retentionScheduleWeekly().weeksOfTheMonth().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-02T09:18:08Z"), model.retentionTimes().get(0)); + Assertions.assertEquals(1171574228, model.retentionDuration().count()); + Assertions.assertEquals(RetentionDurationType.INVALID, model.retentionDuration().durationType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { YearlyRetentionSchedule model = new YearlyRetentionSchedule().withRetentionScheduleFormatType(RetentionScheduleFormat.INVALID) - .withMonthsOfYear(Arrays.asList(MonthOfYear.OCTOBER, MonthOfYear.NOVEMBER)) - .withRetentionScheduleDaily(new DailyRetentionFormat() - .withDaysOfTheMonth(Arrays.asList(new Day().withDate(1046360086).withIsLast(false)))) + .withMonthsOfYear(Arrays.asList(MonthOfYear.MAY, MonthOfYear.DECEMBER)) + .withRetentionScheduleDaily(new DailyRetentionFormat().withDaysOfTheMonth(Arrays.asList( + new Day().withDate(1427388338).withIsLast(true), new Day().withDate(870131918).withIsLast(false)))) .withRetentionScheduleWeekly(new WeeklyRetentionFormat() .withDaysOfTheWeek( - Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY, DayOfWeek.SATURDAY)) - .withWeeksOfTheMonth( - Arrays.asList(WeekOfMonth.THIRD, WeekOfMonth.THIRD, WeekOfMonth.FOURTH, WeekOfMonth.THIRD))) - .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-03-22T04:29:22Z"))) + Arrays.asList(DayOfWeek.THURSDAY, DayOfWeek.MONDAY, DayOfWeek.SUNDAY, DayOfWeek.FRIDAY)) + .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.LAST))) + .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-10-02T09:18:08Z"), + OffsetDateTime.parse("2021-05-11T11:42:40Z"), OffsetDateTime.parse("2021-08-25T16:59:16Z"), + OffsetDateTime.parse("2021-10-10T04:29:48Z"))) .withRetentionDuration( - new RetentionDuration().withCount(328440164).withDurationType(RetentionDurationType.WEEKS)); + new RetentionDuration().withCount(1171574228).withDurationType(RetentionDurationType.INVALID)); model = BinaryData.fromObject(model).toObject(YearlyRetentionSchedule.class); Assertions.assertEquals(RetentionScheduleFormat.INVALID, model.retentionScheduleFormatType()); - Assertions.assertEquals(MonthOfYear.OCTOBER, model.monthsOfYear().get(0)); - Assertions.assertEquals(1046360086, model.retentionScheduleDaily().daysOfTheMonth().get(0).date()); - Assertions.assertEquals(false, model.retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); - Assertions.assertEquals(DayOfWeek.MONDAY, model.retentionScheduleWeekly().daysOfTheWeek().get(0)); - Assertions.assertEquals(WeekOfMonth.THIRD, model.retentionScheduleWeekly().weeksOfTheMonth().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-22T04:29:22Z"), model.retentionTimes().get(0)); - Assertions.assertEquals(328440164, model.retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.WEEKS, model.retentionDuration().durationType()); + Assertions.assertEquals(MonthOfYear.MAY, model.monthsOfYear().get(0)); + Assertions.assertEquals(1427388338, model.retentionScheduleDaily().daysOfTheMonth().get(0).date()); + Assertions.assertTrue(model.retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.retentionScheduleWeekly().daysOfTheWeek().get(0)); + Assertions.assertEquals(WeekOfMonth.LAST, model.retentionScheduleWeekly().weeksOfTheMonth().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-02T09:18:08Z"), model.retentionTimes().get(0)); + Assertions.assertEquals(1171574228, model.retentionDuration().count()); + Assertions.assertEquals(RetentionDurationType.INVALID, model.retentionDuration().durationType()); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/tsp-location.yaml b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/tsp-location.yaml new file mode 100644 index 000000000000..e1e3216663a4 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup +commit: 49bbe29703b0e2eb3c2b5dde117572dfd81f8c7f +repo: Azure/azure-rest-api-specs +additionalDirectories: