diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md index 40d797e1c85d6..e662bd0c48304 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.7 (Unreleased) +## 1.0.0-beta.1 (2022-12-20) + +- Azure Resource Manager RecoveryServicesBackup 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-2022-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md index bf9a1c159fb91..f5a969930de05 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md @@ -2,7 +2,7 @@ Azure Resource Manager RecoveryServicesBackup 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-2022-09-preview. 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 RecoveryServicesBackup Management SDK. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2022-10. 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.0.0-beta.6 + 1.0.0-beta.7 ``` [//]: # ({x-version-update-end}) @@ -41,19 +41,19 @@ Various documentation is available to help you get started Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. -[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. ### Authentication -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. - `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. -In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -With above configuration, `azure` client can be authenticated by following code: +With above configuration, `azure` client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide][cg]. -1. Fork it -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Commit your changes (`git commit -am 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new Pull Request +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/SAMPLE.md b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/SAMPLE.md index 5032a4804f0e4..8fbe78b471c67 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/SAMPLE.md +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/SAMPLE.md @@ -235,7 +235,7 @@ import com.azure.core.util.Context; /** Samples for BackupEngines Get. */ public final class BackupEnginesGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Dpm/BackupEngines_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Dpm/BackupEngines_Get.json */ /** * Sample code: Get Dpm/AzureBackupServer/Lajolla Backup Engine Details. @@ -257,7 +257,7 @@ import com.azure.core.util.Context; /** Samples for BackupEngines List. */ public final class BackupEnginesListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Dpm/BackupEngines_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Dpm/BackupEngines_List.json */ /** * Sample code: List Dpm/AzureBackupServer/Lajolla Backup Engines. @@ -279,7 +279,7 @@ import com.azure.core.util.Context; /** Samples for BackupJobs List. */ public final class BackupJobsListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/ListJobs.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/ListJobs.json */ /** * Sample code: List All Jobs. @@ -292,7 +292,7 @@ public final class BackupJobsListSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/ListJobsWithAllSupportedFilters.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/ListJobsWithAllSupportedFilters.json */ /** * Sample code: List Jobs With Filters. @@ -313,7 +313,7 @@ public final class BackupJobsListSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/ListJobsWithStartTimeAndEndTimeFilters.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/ListJobsWithStartTimeAndEndTimeFilters.json */ /** * Sample code: List Jobs With Time Filter. @@ -342,7 +342,7 @@ import com.azure.core.util.Context; /** Samples for BackupOperationResults Get. */ public final class BackupOperationResultsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/ProtectedItem_Delete_OperationResult.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/ProtectedItem_Delete_OperationResult.json */ /** * Sample code: Get Result for Protected Item Delete Operation. @@ -370,7 +370,7 @@ import com.azure.core.util.Context; /** Samples for BackupOperationStatuses Get. */ public final class BackupOperationStatusesGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/ProtectedItem_Delete_OperationStatus.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/ProtectedItem_Delete_OperationStatus.json */ /** * Sample code: Get Protected Item Delete Operation Status. @@ -398,7 +398,7 @@ import com.azure.core.util.Context; /** Samples for BackupPolicies List. */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureWorkload/BackupPolicies_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureWorkload/BackupPolicies_List.json */ /** * Sample code: List protection policies with backupManagementType filter as AzureWorkload. @@ -413,7 +413,7 @@ public final class BackupPoliciesListSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/V2Policy/v2-List-Policies.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/V2Policy/v2-List-Policies.json */ /** * Sample code: List protection policies with backupManagementType filter as AzureIaasVm with both V1 and V2 @@ -429,7 +429,7 @@ public final class BackupPoliciesListSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/BackupPolicies_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/BackupPolicies_List.json */ /** * Sample code: List protection policies with backupManagementType filter as AzureIaasVm. @@ -453,7 +453,7 @@ import com.azure.core.util.Context; /** Samples for BackupProtectableItems List. */ public final class BackupProtectableItemsListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/BackupProtectableItems_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/BackupProtectableItems_List.json */ /** * Sample code: List protectable items with backupManagementType filter as AzureIaasVm. @@ -477,7 +477,7 @@ import com.azure.core.util.Context; /** Samples for BackupProtectedItems List. */ public final class BackupProtectedItemsListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/BackupProtectedItems_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/BackupProtectedItems_List.json */ /** * Sample code: List protected items with backupManagementType filter as AzureIaasVm. @@ -506,7 +506,7 @@ import com.azure.core.util.Context; /** Samples for BackupProtectionContainers List. */ public final class BackupProtectionContainersListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureStorage/ProtectionContainers_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureStorage/ProtectionContainers_List.json */ /** * Sample code: List Backup Protection Containers. @@ -530,7 +530,7 @@ import com.azure.core.util.Context; /** Samples for BackupProtectionIntent List. */ public final class BackupProtectionIntentListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureWorkload/BackupProtectionIntent_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureWorkload/BackupProtectionIntent_List.json */ /** * Sample code: List protection intent with backupManagementType filter. @@ -552,7 +552,7 @@ import com.azure.core.util.Context; /** Samples for BackupResourceEncryptionConfigs Get. */ public final class BackupResourceEncryptionConfigsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/BackupResourceEncryptionConfig_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/BackupResourceEncryptionConfig_Get.json */ /** * Sample code: Get Vault Encryption Configuration. @@ -578,7 +578,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.InfrastructureEnc /** Samples for BackupResourceEncryptionConfigs Update. */ public final class BackupResourceEncryptionConfigsUpdateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/BackupResourceEncryptionConfig_Put.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/BackupResourceEncryptionConfig_Put.json */ /** * Sample code: Update Vault Encryption Configuration. @@ -596,7 +596,7 @@ public final class BackupResourceEncryptionConfigsUpdateSamples { .withProperties( new BackupResourceEncryptionConfig() .withEncryptionAtRestType(EncryptionAtRestType.CUSTOMER_MANAGED) - .withKeyUri("https://gktestkv1.vault.azure.net/keys/Test1/ed2e8cdc7f86477ebf0c6462b504a9ed") + .withKeyUri("fakeTokenPlaceholder") .withSubscriptionId("1a2311d9-66f5-47d3-a9fb-7a37da63934b") .withInfrastructureEncryptionState(InfrastructureEncryptionState.fromString("true"))), Context.NONE); @@ -612,7 +612,7 @@ import com.azure.core.util.Context; /** Samples for BackupResourceStorageConfigsNonCrr Get. */ public final class BackupResourceStorageConfigsNonCrrGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupStorageConfig_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/BackupStorageConfig_Get.json */ /** * Sample code: Get Vault Storage Configuration. @@ -640,7 +640,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.StorageTypeState; /** Samples for BackupResourceStorageConfigsNonCrr Patch. */ public final class BackupResourceStorageConfigsNonCrrPatchSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupStorageConfig_Patch.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/BackupStorageConfig_Patch.json */ /** * Sample code: Update Vault Storage Configuration. @@ -676,7 +676,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.StorageTypeState; /** Samples for BackupResourceStorageConfigsNonCrr Update. */ public final class BackupResourceStorageConfigsNonCrrUpdateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupStorageConfig_Put.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/BackupStorageConfig_Put.json */ /** * Sample code: Update Vault Storage Configuration. @@ -708,7 +708,7 @@ import com.azure.core.util.Context; /** Samples for BackupResourceVaultConfigs Get. */ public final class BackupResourceVaultConfigsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupResourceVaultConfigs_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/BackupResourceVaultConfigs_Get.json */ /** * Sample code: Get Vault Security Config. @@ -734,7 +734,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.SoftDeleteFeature /** Samples for BackupResourceVaultConfigs Put. */ public final class BackupResourceVaultConfigsPutSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupResourceVaultConfigs_Put.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/BackupResourceVaultConfigs_Put.json */ /** * Sample code: Update Vault Security Config. @@ -769,7 +769,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.EnhancedSecurityS /** Samples for BackupResourceVaultConfigs Update. */ public final class BackupResourceVaultConfigsUpdateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupResourceVaultConfigs_Patch.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/BackupResourceVaultConfigs_Patch.json */ /** * Sample code: Update Vault Security Config. @@ -801,7 +801,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.DataSourceType; /** Samples for BackupStatus Get. */ public final class BackupStatusGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/GetBackupStatus.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/GetBackupStatus.json */ /** * Sample code: Get Azure Virtual Machine Backup Status. @@ -831,7 +831,7 @@ import com.azure.core.util.Context; /** Samples for BackupUsageSummaries List. */ public final class BackupUsageSummariesListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupProtectedItem_UsageSummary_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/BackupProtectedItem_UsageSummary_Get.json */ /** * Sample code: Get Protected Items Usages Summary. @@ -846,7 +846,7 @@ public final class BackupUsageSummariesListSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupProtectionContainers_UsageSummary_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/BackupProtectionContainers_UsageSummary_Get.json */ /** * Sample code: Get Protected Containers Usages Summary. @@ -870,7 +870,7 @@ import com.azure.core.util.Context; /** Samples for BackupWorkloadItems List. */ public final class BackupWorkloadItemsListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureWorkload/BackupWorkloadItems_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureWorkload/BackupWorkloadItems_List.json */ /** * Sample code: List Workload Items in Container. @@ -903,7 +903,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.IaasVMBackupReque /** Samples for Backups Trigger. */ public final class BackupsTriggerSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/TriggerBackup_Post.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/TriggerBackup_Post.json */ /** * Sample code: Trigger Backup. @@ -934,7 +934,7 @@ import com.azure.core.util.Context; /** Samples for BmsPrepareDataMoveOperationResult Get. */ public final class BmsPrepareDataMoveOperationResultGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/BackupDataMove/PrepareDataMoveOperationResult_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/BackupDataMove/PrepareDataMoveOperationResult_Get.json */ /** * Sample code: Get operation result for PrepareDataMove. @@ -958,7 +958,7 @@ import com.azure.core.util.Context; /** Samples for DeletedProtectionContainers List. */ public final class DeletedProtectionContainersListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureStorage/SoftDeletedContainers_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureStorage/SoftDeletedContainers_List.json */ /** * Sample code: List Backup Protection Containers. @@ -982,7 +982,7 @@ import com.azure.core.util.Context; /** Samples for ExportJobsOperationResults Get. */ public final class ExportJobsOperationResultsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/ExportJobsOperationResult.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/ExportJobsOperationResult.json */ /** * Sample code: Export Jobs Operation Results. @@ -1008,7 +1008,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.AzureVMResourceFe /** Samples for FeatureSupport Validate. */ public final class FeatureSupportValidateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/BackupFeature_Validate.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/BackupFeature_Validate.json */ /** * Sample code: Check Azure Vm Backup Feature Support. @@ -1037,7 +1037,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.IlrRequestResourc /** Samples for ItemLevelRecoveryConnections Provision. */ public final class ItemLevelRecoveryConnectionsProvisionSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/Provision_Ilr.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/Provision_Ilr.json */ /** * Sample code: Provision Instant Item Level Recovery for Azure Vm. @@ -1076,7 +1076,7 @@ import com.azure.core.util.Context; /** Samples for ItemLevelRecoveryConnections Revoke. */ public final class ItemLevelRecoveryConnectionsRevokeSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/Revoke_Ilr.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/Revoke_Ilr.json */ /** * Sample code: Revoke Instant Item Level Recovery for Azure Vm. @@ -1107,7 +1107,7 @@ import com.azure.core.util.Context; /** Samples for JobCancellations Trigger. */ public final class JobCancellationsTriggerSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/TriggerCancelJob.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/TriggerCancelJob.json */ /** * Sample code: Cancel Job. @@ -1132,7 +1132,7 @@ import com.azure.core.util.Context; /** Samples for JobDetails Get. */ public final class JobDetailsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/GetJobDetails.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/GetJobDetails.json */ /** * Sample code: Get Job Details. @@ -1157,7 +1157,7 @@ import com.azure.core.util.Context; /** Samples for JobOperationResults Get. */ public final class JobOperationResultsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/CancelJobOperationResult.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/CancelJobOperationResult.json */ /** * Sample code: Cancel Job Operation Result. @@ -1186,7 +1186,7 @@ import com.azure.core.util.Context; /** Samples for Jobs Export. */ public final class JobsExportSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/TriggerExportJobs.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/TriggerExportJobs.json */ /** * Sample code: Export Jobs. @@ -1214,7 +1214,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateIaasVMRes /** Samples for OperationOperation Validate. */ public final class OperationOperationValidateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ValidateOperation_RestoreDisk.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk.json */ /** * Sample code: Validate Operation. @@ -1250,7 +1250,7 @@ public final class OperationOperationValidateSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ValidateOperation_RestoreDisk_IdentityBasedRestoreDetails.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk_IdentityBasedRestoreDetails.json */ /** * Sample code: Validate Operation with identityBasedRestoreDetails. @@ -1297,7 +1297,7 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/ListOperations.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ListOperations.json */ /** * Sample code: ListOperations. @@ -1319,7 +1319,7 @@ import com.azure.core.util.Context; /** Samples for PrivateEndpoint GetOperationStatus. */ public final class PrivateEndpointGetOperationStatusSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/PrivateEndpointConnection/GetPrivateEndpointConnectionOperationStatus.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnectionOperationStatus.json */ /** * Sample code: Get OperationStatus. @@ -1348,7 +1348,7 @@ import com.azure.core.util.Context; /** Samples for PrivateEndpointConnection Delete. */ public final class PrivateEndpointConnectionDeleteSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/PrivateEndpointConnection/DeletePrivateEndpointConnection.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/PrivateEndpointConnection/DeletePrivateEndpointConnection.json */ /** * Sample code: Delete PrivateEndpointConnection. @@ -1373,7 +1373,7 @@ import com.azure.core.util.Context; /** Samples for PrivateEndpointConnection Get. */ public final class PrivateEndpointConnectionGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json */ /** * Sample code: Get PrivateEndpointConnection. @@ -1404,7 +1404,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.ProvisioningState /** Samples for PrivateEndpointConnection Put. */ public final class PrivateEndpointConnectionPutSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/PrivateEndpointConnection/PutPrivateEndpointConnection.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/PrivateEndpointConnection/PutPrivateEndpointConnection.json */ /** * Sample code: Update PrivateEndpointConnection. @@ -1448,7 +1448,7 @@ import com.azure.core.util.Context; /** Samples for ProtectableContainers List. */ public final class ProtectableContainersListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureStorage/ProtectableContainers_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureStorage/ProtectableContainers_List.json */ /** * Sample code: List protectable items with backupManagementType filter as AzureStorage. @@ -1477,7 +1477,7 @@ import com.azure.core.util.Context; /** Samples for ProtectedItemOperationResults Get. */ public final class ProtectedItemOperationResultsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectedItemOperationResults.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ProtectedItemOperationResults.json */ /** * Sample code: Get Operation Results of Protected Vm. @@ -1508,7 +1508,7 @@ import com.azure.core.util.Context; /** Samples for ProtectedItemOperationStatuses Get. */ public final class ProtectedItemOperationStatusesGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectedItemOperationStatus.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ProtectedItemOperationStatus.json */ /** * Sample code: Get Operation Status of Protected Vm. @@ -1540,7 +1540,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionState; /** Samples for ProtectedItems CreateOrUpdate. */ public final class ProtectedItemsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/StopProtection.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/StopProtection.json */ /** * Sample code: Stop Protection with retain data on Azure IaasVm. @@ -1567,7 +1567,7 @@ public final class ProtectedItemsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ConfigureProtection.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ConfigureProtection.json */ /** * Sample code: Enable Protection on Azure IaasVm. @@ -1604,7 +1604,7 @@ import com.azure.core.util.Context; /** Samples for ProtectedItems Delete. */ public final class ProtectedItemsDeleteSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/ProtectedItem_Delete.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/ProtectedItem_Delete.json */ /** * Sample code: Delete Protection from Azure Virtual Machine. @@ -1634,7 +1634,7 @@ import com.azure.core.util.Context; /** Samples for ProtectedItems Get. */ public final class ProtectedItemsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json */ /** * Sample code: Get Protected Classic Virtual Machine Details. @@ -1656,7 +1656,7 @@ public final class ProtectedItemsGetSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/Compute_ProtectedItem_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/Compute_ProtectedItem_Get.json */ /** * Sample code: Get Protected Virtual Machine Details. @@ -1687,7 +1687,7 @@ import com.azure.core.util.Context; /** Samples for ProtectionContainerOperationResults Get. */ public final class ProtectionContainerOperationResultsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureStorage/ProtectionContainers_Inquire_Result.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureStorage/ProtectionContainers_Inquire_Result.json */ /** * Sample code: Get Azure Storage Protection Container Operation Result. @@ -1717,7 +1717,7 @@ import com.azure.core.util.Context; /** Samples for ProtectionContainerRefreshOperationResults Get. */ public final class ProtectionContainerRefreshOperationResultsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/RefreshContainers_OperationResults.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/RefreshContainers_OperationResults.json */ /** * Sample code: Azure Vm Discovery Operation Result. @@ -1742,7 +1742,7 @@ import com.azure.core.util.Context; /** Samples for ProtectionContainers Get. */ public final class ProtectionContainersGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureWorkload/ProtectionContainers_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureWorkload/ProtectionContainers_Get.json */ /** * Sample code: Get Protection Container Details. @@ -1766,7 +1766,7 @@ import com.azure.core.util.Context; /** Samples for ProtectionContainers Inquire. */ public final class ProtectionContainersInquireSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureStorage/ProtectionContainers_Inquire.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureStorage/ProtectionContainers_Inquire.json */ /** * Sample code: Inquire Azure Storage Protection Containers. @@ -1791,7 +1791,7 @@ import com.azure.core.util.Context; /** Samples for ProtectionContainers Refresh. */ public final class ProtectionContainersRefreshSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/RefreshContainers.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/RefreshContainers.json */ /** * Sample code: Trigger Azure Vm Discovery. @@ -1817,7 +1817,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementT /** Samples for ProtectionContainers Register. */ public final class ProtectionContainersRegisterSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureStorage/ProtectionContainers_Register.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureStorage/ProtectionContainers_Register.json */ /** * Sample code: RegisterAzure Storage ProtectionContainers. @@ -1851,7 +1851,7 @@ import com.azure.core.util.Context; /** Samples for ProtectionContainers Unregister. */ public final class ProtectionContainersUnregisterSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureWorkload/ProtectionContainers_Unregister.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureWorkload/ProtectionContainers_Unregister.json */ /** * Sample code: Unregister Protection Container. @@ -1876,7 +1876,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.AzureResourceProt /** Samples for ProtectionIntent CreateOrUpdate. */ public final class ProtectionIntentCreateOrUpdateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json */ /** * Sample code: Create or Update Azure Vm Protection Intent. @@ -1909,7 +1909,7 @@ import com.azure.core.util.Context; /** Samples for ProtectionIntent Delete. */ public final class ProtectionIntentDeleteSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureWorkload/BackupProtectionIntent_Delete.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureWorkload/BackupProtectionIntent_Delete.json */ /** * Sample code: Delete Protection intent from item. @@ -1933,7 +1933,7 @@ import com.azure.core.util.Context; /** Samples for ProtectionIntent Get. */ public final class ProtectionIntentGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureWorkload/BackupProtectionIntent_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureWorkload/BackupProtectionIntent_Get.json */ /** * Sample code: Get ProtectionIntent for an item. @@ -1959,7 +1959,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.PreValidateEnable /** Samples for ProtectionIntent Validate. */ public final class ProtectionIntentValidateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectionIntent_Validate.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ProtectionIntent_Validate.json */ /** * Sample code: Validate Enable Protection on Azure Vm. @@ -2020,7 +2020,7 @@ import java.util.Arrays; /** Samples for ProtectionPolicies CreateOrUpdate. */ public final class ProtectionPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json */ /** * Sample code: Create or Update Full Azure Workload Protection Policy. @@ -2120,7 +2120,7 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json */ /** * Sample code: Create or Update Simple Azure Vm Protection Policy. @@ -2154,7 +2154,7 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json */ /** * Sample code: Create or Update Daily Azure Storage Protection Policy. @@ -2222,7 +2222,7 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json */ /** * Sample code: Create or Update Hourly Azure Storage Protection Policy. @@ -2290,7 +2290,7 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json */ /** * Sample code: Create or Update Full Azure Vm Protection Policy. @@ -2353,7 +2353,7 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/V2Policy/IaaS_v2_hourly.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/V2Policy/IaaS_v2_hourly.json */ /** * Sample code: Create or Update Enhanced Azure Vm Protection Policy with Hourly backup. @@ -2430,7 +2430,7 @@ public final class ProtectionPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/V2Policy/IaaS_v2_daily.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/V2Policy/IaaS_v2_daily.json */ /** * Sample code: Create or Update Enhanced Azure Vm Protection Policy with daily backup. @@ -2514,7 +2514,7 @@ import com.azure.core.util.Context; /** Samples for ProtectionPolicies Delete. */ public final class ProtectionPoliciesDeleteSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectionPolicies_Delete.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ProtectionPolicies_Delete.json */ /** * Sample code: Delete Azure Vm Protection Policy. @@ -2536,7 +2536,7 @@ import com.azure.core.util.Context; /** Samples for ProtectionPolicies Get. */ public final class ProtectionPoliciesGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectionPolicies_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ProtectionPolicies_Get.json */ /** * Sample code: Get Azure IaasVm Protection Policy Details. @@ -2549,7 +2549,7 @@ public final class ProtectionPoliciesGetSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json */ /** * Sample code: Get Azure IaasVm Enhanced Protection Policy Details. @@ -2573,7 +2573,7 @@ import com.azure.core.util.Context; /** Samples for ProtectionPolicyOperationResults Get. */ public final class ProtectionPolicyOperationResultsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectionPolicyOperationResults_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ProtectionPolicyOperationResults_Get.json */ /** * Sample code: Get Protection Policy Operation Results. @@ -2602,7 +2602,7 @@ import com.azure.core.util.Context; /** Samples for ProtectionPolicyOperationStatuses Get. */ public final class ProtectionPolicyOperationStatusesGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectionPolicyOperationStatuses_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ProtectionPolicyOperationStatuses_Get.json */ /** * Sample code: Get Protection Policy Operation Status. @@ -2631,7 +2631,7 @@ import com.azure.core.util.Context; /** Samples for RecoveryPoints Get. */ public final class RecoveryPointsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/RecoveryPoints_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/RecoveryPoints_Get.json */ /** * Sample code: Get Azure Vm Recovery Point Details. @@ -2662,7 +2662,7 @@ import com.azure.core.util.Context; /** Samples for RecoveryPoints List. */ public final class RecoveryPointsListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/RecoveryPoints_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/RecoveryPoints_List.json */ /** * Sample code: Get Protected Azure Vm Recovery Points. @@ -2695,7 +2695,7 @@ import java.util.Arrays; /** Samples for RecoveryPointsRecommendedForMove List. */ public final class RecoveryPointsRecommendedForMoveListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/RecoveryPointsRecommendedForMove_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/RecoveryPointsRecommendedForMove_List.json */ /** * Sample code: Get Protected Azure Vm Recovery Points Recommended for Move. @@ -2728,7 +2728,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuardProxies Get. */ public final class ResourceGuardProxiesGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json */ /** * Sample code: Get VaultGuardProxies. @@ -2750,7 +2750,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuardProxyOperation Delete. */ public final class ResourceGuardProxyOperationDeleteSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json */ /** * Sample code: Delete ResourceGuardProxy. @@ -2774,7 +2774,7 @@ import com.azure.core.util.Context; /** Samples for ResourceGuardProxyOperation Get. */ public final class ResourceGuardProxyOperationGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json */ /** * Sample code: Get ResourceGuardProxy. @@ -2798,7 +2798,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProx /** Samples for ResourceGuardProxyOperation Put. */ public final class ResourceGuardProxyOperationPutSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json */ /** * Sample code: Create ResourceGuardProxy. @@ -2831,7 +2831,7 @@ import java.util.Arrays; /** Samples for ResourceGuardProxyOperation UnlockDelete. */ public final class ResourceGuardProxyOperationUnlockDeleteSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json */ /** * Sample code: UnlockDelete ResourceGuardProxy. @@ -2868,7 +2868,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.PrepareDataMoveRe /** Samples for ResourceProvider BmsPrepareDataMove. */ public final class ResourceProviderBmsPrepareDataMoveSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/BackupDataMove/PrepareDataMove_Post.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/BackupDataMove/PrepareDataMove_Post.json */ /** * Sample code: Prepare Data Move. @@ -2902,7 +2902,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.TriggerDataMoveRe /** Samples for ResourceProvider BmsTriggerDataMove. */ public final class ResourceProviderBmsTriggerDataMoveSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/BackupDataMove/TriggerDataMove_Post.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/BackupDataMove/TriggerDataMove_Post.json */ /** * Sample code: Trigger Data Move. @@ -2935,7 +2935,7 @@ import com.azure.core.util.Context; /** Samples for ResourceProvider GetOperationStatus. */ public final class ResourceProviderGetOperationStatusSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/BackupDataMove/BackupDataMoveOperationStatus_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/BackupDataMove/BackupDataMoveOperationStatus_Get.json */ /** * Sample code: Get OperationStatus. @@ -2962,7 +2962,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTier /** Samples for ResourceProvider MoveRecoveryPoint. */ public final class ResourceProviderMoveRecoveryPointSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/TriggerRecoveryPointMove_Post.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/TriggerRecoveryPointMove_Post.json */ /** * Sample code: Trigger RP Move Operation. @@ -3006,7 +3006,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.RestoreRequestRes /** Samples for Restores Trigger. */ public final class RestoresTriggerSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreWithRehydrationRequest.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreWithRehydrationRequest.json */ /** * Sample code: Restore to New Azure IaasVm with IaasVMRestoreWithRehydrationRequest. @@ -3053,7 +3053,7 @@ public final class RestoresTriggerSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest.json */ /** * Sample code: Restore to New Azure IaasVm with IaasVMRestoreRequest. @@ -3097,7 +3097,7 @@ public final class RestoresTriggerSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreWithRehydrationRequest.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreWithRehydrationRequest.json */ /** * Sample code: Restore Disks with IaasVMRestoreWithRehydrationRequest. @@ -3136,7 +3136,7 @@ public final class RestoresTriggerSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json */ /** * Sample code: Restore to New Azure IaasVm with IaasVMRestoreRequest with identityBasedRestoreDetails. @@ -3182,7 +3182,7 @@ public final class RestoresTriggerSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json */ /** * Sample code: Restore Disks with IaasVMRestoreRequest. @@ -3222,7 +3222,7 @@ public final class RestoresTriggerSamples { } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json */ /** * Sample code: Restore Disks with IaasVMRestoreRequest with IdentityBasedRestoreDetails. @@ -3273,7 +3273,7 @@ import com.azure.core.util.Context; /** Samples for SecurityPINs Get. */ public final class SecurityPINsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupSecurityPin_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/BackupSecurityPin_Get.json */ /** * Sample code: Get Vault Security Pin. @@ -3300,7 +3300,7 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateIaasVMRes /** Samples for ValidateOperation Trigger. */ public final class ValidateOperationTriggerSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/TriggerValidateOperation_RestoreDisk.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/TriggerValidateOperation_RestoreDisk.json */ /** * Sample code: Trigger Validate Operation. @@ -3345,7 +3345,7 @@ import com.azure.core.util.Context; /** Samples for ValidateOperationResults Get. */ public final class ValidateOperationResultsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ValidateOperationResults.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ValidateOperationResults.json */ /** * Sample code: Get Operation Results of Validate Operation. @@ -3370,7 +3370,7 @@ import com.azure.core.util.Context; /** Samples for ValidateOperationStatuses Get. */ public final class ValidateOperationStatusesGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ValidateOperationStatus.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 0837a8c41a18f..5047bf6593c19 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml @@ -13,7 +13,7 @@ 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-2022-09-preview. + 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-2022-10. https://github.com/Azure/azure-sdk-for-java 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 6185e1e07ad56..9833371edb7ec 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 @@ -401,7 +401,7 @@ public RecoveryServicesBackupManager authenticate(TokenCredential credential, Az .append("-") .append("com.azure.resourcemanager.recoveryservicesbackup") .append("/") - .append("1.0.0-beta.6"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") 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 5b31ebc5b6fe7..c42dcd5786734 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 @@ -55,7 +55,7 @@ public final class BackupEnginesClientImpl implements BackupEnginesClient { */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BackupEnginesService { + public interface BackupEnginesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" @@ -159,7 +159,7 @@ private Mono> listSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -220,7 +220,7 @@ private Mono> listSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } @@ -535,7 +535,7 @@ private Mono> listNextSinglePageAsy res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -575,7 +575,7 @@ private Mono> listNextSinglePageAsy res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } } 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 b3bf078418a4e..9e38c7a951081 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 @@ -55,7 +55,7 @@ public final class BackupJobsClientImpl implements BackupJobsClient { */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BackupJobsService { + public interface BackupJobsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" @@ -140,7 +140,7 @@ private Mono> listSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -200,7 +200,7 @@ private Mono> listSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } @@ -331,7 +331,7 @@ private Mono> listNextSinglePageAsync(String nex res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -369,7 +369,7 @@ private Mono> listNextSinglePageAsync(String nex res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } } 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 b56da0b7d9ec6..c605d250a0aaf 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 @@ -50,7 +50,7 @@ public final class BackupOperationResultsClientImpl implements BackupOperationRe */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BackupOperationResultsService { + public interface BackupOperationResultsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 5e5440fa1dfc3..bab8e9e632f1f 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 @@ -51,7 +51,7 @@ public final class BackupOperationStatusesClientImpl implements BackupOperationS */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BackupOperationStatusesService { + public interface BackupOperationStatusesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 149c0e793674e..5961e3d03e59f 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 @@ -55,7 +55,7 @@ public final class BackupPoliciesClientImpl implements BackupPoliciesClient { */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BackupPoliciesService { + public interface BackupPoliciesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" @@ -139,7 +139,7 @@ private Mono> listSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -199,7 +199,7 @@ private Mono> listSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } @@ -331,7 +331,7 @@ private Mono> listNextSinglePageAsy res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -371,7 +371,7 @@ private Mono> listNextSinglePageAsy res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } } 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 5e3520911a3ca..e1da259c59344 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 @@ -56,7 +56,7 @@ public final class BackupProtectableItemsClientImpl implements BackupProtectable */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BackupProtectableItemsService { + public interface BackupProtectableItemsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" @@ -143,7 +143,7 @@ private Mono> listSinglePage res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -205,7 +205,7 @@ private Mono> listSinglePage res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } @@ -342,7 +342,7 @@ private Mono> listNextSingle res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -382,7 +382,7 @@ private Mono> listNextSingle res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } } 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 8ce42bee712b7..dae40e9ee4968 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 @@ -56,7 +56,7 @@ public final class BackupProtectedItemsClientImpl implements BackupProtectedItem */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BackupProtectedItemsService { + public interface BackupProtectedItemsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" @@ -142,7 +142,7 @@ private Mono> listSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -203,7 +203,7 @@ private Mono> listSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } @@ -335,7 +335,7 @@ private Mono> listNextSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -374,7 +374,7 @@ private Mono> listNextSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } } 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 3421418003d0b..70348cdf9f013 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 @@ -57,7 +57,7 @@ public final class BackupProtectionContainersClientImpl implements BackupProtect */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BackupProtectionContainersService { + public interface BackupProtectionContainersService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" @@ -140,7 +140,7 @@ private Mono> listSinglePageAsyn res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -199,7 +199,7 @@ private Mono> listSinglePageAsyn res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } @@ -326,7 +326,7 @@ private Mono> listNextSinglePage res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -366,7 +366,7 @@ private Mono> listNextSinglePage res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } } 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 7a6bc1f31c6dd..2e4c8b4944fc3 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 @@ -56,7 +56,7 @@ public final class BackupProtectionIntentsClientImpl implements BackupProtection */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BackupProtectionIntentsService { + public interface BackupProtectionIntentsService { @Headers({"Content-Type: application/json"}) @Get( "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" @@ -142,7 +142,7 @@ private Mono> listSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -203,7 +203,7 @@ private Mono> listSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } @@ -335,7 +335,7 @@ private Mono> listNextSinglePageAsy res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -375,7 +375,7 @@ private Mono> listNextSinglePageAsy res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } } 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 9b630f2d27fbe..e693119f5ca08 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 @@ -57,7 +57,7 @@ public final class BackupResourceEncryptionConfigsClientImpl implements BackupRe */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BackupResourceEncryptionConfigsService { + public interface BackupResourceEncryptionConfigsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 4eafea64c97ae..fa8fb4efbdfbb 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 @@ -59,7 +59,7 @@ public final class BackupResourceStorageConfigsNonCrrsClientImpl implements Back */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BackupResourceStorageConfigsNonCrrsService { + public interface BackupResourceStorageConfigsNonCrrsService { @Headers({"Content-Type: application/json"}) @Get( "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 d2ac526b0be4f..b9e590092e7c8 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 @@ -55,7 +55,7 @@ public final class BackupResourceVaultConfigsClientImpl implements BackupResourc */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BackupResourceVaultConfigsService { + public interface BackupResourceVaultConfigsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 68a62425ce78b..876672d4940ab 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 @@ -52,7 +52,7 @@ public final class BackupStatusClientImpl implements BackupStatusClient { */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BackupStatusService { + public interface BackupStatusService { @Headers({"Content-Type: application/json"}) @Post( "/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus") 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 40efb69facf15..f2c98e6568892 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 @@ -56,7 +56,7 @@ public final class BackupUsageSummariesClientImpl implements BackupUsageSummarie */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BackupUsageSummariesService { + public interface BackupUsageSummariesService { @Headers({"Content-Type: application/json"}) @Get( "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 a5c61a8e5370e..2ff4f10694dec 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 @@ -55,7 +55,7 @@ public final class BackupWorkloadItemsClientImpl implements BackupWorkloadItemsC */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BackupWorkloadItemsService { + public interface BackupWorkloadItemsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" @@ -158,7 +158,7 @@ private Mono> listSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -235,7 +235,7 @@ private Mono> listSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } @@ -404,7 +404,7 @@ private Mono> listNextSinglePageAsync(S res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -442,7 +442,7 @@ private Mono> listNextSinglePageAsync(S res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } } 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 2a5fba5824c54..6c2a45cf67902 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 @@ -50,7 +50,7 @@ public final class BackupsClientImpl implements BackupsClient { */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BackupsService { + public interface BackupsService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 1895810d93ad5..863b7a956a390 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 @@ -56,7 +56,7 @@ public final class BmsPrepareDataMoveOperationResultsClientImpl implements BmsPr */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface BmsPrepareDataMoveOperationResultsService { + public interface BmsPrepareDataMoveOperationResultsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 1863819303989..e8e0710edcaf9 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 @@ -57,7 +57,7 @@ public final class DeletedProtectionContainersClientImpl implements DeletedProte */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface DeletedProtectionContainersService { + public interface DeletedProtectionContainersService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" @@ -140,7 +140,7 @@ private Mono> listSinglePageAsyn res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -199,7 +199,7 @@ private Mono> listSinglePageAsyn res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } @@ -326,7 +326,7 @@ private Mono> listNextSinglePage res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -366,7 +366,7 @@ private Mono> listNextSinglePage res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } } 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 550e35d71b421..7fe071931bb2c 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 @@ -52,7 +52,7 @@ public final class ExportJobsOperationResultsClientImpl implements ExportJobsOpe */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ExportJobsOperationResultsService { + public interface ExportJobsOperationResultsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 528df4c134ac4..8a6b0d0eefa48 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 @@ -52,7 +52,7 @@ public final class FeatureSupportsClientImpl implements FeatureSupportsClient { */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface FeatureSupportsService { + public interface FeatureSupportsService { @Headers({"Content-Type: application/json"}) @Post( "/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}" 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 32851b78b08da..dd6d7f0be214a 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 @@ -53,7 +53,7 @@ public final class ItemLevelRecoveryConnectionsClientImpl implements ItemLevelRe */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ItemLevelRecoveryConnectionsService { + public interface ItemLevelRecoveryConnectionsService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 9ffab3e08b32d..8cba76dddf34a 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 @@ -49,7 +49,7 @@ public final class JobCancellationsClientImpl implements JobCancellationsClient */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface JobCancellationsService { + public interface JobCancellationsService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 9e89152bb8b72..32c4baede9626 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 @@ -50,7 +50,7 @@ public final class JobDetailsClientImpl implements JobDetailsClient { */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface JobDetailsService { + public interface JobDetailsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 faed1df02ae2d..6bde96a427401 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 @@ -49,7 +49,7 @@ public final class JobOperationResultsClientImpl implements JobOperationResultsC */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface JobOperationResultsService { + public interface JobOperationResultsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 6809215d4b4ea..619c69c9b63d8 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 @@ -48,7 +48,7 @@ public final class JobsClientImpl implements JobsClient { */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface JobsService { + public interface JobsService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 e3923194c8dba..aee1cdc7c1e36 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 @@ -52,7 +52,7 @@ public final class OperationOperationsClientImpl implements OperationOperationsC */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface OperationOperationsService { + public interface OperationOperationsService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 7735437e2d961..b4b8a602aa48e 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 @@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface OperationsService { + public interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.RecoveryServices/operations") @ExpectedResponses({200}) 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 572e68d860ab1..a6559253988e8 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 @@ -60,7 +60,7 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface PrivateEndpointConnectionsService { + public interface PrivateEndpointConnectionsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 c35114b443436..140dbe91552c7 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 @@ -50,7 +50,7 @@ public final class PrivateEndpointsClientImpl implements PrivateEndpointsClient */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface PrivateEndpointsService { + public interface PrivateEndpointsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 aef3c782bd047..d976c0eb5c9ae 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 @@ -56,7 +56,7 @@ public final class ProtectableContainersClientImpl implements ProtectableContain */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ProtectableContainersService { + public interface ProtectableContainersService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" @@ -145,7 +145,7 @@ private Mono> listSinglePageAsy res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -209,7 +209,7 @@ private Mono> listSinglePageAsy res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } @@ -343,7 +343,7 @@ private Mono> listNextSinglePag res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -383,7 +383,7 @@ private Mono> listNextSinglePag res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } } 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 b8a1e50fca9c0..bc8a91432574d 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 @@ -54,7 +54,7 @@ public final class ProtectedItemOperationResultsClientImpl implements ProtectedI */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ProtectedItemOperationResultsService { + public interface ProtectedItemOperationResultsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 02af6387237a3..ce7c3f579de29 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 @@ -54,7 +54,7 @@ public final class ProtectedItemOperationStatusesClientImpl implements Protected */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ProtectedItemOperationStatusesService { + public interface ProtectedItemOperationStatusesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 e369c385aebd1..7db87e1ef5196 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 @@ -53,7 +53,7 @@ public final class ProtectedItemsClientImpl implements ProtectedItemsClient { */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ProtectedItemsService { + public interface ProtectedItemsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 57c0443f67d60..bb925eb412efb 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 @@ -56,7 +56,7 @@ public final class ProtectionContainerOperationResultsClientImpl implements Prot */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ProtectionContainerOperationResultsService { + public interface ProtectionContainerOperationResultsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 42b9000dbab17..28d6b00ca3c76 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 @@ -58,7 +58,7 @@ public final class ProtectionContainerRefreshOperationResultsClientImpl */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ProtectionContainerRefreshOperationResultsService { + public interface ProtectionContainerRefreshOperationResultsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 fc23b5c689e0f..92a0b2cbb4cff 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 @@ -55,7 +55,7 @@ public final class ProtectionContainersClientImpl implements ProtectionContainer */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ProtectionContainersService { + public interface ProtectionContainersService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 fb90ecd44f8c8..cb3d35695cd12 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 @@ -56,7 +56,7 @@ public final class ProtectionIntentsClientImpl implements ProtectionIntentsClien */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ProtectionIntentsService { + public interface ProtectionIntentsService { @Headers({"Content-Type: application/json"}) @Post( "/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}" 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 9647fc8b549df..36ca0ef66da4f 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 @@ -58,7 +58,7 @@ public final class ProtectionPoliciesClientImpl implements ProtectionPoliciesCli */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ProtectionPoliciesService { + public interface ProtectionPoliciesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 9898437de56f4..227f5f6c88dac 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 @@ -56,7 +56,7 @@ public final class ProtectionPolicyOperationResultsClientImpl implements Protect */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ProtectionPolicyOperationResultsService { + public interface ProtectionPolicyOperationResultsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 854c89d4c5578..6741b0f9ff199 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 @@ -56,7 +56,7 @@ public final class ProtectionPolicyOperationStatusesClientImpl implements Protec */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ProtectionPolicyOperationStatusesService { + public interface ProtectionPolicyOperationStatusesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 20f46f3aa123e..f8da4e15ef2bf 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 @@ -55,7 +55,7 @@ public final class RecoveryPointsClientImpl implements RecoveryPointsClient { */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface RecoveryPointsService { + public interface RecoveryPointsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" @@ -183,7 +183,7 @@ private Mono> listSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -264,7 +264,7 @@ private Mono> listSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } @@ -674,7 +674,7 @@ private Mono> listNextSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -713,7 +713,7 @@ private Mono> listNextSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } } 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 65fc85ad17e82..650a0ff821996 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 @@ -64,7 +64,7 @@ public final class RecoveryPointsRecommendedForMovesClientImpl implements Recove */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface RecoveryPointsRecommendedForMovesService { + public interface RecoveryPointsRecommendedForMovesService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" @@ -177,7 +177,7 @@ private Mono> listSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -263,7 +263,7 @@ private Mono> listSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } @@ -413,7 +413,7 @@ private Mono> listNextSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -452,7 +452,7 @@ private Mono> listNextSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } } 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/RecoveryServicesBackupClientImpl.java index 746d5b15ab358..88aa4c3660218 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/RecoveryServicesBackupClientImpl.java @@ -779,7 +779,7 @@ public ResourceGuardProxyOperationsClient getResourceGuardProxyOperations() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-09-01-preview"; + this.apiVersion = "2022-10-01"; this.backupResourceStorageConfigsNonCrrs = new BackupResourceStorageConfigsNonCrrsClientImpl(this); this.protectionIntents = new ProtectionIntentsClientImpl(this); this.backupStatus = new BackupStatusClientImpl(this); 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 index 8c163941ddf3a..669462004af8e 100644 --- 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 @@ -56,7 +56,7 @@ public final class ResourceGuardProxiesClientImpl implements ResourceGuardProxie */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ResourceGuardProxiesService { + public interface ResourceGuardProxiesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" @@ -136,7 +136,7 @@ private Mono> getSinglePageAs res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -193,7 +193,7 @@ private Mono> getSinglePageAs res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } @@ -296,7 +296,7 @@ private Mono> getNextSinglePa res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -336,7 +336,7 @@ private Mono> getNextSinglePa res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), + res.getValue().nextLink().toString(), null)); } } 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 3b58ba8df754a..8bd58a21cc688 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 @@ -58,7 +58,7 @@ public final class ResourceGuardProxyOperationsClientImpl implements ResourceGua */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ResourceGuardProxyOperationsService { + public interface ResourceGuardProxyOperationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 a65513bb543ca..216e8436ee036 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 @@ -60,7 +60,7 @@ public final class ResourceProvidersClientImpl implements ResourceProvidersClien */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ResourceProvidersService { + public interface ResourceProvidersService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 493c5d20f41a3..70976bc7e7f57 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 @@ -55,7 +55,7 @@ public final class RestoresClientImpl implements RestoresClient { */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface RestoresService { + public interface RestoresService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 35d4841e59283..6e2d18ebbe908 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 @@ -52,7 +52,7 @@ public final class SecurityPINsClientImpl implements SecurityPINsClient { */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface SecurityPINsService { + public interface SecurityPINsService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 d6f2b96864ca0..a46b81b9b8513 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 @@ -51,7 +51,7 @@ public final class ValidateOperationResultsClientImpl implements ValidateOperati */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ValidateOperationResultsService { + public interface ValidateOperationResultsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 363b1d897cb32..e63806df7a98b 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 @@ -52,7 +52,7 @@ public final class ValidateOperationStatusesClientImpl implements ValidateOperat */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ValidateOperationStatusesService { + public interface ValidateOperationStatusesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 2243a14683fbd..a4d8849a99936 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 @@ -56,7 +56,7 @@ public final class ValidateOperationsClientImpl implements ValidateOperationsCli */ @Host("{$host}") @ServiceInterface(name = "RecoveryServicesBack") - private interface ValidateOperationsService { + public interface ValidateOperationsService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" 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 7164607b251c6..57ea139cbcf24 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 @@ -24,7 +24,7 @@ @Fluent public class IaasVMRestoreRequest extends RestoreRequest { /* - * ID of the backup copy to be recovered. + * Recovery Point ID Name of the backup copy to be recovered. */ @JsonProperty(value = "recoveryPointId") private String recoveryPointId; @@ -158,7 +158,7 @@ public IaasVMRestoreRequest() { } /** - * Get the recoveryPointId property: ID of the backup copy to be recovered. + * Get the recoveryPointId property: Recovery Point ID Name of the backup copy to be recovered. * * @return the recoveryPointId value. */ @@ -167,7 +167,7 @@ public String recoveryPointId() { } /** - * Set the recoveryPointId property: ID of the backup copy to be recovered. + * Set the recoveryPointId property: Recovery Point ID Name of the backup copy to be recovered. * * @param recoveryPointId the recoveryPointId value to set. * @return the IaasVMRestoreRequest object itself. 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 ae38de67bc3fa..7ec252ce64cf1 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 @@ -9,7 +9,7 @@ /** Samples for BackupEngines Get. */ public final class BackupEnginesGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Dpm/BackupEngines_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 0ba8e7063502a..ae28314c2ecde 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 @@ -9,7 +9,7 @@ /** Samples for BackupEngines List. */ public final class BackupEnginesListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Dpm/BackupEngines_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 3cd5ed71d0ccb..e08ea49dd67b9 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 @@ -9,7 +9,7 @@ /** Samples for BackupJobs List. */ public final class BackupJobsListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/ListJobs.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/ListJobs.json */ /** * Sample code: List All Jobs. @@ -22,7 +22,7 @@ public static void listAllJobs( } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/ListJobsWithAllSupportedFilters.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/ListJobsWithAllSupportedFilters.json */ /** * Sample code: List Jobs With Filters. @@ -43,7 +43,7 @@ public static void listJobsWithFilters( } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/ListJobsWithStartTimeAndEndTimeFilters.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 006a7f6bda1f0..cdffb89256d42 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 @@ -9,7 +9,7 @@ /** Samples for BackupOperationResults Get. */ public final class BackupOperationResultsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/ProtectedItem_Delete_OperationResult.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 a0f671834cd17..e1fe483acfe03 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 @@ -9,7 +9,7 @@ /** Samples for BackupOperationStatuses Get. */ public final class BackupOperationStatusesGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/ProtectedItem_Delete_OperationStatus.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 66c4016d4f21a..e8c03f4d826b8 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 @@ -9,7 +9,7 @@ /** Samples for BackupPolicies List. */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureWorkload/BackupPolicies_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureWorkload/BackupPolicies_List.json */ /** * Sample code: List protection policies with backupManagementType filter as AzureWorkload. @@ -24,7 +24,7 @@ public static void listProtectionPoliciesWithBackupManagementTypeFilterAsAzureWo } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/V2Policy/v2-List-Policies.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/V2Policy/v2-List-Policies.json */ /** * Sample code: List protection policies with backupManagementType filter as AzureIaasVm with both V1 and V2 @@ -40,7 +40,7 @@ public static void listProtectionPoliciesWithBackupManagementTypeFilterAsAzureIa } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/BackupPolicies_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 3b3b2e45af595..4779a3e683388 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 @@ -9,7 +9,7 @@ /** Samples for BackupProtectableItems List. */ public final class BackupProtectableItemsListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/BackupProtectableItems_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 cf49b9a9bc6e7..2f7a842d17ee3 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 @@ -9,7 +9,7 @@ /** Samples for BackupProtectedItems List. */ public final class BackupProtectedItemsListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/BackupProtectedItems_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 3b444a05161c6..062a2f2efee08 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 @@ -9,7 +9,7 @@ /** Samples for BackupProtectionContainers List. */ public final class BackupProtectionContainersListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureStorage/ProtectionContainers_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 e48defb13e11d..59abb808637a0 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 @@ -9,7 +9,7 @@ /** Samples for BackupProtectionIntent List. */ public final class BackupProtectionIntentListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureWorkload/BackupProtectionIntent_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 dc33d47fb88b7..2a9c0bd92a9d5 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 @@ -9,7 +9,7 @@ /** Samples for BackupResourceEncryptionConfigs Get. */ public final class BackupResourceEncryptionConfigsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/BackupResourceEncryptionConfig_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 e5ebe1c67f392..8c7ad62b9d542 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 @@ -13,7 +13,7 @@ /** Samples for BackupResourceEncryptionConfigs Update. */ public final class BackupResourceEncryptionConfigsUpdateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/BackupResourceEncryptionConfig_Put.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/BackupResourceEncryptionConfig_Put.json */ /** * Sample code: Update Vault Encryption Configuration. @@ -31,7 +31,7 @@ public static void updateVaultEncryptionConfiguration( .withProperties( new BackupResourceEncryptionConfig() .withEncryptionAtRestType(EncryptionAtRestType.CUSTOMER_MANAGED) - .withKeyUri("https://gktestkv1.vault.azure.net/keys/Test1/ed2e8cdc7f86477ebf0c6462b504a9ed") + .withKeyUri("fakeTokenPlaceholder") .withSubscriptionId("1a2311d9-66f5-47d3-a9fb-7a37da63934b") .withInfrastructureEncryptionState(InfrastructureEncryptionState.fromString("true"))), Context.NONE); 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 1b9167547e5b7..3dc3934815233 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 @@ -9,7 +9,7 @@ /** Samples for BackupResourceStorageConfigsNonCrr Get. */ public final class BackupResourceStorageConfigsNonCrrGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupStorageConfig_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 e87b1a89074a4..26c8137ab503f 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 @@ -13,7 +13,7 @@ /** Samples for BackupResourceStorageConfigsNonCrr Patch. */ public final class BackupResourceStorageConfigsNonCrrPatchSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupStorageConfig_Patch.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 1840f78a98ccf..97a850792b3d3 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 @@ -13,7 +13,7 @@ /** Samples for BackupResourceStorageConfigsNonCrr Update. */ public final class BackupResourceStorageConfigsNonCrrUpdateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupStorageConfig_Put.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 4cc4b41425bbb..d215191701257 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 @@ -9,7 +9,7 @@ /** Samples for BackupResourceVaultConfigs Get. */ public final class BackupResourceVaultConfigsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupResourceVaultConfigs_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 5e9cbefbe088c..1cd4a90e9a56b 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 @@ -13,7 +13,7 @@ /** Samples for BackupResourceVaultConfigs Put. */ public final class BackupResourceVaultConfigsPutSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupResourceVaultConfigs_Put.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 f722a20af8d23..fbf9eee6c4cd3 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 @@ -12,7 +12,7 @@ /** Samples for BackupResourceVaultConfigs Update. */ public final class BackupResourceVaultConfigsUpdateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupResourceVaultConfigs_Patch.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 8b01d8a993afc..2af73468ca781 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 @@ -11,7 +11,7 @@ /** Samples for BackupStatus Get. */ public final class BackupStatusGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/GetBackupStatus.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 194cb248969d1..c835be43b639e 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 @@ -9,7 +9,7 @@ /** Samples for BackupUsageSummaries List. */ public final class BackupUsageSummariesListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupProtectedItem_UsageSummary_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Common/BackupProtectedItem_UsageSummary_Get.json */ /** * Sample code: Get Protected Items Usages Summary. @@ -24,7 +24,7 @@ public static void getProtectedItemsUsagesSummary( } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupProtectionContainers_UsageSummary_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 88999fed88576..d4f9c7949ddd0 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 @@ -9,7 +9,7 @@ /** Samples for BackupWorkloadItems List. */ public final class BackupWorkloadItemsListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureWorkload/BackupWorkloadItems_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 c82a7afb9ccbe..cf78dece1f15c 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 @@ -11,7 +11,7 @@ /** Samples for Backups Trigger. */ public final class BackupsTriggerSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/TriggerBackup_Post.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 073dcd20de383..87db2fcd46eae 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 @@ -9,7 +9,7 @@ /** Samples for BmsPrepareDataMoveOperationResult Get. */ public final class BmsPrepareDataMoveOperationResultGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/BackupDataMove/PrepareDataMoveOperationResult_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 9366c36b1c490..64717a9c08186 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 @@ -9,7 +9,7 @@ /** Samples for DeletedProtectionContainers List. */ public final class DeletedProtectionContainersListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureStorage/SoftDeletedContainers_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 9504409d1fee5..ba7d7954bd9b1 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 @@ -9,7 +9,7 @@ /** Samples for ExportJobsOperationResults Get. */ public final class ExportJobsOperationResultsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/ExportJobsOperationResult.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 9a30368dd6b6f..3b37fb17358a0 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 @@ -10,7 +10,7 @@ /** Samples for FeatureSupport Validate. */ public final class FeatureSupportValidateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/BackupFeature_Validate.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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/ItemLevelRecoveryConnectionsProvisionSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ItemLevelRecoveryConnectionsProvisionSamples.java index 5f07595fc784a..26fdf94e38ba1 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 @@ -11,7 +11,7 @@ /** Samples for ItemLevelRecoveryConnections Provision. */ public final class ItemLevelRecoveryConnectionsProvisionSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/Provision_Ilr.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 a2584ab30da85..ba2988073f17e 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 @@ -9,7 +9,7 @@ /** Samples for ItemLevelRecoveryConnections Revoke. */ public final class ItemLevelRecoveryConnectionsRevokeSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/Revoke_Ilr.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 96f09cd22e417..7cf250ca028e3 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 @@ -9,7 +9,7 @@ /** Samples for JobCancellations Trigger. */ public final class JobCancellationsTriggerSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/TriggerCancelJob.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 8b4238a94a06b..72d449399c0e4 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 @@ -9,7 +9,7 @@ /** Samples for JobDetails Get. */ public final class JobDetailsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/GetJobDetails.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 f1864fb0fc939..893a12c747e63 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 @@ -9,7 +9,7 @@ /** Samples for JobOperationResults Get. */ public final class JobOperationResultsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/CancelJobOperationResult.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 0d25cbb03a015..18e1064fcd956 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 @@ -9,7 +9,7 @@ /** Samples for Jobs Export. */ public final class JobsExportSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/TriggerExportJobs.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 90b4a745cccd4..6d71afd66b9c0 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 @@ -15,7 +15,7 @@ /** Samples for OperationOperation Validate. */ public final class OperationOperationValidateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ValidateOperation_RestoreDisk.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk.json */ /** * Sample code: Validate Operation. @@ -51,7 +51,7 @@ public static void validateOperation( } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ValidateOperation_RestoreDisk_IdentityBasedRestoreDetails.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 56b17948bb6dd..6c9690c9be729 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 @@ -9,7 +9,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/ListOperations.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 1d1f712ad5fd1..bb8cb3ce61bce 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 @@ -9,7 +9,7 @@ /** Samples for PrivateEndpointConnection Delete. */ public final class PrivateEndpointConnectionDeleteSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/PrivateEndpointConnection/DeletePrivateEndpointConnection.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 ab34d29d95f17..7ce4d5bc7e58b 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 @@ -9,7 +9,7 @@ /** Samples for PrivateEndpointConnection Get. */ public final class PrivateEndpointConnectionGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 6f0b785bf4cae..ebc5eadf79fd9 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 @@ -15,7 +15,7 @@ /** Samples for PrivateEndpointConnection Put. */ public final class PrivateEndpointConnectionPutSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/PrivateEndpointConnection/PutPrivateEndpointConnection.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 f85790200e0d7..503714430ca33 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 @@ -9,7 +9,7 @@ /** Samples for PrivateEndpoint GetOperationStatus. */ public final class PrivateEndpointGetOperationStatusSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/PrivateEndpointConnection/GetPrivateEndpointConnectionOperationStatus.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 082f2c90cac67..308487c6682c7 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 @@ -9,7 +9,7 @@ /** Samples for ProtectableContainers List. */ public final class ProtectableContainersListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureStorage/ProtectableContainers_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 70078abc9b425..e871eba9f08ff 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 @@ -9,7 +9,7 @@ /** Samples for ProtectedItemOperationResults Get. */ public final class ProtectedItemOperationResultsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectedItemOperationResults.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 f8b86397191e7..935df91ce835f 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 @@ -9,7 +9,7 @@ /** Samples for ProtectedItemOperationStatuses Get. */ public final class ProtectedItemOperationStatusesGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectedItemOperationStatus.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 33c5ede04cd11..9dfbed98691ba 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 @@ -10,7 +10,7 @@ /** Samples for ProtectedItems CreateOrUpdate. */ public final class ProtectedItemsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/StopProtection.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/StopProtection.json */ /** * Sample code: Stop Protection with retain data on Azure IaasVm. @@ -37,7 +37,7 @@ public static void stopProtectionWithRetainDataOnAzureIaasVm( } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ConfigureProtection.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ConfigureProtection.json */ /** * Sample code: Enable Protection on Azure IaasVm. 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 af3b98f01b48d..640a42656b400 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 @@ -9,7 +9,7 @@ /** Samples for ProtectedItems Delete. */ public final class ProtectedItemsDeleteSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/ProtectedItem_Delete.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 45eee5cdcd9f6..c143a915af8fa 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 @@ -9,7 +9,7 @@ /** Samples for ProtectedItems Get. */ public final class ProtectedItemsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json */ /** * Sample code: Get Protected Classic Virtual Machine Details. @@ -31,7 +31,7 @@ public static void getProtectedClassicVirtualMachineDetails( } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/Compute_ProtectedItem_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 3393c6a074356..93a2afc3708de 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 @@ -9,7 +9,7 @@ /** Samples for ProtectionContainerOperationResults Get. */ public final class ProtectionContainerOperationResultsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureStorage/ProtectionContainers_Inquire_Result.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 cc539e00b330f..ee5d85cc0f7f6 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 @@ -9,7 +9,7 @@ /** Samples for ProtectionContainerRefreshOperationResults Get. */ public final class ProtectionContainerRefreshOperationResultsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/RefreshContainers_OperationResults.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 183e3f6093ec8..cc28347c3cc64 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 @@ -9,7 +9,7 @@ /** Samples for ProtectionContainers Get. */ public final class ProtectionContainersGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureWorkload/ProtectionContainers_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 2e519452fd576..143f2df1025d4 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 @@ -9,7 +9,7 @@ /** Samples for ProtectionContainers Inquire. */ public final class ProtectionContainersInquireSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureStorage/ProtectionContainers_Inquire.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 26cc8673404a1..ccc2dc2b88e7c 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 @@ -9,7 +9,7 @@ /** Samples for ProtectionContainers Refresh. */ public final class ProtectionContainersRefreshSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/RefreshContainers.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 67d4b533570b6..fe9131178ddd1 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 @@ -11,7 +11,7 @@ /** Samples for ProtectionContainers Register. */ public final class ProtectionContainersRegisterSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureStorage/ProtectionContainers_Register.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureStorage/ProtectionContainers_Register.json */ /** * Sample code: RegisterAzure Storage ProtectionContainers. 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 1c51a25ddbbb0..a5ee65a5eecff 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 @@ -9,7 +9,7 @@ /** Samples for ProtectionContainers Unregister. */ public final class ProtectionContainersUnregisterSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureWorkload/ProtectionContainers_Unregister.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 24609f80ac1d1..f77af1ca1e223 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 @@ -9,7 +9,7 @@ /** Samples for ProtectionIntent CreateOrUpdate. */ public final class ProtectionIntentCreateOrUpdateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json */ /** * Sample code: Create or Update Azure Vm Protection Intent. 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 3cf07a6990a45..bea4ad98528ee 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 @@ -9,7 +9,7 @@ /** Samples for ProtectionIntent Delete. */ public final class ProtectionIntentDeleteSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureWorkload/BackupProtectionIntent_Delete.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 8730a598e23e9..fa79ed668a0e0 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 @@ -9,7 +9,7 @@ /** Samples for ProtectionIntent Get. */ public final class ProtectionIntentGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureWorkload/BackupProtectionIntent_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 ca206275b4acc..a02832d1e93c1 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 @@ -11,7 +11,7 @@ /** Samples for ProtectionIntent Validate. */ public final class ProtectionIntentValidateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectionIntent_Validate.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 6f677c1720a68..dce3e217ed39c 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 @@ -37,7 +37,7 @@ /** Samples for ProtectionPolicies CreateOrUpdate. */ public final class ProtectionPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json */ /** * Sample code: Create or Update Full Azure Workload Protection Policy. @@ -137,7 +137,7 @@ public static void createOrUpdateFullAzureWorkloadProtectionPolicy( } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json */ /** * Sample code: Create or Update Simple Azure Vm Protection Policy. @@ -171,7 +171,7 @@ public static void createOrUpdateSimpleAzureVmProtectionPolicy( } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json */ /** * Sample code: Create or Update Daily Azure Storage Protection Policy. @@ -239,7 +239,7 @@ public static void createOrUpdateDailyAzureStorageProtectionPolicy( } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json */ /** * Sample code: Create or Update Hourly Azure Storage Protection Policy. @@ -307,7 +307,7 @@ public static void createOrUpdateHourlyAzureStorageProtectionPolicy( } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json */ /** * Sample code: Create or Update Full Azure Vm Protection Policy. @@ -370,7 +370,7 @@ public static void createOrUpdateFullAzureVmProtectionPolicy( } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/V2Policy/IaaS_v2_hourly.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/V2Policy/IaaS_v2_hourly.json */ /** * Sample code: Create or Update Enhanced Azure Vm Protection Policy with Hourly backup. @@ -447,7 +447,7 @@ public static void createOrUpdateEnhancedAzureVmProtectionPolicyWithHourlyBackup } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/V2Policy/IaaS_v2_daily.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/V2Policy/IaaS_v2_daily.json */ /** * Sample code: Create or Update Enhanced Azure Vm Protection Policy with daily backup. 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 5cb73673e1571..6a0d0a20b7c8b 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 @@ -9,7 +9,7 @@ /** Samples for ProtectionPolicies Delete. */ public final class ProtectionPoliciesDeleteSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectionPolicies_Delete.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 d51e392fa010b..1bb0db9314665 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 @@ -9,7 +9,7 @@ /** Samples for ProtectionPolicies Get. */ public final class ProtectionPoliciesGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectionPolicies_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/ProtectionPolicies_Get.json */ /** * Sample code: Get Azure IaasVm Protection Policy Details. @@ -22,7 +22,7 @@ public static void getAzureIaasVmProtectionPolicyDetails( } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json */ /** * Sample code: Get Azure IaasVm Enhanced Protection Policy Details. 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 02e7f1a98f5f5..79dff0c0ae2f6 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 @@ -9,7 +9,7 @@ /** Samples for ProtectionPolicyOperationResults Get. */ public final class ProtectionPolicyOperationResultsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectionPolicyOperationResults_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 02ee4d93f9501..8231372953ef4 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 @@ -9,7 +9,7 @@ /** Samples for ProtectionPolicyOperationStatuses Get. */ public final class ProtectionPolicyOperationStatusesGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ProtectionPolicyOperationStatuses_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 98814e249795d..1d388ffed58b6 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 @@ -9,7 +9,7 @@ /** Samples for RecoveryPoints Get. */ public final class RecoveryPointsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/RecoveryPoints_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 abef7ad6cc83a..2312dca1a18f0 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 @@ -9,7 +9,7 @@ /** Samples for RecoveryPoints List. */ public final class RecoveryPointsListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/RecoveryPoints_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 4f05d2ff9d064..f8bdafee6d105 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 @@ -11,7 +11,7 @@ /** Samples for RecoveryPointsRecommendedForMove List. */ public final class RecoveryPointsRecommendedForMoveListSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/RecoveryPointsRecommendedForMove_List.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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/ResourceGuardProxiesGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxiesGetSamples.java index f596b0ce00103..076ab35ee0545 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for ResourceGuardProxies Get. */ public final class ResourceGuardProxiesGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json */ /** * Sample code: Get VaultGuardProxies. 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 index bdb6490f823a0..f664da6b85e2d 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for ResourceGuardProxyOperation Delete. */ public final class ResourceGuardProxyOperationDeleteSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json */ /** * Sample code: Delete ResourceGuardProxy. 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 index fb0b68b67ae48..797c6a1506910 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for ResourceGuardProxyOperation Get. */ public final class ResourceGuardProxyOperationGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json */ /** * Sample code: Get ResourceGuardProxy. 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 index da85fe477e3bb..3979a1045f604 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for ResourceGuardProxyOperation Put. */ public final class ResourceGuardProxyOperationPutSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json */ /** * Sample code: Create ResourceGuardProxy. 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 index 58b359d7fe246..6cc7a62378362 100644 --- 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 @@ -11,7 +11,7 @@ /** Samples for ResourceGuardProxyOperation UnlockDelete. */ public final class ResourceGuardProxyOperationUnlockDeleteSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json */ /** * Sample code: UnlockDelete ResourceGuardProxy. 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 1d9485b4108e7..ea75cd5da6386 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 @@ -11,7 +11,7 @@ /** Samples for ResourceProvider BmsPrepareDataMove. */ public final class ResourceProviderBmsPrepareDataMoveSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/BackupDataMove/PrepareDataMove_Post.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 c2ed85e3519d0..535336681f721 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 @@ -11,7 +11,7 @@ /** Samples for ResourceProvider BmsTriggerDataMove. */ public final class ResourceProviderBmsTriggerDataMoveSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/BackupDataMove/TriggerDataMove_Post.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 239203709ce19..cc17bdb276ac1 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 @@ -9,7 +9,7 @@ /** Samples for ResourceProvider GetOperationStatus. */ public final class ResourceProviderGetOperationStatusSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/BackupDataMove/BackupDataMoveOperationStatus_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 a490895c96791..b2df082521793 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 @@ -11,7 +11,7 @@ /** Samples for ResourceProvider MoveRecoveryPoint. */ public final class ResourceProviderMoveRecoveryPointSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/TriggerRecoveryPointMove_Post.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 010ab360b5993..f1dd8d2fa7f0a 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 @@ -18,7 +18,7 @@ /** Samples for Restores Trigger. */ public final class RestoresTriggerSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreWithRehydrationRequest.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreWithRehydrationRequest.json */ /** * Sample code: Restore to New Azure IaasVm with IaasVMRestoreWithRehydrationRequest. @@ -65,7 +65,7 @@ public static void restoreToNewAzureIaasVmWithIaasVMRestoreWithRehydrationReques } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest.json */ /** * Sample code: Restore to New Azure IaasVm with IaasVMRestoreRequest. @@ -109,7 +109,7 @@ public static void restoreToNewAzureIaasVmWithIaasVMRestoreRequest( } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreWithRehydrationRequest.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreWithRehydrationRequest.json */ /** * Sample code: Restore Disks with IaasVMRestoreWithRehydrationRequest. @@ -148,7 +148,7 @@ public static void restoreDisksWithIaasVMRestoreWithRehydrationRequest( } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json */ /** * Sample code: Restore to New Azure IaasVm with IaasVMRestoreRequest with identityBasedRestoreDetails. @@ -194,7 +194,7 @@ public static void restoreToNewAzureIaasVmWithIaasVMRestoreRequestWithIdentityBa } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json */ /** * Sample code: Restore Disks with IaasVMRestoreRequest. @@ -234,7 +234,7 @@ public static void restoreDisksWithIaasVMRestoreRequest( } /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json */ /** * Sample code: Restore Disks with IaasVMRestoreRequest with IdentityBasedRestoreDetails. 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 7a7300c1b2bef..162a5723cdbbb 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 @@ -9,7 +9,7 @@ /** Samples for SecurityPINs Get. */ public final class SecurityPINsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/Common/BackupSecurityPin_Get.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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/ValidateOperationResultsGetSamples.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationResultsGetSamples.java index 7b9519776312c..62926303b4526 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 @@ -9,7 +9,7 @@ /** Samples for ValidateOperationResults Get. */ public final class ValidateOperationResultsGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ValidateOperationResults.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 d53f217a2a3eb..cbd6b11ca0685 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 @@ -9,7 +9,7 @@ /** Samples for ValidateOperationStatuses Get. */ public final class ValidateOperationStatusesGetSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/ValidateOperationStatus.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/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 44d6a47ead816..297a3d274a2ee 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 @@ -14,7 +14,7 @@ /** Samples for ValidateOperation Trigger. */ public final class ValidateOperationTriggerSamples { /* - * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2022-09-01-preview/examples/AzureIaasVm/TriggerValidateOperation_RestoreDisk.json + * x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/AzureIaasVm/TriggerValidateOperation_RestoreDisk.json */ /** * Sample code: Trigger Validate Operation. 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 deleted file mode 100644 index 13ee2fd4a7659..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureBackupGoalFeatureSupportRequestTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureBackupGoalFeatureSupportRequest; -import org.junit.jupiter.api.Test; - -public final class AzureBackupGoalFeatureSupportRequestTests { - @Test - public void testDeserialize() { - AzureBackupGoalFeatureSupportRequest model = - BinaryData - .fromString("{\"featureType\":\"AzureBackupGoals\"}") - .toObject(AzureBackupGoalFeatureSupportRequest.class); - } - - @Test - public void testSerialize() { - AzureBackupGoalFeatureSupportRequest model = new AzureBackupGoalFeatureSupportRequest(); - model = BinaryData.fromObject(model).toObject(AzureBackupGoalFeatureSupportRequest.class); - } -} 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 deleted file mode 100644 index 7cc10b6790fb2..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureBackupServerContainerTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureBackupServerContainer; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.DpmContainerExtendedInfo; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureBackupServerContainerTests { - @Test - public void testDeserialize() { - AzureBackupServerContainer model = - BinaryData - .fromString( - "{\"containerType\":\"AzureBackupServerContainer\",\"canReRegister\":false,\"containerId\":\"hxuicbuewmrs\",\"protectedItemCount\":5368403589308605002,\"dpmAgentVersion\":\"uzrhwpusxjbaqe\",\"dpmServers\":[\"dohzjq\"],\"upgradeAvailable\":false,\"protectionStatus\":\"o\",\"extendedInfo\":{\"lastRefreshedAt\":\"2021-09-17T17:00:52Z\"},\"friendlyName\":\"ncnwfepbnwgf\",\"backupManagementType\":\"AzureBackupServer\",\"registrationStatus\":\"cgbjbgdlfgt\",\"healthStatus\":\"snaquf\",\"protectableObjectType\":\"bctqhamzjrwd\"}") - .toObject(AzureBackupServerContainer.class); - Assertions.assertEquals("ncnwfepbnwgf", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); - Assertions.assertEquals("cgbjbgdlfgt", model.registrationStatus()); - Assertions.assertEquals("snaquf", model.healthStatus()); - Assertions.assertEquals("bctqhamzjrwd", model.protectableObjectType()); - Assertions.assertEquals(false, model.canReRegister()); - Assertions.assertEquals("hxuicbuewmrs", model.containerId()); - Assertions.assertEquals(5368403589308605002L, model.protectedItemCount()); - Assertions.assertEquals("uzrhwpusxjbaqe", model.dpmAgentVersion()); - Assertions.assertEquals("dohzjq", model.dpmServers().get(0)); - Assertions.assertEquals(false, model.upgradeAvailable()); - Assertions.assertEquals("o", model.protectionStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-17T17:00:52Z"), model.extendedInfo().lastRefreshedAt()); - } - - @Test - public void testSerialize() { - AzureBackupServerContainer model = - new AzureBackupServerContainer() - .withFriendlyName("ncnwfepbnwgf") - .withBackupManagementType(BackupManagementType.AZURE_BACKUP_SERVER) - .withRegistrationStatus("cgbjbgdlfgt") - .withHealthStatus("snaquf") - .withProtectableObjectType("bctqhamzjrwd") - .withCanReRegister(false) - .withContainerId("hxuicbuewmrs") - .withProtectedItemCount(5368403589308605002L) - .withDpmAgentVersion("uzrhwpusxjbaqe") - .withDpmServers(Arrays.asList("dohzjq")) - .withUpgradeAvailable(false) - .withProtectionStatus("o") - .withExtendedInfo( - new DpmContainerExtendedInfo().withLastRefreshedAt(OffsetDateTime.parse("2021-09-17T17:00:52Z"))); - model = BinaryData.fromObject(model).toObject(AzureBackupServerContainer.class); - Assertions.assertEquals("ncnwfepbnwgf", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); - Assertions.assertEquals("cgbjbgdlfgt", model.registrationStatus()); - Assertions.assertEquals("snaquf", model.healthStatus()); - Assertions.assertEquals("bctqhamzjrwd", model.protectableObjectType()); - Assertions.assertEquals(false, model.canReRegister()); - Assertions.assertEquals("hxuicbuewmrs", model.containerId()); - Assertions.assertEquals(5368403589308605002L, model.protectedItemCount()); - Assertions.assertEquals("uzrhwpusxjbaqe", model.dpmAgentVersion()); - Assertions.assertEquals("dohzjq", model.dpmServers().get(0)); - Assertions.assertEquals(false, model.upgradeAvailable()); - Assertions.assertEquals("o", model.protectionStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-17T17:00:52Z"), 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 deleted file mode 100644 index 1d072f1dcea70..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureBackupServerEngineTests.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class AzureBackupServerEngineTests { - @Test - public void testDeserialize() { - AzureBackupServerEngine model = - BinaryData - .fromString( - "{\"backupEngineType\":\"AzureBackupServerEngine\",\"friendlyName\":\"w\",\"backupManagementType\":\"AzureBackupServer\",\"registrationStatus\":\"ujtmvcopexcmjurb\",\"backupEngineState\":\"hlkyqltqsrog\",\"healthStatus\":\"wkffdjkt\",\"canReRegister\":false,\"backupEngineId\":\"dfvclglxnfu\",\"dpmVersion\":\"tkbu\",\"azureBackupAgentVersion\":\"ogsf\",\"isAzureBackupAgentUpgradeAvailable\":true,\"isDpmUpgradeAvailable\":false,\"extendedInfo\":{\"databaseName\":\"sharujtj\",\"protectedItemsCount\":650202313,\"protectedServersCount\":1013895282,\"diskCount\":9701584,\"usedDiskSpace\":46.7587407164006,\"availableDiskSpace\":83.77781923734668,\"refreshedAt\":\"2021-01-08T01:16:23Z\",\"azureProtectedInstances\":139567391}}") - .toObject(AzureBackupServerEngine.class); - Assertions.assertEquals("w", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); - Assertions.assertEquals("ujtmvcopexcmjurb", model.registrationStatus()); - Assertions.assertEquals("hlkyqltqsrog", model.backupEngineState()); - Assertions.assertEquals("wkffdjkt", model.healthStatus()); - Assertions.assertEquals(false, model.canReRegister()); - Assertions.assertEquals("dfvclglxnfu", model.backupEngineId()); - Assertions.assertEquals("tkbu", model.dpmVersion()); - Assertions.assertEquals("ogsf", model.azureBackupAgentVersion()); - Assertions.assertEquals(true, model.isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(false, model.isDpmUpgradeAvailable()); - Assertions.assertEquals("sharujtj", model.extendedInfo().databaseName()); - Assertions.assertEquals(650202313, model.extendedInfo().protectedItemsCount()); - Assertions.assertEquals(1013895282, model.extendedInfo().protectedServersCount()); - Assertions.assertEquals(9701584, model.extendedInfo().diskCount()); - Assertions.assertEquals(46.7587407164006D, model.extendedInfo().usedDiskSpace()); - Assertions.assertEquals(83.77781923734668D, model.extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-08T01:16:23Z"), model.extendedInfo().refreshedAt()); - Assertions.assertEquals(139567391, model.extendedInfo().azureProtectedInstances()); - } - - @Test - public void testSerialize() { - AzureBackupServerEngine model = - new AzureBackupServerEngine() - .withFriendlyName("w") - .withBackupManagementType(BackupManagementType.AZURE_BACKUP_SERVER) - .withRegistrationStatus("ujtmvcopexcmjurb") - .withBackupEngineState("hlkyqltqsrog") - .withHealthStatus("wkffdjkt") - .withCanReRegister(false) - .withBackupEngineId("dfvclglxnfu") - .withDpmVersion("tkbu") - .withAzureBackupAgentVersion("ogsf") - .withIsAzureBackupAgentUpgradeAvailable(true) - .withIsDpmUpgradeAvailable(false) - .withExtendedInfo( - new BackupEngineExtendedInfo() - .withDatabaseName("sharujtj") - .withProtectedItemsCount(650202313) - .withProtectedServersCount(1013895282) - .withDiskCount(9701584) - .withUsedDiskSpace(46.7587407164006D) - .withAvailableDiskSpace(83.77781923734668D) - .withRefreshedAt(OffsetDateTime.parse("2021-01-08T01:16:23Z")) - .withAzureProtectedInstances(139567391)); - model = BinaryData.fromObject(model).toObject(AzureBackupServerEngine.class); - Assertions.assertEquals("w", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); - Assertions.assertEquals("ujtmvcopexcmjurb", model.registrationStatus()); - Assertions.assertEquals("hlkyqltqsrog", model.backupEngineState()); - Assertions.assertEquals("wkffdjkt", model.healthStatus()); - Assertions.assertEquals(false, model.canReRegister()); - Assertions.assertEquals("dfvclglxnfu", model.backupEngineId()); - Assertions.assertEquals("tkbu", model.dpmVersion()); - Assertions.assertEquals("ogsf", model.azureBackupAgentVersion()); - Assertions.assertEquals(true, model.isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(false, model.isDpmUpgradeAvailable()); - Assertions.assertEquals("sharujtj", model.extendedInfo().databaseName()); - Assertions.assertEquals(650202313, model.extendedInfo().protectedItemsCount()); - Assertions.assertEquals(1013895282, model.extendedInfo().protectedServersCount()); - Assertions.assertEquals(9701584, model.extendedInfo().diskCount()); - Assertions.assertEquals(46.7587407164006D, model.extendedInfo().usedDiskSpace()); - Assertions.assertEquals(83.77781923734668D, model.extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-08T01:16:23Z"), model.extendedInfo().refreshedAt()); - Assertions.assertEquals(139567391, 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 deleted file mode 100644 index 19c6535089f74..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareBackupRequestTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareBackupRequest; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureFileShareBackupRequestTests { - @Test - public void testDeserialize() { - AzureFileShareBackupRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureFileShareBackupRequest\",\"recoveryPointExpiryTimeInUTC\":\"2021-07-09T12:00:41Z\"}") - .toObject(AzureFileShareBackupRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-09T12:00:41Z"), model.recoveryPointExpiryTimeInUtc()); - } - - @Test - public void testSerialize() { - AzureFileShareBackupRequest model = - new AzureFileShareBackupRequest() - .withRecoveryPointExpiryTimeInUtc(OffsetDateTime.parse("2021-07-09T12:00:41Z")); - model = BinaryData.fromObject(model).toObject(AzureFileShareBackupRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-09T12:00:41Z"), 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 deleted file mode 100644 index 9f3f4a5ea46f4..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareProtectableItemTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// 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.AzureFileShareProtectableItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureFileShareProtectableItemTests { - @Test - public void testDeserialize() { - AzureFileShareProtectableItem model = - BinaryData - .fromString( - "{\"protectableItemType\":\"AzureFileShare\",\"parentContainerFabricId\":\"uygb\",\"parentContainerFriendlyName\":\"qqekewvnqvcdlgu\",\"azureFileShareType\":\"XSMB\",\"backupManagementType\":\"f\",\"workloadType\":\"wnlaxpu\",\"friendlyName\":\"qikczvvita\",\"protectionState\":\"Protecting\"}") - .toObject(AzureFileShareProtectableItem.class); - Assertions.assertEquals("f", model.backupManagementType()); - Assertions.assertEquals("wnlaxpu", model.workloadType()); - Assertions.assertEquals("qikczvvita", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - Assertions.assertEquals("uygb", model.parentContainerFabricId()); - Assertions.assertEquals("qqekewvnqvcdlgu", model.parentContainerFriendlyName()); - Assertions.assertEquals(AzureFileShareType.XSMB, model.azureFileShareType()); - } - - @Test - public void testSerialize() { - AzureFileShareProtectableItem model = - new AzureFileShareProtectableItem() - .withBackupManagementType("f") - .withWorkloadType("wnlaxpu") - .withFriendlyName("qikczvvita") - .withProtectionState(ProtectionStatus.PROTECTING) - .withParentContainerFabricId("uygb") - .withParentContainerFriendlyName("qqekewvnqvcdlgu") - .withAzureFileShareType(AzureFileShareType.XSMB); - model = BinaryData.fromObject(model).toObject(AzureFileShareProtectableItem.class); - Assertions.assertEquals("f", model.backupManagementType()); - Assertions.assertEquals("wnlaxpu", model.workloadType()); - Assertions.assertEquals("qikczvvita", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - Assertions.assertEquals("uygb", model.parentContainerFabricId()); - Assertions.assertEquals("qqekewvnqvcdlgu", 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 deleted file mode 100644 index 3e40b909cef06..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareProtectionPolicyTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareProtectionPolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionPolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.SchedulePolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureFileShareProtectionPolicyTests { - @Test - public void testDeserialize() { - AzureFileShareProtectionPolicy model = - BinaryData - .fromString( - "{\"backupManagementType\":\"AzureStorage\",\"workLoadType\":\"SQLDB\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"timeZone\":\"qjfsmlmbtxhw\",\"protectedItemsCount\":849596082,\"resourceGuardOperationRequests\":[\"tawc\",\"ezbrhubskh\",\"dyg\"]}") - .toObject(AzureFileShareProtectionPolicy.class); - Assertions.assertEquals(849596082, model.protectedItemsCount()); - Assertions.assertEquals("tawc", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(WorkloadType.SQLDB, model.workLoadType()); - Assertions.assertEquals("qjfsmlmbtxhw", model.timeZone()); - } - - @Test - public void testSerialize() { - AzureFileShareProtectionPolicy model = - new AzureFileShareProtectionPolicy() - .withProtectedItemsCount(849596082) - .withResourceGuardOperationRequests(Arrays.asList("tawc", "ezbrhubskh", "dyg")) - .withWorkLoadType(WorkloadType.SQLDB) - .withSchedulePolicy(new SchedulePolicy()) - .withRetentionPolicy(new RetentionPolicy()) - .withTimeZone("qjfsmlmbtxhw"); - model = BinaryData.fromObject(model).toObject(AzureFileShareProtectionPolicy.class); - Assertions.assertEquals(849596082, model.protectedItemsCount()); - Assertions.assertEquals("tawc", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(WorkloadType.SQLDB, model.workLoadType()); - Assertions.assertEquals("qjfsmlmbtxhw", 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 deleted file mode 100644 index 22fe37fba274a..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareProvisionIlrRequestTests.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.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareProvisionIlrRequest; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureFileShareProvisionIlrRequestTests { - @Test - public void testDeserialize() { - AzureFileShareProvisionIlrRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureFileShareProvisionILRRequest\",\"recoveryPointId\":\"fcsserxhtvsox\",\"sourceResourceId\":\"wntsjgqrsxy\"}") - .toObject(AzureFileShareProvisionIlrRequest.class); - Assertions.assertEquals("fcsserxhtvsox", model.recoveryPointId()); - Assertions.assertEquals("wntsjgqrsxy", model.sourceResourceId()); - } - - @Test - public void testSerialize() { - AzureFileShareProvisionIlrRequest model = - new AzureFileShareProvisionIlrRequest() - .withRecoveryPointId("fcsserxhtvsox") - .withSourceResourceId("wntsjgqrsxy"); - model = BinaryData.fromObject(model).toObject(AzureFileShareProvisionIlrRequest.class); - Assertions.assertEquals("fcsserxhtvsox", model.recoveryPointId()); - Assertions.assertEquals("wntsjgqrsxy", 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 deleted file mode 100644 index c96f45ee98162..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareRecoveryPointTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareRecoveryPoint; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureFileShareRecoveryPointTests { - @Test - public void testDeserialize() { - AzureFileShareRecoveryPoint model = - BinaryData - .fromString( - "{\"objectType\":\"AzureFileShareRecoveryPoint\",\"recoveryPointType\":\"ceacvlhvygdy\",\"recoveryPointTime\":\"2021-04-02T04:25:09Z\",\"fileShareSnapshotUri\":\"rtwnawjslbi\",\"recoveryPointSizeInGB\":1632414232}") - .toObject(AzureFileShareRecoveryPoint.class); - Assertions.assertEquals("ceacvlhvygdy", model.recoveryPointType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-02T04:25:09Z"), model.recoveryPointTime()); - Assertions.assertEquals("rtwnawjslbi", model.fileShareSnapshotUri()); - Assertions.assertEquals(1632414232, model.recoveryPointSizeInGB()); - } - - @Test - public void testSerialize() { - AzureFileShareRecoveryPoint model = - new AzureFileShareRecoveryPoint() - .withRecoveryPointType("ceacvlhvygdy") - .withRecoveryPointTime(OffsetDateTime.parse("2021-04-02T04:25:09Z")) - .withFileShareSnapshotUri("rtwnawjslbi") - .withRecoveryPointSizeInGB(1632414232); - model = BinaryData.fromObject(model).toObject(AzureFileShareRecoveryPoint.class); - Assertions.assertEquals("ceacvlhvygdy", model.recoveryPointType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-02T04:25:09Z"), model.recoveryPointTime()); - Assertions.assertEquals("rtwnawjslbi", model.fileShareSnapshotUri()); - Assertions.assertEquals(1632414232, model.recoveryPointSizeInGB()); - } -} 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 deleted file mode 100644 index 309553f444916..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileShareRestoreRequestTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileShareRestoreRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.CopyOptions; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryType; -import com.azure.resourcemanager.recoveryservicesbackup.models.RestoreFileSpecs; -import com.azure.resourcemanager.recoveryservicesbackup.models.RestoreRequestType; -import com.azure.resourcemanager.recoveryservicesbackup.models.TargetAfsRestoreInfo; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureFileShareRestoreRequestTests { - @Test - public void testDeserialize() { - AzureFileShareRestoreRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureFileShareRestoreRequest\",\"recoveryType\":\"AlternateLocation\",\"sourceResourceId\":\"yztsfmz\",\"copyOptions\":\"Invalid\",\"restoreRequestType\":\"ItemLevelRestore\",\"restoreFileSpecs\":[{\"path\":\"hqnrn\",\"fileSpecType\":\"x\",\"targetFolderPath\":\"uwrykqgaifmvikl\"},{\"path\":\"dvk\",\"fileSpecType\":\"ejd\",\"targetFolderPath\":\"xcv\"},{\"path\":\"rhnj\",\"fileSpecType\":\"olvtnovqfzge\",\"targetFolderPath\":\"dftuljltduce\"}],\"targetDetails\":{\"name\":\"mczuo\",\"targetResourceId\":\"jw\"}}") - .toObject(AzureFileShareRestoreRequest.class); - Assertions.assertEquals(RecoveryType.ALTERNATE_LOCATION, model.recoveryType()); - Assertions.assertEquals("yztsfmz", model.sourceResourceId()); - Assertions.assertEquals(CopyOptions.INVALID, model.copyOptions()); - Assertions.assertEquals(RestoreRequestType.ITEM_LEVEL_RESTORE, model.restoreRequestType()); - Assertions.assertEquals("hqnrn", model.restoreFileSpecs().get(0).path()); - Assertions.assertEquals("x", model.restoreFileSpecs().get(0).fileSpecType()); - Assertions.assertEquals("uwrykqgaifmvikl", model.restoreFileSpecs().get(0).targetFolderPath()); - Assertions.assertEquals("mczuo", model.targetDetails().name()); - Assertions.assertEquals("jw", model.targetDetails().targetResourceId()); - } - - @Test - public void testSerialize() { - AzureFileShareRestoreRequest model = - new AzureFileShareRestoreRequest() - .withRecoveryType(RecoveryType.ALTERNATE_LOCATION) - .withSourceResourceId("yztsfmz") - .withCopyOptions(CopyOptions.INVALID) - .withRestoreRequestType(RestoreRequestType.ITEM_LEVEL_RESTORE) - .withRestoreFileSpecs( - Arrays - .asList( - new RestoreFileSpecs() - .withPath("hqnrn") - .withFileSpecType("x") - .withTargetFolderPath("uwrykqgaifmvikl"), - new RestoreFileSpecs().withPath("dvk").withFileSpecType("ejd").withTargetFolderPath("xcv"), - new RestoreFileSpecs() - .withPath("rhnj") - .withFileSpecType("olvtnovqfzge") - .withTargetFolderPath("dftuljltduce"))) - .withTargetDetails(new TargetAfsRestoreInfo().withName("mczuo").withTargetResourceId("jw")); - model = BinaryData.fromObject(model).toObject(AzureFileShareRestoreRequest.class); - Assertions.assertEquals(RecoveryType.ALTERNATE_LOCATION, model.recoveryType()); - Assertions.assertEquals("yztsfmz", model.sourceResourceId()); - Assertions.assertEquals(CopyOptions.INVALID, model.copyOptions()); - Assertions.assertEquals(RestoreRequestType.ITEM_LEVEL_RESTORE, model.restoreRequestType()); - Assertions.assertEquals("hqnrn", model.restoreFileSpecs().get(0).path()); - Assertions.assertEquals("x", model.restoreFileSpecs().get(0).fileSpecType()); - Assertions.assertEquals("uwrykqgaifmvikl", model.restoreFileSpecs().get(0).targetFolderPath()); - Assertions.assertEquals("mczuo", model.targetDetails().name()); - Assertions.assertEquals("jw", 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 deleted file mode 100644 index 4a4bc8ff70f0c..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileshareProtectedItemExtendedInfoTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileshareProtectedItemExtendedInfo; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureFileshareProtectedItemExtendedInfoTests { - @Test - public void testDeserialize() { - AzureFileshareProtectedItemExtendedInfo model = - BinaryData - .fromString( - "{\"oldestRecoveryPoint\":\"2021-05-13T12:50:34Z\",\"recoveryPointCount\":613728557,\"policyState\":\"vfoimwksli\",\"resourceState\":\"izjx\",\"resourceStateSyncTime\":\"2021-01-08T09:26:16Z\"}") - .toObject(AzureFileshareProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-13T12:50:34Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(613728557, model.recoveryPointCount()); - Assertions.assertEquals("vfoimwksli", model.policyState()); - } - - @Test - public void testSerialize() { - AzureFileshareProtectedItemExtendedInfo model = - new AzureFileshareProtectedItemExtendedInfo() - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-05-13T12:50:34Z")) - .withRecoveryPointCount(613728557) - .withPolicyState("vfoimwksli"); - model = BinaryData.fromObject(model).toObject(AzureFileshareProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-13T12:50:34Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(613728557, model.recoveryPointCount()); - Assertions.assertEquals("vfoimwksli", model.policyState()); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileshareProtectedItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileshareProtectedItemTests.java deleted file mode 100644 index 6ecda6c3ae30b..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureFileshareProtectedItemTests.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileshareProtectedItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureFileshareProtectedItemExtendedInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.KpiResourceHealthDetails; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionState; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceHealthStatus; -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; - -public final class AzureFileshareProtectedItemTests { - @Test - public void testDeserialize() { - AzureFileshareProtectedItem model = - BinaryData - .fromString( - "{\"protectedItemType\":\"AzureFileShareProtectedItem\",\"friendlyName\":\"xtqmieoxor\",\"protectionStatus\":\"ufhyaomtbgh\",\"protectionState\":\"ProtectionStopped\",\"lastBackupStatus\":\"rvk\",\"lastBackupTime\":\"2021-11-21T11:52:27Z\",\"kpisHealths\":{\"bibgjmfxumv\":{\"resourceHealthStatus\":\"TransientUnhealthy\",\"resourceHealthDetails\":[]},\"ovwxnbkfezzxsc\":{\"resourceHealthStatus\":\"PersistentDegraded\",\"resourceHealthDetails\":[]},\"g\":{\"resourceHealthStatus\":\"Invalid\",\"resourceHealthDetails\":[]},\"zbomvzzbtdcqvpni\":{\"resourceHealthStatus\":\"TransientDegraded\",\"resourceHealthDetails\":[]}},\"extendedInfo\":{\"oldestRecoveryPoint\":\"2021-07-28T02:37:45Z\",\"recoveryPointCount\":277819924,\"policyState\":\"wdsh\",\"resourceState\":\"snrbgyefrymsgao\",\"resourceStateSyncTime\":\"2020-12-25T11:28:29Z\"},\"backupManagementType\":\"AzureBackupServer\",\"workloadType\":\"VMwareVM\",\"containerName\":\"mrfhirctymox\",\"sourceResourceId\":\"tpipiwyczuhx\",\"policyId\":\"pqjlihhyusps\",\"lastRecoveryPoint\":\"2021-06-21T18:35:02Z\",\"backupSetName\":\"vlmfwdgzxulucv\",\"createMode\":\"Recover\",\"deferredDeleteTimeInUTC\":\"2021-10-14T22:40:57Z\",\"isScheduledForDeferredDelete\":false,\"deferredDeleteTimeRemaining\":\"zvxurisjnhny\",\"isDeferredDeleteScheduleUpcoming\":false,\"isRehydrate\":true,\"resourceGuardOperationRequests\":[\"gxmrhublwp\",\"esutrgjupauutpw\"],\"isArchiveEnabled\":true,\"policyName\":\"hej\",\"softDeleteRetentionPeriod\":248529956}") - .toObject(AzureFileshareProtectedItem.class); - Assertions.assertEquals("mrfhirctymox", model.containerName()); - Assertions.assertEquals("tpipiwyczuhx", model.sourceResourceId()); - Assertions.assertEquals("pqjlihhyusps", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T18:35:02Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("vlmfwdgzxulucv", model.backupSetName()); - Assertions.assertEquals(CreateMode.RECOVER, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-14T22:40:57Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("zvxurisjnhny", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(false, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(true, model.isRehydrate()); - Assertions.assertEquals("gxmrhublwp", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.isArchiveEnabled()); - Assertions.assertEquals("hej", model.policyName()); - Assertions.assertEquals(248529956, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("xtqmieoxor", model.friendlyName()); - Assertions.assertEquals("ufhyaomtbgh", model.protectionStatus()); - Assertions.assertEquals(ProtectionState.PROTECTION_STOPPED, model.protectionState()); - Assertions.assertEquals("rvk", model.lastBackupStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-21T11:52:27Z"), model.lastBackupTime()); - Assertions - .assertEquals( - ResourceHealthStatus.TRANSIENT_UNHEALTHY, - model.kpisHealths().get("bibgjmfxumv").resourceHealthStatus()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-07-28T02:37:45Z"), model.extendedInfo().oldestRecoveryPoint()); - Assertions.assertEquals(277819924, model.extendedInfo().recoveryPointCount()); - Assertions.assertEquals("wdsh", model.extendedInfo().policyState()); - } - - @Test - public void testSerialize() { - AzureFileshareProtectedItem model = - new AzureFileshareProtectedItem() - .withContainerName("mrfhirctymox") - .withSourceResourceId("tpipiwyczuhx") - .withPolicyId("pqjlihhyusps") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-06-21T18:35:02Z")) - .withBackupSetName("vlmfwdgzxulucv") - .withCreateMode(CreateMode.RECOVER) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-10-14T22:40:57Z")) - .withIsScheduledForDeferredDelete(false) - .withDeferredDeleteTimeRemaining("zvxurisjnhny") - .withIsDeferredDeleteScheduleUpcoming(false) - .withIsRehydrate(true) - .withResourceGuardOperationRequests(Arrays.asList("gxmrhublwp", "esutrgjupauutpw")) - .withIsArchiveEnabled(true) - .withPolicyName("hej") - .withSoftDeleteRetentionPeriod(248529956) - .withFriendlyName("xtqmieoxor") - .withProtectionStatus("ufhyaomtbgh") - .withProtectionState(ProtectionState.PROTECTION_STOPPED) - .withLastBackupStatus("rvk") - .withLastBackupTime(OffsetDateTime.parse("2021-11-21T11:52:27Z")) - .withKpisHealths( - mapOf( - "bibgjmfxumv", - new KpiResourceHealthDetails() - .withResourceHealthStatus(ResourceHealthStatus.TRANSIENT_UNHEALTHY) - .withResourceHealthDetails(Arrays.asList()), - "ovwxnbkfezzxsc", - new KpiResourceHealthDetails() - .withResourceHealthStatus(ResourceHealthStatus.PERSISTENT_DEGRADED) - .withResourceHealthDetails(Arrays.asList()), - "g", - new KpiResourceHealthDetails() - .withResourceHealthStatus(ResourceHealthStatus.INVALID) - .withResourceHealthDetails(Arrays.asList()), - "zbomvzzbtdcqvpni", - new KpiResourceHealthDetails() - .withResourceHealthStatus(ResourceHealthStatus.TRANSIENT_DEGRADED) - .withResourceHealthDetails(Arrays.asList()))) - .withExtendedInfo( - new AzureFileshareProtectedItemExtendedInfo() - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-07-28T02:37:45Z")) - .withRecoveryPointCount(277819924) - .withPolicyState("wdsh")); - model = BinaryData.fromObject(model).toObject(AzureFileshareProtectedItem.class); - Assertions.assertEquals("mrfhirctymox", model.containerName()); - Assertions.assertEquals("tpipiwyczuhx", model.sourceResourceId()); - Assertions.assertEquals("pqjlihhyusps", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T18:35:02Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("vlmfwdgzxulucv", model.backupSetName()); - Assertions.assertEquals(CreateMode.RECOVER, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-14T22:40:57Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("zvxurisjnhny", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(false, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(true, model.isRehydrate()); - Assertions.assertEquals("gxmrhublwp", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.isArchiveEnabled()); - Assertions.assertEquals("hej", model.policyName()); - Assertions.assertEquals(248529956, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("xtqmieoxor", model.friendlyName()); - Assertions.assertEquals("ufhyaomtbgh", model.protectionStatus()); - Assertions.assertEquals(ProtectionState.PROTECTION_STOPPED, model.protectionState()); - Assertions.assertEquals("rvk", model.lastBackupStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-21T11:52:27Z"), model.lastBackupTime()); - Assertions - .assertEquals( - ResourceHealthStatus.TRANSIENT_UNHEALTHY, - model.kpisHealths().get("bibgjmfxumv").resourceHealthStatus()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-07-28T02:37:45Z"), model.extendedInfo().oldestRecoveryPoint()); - Assertions.assertEquals(277819924, model.extendedInfo().recoveryPointCount()); - Assertions.assertEquals("wdsh", model.extendedInfo().policyState()); - } - - @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/AzureIaaSClassicComputeVMContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSClassicComputeVMContainerTests.java deleted file mode 100644 index 47516ef1d2a1d..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSClassicComputeVMContainerTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSClassicComputeVMContainer; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureIaaSClassicComputeVMContainerTests { - @Test - public void testDeserialize() { - AzureIaaSClassicComputeVMContainer model = - BinaryData - .fromString( - "{\"containerType\":\"Microsoft.ClassicCompute/virtualMachines\",\"virtualMachineId\":\"uuuybnchrsziz\",\"virtualMachineVersion\":\"uelyetndn\",\"resourceGroup\":\"qyggagfl\",\"friendlyName\":\"gm\",\"backupManagementType\":\"AzureSql\",\"registrationStatus\":\"hzjmucftbyrp\",\"healthStatus\":\"ohkpigqfu\",\"protectableObjectType\":\"ckzmkwklsnox\"}") - .toObject(AzureIaaSClassicComputeVMContainer.class); - Assertions.assertEquals("gm", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_SQL, model.backupManagementType()); - Assertions.assertEquals("hzjmucftbyrp", model.registrationStatus()); - Assertions.assertEquals("ohkpigqfu", model.healthStatus()); - Assertions.assertEquals("ckzmkwklsnox", model.protectableObjectType()); - Assertions.assertEquals("uuuybnchrsziz", model.virtualMachineId()); - Assertions.assertEquals("uelyetndn", model.virtualMachineVersion()); - Assertions.assertEquals("qyggagfl", model.resourceGroup()); - } - - @Test - public void testSerialize() { - AzureIaaSClassicComputeVMContainer model = - new AzureIaaSClassicComputeVMContainer() - .withFriendlyName("gm") - .withBackupManagementType(BackupManagementType.AZURE_SQL) - .withRegistrationStatus("hzjmucftbyrp") - .withHealthStatus("ohkpigqfu") - .withProtectableObjectType("ckzmkwklsnox") - .withVirtualMachineId("uuuybnchrsziz") - .withVirtualMachineVersion("uelyetndn") - .withResourceGroup("qyggagfl"); - model = BinaryData.fromObject(model).toObject(AzureIaaSClassicComputeVMContainer.class); - Assertions.assertEquals("gm", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_SQL, model.backupManagementType()); - Assertions.assertEquals("hzjmucftbyrp", model.registrationStatus()); - Assertions.assertEquals("ohkpigqfu", model.healthStatus()); - Assertions.assertEquals("ckzmkwklsnox", model.protectableObjectType()); - Assertions.assertEquals("uuuybnchrsziz", model.virtualMachineId()); - Assertions.assertEquals("uelyetndn", model.virtualMachineVersion()); - Assertions.assertEquals("qyggagfl", 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 deleted file mode 100644 index 65b2f9caca0c4..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSClassicComputeVMProtectableItemTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSClassicComputeVMProtectableItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureIaaSClassicComputeVMProtectableItemTests { - @Test - public void testDeserialize() { - AzureIaaSClassicComputeVMProtectableItem model = - BinaryData - .fromString( - "{\"protectableItemType\":\"Microsoft.ClassicCompute/virtualMachines\",\"virtualMachineId\":\"ddbhf\",\"virtualMachineVersion\":\"fpazjzoywjxhpd\",\"resourceGroup\":\"ontacnpq\",\"backupManagementType\":\"ehtuevrhr\",\"workloadType\":\"yoogw\",\"friendlyName\":\"nsduugwbsre\",\"protectionState\":\"Invalid\"}") - .toObject(AzureIaaSClassicComputeVMProtectableItem.class); - Assertions.assertEquals("ehtuevrhr", model.backupManagementType()); - Assertions.assertEquals("yoogw", model.workloadType()); - Assertions.assertEquals("nsduugwbsre", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.INVALID, model.protectionState()); - Assertions.assertEquals("ddbhf", model.virtualMachineId()); - Assertions.assertEquals("fpazjzoywjxhpd", model.virtualMachineVersion()); - Assertions.assertEquals("ontacnpq", model.resourceGroup()); - } - - @Test - public void testSerialize() { - AzureIaaSClassicComputeVMProtectableItem model = - new AzureIaaSClassicComputeVMProtectableItem() - .withBackupManagementType("ehtuevrhr") - .withWorkloadType("yoogw") - .withFriendlyName("nsduugwbsre") - .withProtectionState(ProtectionStatus.INVALID) - .withVirtualMachineId("ddbhf") - .withVirtualMachineVersion("fpazjzoywjxhpd") - .withResourceGroup("ontacnpq"); - model = BinaryData.fromObject(model).toObject(AzureIaaSClassicComputeVMProtectableItem.class); - Assertions.assertEquals("ehtuevrhr", model.backupManagementType()); - Assertions.assertEquals("yoogw", model.workloadType()); - Assertions.assertEquals("nsduugwbsre", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.INVALID, model.protectionState()); - Assertions.assertEquals("ddbhf", model.virtualMachineId()); - Assertions.assertEquals("fpazjzoywjxhpd", model.virtualMachineVersion()); - Assertions.assertEquals("ontacnpq", 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 deleted file mode 100644 index 0798ee4b46f3c..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSComputeVMContainerTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSComputeVMContainer; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureIaaSComputeVMContainerTests { - @Test - public void testDeserialize() { - AzureIaaSComputeVMContainer model = - BinaryData - .fromString( - "{\"containerType\":\"Microsoft.Compute/virtualMachines\",\"virtualMachineId\":\"vqecr\",\"virtualMachineVersion\":\"tmxxdtddmflhuy\",\"resourceGroup\":\"zv\",\"friendlyName\":\"napxbannovv\",\"backupManagementType\":\"AzureBackupServer\",\"registrationStatus\":\"ytprwnwvroev\",\"healthStatus\":\"lyokrrrou\",\"protectableObjectType\":\"vnsasbcrymodi\"}") - .toObject(AzureIaaSComputeVMContainer.class); - Assertions.assertEquals("napxbannovv", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); - Assertions.assertEquals("ytprwnwvroev", model.registrationStatus()); - Assertions.assertEquals("lyokrrrou", model.healthStatus()); - Assertions.assertEquals("vnsasbcrymodi", model.protectableObjectType()); - Assertions.assertEquals("vqecr", model.virtualMachineId()); - Assertions.assertEquals("tmxxdtddmflhuy", model.virtualMachineVersion()); - Assertions.assertEquals("zv", model.resourceGroup()); - } - - @Test - public void testSerialize() { - AzureIaaSComputeVMContainer model = - new AzureIaaSComputeVMContainer() - .withFriendlyName("napxbannovv") - .withBackupManagementType(BackupManagementType.AZURE_BACKUP_SERVER) - .withRegistrationStatus("ytprwnwvroev") - .withHealthStatus("lyokrrrou") - .withProtectableObjectType("vnsasbcrymodi") - .withVirtualMachineId("vqecr") - .withVirtualMachineVersion("tmxxdtddmflhuy") - .withResourceGroup("zv"); - model = BinaryData.fromObject(model).toObject(AzureIaaSComputeVMContainer.class); - Assertions.assertEquals("napxbannovv", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); - Assertions.assertEquals("ytprwnwvroev", model.registrationStatus()); - Assertions.assertEquals("lyokrrrou", model.healthStatus()); - Assertions.assertEquals("vnsasbcrymodi", model.protectableObjectType()); - Assertions.assertEquals("vqecr", model.virtualMachineId()); - Assertions.assertEquals("tmxxdtddmflhuy", model.virtualMachineVersion()); - Assertions.assertEquals("zv", 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 deleted file mode 100644 index bffcd0c68cc83..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSComputeVMProtectableItemTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSComputeVMProtectableItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureIaaSComputeVMProtectableItemTests { - @Test - public void testDeserialize() { - AzureIaaSComputeVMProtectableItem model = - BinaryData - .fromString( - "{\"protectableItemType\":\"Microsoft.Compute/virtualMachines\",\"virtualMachineId\":\"xkl\",\"virtualMachineVersion\":\"d\",\"resourceGroup\":\"azpmkmlmv\",\"backupManagementType\":\"f\",\"workloadType\":\"op\",\"friendlyName\":\"bzxliohrdddtfgxq\",\"protectionState\":\"NotProtected\"}") - .toObject(AzureIaaSComputeVMProtectableItem.class); - Assertions.assertEquals("f", model.backupManagementType()); - Assertions.assertEquals("op", model.workloadType()); - Assertions.assertEquals("bzxliohrdddtfgxq", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.protectionState()); - Assertions.assertEquals("xkl", model.virtualMachineId()); - Assertions.assertEquals("d", model.virtualMachineVersion()); - Assertions.assertEquals("azpmkmlmv", model.resourceGroup()); - } - - @Test - public void testSerialize() { - AzureIaaSComputeVMProtectableItem model = - new AzureIaaSComputeVMProtectableItem() - .withBackupManagementType("f") - .withWorkloadType("op") - .withFriendlyName("bzxliohrdddtfgxq") - .withProtectionState(ProtectionStatus.NOT_PROTECTED) - .withVirtualMachineId("xkl") - .withVirtualMachineVersion("d") - .withResourceGroup("azpmkmlmv"); - model = BinaryData.fromObject(model).toObject(AzureIaaSComputeVMProtectableItem.class); - Assertions.assertEquals("f", model.backupManagementType()); - Assertions.assertEquals("op", model.workloadType()); - Assertions.assertEquals("bzxliohrdddtfgxq", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.protectionState()); - Assertions.assertEquals("xkl", model.virtualMachineId()); - Assertions.assertEquals("d", model.virtualMachineVersion()); - Assertions.assertEquals("azpmkmlmv", 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 deleted file mode 100644 index 35d9a9c9b9487..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmJobExtendedInfoTests.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class AzureIaaSvmJobExtendedInfoTests { - @Test - public void testDeserialize() { - AzureIaaSvmJobExtendedInfo model = - BinaryData - .fromString( - "{\"tasksList\":[{\"taskId\":\"o\",\"startTime\":\"2021-04-13T05:15:14Z\",\"endTime\":\"2021-04-06T17:16:51Z\",\"instanceId\":\"lnorwmdu\",\"duration\":\"PT71H27M44S\",\"status\":\"lvxwmyg\",\"progressPercentage\":85.42979852196028,\"taskExecutionDetails\":\"qchiszep\"},{\"taskId\":\"bjcrxgibbdaxco\",\"startTime\":\"2021-10-04T20:43:47Z\",\"endTime\":\"2021-07-31T05:48:57Z\",\"instanceId\":\"orsukokwbqp\",\"duration\":\"PT35H17M35S\",\"status\":\"nuuepzlrp\",\"progressPercentage\":48.290012410423,\"taskExecutionDetails\":\"l\"},{\"taskId\":\"eyuqdunvmnnrwr\",\"startTime\":\"2021-12-03T17:34:52Z\",\"endTime\":\"2021-02-28T14:54:18Z\",\"instanceId\":\"lywjhh\",\"duration\":\"PT225H40M9S\",\"status\":\"xmsivfomiloxggdu\",\"progressPercentage\":1.7481186593642062,\"taskExecutionDetails\":\"ieuzaofjchvcyyy\"},{\"taskId\":\"gdotcubiipuipwo\",\"startTime\":\"2021-03-07T12:16:32Z\",\"endTime\":\"2021-04-04T19:23Z\",\"instanceId\":\"jeknizshq\",\"duration\":\"PT1H34M18S\",\"status\":\"pevf\",\"progressPercentage\":1.5109676301886976,\"taskExecutionDetails\":\"rilbywdx\"}],\"propertyBag\":{\"fscjfnynszquji\":\"ccwr\"},\"internalPropertyBag\":{\"vutpthjoxo\":\"oqytibyowbblgy\",\"pi\":\"smsks\"},\"progressPercentage\":19.47377395997789,\"estimatedRemainingDuration\":\"jxkcgxxlxsff\",\"dynamicErrorMessage\":\"vizqzdwl\"}") - .toObject(AzureIaaSvmJobExtendedInfo.class); - Assertions.assertEquals("o", model.tasksList().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-13T05:15:14Z"), model.tasksList().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T17:16:51Z"), model.tasksList().get(0).endTime()); - Assertions.assertEquals("lnorwmdu", model.tasksList().get(0).instanceId()); - Assertions.assertEquals(Duration.parse("PT71H27M44S"), model.tasksList().get(0).duration()); - Assertions.assertEquals("lvxwmyg", model.tasksList().get(0).status()); - Assertions.assertEquals(85.42979852196028D, model.tasksList().get(0).progressPercentage()); - Assertions.assertEquals("qchiszep", model.tasksList().get(0).taskExecutionDetails()); - Assertions.assertEquals("ccwr", model.propertyBag().get("fscjfnynszquji")); - Assertions.assertEquals("oqytibyowbblgy", model.internalPropertyBag().get("vutpthjoxo")); - Assertions.assertEquals(19.47377395997789D, model.progressPercentage()); - Assertions.assertEquals("jxkcgxxlxsff", model.estimatedRemainingDuration()); - Assertions.assertEquals("vizqzdwl", model.dynamicErrorMessage()); - } - - @Test - public void testSerialize() { - AzureIaaSvmJobExtendedInfo model = - new AzureIaaSvmJobExtendedInfo() - .withTasksList( - Arrays - .asList( - new AzureIaaSvmJobTaskDetails() - .withTaskId("o") - .withStartTime(OffsetDateTime.parse("2021-04-13T05:15:14Z")) - .withEndTime(OffsetDateTime.parse("2021-04-06T17:16:51Z")) - .withInstanceId("lnorwmdu") - .withDuration(Duration.parse("PT71H27M44S")) - .withStatus("lvxwmyg") - .withProgressPercentage(85.42979852196028D) - .withTaskExecutionDetails("qchiszep"), - new AzureIaaSvmJobTaskDetails() - .withTaskId("bjcrxgibbdaxco") - .withStartTime(OffsetDateTime.parse("2021-10-04T20:43:47Z")) - .withEndTime(OffsetDateTime.parse("2021-07-31T05:48:57Z")) - .withInstanceId("orsukokwbqp") - .withDuration(Duration.parse("PT35H17M35S")) - .withStatus("nuuepzlrp") - .withProgressPercentage(48.290012410423D) - .withTaskExecutionDetails("l"), - new AzureIaaSvmJobTaskDetails() - .withTaskId("eyuqdunvmnnrwr") - .withStartTime(OffsetDateTime.parse("2021-12-03T17:34:52Z")) - .withEndTime(OffsetDateTime.parse("2021-02-28T14:54:18Z")) - .withInstanceId("lywjhh") - .withDuration(Duration.parse("PT225H40M9S")) - .withStatus("xmsivfomiloxggdu") - .withProgressPercentage(1.7481186593642062D) - .withTaskExecutionDetails("ieuzaofjchvcyyy"), - new AzureIaaSvmJobTaskDetails() - .withTaskId("gdotcubiipuipwo") - .withStartTime(OffsetDateTime.parse("2021-03-07T12:16:32Z")) - .withEndTime(OffsetDateTime.parse("2021-04-04T19:23Z")) - .withInstanceId("jeknizshq") - .withDuration(Duration.parse("PT1H34M18S")) - .withStatus("pevf") - .withProgressPercentage(1.5109676301886976D) - .withTaskExecutionDetails("rilbywdx"))) - .withPropertyBag(mapOf("fscjfnynszquji", "ccwr")) - .withInternalPropertyBag(mapOf("vutpthjoxo", "oqytibyowbblgy", "pi", "smsks")) - .withProgressPercentage(19.47377395997789D) - .withEstimatedRemainingDuration("jxkcgxxlxsff") - .withDynamicErrorMessage("vizqzdwl"); - model = BinaryData.fromObject(model).toObject(AzureIaaSvmJobExtendedInfo.class); - Assertions.assertEquals("o", model.tasksList().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-13T05:15:14Z"), model.tasksList().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T17:16:51Z"), model.tasksList().get(0).endTime()); - Assertions.assertEquals("lnorwmdu", model.tasksList().get(0).instanceId()); - Assertions.assertEquals(Duration.parse("PT71H27M44S"), model.tasksList().get(0).duration()); - Assertions.assertEquals("lvxwmyg", model.tasksList().get(0).status()); - Assertions.assertEquals(85.42979852196028D, model.tasksList().get(0).progressPercentage()); - Assertions.assertEquals("qchiszep", model.tasksList().get(0).taskExecutionDetails()); - Assertions.assertEquals("ccwr", model.propertyBag().get("fscjfnynszquji")); - Assertions.assertEquals("oqytibyowbblgy", model.internalPropertyBag().get("vutpthjoxo")); - Assertions.assertEquals(19.47377395997789D, model.progressPercentage()); - Assertions.assertEquals("jxkcgxxlxsff", model.estimatedRemainingDuration()); - Assertions.assertEquals("vizqzdwl", model.dynamicErrorMessage()); - } - - @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/AzureIaaSvmJobTaskDetailsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmJobTaskDetailsTests.java deleted file mode 100644 index c52dcb485ab17..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmJobTaskDetailsTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmJobTaskDetails; -import java.time.Duration; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureIaaSvmJobTaskDetailsTests { - @Test - public void testDeserialize() { - AzureIaaSvmJobTaskDetails model = - BinaryData - .fromString( - "{\"taskId\":\"lyoupfgfbkju\",\"startTime\":\"2021-04-30T06:19:59Z\",\"endTime\":\"2021-05-02T14:41:51Z\",\"instanceId\":\"fminsgowzf\",\"duration\":\"PT64H45M57S\",\"status\":\"t\",\"progressPercentage\":21.873740552777832,\"taskExecutionDetails\":\"bqactxtgzukx\"}") - .toObject(AzureIaaSvmJobTaskDetails.class); - Assertions.assertEquals("lyoupfgfbkju", model.taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-30T06:19:59Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-02T14:41:51Z"), model.endTime()); - Assertions.assertEquals("fminsgowzf", model.instanceId()); - Assertions.assertEquals(Duration.parse("PT64H45M57S"), model.duration()); - Assertions.assertEquals("t", model.status()); - Assertions.assertEquals(21.873740552777832D, model.progressPercentage()); - Assertions.assertEquals("bqactxtgzukx", model.taskExecutionDetails()); - } - - @Test - public void testSerialize() { - AzureIaaSvmJobTaskDetails model = - new AzureIaaSvmJobTaskDetails() - .withTaskId("lyoupfgfbkju") - .withStartTime(OffsetDateTime.parse("2021-04-30T06:19:59Z")) - .withEndTime(OffsetDateTime.parse("2021-05-02T14:41:51Z")) - .withInstanceId("fminsgowzf") - .withDuration(Duration.parse("PT64H45M57S")) - .withStatus("t") - .withProgressPercentage(21.873740552777832D) - .withTaskExecutionDetails("bqactxtgzukx"); - model = BinaryData.fromObject(model).toObject(AzureIaaSvmJobTaskDetails.class); - Assertions.assertEquals("lyoupfgfbkju", model.taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-30T06:19:59Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-02T14:41:51Z"), model.endTime()); - Assertions.assertEquals("fminsgowzf", model.instanceId()); - Assertions.assertEquals(Duration.parse("PT64H45M57S"), model.duration()); - Assertions.assertEquals("t", model.status()); - Assertions.assertEquals(21.873740552777832D, model.progressPercentage()); - Assertions.assertEquals("bqactxtgzukx", 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 deleted file mode 100644 index fe2d41faeb112..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmProtectedItemExtendedInfoTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmProtectedItemExtendedInfo; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureIaaSvmProtectedItemExtendedInfoTests { - @Test - public void testDeserialize() { - AzureIaaSvmProtectedItemExtendedInfo model = - BinaryData - .fromString( - "{\"oldestRecoveryPoint\":\"2021-05-27T13:13:34Z\",\"oldestRecoveryPointInVault\":\"2021-10-18T14:47:31Z\",\"oldestRecoveryPointInArchive\":\"2021-11-19T12:22:46Z\",\"newestRecoveryPointInArchive\":\"2021-03-21T00:50:35Z\",\"recoveryPointCount\":390337220,\"policyInconsistent\":false}") - .toObject(AzureIaaSvmProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-27T13:13:34Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T14:47:31Z"), model.oldestRecoveryPointInVault()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-19T12:22:46Z"), model.oldestRecoveryPointInArchive()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-21T00:50:35Z"), model.newestRecoveryPointInArchive()); - Assertions.assertEquals(390337220, model.recoveryPointCount()); - Assertions.assertEquals(false, model.policyInconsistent()); - } - - @Test - public void testSerialize() { - AzureIaaSvmProtectedItemExtendedInfo model = - new AzureIaaSvmProtectedItemExtendedInfo() - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-05-27T13:13:34Z")) - .withOldestRecoveryPointInVault(OffsetDateTime.parse("2021-10-18T14:47:31Z")) - .withOldestRecoveryPointInArchive(OffsetDateTime.parse("2021-11-19T12:22:46Z")) - .withNewestRecoveryPointInArchive(OffsetDateTime.parse("2021-03-21T00:50:35Z")) - .withRecoveryPointCount(390337220) - .withPolicyInconsistent(false); - model = BinaryData.fromObject(model).toObject(AzureIaaSvmProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-27T13:13:34Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T14:47:31Z"), model.oldestRecoveryPointInVault()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-19T12:22:46Z"), model.oldestRecoveryPointInArchive()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-21T00:50:35Z"), model.newestRecoveryPointInArchive()); - Assertions.assertEquals(390337220, model.recoveryPointCount()); - Assertions.assertEquals(false, 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 deleted file mode 100644 index c5cfe50438dd6..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureIaaSvmProtectionPolicyTests.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSvmProtectionPolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.IaasvmPolicyType; -import com.azure.resourcemanager.recoveryservicesbackup.models.InstantRPAdditionalDetails; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDurationType; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionPolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.SchedulePolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.TieringMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.TieringPolicy; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureIaaSvmProtectionPolicyTests { - @Test - public void testDeserialize() { - AzureIaaSvmProtectionPolicy model = - BinaryData - .fromString( - "{\"backupManagementType\":\"AzureIaasVM\",\"instantRPDetails\":{\"azureBackupRGNamePrefix\":\"k\",\"azureBackupRGNameSuffix\":\"zfvazi\"},\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{\"lkatnwxyiopidkqq\":{\"tieringMode\":\"TierRecommended\",\"duration\":1411328763,\"durationType\":\"Years\"},\"kdmligovi\":{\"tieringMode\":\"DoNotTier\",\"duration\":113648851,\"durationType\":\"Weeks\"},\"oaz\":{\"tieringMode\":\"Invalid\",\"duration\":610794804,\"durationType\":\"Days\"},\"oorb\":{\"tieringMode\":\"Invalid\",\"duration\":1388266960,\"durationType\":\"Years\"}},\"instantRpRetentionRangeInDays\":1028878744,\"timeZone\":\"bfhjxakvvjgsl\",\"policyType\":\"Invalid\",\"protectedItemsCount\":1486233885,\"resourceGuardOperationRequests\":[\"wwtkg\"]}") - .toObject(AzureIaaSvmProtectionPolicy.class); - Assertions.assertEquals(1486233885, model.protectedItemsCount()); - Assertions.assertEquals("wwtkg", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("k", model.instantRPDetails().azureBackupRGNamePrefix()); - Assertions.assertEquals("zfvazi", model.instantRPDetails().azureBackupRGNameSuffix()); - Assertions - .assertEquals(TieringMode.TIER_RECOMMENDED, model.tieringPolicy().get("lkatnwxyiopidkqq").tieringMode()); - Assertions.assertEquals(1411328763, model.tieringPolicy().get("lkatnwxyiopidkqq").duration()); - Assertions - .assertEquals(RetentionDurationType.YEARS, model.tieringPolicy().get("lkatnwxyiopidkqq").durationType()); - Assertions.assertEquals(1028878744, model.instantRpRetentionRangeInDays()); - Assertions.assertEquals("bfhjxakvvjgsl", model.timeZone()); - Assertions.assertEquals(IaasvmPolicyType.INVALID, model.policyType()); - } - - @Test - public void testSerialize() { - AzureIaaSvmProtectionPolicy model = - new AzureIaaSvmProtectionPolicy() - .withProtectedItemsCount(1486233885) - .withResourceGuardOperationRequests(Arrays.asList("wwtkg")) - .withInstantRPDetails( - new InstantRPAdditionalDetails() - .withAzureBackupRGNamePrefix("k") - .withAzureBackupRGNameSuffix("zfvazi")) - .withSchedulePolicy(new SchedulePolicy()) - .withRetentionPolicy(new RetentionPolicy()) - .withTieringPolicy( - mapOf( - "lkatnwxyiopidkqq", - new TieringPolicy() - .withTieringMode(TieringMode.TIER_RECOMMENDED) - .withDuration(1411328763) - .withDurationType(RetentionDurationType.YEARS), - "kdmligovi", - new TieringPolicy() - .withTieringMode(TieringMode.DO_NOT_TIER) - .withDuration(113648851) - .withDurationType(RetentionDurationType.WEEKS), - "oaz", - new TieringPolicy() - .withTieringMode(TieringMode.INVALID) - .withDuration(610794804) - .withDurationType(RetentionDurationType.DAYS), - "oorb", - new TieringPolicy() - .withTieringMode(TieringMode.INVALID) - .withDuration(1388266960) - .withDurationType(RetentionDurationType.YEARS))) - .withInstantRpRetentionRangeInDays(1028878744) - .withTimeZone("bfhjxakvvjgsl") - .withPolicyType(IaasvmPolicyType.INVALID); - model = BinaryData.fromObject(model).toObject(AzureIaaSvmProtectionPolicy.class); - Assertions.assertEquals(1486233885, model.protectedItemsCount()); - Assertions.assertEquals("wwtkg", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("k", model.instantRPDetails().azureBackupRGNamePrefix()); - Assertions.assertEquals("zfvazi", model.instantRPDetails().azureBackupRGNameSuffix()); - Assertions - .assertEquals(TieringMode.TIER_RECOMMENDED, model.tieringPolicy().get("lkatnwxyiopidkqq").tieringMode()); - Assertions.assertEquals(1411328763, model.tieringPolicy().get("lkatnwxyiopidkqq").duration()); - Assertions - .assertEquals(RetentionDurationType.YEARS, model.tieringPolicy().get("lkatnwxyiopidkqq").durationType()); - Assertions.assertEquals(1028878744, model.instantRpRetentionRangeInDays()); - Assertions.assertEquals("bfhjxakvvjgsl", model.timeZone()); - Assertions.assertEquals(IaasvmPolicyType.INVALID, model.policyType()); - } - - @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/AzureRecoveryServiceVaultProtectionIntentTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureRecoveryServiceVaultProtectionIntentTests.java deleted file mode 100644 index 975b9718b09a2..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureRecoveryServiceVaultProtectionIntentTests.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.AzureRecoveryServiceVaultProtectionIntent; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureRecoveryServiceVaultProtectionIntentTests { - @Test - public void testDeserialize() { - AzureRecoveryServiceVaultProtectionIntent model = - BinaryData - .fromString( - "{\"protectionIntentItemType\":\"RecoveryServiceVaultItem\",\"backupManagementType\":\"AzureStorage\",\"sourceResourceId\":\"gxhnpomyqwcabv\",\"itemId\":\"ilee\",\"policyId\":\"swlpaugmrmfj\",\"protectionState\":\"Protecting\"}") - .toObject(AzureRecoveryServiceVaultProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.AZURE_STORAGE, model.backupManagementType()); - Assertions.assertEquals("gxhnpomyqwcabv", model.sourceResourceId()); - Assertions.assertEquals("ilee", model.itemId()); - Assertions.assertEquals("swlpaugmrmfj", model.policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - } - - @Test - public void testSerialize() { - AzureRecoveryServiceVaultProtectionIntent model = - new AzureRecoveryServiceVaultProtectionIntent() - .withBackupManagementType(BackupManagementType.AZURE_STORAGE) - .withSourceResourceId("gxhnpomyqwcabv") - .withItemId("ilee") - .withPolicyId("swlpaugmrmfj") - .withProtectionState(ProtectionStatus.PROTECTING); - model = BinaryData.fromObject(model).toObject(AzureRecoveryServiceVaultProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.AZURE_STORAGE, model.backupManagementType()); - Assertions.assertEquals("gxhnpomyqwcabv", model.sourceResourceId()); - Assertions.assertEquals("ilee", model.itemId()); - Assertions.assertEquals("swlpaugmrmfj", model.policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, 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 deleted file mode 100644 index 84badb67dcf1b..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureResourceProtectionIntentTests.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.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureResourceProtectionIntent; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureResourceProtectionIntentTests { - @Test - public void testDeserialize() { - AzureResourceProtectionIntent model = - BinaryData - .fromString( - "{\"protectionIntentItemType\":\"AzureResourceItem\",\"friendlyName\":\"toaukhfkvcisiz\",\"backupManagementType\":\"AzureSql\",\"sourceResourceId\":\"dsxjwuivedw\",\"itemId\":\"yeew\",\"policyId\":\"iqbps\",\"protectionState\":\"NotProtected\"}") - .toObject(AzureResourceProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.AZURE_SQL, model.backupManagementType()); - Assertions.assertEquals("dsxjwuivedw", model.sourceResourceId()); - Assertions.assertEquals("yeew", model.itemId()); - Assertions.assertEquals("iqbps", model.policyId()); - Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.protectionState()); - Assertions.assertEquals("toaukhfkvcisiz", model.friendlyName()); - } - - @Test - public void testSerialize() { - AzureResourceProtectionIntent model = - new AzureResourceProtectionIntent() - .withBackupManagementType(BackupManagementType.AZURE_SQL) - .withSourceResourceId("dsxjwuivedw") - .withItemId("yeew") - .withPolicyId("iqbps") - .withProtectionState(ProtectionStatus.NOT_PROTECTED) - .withFriendlyName("toaukhfkvcisiz"); - model = BinaryData.fromObject(model).toObject(AzureResourceProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.AZURE_SQL, model.backupManagementType()); - Assertions.assertEquals("dsxjwuivedw", model.sourceResourceId()); - Assertions.assertEquals("yeew", model.itemId()); - Assertions.assertEquals("iqbps", model.policyId()); - Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.protectionState()); - Assertions.assertEquals("toaukhfkvcisiz", 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 deleted file mode 100644 index 5401dde6fe510..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlContainerTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlContainer; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureSqlContainerTests { - @Test - public void testDeserialize() { - AzureSqlContainer model = - BinaryData - .fromString( - "{\"containerType\":\"AzureSqlContainer\",\"friendlyName\":\"fdpyflubh\",\"backupManagementType\":\"AzureIaasVM\",\"registrationStatus\":\"r\",\"healthStatus\":\"uyzlw\",\"protectableObjectType\":\"memhooclutnpq\"}") - .toObject(AzureSqlContainer.class); - Assertions.assertEquals("fdpyflubh", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.backupManagementType()); - Assertions.assertEquals("r", model.registrationStatus()); - Assertions.assertEquals("uyzlw", model.healthStatus()); - Assertions.assertEquals("memhooclutnpq", model.protectableObjectType()); - } - - @Test - public void testSerialize() { - AzureSqlContainer model = - new AzureSqlContainer() - .withFriendlyName("fdpyflubh") - .withBackupManagementType(BackupManagementType.AZURE_IAAS_VM) - .withRegistrationStatus("r") - .withHealthStatus("uyzlw") - .withProtectableObjectType("memhooclutnpq"); - model = BinaryData.fromObject(model).toObject(AzureSqlContainer.class); - Assertions.assertEquals("fdpyflubh", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.backupManagementType()); - Assertions.assertEquals("r", model.registrationStatus()); - Assertions.assertEquals("uyzlw", model.healthStatus()); - Assertions.assertEquals("memhooclutnpq", 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 deleted file mode 100644 index b1de8e805150e..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlProtectedItemExtendedInfoTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlProtectedItemExtendedInfo; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureSqlProtectedItemExtendedInfoTests { - @Test - public void testDeserialize() { - AzureSqlProtectedItemExtendedInfo model = - BinaryData - .fromString( - "{\"oldestRecoveryPoint\":\"2021-07-24T05:54:49Z\",\"recoveryPointCount\":309058376,\"policyState\":\"fhoqca\"}") - .toObject(AzureSqlProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-24T05:54:49Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(309058376, model.recoveryPointCount()); - Assertions.assertEquals("fhoqca", model.policyState()); - } - - @Test - public void testSerialize() { - AzureSqlProtectedItemExtendedInfo model = - new AzureSqlProtectedItemExtendedInfo() - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-07-24T05:54:49Z")) - .withRecoveryPointCount(309058376) - .withPolicyState("fhoqca"); - model = BinaryData.fromObject(model).toObject(AzureSqlProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-24T05:54:49Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(309058376, model.recoveryPointCount()); - Assertions.assertEquals("fhoqca", 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 deleted file mode 100644 index bcc6fc06c781e..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlProtectedItemTests.java +++ /dev/null @@ -1,97 +0,0 @@ -// 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.AzureSqlProtectedItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlProtectedItemExtendedInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItemState; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureSqlProtectedItemTests { - @Test - public void testDeserialize() { - AzureSqlProtectedItem model = - BinaryData - .fromString( - "{\"protectedItemType\":\"Microsoft.Sql/servers/databases\",\"protectedItemDataId\":\"vudtjuewbcihx\",\"protectionState\":\"ProtectionStopped\",\"extendedInfo\":{\"oldestRecoveryPoint\":\"2021-02-12T16:32:50Z\",\"recoveryPointCount\":2057414837,\"policyState\":\"cybvpayakkudzpxg\"},\"backupManagementType\":\"AzureSql\",\"workloadType\":\"FileFolder\",\"containerName\":\"gstcyohpf\",\"sourceResourceId\":\"rkdbdgiogsjkmnwq\",\"policyId\":\"obaiyhddviaceg\",\"lastRecoveryPoint\":\"2021-04-14T23:17:33Z\",\"backupSetName\":\"tfpmvmemfnczdw\",\"createMode\":\"Invalid\",\"deferredDeleteTimeInUTC\":\"2020-12-21T10:32:32Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"lchpodbzevwrdn\",\"isDeferredDeleteScheduleUpcoming\":false,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"jcswsmys\",\"uluqypfc\",\"lerchpq\",\"mfpjbabw\"],\"isArchiveEnabled\":true,\"policyName\":\"xsspuunnoxyhk\",\"softDeleteRetentionPeriod\":1875486433}") - .toObject(AzureSqlProtectedItem.class); - Assertions.assertEquals("gstcyohpf", model.containerName()); - Assertions.assertEquals("rkdbdgiogsjkmnwq", model.sourceResourceId()); - Assertions.assertEquals("obaiyhddviaceg", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-14T23:17:33Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("tfpmvmemfnczdw", model.backupSetName()); - Assertions.assertEquals(CreateMode.INVALID, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-21T10:32:32Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(true, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("lchpodbzevwrdn", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(false, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, model.isRehydrate()); - Assertions.assertEquals("jcswsmys", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.isArchiveEnabled()); - Assertions.assertEquals("xsspuunnoxyhk", model.policyName()); - Assertions.assertEquals(1875486433, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("vudtjuewbcihx", model.protectedItemDataId()); - Assertions.assertEquals(ProtectedItemState.PROTECTION_STOPPED, model.protectionState()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-02-12T16:32:50Z"), model.extendedInfo().oldestRecoveryPoint()); - Assertions.assertEquals(2057414837, model.extendedInfo().recoveryPointCount()); - Assertions.assertEquals("cybvpayakkudzpxg", model.extendedInfo().policyState()); - } - - @Test - public void testSerialize() { - AzureSqlProtectedItem model = - new AzureSqlProtectedItem() - .withContainerName("gstcyohpf") - .withSourceResourceId("rkdbdgiogsjkmnwq") - .withPolicyId("obaiyhddviaceg") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-04-14T23:17:33Z")) - .withBackupSetName("tfpmvmemfnczdw") - .withCreateMode(CreateMode.INVALID) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2020-12-21T10:32:32Z")) - .withIsScheduledForDeferredDelete(true) - .withDeferredDeleteTimeRemaining("lchpodbzevwrdn") - .withIsDeferredDeleteScheduleUpcoming(false) - .withIsRehydrate(false) - .withResourceGuardOperationRequests(Arrays.asList("jcswsmys", "uluqypfc", "lerchpq", "mfpjbabw")) - .withIsArchiveEnabled(true) - .withPolicyName("xsspuunnoxyhk") - .withSoftDeleteRetentionPeriod(1875486433) - .withProtectedItemDataId("vudtjuewbcihx") - .withProtectionState(ProtectedItemState.PROTECTION_STOPPED) - .withExtendedInfo( - new AzureSqlProtectedItemExtendedInfo() - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-02-12T16:32:50Z")) - .withRecoveryPointCount(2057414837) - .withPolicyState("cybvpayakkudzpxg")); - model = BinaryData.fromObject(model).toObject(AzureSqlProtectedItem.class); - Assertions.assertEquals("gstcyohpf", model.containerName()); - Assertions.assertEquals("rkdbdgiogsjkmnwq", model.sourceResourceId()); - Assertions.assertEquals("obaiyhddviaceg", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-14T23:17:33Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("tfpmvmemfnczdw", model.backupSetName()); - Assertions.assertEquals(CreateMode.INVALID, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-21T10:32:32Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(true, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("lchpodbzevwrdn", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(false, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, model.isRehydrate()); - Assertions.assertEquals("jcswsmys", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.isArchiveEnabled()); - Assertions.assertEquals("xsspuunnoxyhk", model.policyName()); - Assertions.assertEquals(1875486433, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("vudtjuewbcihx", model.protectedItemDataId()); - Assertions.assertEquals(ProtectedItemState.PROTECTION_STOPPED, model.protectionState()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-02-12T16:32:50Z"), model.extendedInfo().oldestRecoveryPoint()); - Assertions.assertEquals(2057414837, model.extendedInfo().recoveryPointCount()); - Assertions.assertEquals("cybvpayakkudzpxg", 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 deleted file mode 100644 index 5a67d477b20d7..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlProtectionPolicyTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlProtectionPolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureSqlProtectionPolicyTests { - @Test - public void testDeserialize() { - AzureSqlProtectionPolicy model = - BinaryData - .fromString( - "{\"backupManagementType\":\"AzureSql\",\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"protectedItemsCount\":1644309968,\"resourceGuardOperationRequests\":[\"jvlpjxxkzbr\",\"sgeivsiy\"]}") - .toObject(AzureSqlProtectionPolicy.class); - Assertions.assertEquals(1644309968, model.protectedItemsCount()); - Assertions.assertEquals("jvlpjxxkzbr", model.resourceGuardOperationRequests().get(0)); - } - - @Test - public void testSerialize() { - AzureSqlProtectionPolicy model = - new AzureSqlProtectionPolicy() - .withProtectedItemsCount(1644309968) - .withResourceGuardOperationRequests(Arrays.asList("jvlpjxxkzbr", "sgeivsiy")) - .withRetentionPolicy(new RetentionPolicy()); - model = BinaryData.fromObject(model).toObject(AzureSqlProtectionPolicy.class); - Assertions.assertEquals(1644309968, model.protectedItemsCount()); - Assertions.assertEquals("jvlpjxxkzbr", model.resourceGuardOperationRequests().get(0)); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlagWorkloadContainerProtectionContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlagWorkloadContainerProtectionContainerTests.java deleted file mode 100644 index 6dbb92f0a0c57..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureSqlagWorkloadContainerProtectionContainerTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlagWorkloadContainerProtectionContainer; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.DistributedNodesInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.InquiryInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.OperationType; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadType; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureSqlagWorkloadContainerProtectionContainerTests { - @Test - public void testDeserialize() { - AzureSqlagWorkloadContainerProtectionContainer model = - BinaryData - .fromString( - "{\"containerType\":\"SQLAGWorkLoadContainer\",\"sourceResourceId\":\"cbb\",\"lastUpdatedTime\":\"2021-06-19T13:37:47Z\",\"extendedInfo\":{\"hostServerName\":\"knapq\",\"inquiryInfo\":{\"status\":\"uicdhzbdybwwg\",\"inquiryDetails\":[]},\"nodesList\":[{\"nodeName\":\"mhmwffpl\",\"status\":\"u\"},{\"nodeName\":\"ck\",\"status\":\"rrvwey\"}]},\"workloadType\":\"GenericDataSource\",\"operationType\":\"Register\",\"friendlyName\":\"phaimmoi\",\"backupManagementType\":\"Invalid\",\"registrationStatus\":\"oshbragapyy\",\"healthStatus\":\"fsv\",\"protectableObjectType\":\"avbopfp\"}") - .toObject(AzureSqlagWorkloadContainerProtectionContainer.class); - Assertions.assertEquals("phaimmoi", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.INVALID, model.backupManagementType()); - Assertions.assertEquals("oshbragapyy", model.registrationStatus()); - Assertions.assertEquals("fsv", model.healthStatus()); - Assertions.assertEquals("avbopfp", model.protectableObjectType()); - Assertions.assertEquals("cbb", model.sourceResourceId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T13:37:47Z"), model.lastUpdatedTime()); - Assertions.assertEquals("knapq", model.extendedInfo().hostServerName()); - Assertions.assertEquals("uicdhzbdybwwg", model.extendedInfo().inquiryInfo().status()); - Assertions.assertEquals("mhmwffpl", model.extendedInfo().nodesList().get(0).nodeName()); - Assertions.assertEquals("u", model.extendedInfo().nodesList().get(0).status()); - Assertions.assertEquals(WorkloadType.GENERIC_DATA_SOURCE, model.workloadType()); - Assertions.assertEquals(OperationType.REGISTER, model.operationType()); - } - - @Test - public void testSerialize() { - AzureSqlagWorkloadContainerProtectionContainer model = - new AzureSqlagWorkloadContainerProtectionContainer() - .withFriendlyName("phaimmoi") - .withBackupManagementType(BackupManagementType.INVALID) - .withRegistrationStatus("oshbragapyy") - .withHealthStatus("fsv") - .withProtectableObjectType("avbopfp") - .withSourceResourceId("cbb") - .withLastUpdatedTime(OffsetDateTime.parse("2021-06-19T13:37:47Z")) - .withExtendedInfo( - new AzureWorkloadContainerExtendedInfo() - .withHostServerName("knapq") - .withInquiryInfo( - new InquiryInfo().withStatus("uicdhzbdybwwg").withInquiryDetails(Arrays.asList())) - .withNodesList( - Arrays - .asList( - new DistributedNodesInfo().withNodeName("mhmwffpl").withStatus("u"), - new DistributedNodesInfo().withNodeName("ck").withStatus("rrvwey")))) - .withWorkloadType(WorkloadType.GENERIC_DATA_SOURCE) - .withOperationType(OperationType.REGISTER); - model = BinaryData.fromObject(model).toObject(AzureSqlagWorkloadContainerProtectionContainer.class); - Assertions.assertEquals("phaimmoi", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.INVALID, model.backupManagementType()); - Assertions.assertEquals("oshbragapyy", model.registrationStatus()); - Assertions.assertEquals("fsv", model.healthStatus()); - Assertions.assertEquals("avbopfp", model.protectableObjectType()); - Assertions.assertEquals("cbb", model.sourceResourceId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-19T13:37:47Z"), model.lastUpdatedTime()); - Assertions.assertEquals("knapq", model.extendedInfo().hostServerName()); - Assertions.assertEquals("uicdhzbdybwwg", model.extendedInfo().inquiryInfo().status()); - Assertions.assertEquals("mhmwffpl", model.extendedInfo().nodesList().get(0).nodeName()); - Assertions.assertEquals("u", model.extendedInfo().nodesList().get(0).status()); - Assertions.assertEquals(WorkloadType.GENERIC_DATA_SOURCE, model.workloadType()); - Assertions.assertEquals(OperationType.REGISTER, model.operationType()); - } -} 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 deleted file mode 100644 index e44052f8deb6d..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageContainerTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AcquireStorageAccountLock; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageContainer; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureStorageContainerTests { - @Test - public void testDeserialize() { - AzureStorageContainer model = - BinaryData - .fromString( - "{\"containerType\":\"StorageContainer\",\"sourceResourceId\":\"mczjkm\",\"storageAccountVersion\":\"kyujxsglhsrrr\",\"resourceGroup\":\"jylmbkzudnigr\",\"protectedItemCount\":3830052019666326430,\"acquireStorageAccountLock\":\"NotAcquire\",\"friendlyName\":\"wlpxuzzjg\",\"backupManagementType\":\"Invalid\",\"registrationStatus\":\"qyhqo\",\"healthStatus\":\"ihiqakydiw\",\"protectableObjectType\":\"rkwpzdqtvhcspod\"}") - .toObject(AzureStorageContainer.class); - Assertions.assertEquals("wlpxuzzjg", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.INVALID, model.backupManagementType()); - Assertions.assertEquals("qyhqo", model.registrationStatus()); - Assertions.assertEquals("ihiqakydiw", model.healthStatus()); - Assertions.assertEquals("rkwpzdqtvhcspod", model.protectableObjectType()); - Assertions.assertEquals("mczjkm", model.sourceResourceId()); - Assertions.assertEquals("kyujxsglhsrrr", model.storageAccountVersion()); - Assertions.assertEquals("jylmbkzudnigr", model.resourceGroup()); - Assertions.assertEquals(3830052019666326430L, model.protectedItemCount()); - Assertions.assertEquals(AcquireStorageAccountLock.NOT_ACQUIRE, model.acquireStorageAccountLock()); - } - - @Test - public void testSerialize() { - AzureStorageContainer model = - new AzureStorageContainer() - .withFriendlyName("wlpxuzzjg") - .withBackupManagementType(BackupManagementType.INVALID) - .withRegistrationStatus("qyhqo") - .withHealthStatus("ihiqakydiw") - .withProtectableObjectType("rkwpzdqtvhcspod") - .withSourceResourceId("mczjkm") - .withStorageAccountVersion("kyujxsglhsrrr") - .withResourceGroup("jylmbkzudnigr") - .withProtectedItemCount(3830052019666326430L) - .withAcquireStorageAccountLock(AcquireStorageAccountLock.NOT_ACQUIRE); - model = BinaryData.fromObject(model).toObject(AzureStorageContainer.class); - Assertions.assertEquals("wlpxuzzjg", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.INVALID, model.backupManagementType()); - Assertions.assertEquals("qyhqo", model.registrationStatus()); - Assertions.assertEquals("ihiqakydiw", model.healthStatus()); - Assertions.assertEquals("rkwpzdqtvhcspod", model.protectableObjectType()); - Assertions.assertEquals("mczjkm", model.sourceResourceId()); - Assertions.assertEquals("kyujxsglhsrrr", model.storageAccountVersion()); - Assertions.assertEquals("jylmbkzudnigr", model.resourceGroup()); - Assertions.assertEquals(3830052019666326430L, model.protectedItemCount()); - Assertions.assertEquals(AcquireStorageAccountLock.NOT_ACQUIRE, model.acquireStorageAccountLock()); - } -} 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 deleted file mode 100644 index 8316bb988f6df..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageJobExtendedInfoTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class AzureStorageJobExtendedInfoTests { - @Test - public void testDeserialize() { - AzureStorageJobExtendedInfo model = - BinaryData - .fromString( - "{\"tasksList\":[{\"taskId\":\"oggculapz\",\"status\":\"rpgogtqxep\"}],\"propertyBag\":{\"uajlyj\":\"b\"},\"dynamicErrorMessage\":\"vofqzhvfc\"}") - .toObject(AzureStorageJobExtendedInfo.class); - Assertions.assertEquals("oggculapz", model.tasksList().get(0).taskId()); - Assertions.assertEquals("rpgogtqxep", model.tasksList().get(0).status()); - Assertions.assertEquals("b", model.propertyBag().get("uajlyj")); - Assertions.assertEquals("vofqzhvfc", model.dynamicErrorMessage()); - } - - @Test - public void testSerialize() { - AzureStorageJobExtendedInfo model = - new AzureStorageJobExtendedInfo() - .withTasksList( - Arrays.asList(new AzureStorageJobTaskDetails().withTaskId("oggculapz").withStatus("rpgogtqxep"))) - .withPropertyBag(mapOf("uajlyj", "b")) - .withDynamicErrorMessage("vofqzhvfc"); - model = BinaryData.fromObject(model).toObject(AzureStorageJobExtendedInfo.class); - Assertions.assertEquals("oggculapz", model.tasksList().get(0).taskId()); - Assertions.assertEquals("rpgogtqxep", model.tasksList().get(0).status()); - Assertions.assertEquals("b", model.propertyBag().get("uajlyj")); - Assertions.assertEquals("vofqzhvfc", model.dynamicErrorMessage()); - } - - @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/AzureStorageJobTaskDetailsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageJobTaskDetailsTests.java deleted file mode 100644 index 4480247d80646..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageJobTaskDetailsTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageJobTaskDetails; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureStorageJobTaskDetailsTests { - @Test - public void testDeserialize() { - AzureStorageJobTaskDetails model = - BinaryData - .fromString("{\"taskId\":\"yfm\",\"status\":\"uxrkjp\"}") - .toObject(AzureStorageJobTaskDetails.class); - Assertions.assertEquals("yfm", model.taskId()); - Assertions.assertEquals("uxrkjp", model.status()); - } - - @Test - public void testSerialize() { - AzureStorageJobTaskDetails model = new AzureStorageJobTaskDetails().withTaskId("yfm").withStatus("uxrkjp"); - model = BinaryData.fromObject(model).toObject(AzureStorageJobTaskDetails.class); - Assertions.assertEquals("yfm", model.taskId()); - Assertions.assertEquals("uxrkjp", 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 deleted file mode 100644 index b448bc9514802..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureStorageProtectableContainerTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureStorageProtectableContainer; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureStorageProtectableContainerTests { - @Test - public void testDeserialize() { - AzureStorageProtectableContainer model = - BinaryData - .fromString( - "{\"protectableContainerType\":\"StorageContainer\",\"friendlyName\":\"axsipietgb\",\"backupManagementType\":\"AzureSql\",\"healthStatus\":\"ulbmoichdlp\",\"containerId\":\"pubntnbatz\"}") - .toObject(AzureStorageProtectableContainer.class); - Assertions.assertEquals("axsipietgb", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_SQL, model.backupManagementType()); - Assertions.assertEquals("ulbmoichdlp", model.healthStatus()); - Assertions.assertEquals("pubntnbatz", model.containerId()); - } - - @Test - public void testSerialize() { - AzureStorageProtectableContainer model = - new AzureStorageProtectableContainer() - .withFriendlyName("axsipietgb") - .withBackupManagementType(BackupManagementType.AZURE_SQL) - .withHealthStatus("ulbmoichdlp") - .withContainerId("pubntnbatz"); - model = BinaryData.fromObject(model).toObject(AzureStorageProtectableContainer.class); - Assertions.assertEquals("axsipietgb", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_SQL, model.backupManagementType()); - Assertions.assertEquals("ulbmoichdlp", model.healthStatus()); - Assertions.assertEquals("pubntnbatz", 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 deleted file mode 100644 index 1e2c586acbeb4..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMAppContainerProtectableContainerTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureVMAppContainerProtectableContainer; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureVMAppContainerProtectableContainerTests { - @Test - public void testDeserialize() { - AzureVMAppContainerProtectableContainer model = - BinaryData - .fromString( - "{\"protectableContainerType\":\"VMAppContainer\",\"friendlyName\":\"qs\",\"backupManagementType\":\"DPM\",\"healthStatus\":\"aelcat\",\"containerId\":\"ju\"}") - .toObject(AzureVMAppContainerProtectableContainer.class); - Assertions.assertEquals("qs", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.DPM, model.backupManagementType()); - Assertions.assertEquals("aelcat", model.healthStatus()); - Assertions.assertEquals("ju", model.containerId()); - } - - @Test - public void testSerialize() { - AzureVMAppContainerProtectableContainer model = - new AzureVMAppContainerProtectableContainer() - .withFriendlyName("qs") - .withBackupManagementType(BackupManagementType.DPM) - .withHealthStatus("aelcat") - .withContainerId("ju"); - model = BinaryData.fromObject(model).toObject(AzureVMAppContainerProtectableContainer.class); - Assertions.assertEquals("qs", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.DPM, model.backupManagementType()); - Assertions.assertEquals("aelcat", model.healthStatus()); - Assertions.assertEquals("ju", model.containerId()); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMAppContainerProtectionContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMAppContainerProtectionContainerTests.java deleted file mode 100644 index b8788751b57fd..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMAppContainerProtectionContainerTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureVMAppContainerProtectionContainer; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.DistributedNodesInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.InquiryInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.OperationType; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadType; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureVMAppContainerProtectionContainerTests { - @Test - public void testDeserialize() { - AzureVMAppContainerProtectionContainer model = - BinaryData - .fromString( - "{\"containerType\":\"VMAppContainer\",\"sourceResourceId\":\"lrvkmjc\",\"lastUpdatedTime\":\"2021-04-16T01:01:12Z\",\"extendedInfo\":{\"hostServerName\":\"gfggcvkyylizrzbj\",\"inquiryInfo\":{\"status\":\"xsfuztlvt\",\"inquiryDetails\":[]},\"nodesList\":[{\"nodeName\":\"dqlvhukoveof\",\"status\":\"rvjfnmjmvlw\"}]},\"workloadType\":\"Sharepoint\",\"operationType\":\"Reregister\",\"friendlyName\":\"ujr\",\"backupManagementType\":\"Invalid\",\"registrationStatus\":\"juid\",\"healthStatus\":\"uuyjucejikz\",\"protectableObjectType\":\"ovvtzejetjkln\"}") - .toObject(AzureVMAppContainerProtectionContainer.class); - Assertions.assertEquals("ujr", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.INVALID, model.backupManagementType()); - Assertions.assertEquals("juid", model.registrationStatus()); - Assertions.assertEquals("uuyjucejikz", model.healthStatus()); - Assertions.assertEquals("ovvtzejetjkln", model.protectableObjectType()); - Assertions.assertEquals("lrvkmjc", model.sourceResourceId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-16T01:01:12Z"), model.lastUpdatedTime()); - Assertions.assertEquals("gfggcvkyylizrzbj", model.extendedInfo().hostServerName()); - Assertions.assertEquals("xsfuztlvt", model.extendedInfo().inquiryInfo().status()); - Assertions.assertEquals("dqlvhukoveof", model.extendedInfo().nodesList().get(0).nodeName()); - Assertions.assertEquals("rvjfnmjmvlw", model.extendedInfo().nodesList().get(0).status()); - Assertions.assertEquals(WorkloadType.SHAREPOINT, model.workloadType()); - Assertions.assertEquals(OperationType.REREGISTER, model.operationType()); - } - - @Test - public void testSerialize() { - AzureVMAppContainerProtectionContainer model = - new AzureVMAppContainerProtectionContainer() - .withFriendlyName("ujr") - .withBackupManagementType(BackupManagementType.INVALID) - .withRegistrationStatus("juid") - .withHealthStatus("uuyjucejikz") - .withProtectableObjectType("ovvtzejetjkln") - .withSourceResourceId("lrvkmjc") - .withLastUpdatedTime(OffsetDateTime.parse("2021-04-16T01:01:12Z")) - .withExtendedInfo( - new AzureWorkloadContainerExtendedInfo() - .withHostServerName("gfggcvkyylizrzbj") - .withInquiryInfo(new InquiryInfo().withStatus("xsfuztlvt").withInquiryDetails(Arrays.asList())) - .withNodesList( - Arrays - .asList( - new DistributedNodesInfo().withNodeName("dqlvhukoveof").withStatus("rvjfnmjmvlw")))) - .withWorkloadType(WorkloadType.SHAREPOINT) - .withOperationType(OperationType.REREGISTER); - model = BinaryData.fromObject(model).toObject(AzureVMAppContainerProtectionContainer.class); - Assertions.assertEquals("ujr", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.INVALID, model.backupManagementType()); - Assertions.assertEquals("juid", model.registrationStatus()); - Assertions.assertEquals("uuyjucejikz", model.healthStatus()); - Assertions.assertEquals("ovvtzejetjkln", model.protectableObjectType()); - Assertions.assertEquals("lrvkmjc", model.sourceResourceId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-16T01:01:12Z"), model.lastUpdatedTime()); - Assertions.assertEquals("gfggcvkyylizrzbj", model.extendedInfo().hostServerName()); - Assertions.assertEquals("xsfuztlvt", model.extendedInfo().inquiryInfo().status()); - Assertions.assertEquals("dqlvhukoveof", model.extendedInfo().nodesList().get(0).nodeName()); - Assertions.assertEquals("rvjfnmjmvlw", model.extendedInfo().nodesList().get(0).status()); - Assertions.assertEquals(WorkloadType.SHAREPOINT, model.workloadType()); - Assertions.assertEquals(OperationType.REREGISTER, model.operationType()); - } -} 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 deleted file mode 100644 index c76aff58be994..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMResourceFeatureSupportRequestTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureVMResourceFeatureSupportRequest; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureVMResourceFeatureSupportRequestTests { - @Test - public void testDeserialize() { - AzureVMResourceFeatureSupportRequest model = - BinaryData - .fromString("{\"featureType\":\"AzureVMResourceBackup\",\"vmSize\":\"guamlj\",\"vmSku\":\"rgmsplzga\"}") - .toObject(AzureVMResourceFeatureSupportRequest.class); - Assertions.assertEquals("guamlj", model.vmSize()); - Assertions.assertEquals("rgmsplzga", model.vmSku()); - } - - @Test - public void testSerialize() { - AzureVMResourceFeatureSupportRequest model = - new AzureVMResourceFeatureSupportRequest().withVmSize("guamlj").withVmSku("rgmsplzga"); - model = BinaryData.fromObject(model).toObject(AzureVMResourceFeatureSupportRequest.class); - Assertions.assertEquals("guamlj", model.vmSize()); - Assertions.assertEquals("rgmsplzga", 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 deleted file mode 100644 index b4b99b73e6986..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVMResourceFeatureSupportResponseInnerTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.AzureVMResourceFeatureSupportResponseInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.SupportStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureVMResourceFeatureSupportResponseInnerTests { - @Test - public void testDeserialize() { - AzureVMResourceFeatureSupportResponseInner model = - BinaryData - .fromString("{\"supportStatus\":\"DefaultOFF\"}") - .toObject(AzureVMResourceFeatureSupportResponseInner.class); - Assertions.assertEquals(SupportStatus.DEFAULT_OFF, model.supportStatus()); - } - - @Test - public void testSerialize() { - AzureVMResourceFeatureSupportResponseInner model = - new AzureVMResourceFeatureSupportResponseInner().withSupportStatus(SupportStatus.DEFAULT_OFF); - model = BinaryData.fromObject(model).toObject(AzureVMResourceFeatureSupportResponseInner.class); - Assertions.assertEquals(SupportStatus.DEFAULT_OFF, 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 deleted file mode 100644 index ebcc8b20b2164..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadItemTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureVmWorkloadItemTests { - @Test - public void testDeserialize() { - AzureVmWorkloadItem model = - BinaryData - .fromString( - "{\"workloadItemType\":\"AzureVmWorkloadItem\",\"parentName\":\"k\",\"serverName\":\"uzk\",\"isAutoProtectable\":true,\"subinquireditemcount\":163076835,\"subWorkloadItemCount\":2140774011,\"backupManagementType\":\"zvhqjwtrhtgvg\",\"workloadType\":\"c\",\"friendlyName\":\"kolawjmjsmwrokc\",\"protectionState\":\"Invalid\"}") - .toObject(AzureVmWorkloadItem.class); - Assertions.assertEquals("zvhqjwtrhtgvg", model.backupManagementType()); - Assertions.assertEquals("c", model.workloadType()); - Assertions.assertEquals("kolawjmjsmwrokc", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.INVALID, model.protectionState()); - Assertions.assertEquals("k", model.parentName()); - Assertions.assertEquals("uzk", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(163076835, model.subinquireditemcount()); - Assertions.assertEquals(2140774011, model.subWorkloadItemCount()); - } - - @Test - public void testSerialize() { - AzureVmWorkloadItem model = - new AzureVmWorkloadItem() - .withBackupManagementType("zvhqjwtrhtgvg") - .withWorkloadType("c") - .withFriendlyName("kolawjmjsmwrokc") - .withProtectionState(ProtectionStatus.INVALID) - .withParentName("k") - .withServerName("uzk") - .withIsAutoProtectable(true) - .withSubinquireditemcount(163076835) - .withSubWorkloadItemCount(2140774011); - model = BinaryData.fromObject(model).toObject(AzureVmWorkloadItem.class); - Assertions.assertEquals("zvhqjwtrhtgvg", model.backupManagementType()); - Assertions.assertEquals("c", model.workloadType()); - Assertions.assertEquals("kolawjmjsmwrokc", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.INVALID, model.protectionState()); - Assertions.assertEquals("k", model.parentName()); - Assertions.assertEquals("uzk", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(163076835, model.subinquireditemcount()); - Assertions.assertEquals(2140774011, 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 deleted file mode 100644 index 1a5a41e509576..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadProtectedItemExtendedInfoTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadProtectedItemExtendedInfo; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureVmWorkloadProtectedItemExtendedInfoTests { - @Test - public void testDeserialize() { - AzureVmWorkloadProtectedItemExtendedInfo model = - BinaryData - .fromString( - "{\"oldestRecoveryPoint\":\"2021-06-09T18:03:53Z\",\"oldestRecoveryPointInVault\":\"2021-11-30T12:32:49Z\",\"oldestRecoveryPointInArchive\":\"2021-04-24T08:57:31Z\",\"newestRecoveryPointInArchive\":\"2021-10-18T22:32:47Z\",\"recoveryPointCount\":1058689711,\"policyState\":\"eewchpxlktw\",\"recoveryModel\":\"ziycslevufuztck\"}") - .toObject(AzureVmWorkloadProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T18:03:53Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-30T12:32:49Z"), model.oldestRecoveryPointInVault()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T08:57:31Z"), model.oldestRecoveryPointInArchive()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T22:32:47Z"), model.newestRecoveryPointInArchive()); - Assertions.assertEquals(1058689711, model.recoveryPointCount()); - Assertions.assertEquals("eewchpxlktw", model.policyState()); - Assertions.assertEquals("ziycslevufuztck", model.recoveryModel()); - } - - @Test - public void testSerialize() { - AzureVmWorkloadProtectedItemExtendedInfo model = - new AzureVmWorkloadProtectedItemExtendedInfo() - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-06-09T18:03:53Z")) - .withOldestRecoveryPointInVault(OffsetDateTime.parse("2021-11-30T12:32:49Z")) - .withOldestRecoveryPointInArchive(OffsetDateTime.parse("2021-04-24T08:57:31Z")) - .withNewestRecoveryPointInArchive(OffsetDateTime.parse("2021-10-18T22:32:47Z")) - .withRecoveryPointCount(1058689711) - .withPolicyState("eewchpxlktw") - .withRecoveryModel("ziycslevufuztck"); - model = BinaryData.fromObject(model).toObject(AzureVmWorkloadProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T18:03:53Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-30T12:32:49Z"), model.oldestRecoveryPointInVault()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T08:57:31Z"), model.oldestRecoveryPointInArchive()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T22:32:47Z"), model.newestRecoveryPointInArchive()); - Assertions.assertEquals(1058689711, model.recoveryPointCount()); - Assertions.assertEquals("eewchpxlktw", model.policyState()); - Assertions.assertEquals("ziycslevufuztck", 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 deleted file mode 100644 index 8fabe350f13ac..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadProtectionPolicyTests.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.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadProtectionPolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.PolicyType; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionPolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.SchedulePolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.Settings; -import com.azure.resourcemanager.recoveryservicesbackup.models.SubProtectionPolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureVmWorkloadProtectionPolicyTests { - @Test - public void testDeserialize() { - AzureVmWorkloadProtectionPolicy model = - BinaryData - .fromString( - "{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDBInstance\",\"settings\":{\"timeZone\":\"shmkxmaehvbbxur\",\"issqlcompression\":true,\"isCompression\":true},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{}}],\"makePolicyConsistent\":false,\"protectedItemsCount\":338199100,\"resourceGuardOperationRequests\":[\"pyklyhpluodpvru\",\"dlgzibthostgkt\"]}") - .toObject(AzureVmWorkloadProtectionPolicy.class); - Assertions.assertEquals(338199100, model.protectedItemsCount()); - Assertions.assertEquals("pyklyhpluodpvru", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(WorkloadType.SAPHANA_DBINSTANCE, model.workLoadType()); - Assertions.assertEquals("shmkxmaehvbbxur", model.settings().timeZone()); - Assertions.assertEquals(true, model.settings().issqlcompression()); - Assertions.assertEquals(true, model.settings().isCompression()); - Assertions.assertEquals(PolicyType.FULL, model.subProtectionPolicy().get(0).policyType()); - Assertions.assertEquals(false, model.makePolicyConsistent()); - } - - @Test - public void testSerialize() { - AzureVmWorkloadProtectionPolicy model = - new AzureVmWorkloadProtectionPolicy() - .withProtectedItemsCount(338199100) - .withResourceGuardOperationRequests(Arrays.asList("pyklyhpluodpvru", "dlgzibthostgkt")) - .withWorkLoadType(WorkloadType.SAPHANA_DBINSTANCE) - .withSettings( - new Settings().withTimeZone("shmkxmaehvbbxur").withIssqlcompression(true).withIsCompression(true)) - .withSubProtectionPolicy( - Arrays - .asList( - new SubProtectionPolicy() - .withPolicyType(PolicyType.FULL) - .withSchedulePolicy(new SchedulePolicy()) - .withRetentionPolicy(new RetentionPolicy()) - .withTieringPolicy(mapOf()))) - .withMakePolicyConsistent(false); - model = BinaryData.fromObject(model).toObject(AzureVmWorkloadProtectionPolicy.class); - Assertions.assertEquals(338199100, model.protectedItemsCount()); - Assertions.assertEquals("pyklyhpluodpvru", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(WorkloadType.SAPHANA_DBINSTANCE, model.workLoadType()); - Assertions.assertEquals("shmkxmaehvbbxur", model.settings().timeZone()); - Assertions.assertEquals(true, model.settings().issqlcompression()); - Assertions.assertEquals(true, model.settings().isCompression()); - Assertions.assertEquals(PolicyType.FULL, model.subProtectionPolicy().get(0).policyType()); - Assertions.assertEquals(false, model.makePolicyConsistent()); - } - - @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/AzureVmWorkloadSapAseDatabaseWorkloadItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapAseDatabaseWorkloadItemTests.java deleted file mode 100644 index fafbf4e9e1c65..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapAseDatabaseWorkloadItemTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapAseDatabaseWorkloadItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureVmWorkloadSapAseDatabaseWorkloadItemTests { - @Test - public void testDeserialize() { - AzureVmWorkloadSapAseDatabaseWorkloadItem model = - BinaryData - .fromString( - "{\"workloadItemType\":\"SAPAseDatabase\",\"parentName\":\"gdphtvdula\",\"serverName\":\"lejchcsr\",\"isAutoProtectable\":true,\"subinquireditemcount\":1865328530,\"subWorkloadItemCount\":667275674,\"backupManagementType\":\"nrupdwvnphcnzqtp\",\"workloadType\":\"mqrhvthl\",\"friendlyName\":\"wdcxsmlzzhz\",\"protectionState\":\"Protecting\"}") - .toObject(AzureVmWorkloadSapAseDatabaseWorkloadItem.class); - Assertions.assertEquals("nrupdwvnphcnzqtp", model.backupManagementType()); - Assertions.assertEquals("mqrhvthl", model.workloadType()); - Assertions.assertEquals("wdcxsmlzzhz", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - Assertions.assertEquals("gdphtvdula", model.parentName()); - Assertions.assertEquals("lejchcsr", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1865328530, model.subinquireditemcount()); - Assertions.assertEquals(667275674, model.subWorkloadItemCount()); - } - - @Test - public void testSerialize() { - AzureVmWorkloadSapAseDatabaseWorkloadItem model = - new AzureVmWorkloadSapAseDatabaseWorkloadItem() - .withBackupManagementType("nrupdwvnphcnzqtp") - .withWorkloadType("mqrhvthl") - .withFriendlyName("wdcxsmlzzhz") - .withProtectionState(ProtectionStatus.PROTECTING) - .withParentName("gdphtvdula") - .withServerName("lejchcsr") - .withIsAutoProtectable(true) - .withSubinquireditemcount(1865328530) - .withSubWorkloadItemCount(667275674); - model = BinaryData.fromObject(model).toObject(AzureVmWorkloadSapAseDatabaseWorkloadItem.class); - Assertions.assertEquals("nrupdwvnphcnzqtp", model.backupManagementType()); - Assertions.assertEquals("mqrhvthl", model.workloadType()); - Assertions.assertEquals("wdcxsmlzzhz", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - Assertions.assertEquals("gdphtvdula", model.parentName()); - Assertions.assertEquals("lejchcsr", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1865328530, model.subinquireditemcount()); - Assertions.assertEquals(667275674, 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 deleted file mode 100644 index c036998d76e01..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapAseSystemWorkloadItemTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapAseSystemWorkloadItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureVmWorkloadSapAseSystemWorkloadItemTests { - @Test - public void testDeserialize() { - AzureVmWorkloadSapAseSystemWorkloadItem model = - BinaryData - .fromString( - "{\"workloadItemType\":\"SAPAseSystem\",\"parentName\":\"brfkspz\",\"serverName\":\"mtksjcitdigsx\",\"isAutoProtectable\":true,\"subinquireditemcount\":1354192290,\"subWorkloadItemCount\":1536003331,\"backupManagementType\":\"euachtomfl\",\"workloadType\":\"tswfpfmdgycxnms\",\"friendlyName\":\"hqjjys\",\"protectionState\":\"NotProtected\"}") - .toObject(AzureVmWorkloadSapAseSystemWorkloadItem.class); - Assertions.assertEquals("euachtomfl", model.backupManagementType()); - Assertions.assertEquals("tswfpfmdgycxnms", model.workloadType()); - Assertions.assertEquals("hqjjys", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.protectionState()); - Assertions.assertEquals("brfkspz", model.parentName()); - Assertions.assertEquals("mtksjcitdigsx", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1354192290, model.subinquireditemcount()); - Assertions.assertEquals(1536003331, model.subWorkloadItemCount()); - } - - @Test - public void testSerialize() { - AzureVmWorkloadSapAseSystemWorkloadItem model = - new AzureVmWorkloadSapAseSystemWorkloadItem() - .withBackupManagementType("euachtomfl") - .withWorkloadType("tswfpfmdgycxnms") - .withFriendlyName("hqjjys") - .withProtectionState(ProtectionStatus.NOT_PROTECTED) - .withParentName("brfkspz") - .withServerName("mtksjcitdigsx") - .withIsAutoProtectable(true) - .withSubinquireditemcount(1354192290) - .withSubWorkloadItemCount(1536003331); - model = BinaryData.fromObject(model).toObject(AzureVmWorkloadSapAseSystemWorkloadItem.class); - Assertions.assertEquals("euachtomfl", model.backupManagementType()); - Assertions.assertEquals("tswfpfmdgycxnms", model.workloadType()); - Assertions.assertEquals("hqjjys", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.protectionState()); - Assertions.assertEquals("brfkspz", model.parentName()); - Assertions.assertEquals("mtksjcitdigsx", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1354192290, model.subinquireditemcount()); - Assertions.assertEquals(1536003331, 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 deleted file mode 100644 index 87432be7d25c6..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapHanaDatabaseWorkloadItemTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaDatabaseWorkloadItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureVmWorkloadSapHanaDatabaseWorkloadItemTests { - @Test - public void testDeserialize() { - AzureVmWorkloadSapHanaDatabaseWorkloadItem model = - BinaryData - .fromString( - "{\"workloadItemType\":\"SAPHanaDatabase\",\"parentName\":\"bpihehcecybmrqbr\",\"serverName\":\"bmpxdlvykfrexc\",\"isAutoProtectable\":false,\"subinquireditemcount\":1253090653,\"subWorkloadItemCount\":1625535907,\"backupManagementType\":\"ghudg\",\"workloadType\":\"xog\",\"friendlyName\":\"gsv\",\"protectionState\":\"ProtectionFailed\"}") - .toObject(AzureVmWorkloadSapHanaDatabaseWorkloadItem.class); - Assertions.assertEquals("ghudg", model.backupManagementType()); - Assertions.assertEquals("xog", model.workloadType()); - Assertions.assertEquals("gsv", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); - Assertions.assertEquals("bpihehcecybmrqbr", model.parentName()); - Assertions.assertEquals("bmpxdlvykfrexc", model.serverName()); - Assertions.assertEquals(false, model.isAutoProtectable()); - Assertions.assertEquals(1253090653, model.subinquireditemcount()); - Assertions.assertEquals(1625535907, model.subWorkloadItemCount()); - } - - @Test - public void testSerialize() { - AzureVmWorkloadSapHanaDatabaseWorkloadItem model = - new AzureVmWorkloadSapHanaDatabaseWorkloadItem() - .withBackupManagementType("ghudg") - .withWorkloadType("xog") - .withFriendlyName("gsv") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED) - .withParentName("bpihehcecybmrqbr") - .withServerName("bmpxdlvykfrexc") - .withIsAutoProtectable(false) - .withSubinquireditemcount(1253090653) - .withSubWorkloadItemCount(1625535907); - model = BinaryData.fromObject(model).toObject(AzureVmWorkloadSapHanaDatabaseWorkloadItem.class); - Assertions.assertEquals("ghudg", model.backupManagementType()); - Assertions.assertEquals("xog", model.workloadType()); - Assertions.assertEquals("gsv", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); - Assertions.assertEquals("bpihehcecybmrqbr", model.parentName()); - Assertions.assertEquals("bmpxdlvykfrexc", model.serverName()); - Assertions.assertEquals(false, model.isAutoProtectable()); - Assertions.assertEquals(1253090653, model.subinquireditemcount()); - Assertions.assertEquals(1625535907, 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 deleted file mode 100644 index 4b2927ebea746..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSapHanaSystemWorkloadItemTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSapHanaSystemWorkloadItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureVmWorkloadSapHanaSystemWorkloadItemTests { - @Test - public void testDeserialize() { - AzureVmWorkloadSapHanaSystemWorkloadItem model = - BinaryData - .fromString( - "{\"workloadItemType\":\"SAPHanaSystem\",\"parentName\":\"eeczgfbu\",\"serverName\":\"lelssxblycsxzujk\",\"isAutoProtectable\":true,\"subinquireditemcount\":1416694484,\"subWorkloadItemCount\":1476026923,\"backupManagementType\":\"qplpvmjc\",\"workloadType\":\"ewbidyvteowxv\",\"friendlyName\":\"iudeu\",\"protectionState\":\"ProtectionFailed\"}") - .toObject(AzureVmWorkloadSapHanaSystemWorkloadItem.class); - Assertions.assertEquals("qplpvmjc", model.backupManagementType()); - Assertions.assertEquals("ewbidyvteowxv", model.workloadType()); - Assertions.assertEquals("iudeu", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); - Assertions.assertEquals("eeczgfbu", model.parentName()); - Assertions.assertEquals("lelssxblycsxzujk", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1416694484, model.subinquireditemcount()); - Assertions.assertEquals(1476026923, model.subWorkloadItemCount()); - } - - @Test - public void testSerialize() { - AzureVmWorkloadSapHanaSystemWorkloadItem model = - new AzureVmWorkloadSapHanaSystemWorkloadItem() - .withBackupManagementType("qplpvmjc") - .withWorkloadType("ewbidyvteowxv") - .withFriendlyName("iudeu") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED) - .withParentName("eeczgfbu") - .withServerName("lelssxblycsxzujk") - .withIsAutoProtectable(true) - .withSubinquireditemcount(1416694484) - .withSubWorkloadItemCount(1476026923); - model = BinaryData.fromObject(model).toObject(AzureVmWorkloadSapHanaSystemWorkloadItem.class); - Assertions.assertEquals("qplpvmjc", model.backupManagementType()); - Assertions.assertEquals("ewbidyvteowxv", model.workloadType()); - Assertions.assertEquals("iudeu", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); - Assertions.assertEquals("eeczgfbu", model.parentName()); - Assertions.assertEquals("lelssxblycsxzujk", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1416694484, model.subinquireditemcount()); - Assertions.assertEquals(1476026923, 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 deleted file mode 100644 index 44734a9fc329e..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSqlDatabaseWorkloadItemTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureVmWorkloadSqlDatabaseWorkloadItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureVmWorkloadSqlDatabaseWorkloadItemTests { - @Test - public void testDeserialize() { - AzureVmWorkloadSqlDatabaseWorkloadItem model = - BinaryData - .fromString( - "{\"workloadItemType\":\"SQLDataBase\",\"parentName\":\"s\",\"serverName\":\"lmiiiovg\",\"isAutoProtectable\":true,\"subinquireditemcount\":1179154127,\"subWorkloadItemCount\":1406785708,\"backupManagementType\":\"kctotiowlxteq\",\"workloadType\":\"tjgwdtguk\",\"friendlyName\":\"nblwphqlkcc\",\"protectionState\":\"NotProtected\"}") - .toObject(AzureVmWorkloadSqlDatabaseWorkloadItem.class); - Assertions.assertEquals("kctotiowlxteq", model.backupManagementType()); - Assertions.assertEquals("tjgwdtguk", model.workloadType()); - Assertions.assertEquals("nblwphqlkcc", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.protectionState()); - Assertions.assertEquals("s", model.parentName()); - Assertions.assertEquals("lmiiiovg", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1179154127, model.subinquireditemcount()); - Assertions.assertEquals(1406785708, model.subWorkloadItemCount()); - } - - @Test - public void testSerialize() { - AzureVmWorkloadSqlDatabaseWorkloadItem model = - new AzureVmWorkloadSqlDatabaseWorkloadItem() - .withBackupManagementType("kctotiowlxteq") - .withWorkloadType("tjgwdtguk") - .withFriendlyName("nblwphqlkcc") - .withProtectionState(ProtectionStatus.NOT_PROTECTED) - .withParentName("s") - .withServerName("lmiiiovg") - .withIsAutoProtectable(true) - .withSubinquireditemcount(1179154127) - .withSubWorkloadItemCount(1406785708); - model = BinaryData.fromObject(model).toObject(AzureVmWorkloadSqlDatabaseWorkloadItem.class); - Assertions.assertEquals("kctotiowlxteq", model.backupManagementType()); - Assertions.assertEquals("tjgwdtguk", model.workloadType()); - Assertions.assertEquals("nblwphqlkcc", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.NOT_PROTECTED, model.protectionState()); - Assertions.assertEquals("s", model.parentName()); - Assertions.assertEquals("lmiiiovg", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1179154127, model.subinquireditemcount()); - Assertions.assertEquals(1406785708, 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 deleted file mode 100644 index 00b2d376e27c6..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureVmWorkloadSqlInstanceWorkloadItemTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class AzureVmWorkloadSqlInstanceWorkloadItemTests { - @Test - public void testDeserialize() { - AzureVmWorkloadSqlInstanceWorkloadItem model = - BinaryData - .fromString( - "{\"workloadItemType\":\"SQLInstance\",\"dataDirectoryPaths\":[{\"type\":\"Log\",\"path\":\"ku\",\"logicalName\":\"phavpmhbrb\"}],\"parentName\":\"vgovpbbttefjokn\",\"serverName\":\"qyzqedikdfrdb\",\"isAutoProtectable\":true,\"subinquireditemcount\":1170752971,\"subWorkloadItemCount\":1080219257,\"backupManagementType\":\"hfqlgg\",\"workloadType\":\"iwzcxmjpbyeph\",\"friendlyName\":\"t\",\"protectionState\":\"Protecting\"}") - .toObject(AzureVmWorkloadSqlInstanceWorkloadItem.class); - Assertions.assertEquals("hfqlgg", model.backupManagementType()); - Assertions.assertEquals("iwzcxmjpbyeph", model.workloadType()); - Assertions.assertEquals("t", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - Assertions.assertEquals("vgovpbbttefjokn", model.parentName()); - Assertions.assertEquals("qyzqedikdfrdb", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1170752971, model.subinquireditemcount()); - Assertions.assertEquals(1080219257, model.subWorkloadItemCount()); - Assertions.assertEquals(SqlDataDirectoryType.LOG, model.dataDirectoryPaths().get(0).type()); - Assertions.assertEquals("ku", model.dataDirectoryPaths().get(0).path()); - Assertions.assertEquals("phavpmhbrb", model.dataDirectoryPaths().get(0).logicalName()); - } - - @Test - public void testSerialize() { - AzureVmWorkloadSqlInstanceWorkloadItem model = - new AzureVmWorkloadSqlInstanceWorkloadItem() - .withBackupManagementType("hfqlgg") - .withWorkloadType("iwzcxmjpbyeph") - .withFriendlyName("t") - .withProtectionState(ProtectionStatus.PROTECTING) - .withParentName("vgovpbbttefjokn") - .withServerName("qyzqedikdfrdb") - .withIsAutoProtectable(true) - .withSubinquireditemcount(1170752971) - .withSubWorkloadItemCount(1080219257) - .withDataDirectoryPaths( - Arrays - .asList( - new SqlDataDirectory() - .withType(SqlDataDirectoryType.LOG) - .withPath("ku") - .withLogicalName("phavpmhbrb"))); - model = BinaryData.fromObject(model).toObject(AzureVmWorkloadSqlInstanceWorkloadItem.class); - Assertions.assertEquals("hfqlgg", model.backupManagementType()); - Assertions.assertEquals("iwzcxmjpbyeph", model.workloadType()); - Assertions.assertEquals("t", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - Assertions.assertEquals("vgovpbbttefjokn", model.parentName()); - Assertions.assertEquals("qyzqedikdfrdb", model.serverName()); - Assertions.assertEquals(true, model.isAutoProtectable()); - Assertions.assertEquals(1170752971, model.subinquireditemcount()); - Assertions.assertEquals(1080219257, model.subWorkloadItemCount()); - Assertions.assertEquals(SqlDataDirectoryType.LOG, model.dataDirectoryPaths().get(0).type()); - Assertions.assertEquals("ku", model.dataDirectoryPaths().get(0).path()); - Assertions.assertEquals("phavpmhbrb", 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 deleted file mode 100644 index c8046f768ad31..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadAutoProtectionIntentTests.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.AzureWorkloadAutoProtectionIntent; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureWorkloadAutoProtectionIntentTests { - @Test - public void testDeserialize() { - AzureWorkloadAutoProtectionIntent model = - BinaryData - .fromString( - "{\"protectionIntentItemType\":\"AzureWorkloadAutoProtectionIntent\",\"backupManagementType\":\"DefaultBackup\",\"sourceResourceId\":\"kgmnsghpxyc\",\"itemId\":\"drwjjkhvyom\",\"policyId\":\"luzvxnq\",\"protectionState\":\"ProtectionFailed\"}") - .toObject(AzureWorkloadAutoProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); - Assertions.assertEquals("kgmnsghpxyc", model.sourceResourceId()); - Assertions.assertEquals("drwjjkhvyom", model.itemId()); - Assertions.assertEquals("luzvxnq", model.policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, model.protectionState()); - } - - @Test - public void testSerialize() { - AzureWorkloadAutoProtectionIntent model = - new AzureWorkloadAutoProtectionIntent() - .withBackupManagementType(BackupManagementType.DEFAULT_BACKUP) - .withSourceResourceId("kgmnsghpxyc") - .withItemId("drwjjkhvyom") - .withPolicyId("luzvxnq") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED); - model = BinaryData.fromObject(model).toObject(AzureWorkloadAutoProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); - Assertions.assertEquals("kgmnsghpxyc", model.sourceResourceId()); - Assertions.assertEquals("drwjjkhvyom", model.itemId()); - Assertions.assertEquals("luzvxnq", model.policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTION_FAILED, 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 deleted file mode 100644 index 3154a58954e9e..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadBackupRequestTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadBackupRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupType; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureWorkloadBackupRequestTests { - @Test - public void testDeserialize() { - AzureWorkloadBackupRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadBackupRequest\",\"backupType\":\"Invalid\",\"enableCompression\":false,\"recoveryPointExpiryTimeInUTC\":\"2021-04-20T04:19:20Z\"}") - .toObject(AzureWorkloadBackupRequest.class); - Assertions.assertEquals(BackupType.INVALID, model.backupType()); - Assertions.assertEquals(false, model.enableCompression()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-20T04:19:20Z"), model.recoveryPointExpiryTimeInUtc()); - } - - @Test - public void testSerialize() { - AzureWorkloadBackupRequest model = - new AzureWorkloadBackupRequest() - .withBackupType(BackupType.INVALID) - .withEnableCompression(false) - .withRecoveryPointExpiryTimeInUtc(OffsetDateTime.parse("2021-04-20T04:19:20Z")); - model = BinaryData.fromObject(model).toObject(AzureWorkloadBackupRequest.class); - Assertions.assertEquals(BackupType.INVALID, model.backupType()); - Assertions.assertEquals(false, model.enableCompression()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-20T04:19:20Z"), 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 deleted file mode 100644 index a3e6bf82dc10b..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadContainerAutoProtectionIntentTests.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.AzureWorkloadContainerAutoProtectionIntent; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureWorkloadContainerAutoProtectionIntentTests { - @Test - public void testDeserialize() { - AzureWorkloadContainerAutoProtectionIntent model = - BinaryData - .fromString( - "{\"protectionIntentItemType\":\"AzureWorkloadContainerAutoProtectionIntent\",\"backupManagementType\":\"AzureSql\",\"sourceResourceId\":\"hhvnewgnxkymp\",\"itemId\":\"nxrjkixtwbtaoy\",\"policyId\":\"yghs\",\"protectionState\":\"Invalid\"}") - .toObject(AzureWorkloadContainerAutoProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.AZURE_SQL, model.backupManagementType()); - Assertions.assertEquals("hhvnewgnxkymp", model.sourceResourceId()); - Assertions.assertEquals("nxrjkixtwbtaoy", model.itemId()); - Assertions.assertEquals("yghs", model.policyId()); - Assertions.assertEquals(ProtectionStatus.INVALID, model.protectionState()); - } - - @Test - public void testSerialize() { - AzureWorkloadContainerAutoProtectionIntent model = - new AzureWorkloadContainerAutoProtectionIntent() - .withBackupManagementType(BackupManagementType.AZURE_SQL) - .withSourceResourceId("hhvnewgnxkymp") - .withItemId("nxrjkixtwbtaoy") - .withPolicyId("yghs") - .withProtectionState(ProtectionStatus.INVALID); - model = BinaryData.fromObject(model).toObject(AzureWorkloadContainerAutoProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.AZURE_SQL, model.backupManagementType()); - Assertions.assertEquals("hhvnewgnxkymp", model.sourceResourceId()); - Assertions.assertEquals("nxrjkixtwbtaoy", model.itemId()); - Assertions.assertEquals("yghs", model.policyId()); - Assertions.assertEquals(ProtectionStatus.INVALID, model.protectionState()); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadContainerTests.java deleted file mode 100644 index c7db048f785ff..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadContainerTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadContainer; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadContainerExtendedInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.DistributedNodesInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.InquiryInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.OperationType; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadType; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureWorkloadContainerTests { - @Test - public void testDeserialize() { - AzureWorkloadContainer model = - BinaryData - .fromString( - "{\"containerType\":\"AzureWorkloadContainer\",\"sourceResourceId\":\"bwnupgahxkumas\",\"lastUpdatedTime\":\"2021-05-10T22:23:02Z\",\"extendedInfo\":{\"hostServerName\":\"fdmmcpug\",\"inquiryInfo\":{\"status\":\"qepvufhbzeh\",\"inquiryDetails\":[]},\"nodesList\":[{\"nodeName\":\"lbqnbldxeacl\",\"status\":\"chorimkrsr\"}]},\"workloadType\":\"AzureFileShare\",\"operationType\":\"Reregister\",\"friendlyName\":\"fldpuviyfc\",\"backupManagementType\":\"AzureStorage\",\"registrationStatus\":\"olhbhlvb\",\"healthStatus\":\"uqibsxtkcu\",\"protectableObjectType\":\"b\"}") - .toObject(AzureWorkloadContainer.class); - Assertions.assertEquals("fldpuviyfc", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_STORAGE, model.backupManagementType()); - Assertions.assertEquals("olhbhlvb", model.registrationStatus()); - Assertions.assertEquals("uqibsxtkcu", model.healthStatus()); - Assertions.assertEquals("b", model.protectableObjectType()); - Assertions.assertEquals("bwnupgahxkumas", model.sourceResourceId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-10T22:23:02Z"), model.lastUpdatedTime()); - Assertions.assertEquals("fdmmcpug", model.extendedInfo().hostServerName()); - Assertions.assertEquals("qepvufhbzeh", model.extendedInfo().inquiryInfo().status()); - Assertions.assertEquals("lbqnbldxeacl", model.extendedInfo().nodesList().get(0).nodeName()); - Assertions.assertEquals("chorimkrsr", model.extendedInfo().nodesList().get(0).status()); - Assertions.assertEquals(WorkloadType.AZURE_FILE_SHARE, model.workloadType()); - Assertions.assertEquals(OperationType.REREGISTER, model.operationType()); - } - - @Test - public void testSerialize() { - AzureWorkloadContainer model = - new AzureWorkloadContainer() - .withFriendlyName("fldpuviyfc") - .withBackupManagementType(BackupManagementType.AZURE_STORAGE) - .withRegistrationStatus("olhbhlvb") - .withHealthStatus("uqibsxtkcu") - .withProtectableObjectType("b") - .withSourceResourceId("bwnupgahxkumas") - .withLastUpdatedTime(OffsetDateTime.parse("2021-05-10T22:23:02Z")) - .withExtendedInfo( - new AzureWorkloadContainerExtendedInfo() - .withHostServerName("fdmmcpug") - .withInquiryInfo( - new InquiryInfo().withStatus("qepvufhbzeh").withInquiryDetails(Arrays.asList())) - .withNodesList( - Arrays - .asList( - new DistributedNodesInfo().withNodeName("lbqnbldxeacl").withStatus("chorimkrsr")))) - .withWorkloadType(WorkloadType.AZURE_FILE_SHARE) - .withOperationType(OperationType.REREGISTER); - model = BinaryData.fromObject(model).toObject(AzureWorkloadContainer.class); - Assertions.assertEquals("fldpuviyfc", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_STORAGE, model.backupManagementType()); - Assertions.assertEquals("olhbhlvb", model.registrationStatus()); - Assertions.assertEquals("uqibsxtkcu", model.healthStatus()); - Assertions.assertEquals("b", model.protectableObjectType()); - Assertions.assertEquals("bwnupgahxkumas", model.sourceResourceId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-10T22:23:02Z"), model.lastUpdatedTime()); - Assertions.assertEquals("fdmmcpug", model.extendedInfo().hostServerName()); - Assertions.assertEquals("qepvufhbzeh", model.extendedInfo().inquiryInfo().status()); - Assertions.assertEquals("lbqnbldxeacl", model.extendedInfo().nodesList().get(0).nodeName()); - Assertions.assertEquals("chorimkrsr", model.extendedInfo().nodesList().get(0).status()); - Assertions.assertEquals(WorkloadType.AZURE_FILE_SHARE, model.workloadType()); - Assertions.assertEquals(OperationType.REREGISTER, model.operationType()); - } -} 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 deleted file mode 100644 index 51012f6106dd2..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadJobExtendedInfoTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class AzureWorkloadJobExtendedInfoTests { - @Test - public void testDeserialize() { - AzureWorkloadJobExtendedInfo model = - BinaryData - .fromString( - "{\"tasksList\":[{\"taskId\":\"agtltdhlfkqoj\",\"status\":\"kvgtrdcn\"},{\"taskId\":\"mzzs\",\"status\":\"m\"},{\"taskId\":\"nysuxmprafwgckh\",\"status\":\"xvd\"}],\"propertyBag\":{\"spave\":\"wafqroud\",\"bunzozudh\":\"hrv\",\"moy\":\"xg\"},\"dynamicErrorMessage\":\"dyuib\"}") - .toObject(AzureWorkloadJobExtendedInfo.class); - Assertions.assertEquals("agtltdhlfkqoj", model.tasksList().get(0).taskId()); - Assertions.assertEquals("kvgtrdcn", model.tasksList().get(0).status()); - Assertions.assertEquals("wafqroud", model.propertyBag().get("spave")); - Assertions.assertEquals("dyuib", model.dynamicErrorMessage()); - } - - @Test - public void testSerialize() { - AzureWorkloadJobExtendedInfo model = - new AzureWorkloadJobExtendedInfo() - .withTasksList( - Arrays - .asList( - new AzureWorkloadJobTaskDetails().withTaskId("agtltdhlfkqoj").withStatus("kvgtrdcn"), - new AzureWorkloadJobTaskDetails().withTaskId("mzzs").withStatus("m"), - new AzureWorkloadJobTaskDetails().withTaskId("nysuxmprafwgckh").withStatus("xvd"))) - .withPropertyBag(mapOf("spave", "wafqroud", "bunzozudh", "hrv", "moy", "xg")) - .withDynamicErrorMessage("dyuib"); - model = BinaryData.fromObject(model).toObject(AzureWorkloadJobExtendedInfo.class); - Assertions.assertEquals("agtltdhlfkqoj", model.tasksList().get(0).taskId()); - Assertions.assertEquals("kvgtrdcn", model.tasksList().get(0).status()); - Assertions.assertEquals("wafqroud", model.propertyBag().get("spave")); - Assertions.assertEquals("dyuib", model.dynamicErrorMessage()); - } - - @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/AzureWorkloadJobTaskDetailsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadJobTaskDetailsTests.java deleted file mode 100644 index 0b35537e765cd..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadJobTaskDetailsTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadJobTaskDetails; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureWorkloadJobTaskDetailsTests { - @Test - public void testDeserialize() { - AzureWorkloadJobTaskDetails model = - BinaryData - .fromString("{\"taskId\":\"fdn\",\"status\":\"ydvfvfcjnae\"}") - .toObject(AzureWorkloadJobTaskDetails.class); - Assertions.assertEquals("fdn", model.taskId()); - Assertions.assertEquals("ydvfvfcjnae", model.status()); - } - - @Test - public void testSerialize() { - AzureWorkloadJobTaskDetails model = - new AzureWorkloadJobTaskDetails().withTaskId("fdn").withStatus("ydvfvfcjnae"); - model = BinaryData.fromObject(model).toObject(AzureWorkloadJobTaskDetails.class); - Assertions.assertEquals("fdn", model.taskId()); - Assertions.assertEquals("ydvfvfcjnae", 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 deleted file mode 100644 index f4eeb5f0fb7f9..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadPointInTimeRecoveryPointTests.java +++ /dev/null @@ -1,134 +0,0 @@ -// 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.AzureWorkloadPointInTimeRecoveryPoint; -import com.azure.resourcemanager.recoveryservicesbackup.models.PointInTimeRange; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo; -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 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; - -public final class AzureWorkloadPointInTimeRecoveryPointTests { - @Test - public void testDeserialize() { - AzureWorkloadPointInTimeRecoveryPoint model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadPointInTimeRecoveryPoint\",\"timeRanges\":[{\"startTime\":\"2021-04-06T16:13:31Z\",\"endTime\":\"2021-07-04T04:35:49Z\"},{\"startTime\":\"2021-03-05T05:54Z\",\"endTime\":\"2021-08-10T14:37:01Z\"},{\"startTime\":\"2021-07-18T11:29:19Z\",\"endTime\":\"2021-04-12T08:03:04Z\"},{\"startTime\":\"2021-01-22T06:46:52Z\",\"endTime\":\"2021-10-13T14:11:45Z\"}],\"recoveryPointTimeInUTC\":\"2021-11-03T20:02:22Z\",\"type\":\"Full\",\"recoveryPointTierDetails\":[{\"type\":\"InstantRP\",\"status\":\"Valid\",\"extendedInfo\":{\"fzqlqhycavod\":\"ilcbtgnhnzeyqxtj\",\"nlrariaawiuagy\":\"gxdbeesmie\",\"ojocqwogf\":\"wqfbylyrfgiagt\",\"uxylfsbtkadpy\":\"zjvusfzldmo\"}},{\"type\":\"Invalid\",\"status\":\"Deleted\",\"extendedInfo\":{\"grjqctojcmi\":\"kb\",\"eypefojyqd\":\"of\",\"hlhzdsqtzbsrgno\":\"cuplcplcwkhih\"}},{\"type\":\"Invalid\",\"status\":\"Invalid\",\"extendedInfo\":{\"wotey\":\"vecactx\"}},{\"type\":\"ArchivedRP\",\"status\":\"Invalid\",\"extendedInfo\":{\"wifzmp\":\"vekqvgqo\",\"cvhrfsp\":\"wyivqikf\",\"kvyklxubyjaffmm\":\"uagrttikteusqc\"}}],\"recoveryPointMoveReadinessInfo\":{\"bgq\":{\"isReadyForMove\":true,\"additionalInfo\":\"u\"},\"metttwgd\":{\"isReadyForMove\":false,\"additionalInfo\":\"a\"},\"i\":{\"isReadyForMove\":true,\"additionalInfo\":\"ihhrmo\"},\"hyrpetogebjoxs\":{\"isReadyForMove\":true,\"additionalInfo\":\"ypxiutcxap\"}}}") - .toObject(AzureWorkloadPointInTimeRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T20:02:22Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.FULL, model.type()); - Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.VALID, model.recoveryPointTierDetails().get(0).status()); - Assertions - .assertEquals( - "ilcbtgnhnzeyqxtj", model.recoveryPointTierDetails().get(0).extendedInfo().get("fzqlqhycavod")); - Assertions.assertEquals(true, model.recoveryPointMoveReadinessInfo().get("bgq").isReadyForMove()); - Assertions.assertEquals("u", model.recoveryPointMoveReadinessInfo().get("bgq").additionalInfo()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T16:13:31Z"), model.timeRanges().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-04T04:35:49Z"), model.timeRanges().get(0).endTime()); - } - - @Test - public void testSerialize() { - AzureWorkloadPointInTimeRecoveryPoint model = - new AzureWorkloadPointInTimeRecoveryPoint() - .withRecoveryPointTimeInUtc(OffsetDateTime.parse("2021-11-03T20:02:22Z")) - .withType(RestorePointType.FULL) - .withRecoveryPointTierDetails( - Arrays - .asList( - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.INSTANT_RP) - .withStatus(RecoveryPointTierStatus.VALID) - .withExtendedInfo( - mapOf( - "fzqlqhycavod", - "ilcbtgnhnzeyqxtj", - "nlrariaawiuagy", - "gxdbeesmie", - "ojocqwogf", - "wqfbylyrfgiagt", - "uxylfsbtkadpy", - "zjvusfzldmo")), - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.INVALID) - .withStatus(RecoveryPointTierStatus.DELETED) - .withExtendedInfo( - mapOf("grjqctojcmi", "kb", "eypefojyqd", "of", "hlhzdsqtzbsrgno", "cuplcplcwkhih")), - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.INVALID) - .withStatus(RecoveryPointTierStatus.INVALID) - .withExtendedInfo(mapOf("wotey", "vecactx")), - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.ARCHIVED_RP) - .withStatus(RecoveryPointTierStatus.INVALID) - .withExtendedInfo( - mapOf( - "wifzmp", - "vekqvgqo", - "cvhrfsp", - "wyivqikf", - "kvyklxubyjaffmm", - "uagrttikteusqc")))) - .withRecoveryPointMoveReadinessInfo( - mapOf( - "bgq", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("u"), - "metttwgd", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(false).withAdditionalInfo("a"), - "i", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("ihhrmo"), - "hyrpetogebjoxs", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("ypxiutcxap"))) - .withTimeRanges( - Arrays - .asList( - new PointInTimeRange() - .withStartTime(OffsetDateTime.parse("2021-04-06T16:13:31Z")) - .withEndTime(OffsetDateTime.parse("2021-07-04T04:35:49Z")), - new PointInTimeRange() - .withStartTime(OffsetDateTime.parse("2021-03-05T05:54Z")) - .withEndTime(OffsetDateTime.parse("2021-08-10T14:37:01Z")), - new PointInTimeRange() - .withStartTime(OffsetDateTime.parse("2021-07-18T11:29:19Z")) - .withEndTime(OffsetDateTime.parse("2021-04-12T08:03:04Z")), - new PointInTimeRange() - .withStartTime(OffsetDateTime.parse("2021-01-22T06:46:52Z")) - .withEndTime(OffsetDateTime.parse("2021-10-13T14:11:45Z")))); - model = BinaryData.fromObject(model).toObject(AzureWorkloadPointInTimeRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T20:02:22Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.FULL, model.type()); - Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.VALID, model.recoveryPointTierDetails().get(0).status()); - Assertions - .assertEquals( - "ilcbtgnhnzeyqxtj", model.recoveryPointTierDetails().get(0).extendedInfo().get("fzqlqhycavod")); - Assertions.assertEquals(true, model.recoveryPointMoveReadinessInfo().get("bgq").isReadyForMove()); - Assertions.assertEquals("u", model.recoveryPointMoveReadinessInfo().get("bgq").additionalInfo()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T16:13:31Z"), model.timeRanges().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-04T04:35:49Z"), model.timeRanges().get(0).endTime()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 25cdb7226045a..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadPointInTimeRestoreRequestTests.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.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadPointInTimeRestoreRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.OverwriteOptions; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryType; -import com.azure.resourcemanager.recoveryservicesbackup.models.TargetRestoreInfo; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureWorkloadPointInTimeRestoreRequestTests { - @Test - public void testDeserialize() { - AzureWorkloadPointInTimeRestoreRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadPointInTimeRestoreRequest\",\"pointInTime\":\"2021-04-13T21:57:14Z\",\"recoveryType\":\"AlternateLocation\",\"sourceResourceId\":\"ahfbous\",\"propertyBag\":{\"ncxykxhdjhlimm\":\"pgfewetwlyx\",\"cjzhqi\":\"cxfhbcporxv\"},\"targetInfo\":{\"overwriteOption\":\"Invalid\",\"containerId\":\"tgqscjavftjuh\",\"databaseName\":\"azkmtgguwp\",\"targetDirectoryForFileRestore\":\"r\"},\"recoveryMode\":\"Invalid\",\"targetVirtualMachineId\":\"vmmghfcfiwrxgk\"}") - .toObject(AzureWorkloadPointInTimeRestoreRequest.class); - Assertions.assertEquals(RecoveryType.ALTERNATE_LOCATION, model.recoveryType()); - Assertions.assertEquals("ahfbous", model.sourceResourceId()); - Assertions.assertEquals("pgfewetwlyx", model.propertyBag().get("ncxykxhdjhlimm")); - Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); - Assertions.assertEquals("tgqscjavftjuh", model.targetInfo().containerId()); - Assertions.assertEquals("azkmtgguwp", model.targetInfo().databaseName()); - Assertions.assertEquals("r", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); - Assertions.assertEquals("vmmghfcfiwrxgk", model.targetVirtualMachineId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-13T21:57:14Z"), model.pointInTime()); - } - - @Test - public void testSerialize() { - AzureWorkloadPointInTimeRestoreRequest model = - new AzureWorkloadPointInTimeRestoreRequest() - .withRecoveryType(RecoveryType.ALTERNATE_LOCATION) - .withSourceResourceId("ahfbous") - .withPropertyBag(mapOf("ncxykxhdjhlimm", "pgfewetwlyx", "cjzhqi", "cxfhbcporxv")) - .withTargetInfo( - new TargetRestoreInfo() - .withOverwriteOption(OverwriteOptions.INVALID) - .withContainerId("tgqscjavftjuh") - .withDatabaseName("azkmtgguwp") - .withTargetDirectoryForFileRestore("r")) - .withRecoveryMode(RecoveryMode.INVALID) - .withTargetVirtualMachineId("vmmghfcfiwrxgk") - .withPointInTime(OffsetDateTime.parse("2021-04-13T21:57:14Z")); - model = BinaryData.fromObject(model).toObject(AzureWorkloadPointInTimeRestoreRequest.class); - Assertions.assertEquals(RecoveryType.ALTERNATE_LOCATION, model.recoveryType()); - Assertions.assertEquals("ahfbous", model.sourceResourceId()); - Assertions.assertEquals("pgfewetwlyx", model.propertyBag().get("ncxykxhdjhlimm")); - Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); - Assertions.assertEquals("tgqscjavftjuh", model.targetInfo().containerId()); - Assertions.assertEquals("azkmtgguwp", model.targetInfo().databaseName()); - Assertions.assertEquals("r", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); - Assertions.assertEquals("vmmghfcfiwrxgk", model.targetVirtualMachineId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-13T21:57:14Z"), model.pointInTime()); - } - - @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/AzureWorkloadRecoveryPointTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadRecoveryPointTests.java deleted file mode 100644 index 94ac49a78f33b..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadRecoveryPointTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.RecoveryPointTierInformationV2; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierStatus; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType; -import com.azure.resourcemanager.recoveryservicesbackup.models.RestorePointType; -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; - -public final class AzureWorkloadRecoveryPointTests { - @Test - public void testDeserialize() { - AzureWorkloadRecoveryPoint model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadRecoveryPoint\",\"recoveryPointTimeInUTC\":\"2021-01-08T11:03:25Z\",\"type\":\"Invalid\",\"recoveryPointTierDetails\":[{\"type\":\"HardenedRP\",\"status\":\"Rehydrated\",\"extendedInfo\":{\"rgaehvvibrxjj\":\"b\"}}],\"recoveryPointMoveReadinessInfo\":{\"kxzt\":{\"isReadyForMove\":false,\"additionalInfo\":\"it\"},\"idgfc\":{\"isReadyForMove\":false,\"additionalInfo\":\"klf\"},\"zhe\":{\"isReadyForMove\":true,\"additionalInfo\":\"imaq\"}}}") - .toObject(AzureWorkloadRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-08T11:03:25Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.INVALID, model.type()); - Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.REHYDRATED, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("b", model.recoveryPointTierDetails().get(0).extendedInfo().get("rgaehvvibrxjj")); - Assertions.assertEquals(false, model.recoveryPointMoveReadinessInfo().get("kxzt").isReadyForMove()); - Assertions.assertEquals("it", model.recoveryPointMoveReadinessInfo().get("kxzt").additionalInfo()); - } - - @Test - public void testSerialize() { - AzureWorkloadRecoveryPoint model = - new AzureWorkloadRecoveryPoint() - .withRecoveryPointTimeInUtc(OffsetDateTime.parse("2021-01-08T11:03:25Z")) - .withType(RestorePointType.INVALID) - .withRecoveryPointTierDetails( - Arrays - .asList( - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.HARDENED_RP) - .withStatus(RecoveryPointTierStatus.REHYDRATED) - .withExtendedInfo(mapOf("rgaehvvibrxjj", "b")))) - .withRecoveryPointMoveReadinessInfo( - mapOf( - "kxzt", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(false).withAdditionalInfo("it"), - "idgfc", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(false).withAdditionalInfo("klf"), - "zhe", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("imaq"))); - model = BinaryData.fromObject(model).toObject(AzureWorkloadRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-08T11:03:25Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.INVALID, model.type()); - Assertions.assertEquals(RecoveryPointTierType.HARDENED_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.REHYDRATED, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("b", model.recoveryPointTierDetails().get(0).extendedInfo().get("rgaehvvibrxjj")); - Assertions.assertEquals(false, model.recoveryPointMoveReadinessInfo().get("kxzt").isReadyForMove()); - Assertions.assertEquals("it", model.recoveryPointMoveReadinessInfo().get("kxzt").additionalInfo()); - } - - @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/AzureWorkloadRestoreRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadRestoreRequestTests.java deleted file mode 100644 index 634aefede4a78..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadRestoreRequestTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadRestoreRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.OverwriteOptions; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryType; -import com.azure.resourcemanager.recoveryservicesbackup.models.TargetRestoreInfo; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureWorkloadRestoreRequestTests { - @Test - public void testDeserialize() { - AzureWorkloadRestoreRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadRestoreRequest\",\"recoveryType\":\"Invalid\",\"sourceResourceId\":\"yinzqodfvpgs\",\"propertyBag\":{\"vzflbq\":\"gsgbpfgzdjt\"},\"targetInfo\":{\"overwriteOption\":\"FailOnConflict\",\"containerId\":\"lgafcqusrdve\",\"databaseName\":\"wsdtutnwl\",\"targetDirectoryForFileRestore\":\"ycvuzhyrmewipmv\"},\"recoveryMode\":\"FileRecovery\",\"targetVirtualMachineId\":\"ukuqgsj\"}") - .toObject(AzureWorkloadRestoreRequest.class); - Assertions.assertEquals(RecoveryType.INVALID, model.recoveryType()); - Assertions.assertEquals("yinzqodfvpgs", model.sourceResourceId()); - Assertions.assertEquals("gsgbpfgzdjt", model.propertyBag().get("vzflbq")); - Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); - Assertions.assertEquals("lgafcqusrdve", model.targetInfo().containerId()); - Assertions.assertEquals("wsdtutnwl", model.targetInfo().databaseName()); - Assertions.assertEquals("ycvuzhyrmewipmv", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.FILE_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("ukuqgsj", model.targetVirtualMachineId()); - } - - @Test - public void testSerialize() { - AzureWorkloadRestoreRequest model = - new AzureWorkloadRestoreRequest() - .withRecoveryType(RecoveryType.INVALID) - .withSourceResourceId("yinzqodfvpgs") - .withPropertyBag(mapOf("vzflbq", "gsgbpfgzdjt")) - .withTargetInfo( - new TargetRestoreInfo() - .withOverwriteOption(OverwriteOptions.FAIL_ON_CONFLICT) - .withContainerId("lgafcqusrdve") - .withDatabaseName("wsdtutnwl") - .withTargetDirectoryForFileRestore("ycvuzhyrmewipmv")) - .withRecoveryMode(RecoveryMode.FILE_RECOVERY) - .withTargetVirtualMachineId("ukuqgsj"); - model = BinaryData.fromObject(model).toObject(AzureWorkloadRestoreRequest.class); - Assertions.assertEquals(RecoveryType.INVALID, model.recoveryType()); - Assertions.assertEquals("yinzqodfvpgs", model.sourceResourceId()); - Assertions.assertEquals("gsgbpfgzdjt", model.propertyBag().get("vzflbq")); - Assertions.assertEquals(OverwriteOptions.FAIL_ON_CONFLICT, model.targetInfo().overwriteOption()); - Assertions.assertEquals("lgafcqusrdve", model.targetInfo().containerId()); - Assertions.assertEquals("wsdtutnwl", model.targetInfo().databaseName()); - Assertions.assertEquals("ycvuzhyrmewipmv", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.FILE_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("ukuqgsj", model.targetVirtualMachineId()); - } - - @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/AzureWorkloadSapHanaPointInTimeRecoveryPointTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRecoveryPointTests.java deleted file mode 100644 index e47f745cfb5d4..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRecoveryPointTests.java +++ /dev/null @@ -1,119 +0,0 @@ -// 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.AzureWorkloadSapHanaPointInTimeRecoveryPoint; -import com.azure.resourcemanager.recoveryservicesbackup.models.PointInTimeRange; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo; -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 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; - -public final class AzureWorkloadSapHanaPointInTimeRecoveryPointTests { - @Test - public void testDeserialize() { - AzureWorkloadSapHanaPointInTimeRecoveryPoint model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadSAPHanaPointInTimeRecoveryPoint\",\"timeRanges\":[{\"startTime\":\"2021-05-19T22:03:11Z\",\"endTime\":\"2021-07-26T18:31:56Z\"},{\"startTime\":\"2021-12-05T00:17:31Z\",\"endTime\":\"2021-03-10T08:15:44Z\"},{\"startTime\":\"2021-12-07T19:13:24Z\",\"endTime\":\"2020-12-23T10:26:10Z\"},{\"startTime\":\"2021-03-26T08:46:35Z\",\"endTime\":\"2021-02-11T17:22:49Z\"}],\"recoveryPointTimeInUTC\":\"2021-01-01T22:27:05Z\",\"type\":\"Invalid\",\"recoveryPointTierDetails\":[{\"type\":\"HardenedRP\",\"status\":\"Disabled\",\"extendedInfo\":{\"oobrlttyms\":\"qyrp\"}},{\"type\":\"HardenedRP\",\"status\":\"Deleted\",\"extendedInfo\":{\"tilaxh\":\"fwqzdz\",\"ouwivkxoyzunbixx\":\"fhqlyvi\",\"vcpwpgclrc\":\"ti\",\"kenx\":\"vtsoxf\"}},{\"type\":\"ArchivedRP\",\"status\":\"Disabled\",\"extendedInfo\":{\"qskaw\":\"pmpdn\",\"bnpqfrtqlkzme\":\"oqvm\",\"qdrfegcealzxwhc\":\"nitgvkxlz\"}}],\"recoveryPointMoveReadinessInfo\":{\"omfaj\":{\"isReadyForMove\":false,\"additionalInfo\":\"yqhlwigdivbkbx\"},\"hzbezkgi\":{\"isReadyForMove\":false,\"additionalInfo\":\"qvdaeyyguxakjsq\"}}}") - .toObject(AzureWorkloadSapHanaPointInTimeRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T22:27:05Z"), 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("qyrp", model.recoveryPointTierDetails().get(0).extendedInfo().get("oobrlttyms")); - Assertions.assertEquals(false, model.recoveryPointMoveReadinessInfo().get("omfaj").isReadyForMove()); - Assertions.assertEquals("yqhlwigdivbkbx", model.recoveryPointMoveReadinessInfo().get("omfaj").additionalInfo()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-19T22:03:11Z"), model.timeRanges().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T18:31:56Z"), model.timeRanges().get(0).endTime()); - } - - @Test - public void testSerialize() { - AzureWorkloadSapHanaPointInTimeRecoveryPoint model = - new AzureWorkloadSapHanaPointInTimeRecoveryPoint() - .withRecoveryPointTimeInUtc(OffsetDateTime.parse("2021-01-01T22:27:05Z")) - .withType(RestorePointType.INVALID) - .withRecoveryPointTierDetails( - Arrays - .asList( - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.HARDENED_RP) - .withStatus(RecoveryPointTierStatus.DISABLED) - .withExtendedInfo(mapOf("oobrlttyms", "qyrp")), - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.HARDENED_RP) - .withStatus(RecoveryPointTierStatus.DELETED) - .withExtendedInfo( - mapOf( - "tilaxh", - "fwqzdz", - "ouwivkxoyzunbixx", - "fhqlyvi", - "vcpwpgclrc", - "ti", - "kenx", - "vtsoxf")), - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.ARCHIVED_RP) - .withStatus(RecoveryPointTierStatus.DISABLED) - .withExtendedInfo( - mapOf("qskaw", "pmpdn", "bnpqfrtqlkzme", "oqvm", "qdrfegcealzxwhc", "nitgvkxlz")))) - .withRecoveryPointMoveReadinessInfo( - mapOf( - "omfaj", - new RecoveryPointMoveReadinessInfo() - .withIsReadyForMove(false) - .withAdditionalInfo("yqhlwigdivbkbx"), - "hzbezkgi", - new RecoveryPointMoveReadinessInfo() - .withIsReadyForMove(false) - .withAdditionalInfo("qvdaeyyguxakjsq"))) - .withTimeRanges( - Arrays - .asList( - new PointInTimeRange() - .withStartTime(OffsetDateTime.parse("2021-05-19T22:03:11Z")) - .withEndTime(OffsetDateTime.parse("2021-07-26T18:31:56Z")), - new PointInTimeRange() - .withStartTime(OffsetDateTime.parse("2021-12-05T00:17:31Z")) - .withEndTime(OffsetDateTime.parse("2021-03-10T08:15:44Z")), - new PointInTimeRange() - .withStartTime(OffsetDateTime.parse("2021-12-07T19:13:24Z")) - .withEndTime(OffsetDateTime.parse("2020-12-23T10:26:10Z")), - new PointInTimeRange() - .withStartTime(OffsetDateTime.parse("2021-03-26T08:46:35Z")) - .withEndTime(OffsetDateTime.parse("2021-02-11T17:22:49Z")))); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSapHanaPointInTimeRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-01T22:27:05Z"), 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("qyrp", model.recoveryPointTierDetails().get(0).extendedInfo().get("oobrlttyms")); - Assertions.assertEquals(false, model.recoveryPointMoveReadinessInfo().get("omfaj").isReadyForMove()); - Assertions.assertEquals("yqhlwigdivbkbx", model.recoveryPointMoveReadinessInfo().get("omfaj").additionalInfo()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-19T22:03:11Z"), model.timeRanges().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T18:31:56Z"), model.timeRanges().get(0).endTime()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 3097513828d6e..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRestoreRequestTests.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.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaPointInTimeRestoreRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.OverwriteOptions; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryType; -import com.azure.resourcemanager.recoveryservicesbackup.models.TargetRestoreInfo; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureWorkloadSapHanaPointInTimeRestoreRequestTests { - @Test - public void testDeserialize() { - AzureWorkloadSapHanaPointInTimeRestoreRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadSAPHanaPointInTimeRestoreRequest\",\"pointInTime\":\"2021-07-20T06:35:08Z\",\"recoveryType\":\"RestoreDisks\",\"sourceResourceId\":\"sicddyvv\",\"propertyBag\":{\"wa\":\"gfmo\",\"tjeaahhvjhh\":\"pqg\",\"bbjjidjksyxk\":\"akz\"},\"targetInfo\":{\"overwriteOption\":\"Overwrite\",\"containerId\":\"vblbjednljlageua\",\"databaseName\":\"xuns\",\"targetDirectoryForFileRestore\":\"bn\"},\"recoveryMode\":\"Invalid\",\"targetVirtualMachineId\":\"ynenlsvxeizz\"}") - .toObject(AzureWorkloadSapHanaPointInTimeRestoreRequest.class); - Assertions.assertEquals(RecoveryType.RESTORE_DISKS, model.recoveryType()); - Assertions.assertEquals("sicddyvv", model.sourceResourceId()); - Assertions.assertEquals("gfmo", model.propertyBag().get("wa")); - Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); - Assertions.assertEquals("vblbjednljlageua", model.targetInfo().containerId()); - Assertions.assertEquals("xuns", model.targetInfo().databaseName()); - Assertions.assertEquals("bn", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); - Assertions.assertEquals("ynenlsvxeizz", model.targetVirtualMachineId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-20T06:35:08Z"), model.pointInTime()); - } - - @Test - public void testSerialize() { - AzureWorkloadSapHanaPointInTimeRestoreRequest model = - new AzureWorkloadSapHanaPointInTimeRestoreRequest() - .withRecoveryType(RecoveryType.RESTORE_DISKS) - .withSourceResourceId("sicddyvv") - .withPropertyBag(mapOf("wa", "gfmo", "tjeaahhvjhh", "pqg", "bbjjidjksyxk", "akz")) - .withTargetInfo( - new TargetRestoreInfo() - .withOverwriteOption(OverwriteOptions.OVERWRITE) - .withContainerId("vblbjednljlageua") - .withDatabaseName("xuns") - .withTargetDirectoryForFileRestore("bn")) - .withRecoveryMode(RecoveryMode.INVALID) - .withTargetVirtualMachineId("ynenlsvxeizz") - .withPointInTime(OffsetDateTime.parse("2021-07-20T06:35:08Z")); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSapHanaPointInTimeRestoreRequest.class); - Assertions.assertEquals(RecoveryType.RESTORE_DISKS, model.recoveryType()); - Assertions.assertEquals("sicddyvv", model.sourceResourceId()); - Assertions.assertEquals("gfmo", model.propertyBag().get("wa")); - Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); - Assertions.assertEquals("vblbjednljlageua", model.targetInfo().containerId()); - Assertions.assertEquals("xuns", model.targetInfo().databaseName()); - Assertions.assertEquals("bn", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); - Assertions.assertEquals("ynenlsvxeizz", model.targetVirtualMachineId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-20T06:35:08Z"), model.pointInTime()); - } - - @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/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequestTests.java deleted file mode 100644 index 531b071ffadc9..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequestTests.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.OverwriteOptions; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointRehydrationInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryType; -import com.azure.resourcemanager.recoveryservicesbackup.models.RehydrationPriority; -import com.azure.resourcemanager.recoveryservicesbackup.models.TargetRestoreInfo; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequestTests { - @Test - public void testDeserialize() { - AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest\",\"recoveryPointRehydrationInfo\":{\"rehydrationRetentionDuration\":\"fnozoeoqbvjh\",\"rehydrationPriority\":\"Standard\"},\"pointInTime\":\"2021-08-30T03:42:20Z\",\"recoveryType\":\"Offline\",\"sourceResourceId\":\"jchnta\",\"propertyBag\":{\"qkyojwyvf\":\"ymxbulpzealb\"},\"targetInfo\":{\"overwriteOption\":\"Invalid\",\"containerId\":\"uahxs\",\"databaseName\":\"jcmmzrrscub\",\"targetDirectoryForFileRestore\":\"sd\"},\"recoveryMode\":\"WorkloadRecovery\",\"targetVirtualMachineId\":\"qwodiffjx\"}") - .toObject(AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.class); - Assertions.assertEquals(RecoveryType.OFFLINE, model.recoveryType()); - Assertions.assertEquals("jchnta", model.sourceResourceId()); - Assertions.assertEquals("ymxbulpzealb", model.propertyBag().get("qkyojwyvf")); - Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); - Assertions.assertEquals("uahxs", model.targetInfo().containerId()); - Assertions.assertEquals("jcmmzrrscub", model.targetInfo().databaseName()); - Assertions.assertEquals("sd", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.WORKLOAD_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("qwodiffjx", model.targetVirtualMachineId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-30T03:42:20Z"), model.pointInTime()); - Assertions.assertEquals("fnozoeoqbvjh", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); - Assertions - .assertEquals(RehydrationPriority.STANDARD, model.recoveryPointRehydrationInfo().rehydrationPriority()); - } - - @Test - public void testSerialize() { - AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest model = - new AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest() - .withRecoveryType(RecoveryType.OFFLINE) - .withSourceResourceId("jchnta") - .withPropertyBag(mapOf("qkyojwyvf", "ymxbulpzealb")) - .withTargetInfo( - new TargetRestoreInfo() - .withOverwriteOption(OverwriteOptions.INVALID) - .withContainerId("uahxs") - .withDatabaseName("jcmmzrrscub") - .withTargetDirectoryForFileRestore("sd")) - .withRecoveryMode(RecoveryMode.WORKLOAD_RECOVERY) - .withTargetVirtualMachineId("qwodiffjx") - .withPointInTime(OffsetDateTime.parse("2021-08-30T03:42:20Z")) - .withRecoveryPointRehydrationInfo( - new RecoveryPointRehydrationInfo() - .withRehydrationRetentionDuration("fnozoeoqbvjh") - .withRehydrationPriority(RehydrationPriority.STANDARD)); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.class); - Assertions.assertEquals(RecoveryType.OFFLINE, model.recoveryType()); - Assertions.assertEquals("jchnta", model.sourceResourceId()); - Assertions.assertEquals("ymxbulpzealb", model.propertyBag().get("qkyojwyvf")); - Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); - Assertions.assertEquals("uahxs", model.targetInfo().containerId()); - Assertions.assertEquals("jcmmzrrscub", model.targetInfo().databaseName()); - Assertions.assertEquals("sd", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.WORKLOAD_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("qwodiffjx", model.targetVirtualMachineId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-30T03:42:20Z"), model.pointInTime()); - Assertions.assertEquals("fnozoeoqbvjh", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); - Assertions - .assertEquals(RehydrationPriority.STANDARD, model.recoveryPointRehydrationInfo().rehydrationPriority()); - } - - @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/AzureWorkloadSapHanaRecoveryPointTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRecoveryPointTests.java deleted file mode 100644 index 305bcc7d5a155..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRecoveryPointTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.RecoveryPointTierInformationV2; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierStatus; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType; -import com.azure.resourcemanager.recoveryservicesbackup.models.RestorePointType; -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; - -public final class AzureWorkloadSapHanaRecoveryPointTests { - @Test - public void testDeserialize() { - AzureWorkloadSapHanaRecoveryPoint model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadSAPHanaRecoveryPoint\",\"recoveryPointTimeInUTC\":\"2021-05-21T00:13:57Z\",\"type\":\"SnapshotFull\",\"recoveryPointTierDetails\":[{\"type\":\"Invalid\",\"status\":\"Valid\",\"extendedInfo\":{\"tnsi\":\"d\",\"z\":\"ud\",\"kdlpa\":\"mes\",\"dfgsftufqobrj\":\"zrcxfailcfxwmdbo\"}}],\"recoveryPointMoveReadinessInfo\":{\"nrzvuljraaer\":{\"isReadyForMove\":true,\"additionalInfo\":\"ckknhxkizvy\"},\"roylaxxu\":{\"isReadyForMove\":true,\"additionalInfo\":\"qgukkjqnv\"},\"hryvy\":{\"isReadyForMove\":true,\"additionalInfo\":\"sdosfjbjsvgjr\"}}}") - .toObject(AzureWorkloadSapHanaRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-21T00:13:57Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.SNAPSHOT_FULL, model.type()); - Assertions.assertEquals(RecoveryPointTierType.INVALID, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.VALID, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("d", model.recoveryPointTierDetails().get(0).extendedInfo().get("tnsi")); - Assertions.assertEquals(true, model.recoveryPointMoveReadinessInfo().get("nrzvuljraaer").isReadyForMove()); - Assertions - .assertEquals("ckknhxkizvy", model.recoveryPointMoveReadinessInfo().get("nrzvuljraaer").additionalInfo()); - } - - @Test - public void testSerialize() { - AzureWorkloadSapHanaRecoveryPoint model = - new AzureWorkloadSapHanaRecoveryPoint() - .withRecoveryPointTimeInUtc(OffsetDateTime.parse("2021-05-21T00:13:57Z")) - .withType(RestorePointType.SNAPSHOT_FULL) - .withRecoveryPointTierDetails( - Arrays - .asList( - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.INVALID) - .withStatus(RecoveryPointTierStatus.VALID) - .withExtendedInfo( - mapOf( - "tnsi", "d", "z", "ud", "kdlpa", "mes", "dfgsftufqobrj", "zrcxfailcfxwmdbo")))) - .withRecoveryPointMoveReadinessInfo( - mapOf( - "nrzvuljraaer", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("ckknhxkizvy"), - "roylaxxu", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("qgukkjqnv"), - "hryvy", - new RecoveryPointMoveReadinessInfo() - .withIsReadyForMove(true) - .withAdditionalInfo("sdosfjbjsvgjr"))); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSapHanaRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-21T00:13:57Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.SNAPSHOT_FULL, model.type()); - Assertions.assertEquals(RecoveryPointTierType.INVALID, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.VALID, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("d", model.recoveryPointTierDetails().get(0).extendedInfo().get("tnsi")); - Assertions.assertEquals(true, model.recoveryPointMoveReadinessInfo().get("nrzvuljraaer").isReadyForMove()); - Assertions - .assertEquals("ckknhxkizvy", model.recoveryPointMoveReadinessInfo().get("nrzvuljraaer").additionalInfo()); - } - - @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/AzureWorkloadSapHanaRestoreRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRestoreRequestTests.java deleted file mode 100644 index e94ee1b430da3..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRestoreRequestTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaRestoreRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.OverwriteOptions; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryType; -import com.azure.resourcemanager.recoveryservicesbackup.models.TargetRestoreInfo; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureWorkloadSapHanaRestoreRequestTests { - @Test - public void testDeserialize() { - AzureWorkloadSapHanaRestoreRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadSAPHanaRestoreRequest\",\"recoveryType\":\"RestoreDisks\",\"sourceResourceId\":\"nsrmffeycx\",\"propertyBag\":{\"mx\":\"piymerteea\",\"xv\":\"iekkkzddrtkgdojb\",\"cuijpxt\":\"vrefdeesv\"},\"targetInfo\":{\"overwriteOption\":\"Overwrite\",\"containerId\":\"rtujwsawddjibab\",\"databaseName\":\"ititvtzeexavoxt\",\"targetDirectoryForFileRestore\":\"lecdmdqbw\"},\"recoveryMode\":\"Invalid\",\"targetVirtualMachineId\":\"tgsfja\"}") - .toObject(AzureWorkloadSapHanaRestoreRequest.class); - Assertions.assertEquals(RecoveryType.RESTORE_DISKS, model.recoveryType()); - Assertions.assertEquals("nsrmffeycx", model.sourceResourceId()); - Assertions.assertEquals("piymerteea", model.propertyBag().get("mx")); - Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); - Assertions.assertEquals("rtujwsawddjibab", model.targetInfo().containerId()); - Assertions.assertEquals("ititvtzeexavoxt", model.targetInfo().databaseName()); - Assertions.assertEquals("lecdmdqbw", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); - Assertions.assertEquals("tgsfja", model.targetVirtualMachineId()); - } - - @Test - public void testSerialize() { - AzureWorkloadSapHanaRestoreRequest model = - new AzureWorkloadSapHanaRestoreRequest() - .withRecoveryType(RecoveryType.RESTORE_DISKS) - .withSourceResourceId("nsrmffeycx") - .withPropertyBag(mapOf("mx", "piymerteea", "xv", "iekkkzddrtkgdojb", "cuijpxt", "vrefdeesv")) - .withTargetInfo( - new TargetRestoreInfo() - .withOverwriteOption(OverwriteOptions.OVERWRITE) - .withContainerId("rtujwsawddjibab") - .withDatabaseName("ititvtzeexavoxt") - .withTargetDirectoryForFileRestore("lecdmdqbw")) - .withRecoveryMode(RecoveryMode.INVALID) - .withTargetVirtualMachineId("tgsfja"); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSapHanaRestoreRequest.class); - Assertions.assertEquals(RecoveryType.RESTORE_DISKS, model.recoveryType()); - Assertions.assertEquals("nsrmffeycx", model.sourceResourceId()); - Assertions.assertEquals("piymerteea", model.propertyBag().get("mx")); - Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); - Assertions.assertEquals("rtujwsawddjibab", model.targetInfo().containerId()); - Assertions.assertEquals("ititvtzeexavoxt", model.targetInfo().databaseName()); - Assertions.assertEquals("lecdmdqbw", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); - Assertions.assertEquals("tgsfja", model.targetVirtualMachineId()); - } - - @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/AzureWorkloadSapHanaRestoreWithRehydrateRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRestoreWithRehydrateRequestTests.java deleted file mode 100644 index b6ea98ae350df..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSapHanaRestoreWithRehydrateRequestTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSapHanaRestoreWithRehydrateRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.OverwriteOptions; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointRehydrationInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryType; -import com.azure.resourcemanager.recoveryservicesbackup.models.RehydrationPriority; -import com.azure.resourcemanager.recoveryservicesbackup.models.TargetRestoreInfo; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureWorkloadSapHanaRestoreWithRehydrateRequestTests { - @Test - public void testDeserialize() { - AzureWorkloadSapHanaRestoreWithRehydrateRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadSAPHanaRestoreWithRehydrateRequest\",\"recoveryPointRehydrationInfo\":{\"rehydrationRetentionDuration\":\"cyefoyzbamwine\",\"rehydrationPriority\":\"High\"},\"recoveryType\":\"OriginalLocation\",\"sourceResourceId\":\"kpoldtvevboc\",\"propertyBag\":{\"ttxpnrupza\":\"zjknyuxg\",\"swyskbruffg\":\"mrdixtreki\"},\"targetInfo\":{\"overwriteOption\":\"Overwrite\",\"containerId\":\"utvlxhr\",\"databaseName\":\"hvmblcouqehbhbc\",\"targetDirectoryForFileRestore\":\"ziryrandoy\"},\"recoveryMode\":\"Invalid\",\"targetVirtualMachineId\":\"t\"}") - .toObject(AzureWorkloadSapHanaRestoreWithRehydrateRequest.class); - Assertions.assertEquals(RecoveryType.ORIGINAL_LOCATION, model.recoveryType()); - Assertions.assertEquals("kpoldtvevboc", model.sourceResourceId()); - Assertions.assertEquals("zjknyuxg", model.propertyBag().get("ttxpnrupza")); - Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); - Assertions.assertEquals("utvlxhr", model.targetInfo().containerId()); - Assertions.assertEquals("hvmblcouqehbhbc", model.targetInfo().databaseName()); - Assertions.assertEquals("ziryrandoy", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); - Assertions.assertEquals("t", model.targetVirtualMachineId()); - Assertions.assertEquals("cyefoyzbamwine", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); - Assertions.assertEquals(RehydrationPriority.HIGH, model.recoveryPointRehydrationInfo().rehydrationPriority()); - } - - @Test - public void testSerialize() { - AzureWorkloadSapHanaRestoreWithRehydrateRequest model = - new AzureWorkloadSapHanaRestoreWithRehydrateRequest() - .withRecoveryType(RecoveryType.ORIGINAL_LOCATION) - .withSourceResourceId("kpoldtvevboc") - .withPropertyBag(mapOf("ttxpnrupza", "zjknyuxg", "swyskbruffg", "mrdixtreki")) - .withTargetInfo( - new TargetRestoreInfo() - .withOverwriteOption(OverwriteOptions.OVERWRITE) - .withContainerId("utvlxhr") - .withDatabaseName("hvmblcouqehbhbc") - .withTargetDirectoryForFileRestore("ziryrandoy")) - .withRecoveryMode(RecoveryMode.INVALID) - .withTargetVirtualMachineId("t") - .withRecoveryPointRehydrationInfo( - new RecoveryPointRehydrationInfo() - .withRehydrationRetentionDuration("cyefoyzbamwine") - .withRehydrationPriority(RehydrationPriority.HIGH)); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSapHanaRestoreWithRehydrateRequest.class); - Assertions.assertEquals(RecoveryType.ORIGINAL_LOCATION, model.recoveryType()); - Assertions.assertEquals("kpoldtvevboc", model.sourceResourceId()); - Assertions.assertEquals("zjknyuxg", model.propertyBag().get("ttxpnrupza")); - Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); - Assertions.assertEquals("utvlxhr", model.targetInfo().containerId()); - Assertions.assertEquals("hvmblcouqehbhbc", model.targetInfo().databaseName()); - Assertions.assertEquals("ziryrandoy", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); - Assertions.assertEquals("t", model.targetVirtualMachineId()); - Assertions.assertEquals("cyefoyzbamwine", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); - Assertions.assertEquals(RehydrationPriority.HIGH, model.recoveryPointRehydrationInfo().rehydrationPriority()); - } - - @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/AzureWorkloadSqlAutoProtectionIntentTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlAutoProtectionIntentTests.java deleted file mode 100644 index eea5291874d5b..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlAutoProtectionIntentTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlAutoProtectionIntent; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadItemType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureWorkloadSqlAutoProtectionIntentTests { - @Test - public void testDeserialize() { - AzureWorkloadSqlAutoProtectionIntent model = - BinaryData - .fromString( - "{\"protectionIntentItemType\":\"AzureWorkloadSQLAutoProtectionIntent\",\"workloadItemType\":\"SQLInstance\",\"backupManagementType\":\"DefaultBackup\",\"sourceResourceId\":\"wmkoisq\",\"itemId\":\"sffxui\",\"policyId\":\"csypobkdqzrdzsyl\",\"protectionState\":\"Protecting\"}") - .toObject(AzureWorkloadSqlAutoProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); - Assertions.assertEquals("wmkoisq", model.sourceResourceId()); - Assertions.assertEquals("sffxui", model.itemId()); - Assertions.assertEquals("csypobkdqzrdzsyl", model.policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - Assertions.assertEquals(WorkloadItemType.SQLINSTANCE, model.workloadItemType()); - } - - @Test - public void testSerialize() { - AzureWorkloadSqlAutoProtectionIntent model = - new AzureWorkloadSqlAutoProtectionIntent() - .withBackupManagementType(BackupManagementType.DEFAULT_BACKUP) - .withSourceResourceId("wmkoisq") - .withItemId("sffxui") - .withPolicyId("csypobkdqzrdzsyl") - .withProtectionState(ProtectionStatus.PROTECTING) - .withWorkloadItemType(WorkloadItemType.SQLINSTANCE); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSqlAutoProtectionIntent.class); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); - Assertions.assertEquals("wmkoisq", model.sourceResourceId()); - Assertions.assertEquals("sffxui", model.itemId()); - Assertions.assertEquals("csypobkdqzrdzsyl", model.policyId()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - Assertions.assertEquals(WorkloadItemType.SQLINSTANCE, 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 deleted file mode 100644 index e5fb1954f00b9..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlPointInTimeRecoveryPointTests.java +++ /dev/null @@ -1,133 +0,0 @@ -// 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.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.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 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; - -public final class AzureWorkloadSqlPointInTimeRecoveryPointTests { - @Test - public void testDeserialize() { - AzureWorkloadSqlPointInTimeRecoveryPoint model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadSQLPointInTimeRecoveryPoint\",\"timeRanges\":[{\"startTime\":\"2021-08-06T16:32:23Z\",\"endTime\":\"2021-03-15T05:07:25Z\"}],\"extendedInfo\":{\"dataDirectoryTimeInUTC\":\"2021-05-27T05:55:18Z\",\"dataDirectoryPaths\":[{\"type\":\"Invalid\",\"path\":\"mbtmvpdvjdhttzae\",\"logicalName\":\"dxihc\"}]},\"recoveryPointTimeInUTC\":\"2021-05-03T20:49:03Z\",\"type\":\"Invalid\",\"recoveryPointTierDetails\":[{\"type\":\"HardenedRP\",\"status\":\"Disabled\",\"extendedInfo\":{\"rjeuut\":\"dfzpbgtgkylkdg\"}},{\"type\":\"Invalid\",\"status\":\"Deleted\",\"extendedInfo\":{\"tqlgehgppi\":\"hokvbwnh\",\"oajvgcxtxjcs\":\"ifhpf\",\"ssjhoiftxfkf\":\"eafidltugsresm\"}},{\"type\":\"Invalid\",\"status\":\"Deleted\",\"extendedInfo\":{\"q\":\"tillucbiqtg\"}},{\"type\":\"ArchivedRP\",\"status\":\"Invalid\",\"extendedInfo\":{\"lllibph\":\"drizetpwbr\",\"a\":\"qzmiza\",\"joylh\":\"ankjpdnjzh\"}}],\"recoveryPointMoveReadinessInfo\":{\"eecjmeis\":{\"isReadyForMove\":false,\"additionalInfo\":\"xprimrsop\"},\"zaum\":{\"isReadyForMove\":false,\"additionalInfo\":\"asylwx\"},\"zboyjathwt\":{\"isReadyForMove\":false,\"additionalInfo\":\"hguuf\"}}}") - .toObject(AzureWorkloadSqlPointInTimeRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-03T20:49:03Z"), 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("dfzpbgtgkylkdg", model.recoveryPointTierDetails().get(0).extendedInfo().get("rjeuut")); - Assertions.assertEquals(false, model.recoveryPointMoveReadinessInfo().get("eecjmeis").isReadyForMove()); - Assertions.assertEquals("xprimrsop", model.recoveryPointMoveReadinessInfo().get("eecjmeis").additionalInfo()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-05-27T05:55:18Z"), model.extendedInfo().dataDirectoryTimeInUtc()); - Assertions.assertEquals(SqlDataDirectoryType.INVALID, model.extendedInfo().dataDirectoryPaths().get(0).type()); - Assertions.assertEquals("mbtmvpdvjdhttzae", model.extendedInfo().dataDirectoryPaths().get(0).path()); - Assertions.assertEquals("dxihc", model.extendedInfo().dataDirectoryPaths().get(0).logicalName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-06T16:32:23Z"), model.timeRanges().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-15T05:07:25Z"), model.timeRanges().get(0).endTime()); - } - - @Test - public void testSerialize() { - AzureWorkloadSqlPointInTimeRecoveryPoint model = - new AzureWorkloadSqlPointInTimeRecoveryPoint() - .withRecoveryPointTimeInUtc(OffsetDateTime.parse("2021-05-03T20:49:03Z")) - .withType(RestorePointType.INVALID) - .withRecoveryPointTierDetails( - Arrays - .asList( - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.HARDENED_RP) - .withStatus(RecoveryPointTierStatus.DISABLED) - .withExtendedInfo(mapOf("rjeuut", "dfzpbgtgkylkdg")), - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.INVALID) - .withStatus(RecoveryPointTierStatus.DELETED) - .withExtendedInfo( - mapOf( - "tqlgehgppi", - "hokvbwnh", - "oajvgcxtxjcs", - "ifhpf", - "ssjhoiftxfkf", - "eafidltugsresm")), - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.INVALID) - .withStatus(RecoveryPointTierStatus.DELETED) - .withExtendedInfo(mapOf("q", "tillucbiqtg")), - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.ARCHIVED_RP) - .withStatus(RecoveryPointTierStatus.INVALID) - .withExtendedInfo( - mapOf("lllibph", "drizetpwbr", "a", "qzmiza", "joylh", "ankjpdnjzh")))) - .withRecoveryPointMoveReadinessInfo( - mapOf( - "eecjmeis", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(false).withAdditionalInfo("xprimrsop"), - "zaum", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(false).withAdditionalInfo("asylwx"), - "zboyjathwt", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(false).withAdditionalInfo("hguuf"))) - .withExtendedInfo( - new AzureWorkloadSqlRecoveryPointExtendedInfo() - .withDataDirectoryTimeInUtc(OffsetDateTime.parse("2021-05-27T05:55:18Z")) - .withDataDirectoryPaths( - Arrays - .asList( - new SqlDataDirectory() - .withType(SqlDataDirectoryType.INVALID) - .withPath("mbtmvpdvjdhttzae") - .withLogicalName("dxihc")))) - .withTimeRanges( - Arrays - .asList( - new PointInTimeRange() - .withStartTime(OffsetDateTime.parse("2021-08-06T16:32:23Z")) - .withEndTime(OffsetDateTime.parse("2021-03-15T05:07:25Z")))); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSqlPointInTimeRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-03T20:49:03Z"), 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("dfzpbgtgkylkdg", model.recoveryPointTierDetails().get(0).extendedInfo().get("rjeuut")); - Assertions.assertEquals(false, model.recoveryPointMoveReadinessInfo().get("eecjmeis").isReadyForMove()); - Assertions.assertEquals("xprimrsop", model.recoveryPointMoveReadinessInfo().get("eecjmeis").additionalInfo()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-05-27T05:55:18Z"), model.extendedInfo().dataDirectoryTimeInUtc()); - Assertions.assertEquals(SqlDataDirectoryType.INVALID, model.extendedInfo().dataDirectoryPaths().get(0).type()); - Assertions.assertEquals("mbtmvpdvjdhttzae", model.extendedInfo().dataDirectoryPaths().get(0).path()); - Assertions.assertEquals("dxihc", model.extendedInfo().dataDirectoryPaths().get(0).logicalName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-06T16:32:23Z"), model.timeRanges().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-15T05:07:25Z"), model.timeRanges().get(0).endTime()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 7613d3c3d9e5f..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlPointInTimeRestoreRequestTests.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlPointInTimeRestoreRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.OverwriteOptions; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryType; -import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryMapping; -import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryType; -import com.azure.resourcemanager.recoveryservicesbackup.models.TargetRestoreInfo; -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; - -public final class AzureWorkloadSqlPointInTimeRestoreRequestTests { - @Test - public void testDeserialize() { - AzureWorkloadSqlPointInTimeRestoreRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadSQLPointInTimeRestoreRequest\",\"pointInTime\":\"2021-04-30T04:43:06Z\",\"shouldUseAlternateTargetLocation\":true,\"isNonRecoverable\":false,\"alternateDirectoryPaths\":[{\"mappingType\":\"Log\",\"sourceLogicalName\":\"qrntv\",\"sourcePath\":\"ijpstte\",\"targetPath\":\"qqpwcyyuf\"},{\"mappingType\":\"Invalid\",\"sourceLogicalName\":\"nc\",\"sourcePath\":\"mqspkcdqzhlctdd\",\"targetPath\":\"qn\"},{\"mappingType\":\"Log\",\"sourceLogicalName\":\"chrqb\",\"sourcePath\":\"jrcg\",\"targetPath\":\"ydcwboxjumv\"}],\"recoveryType\":\"Offline\",\"sourceResourceId\":\"ihrraiouaub\",\"propertyBag\":{\"rzpasccbiuimzdly\":\"loqxfuojrngif\",\"fdvruz\":\"dfqwmkyoq\",\"hpc\":\"lzo\"},\"targetInfo\":{\"overwriteOption\":\"Invalid\",\"containerId\":\"xotngfdguge\",\"databaseName\":\"i\",\"targetDirectoryForFileRestore\":\"rkyui\"},\"recoveryMode\":\"WorkloadRecovery\",\"targetVirtualMachineId\":\"nmfpp\"}") - .toObject(AzureWorkloadSqlPointInTimeRestoreRequest.class); - Assertions.assertEquals(RecoveryType.OFFLINE, model.recoveryType()); - Assertions.assertEquals("ihrraiouaub", model.sourceResourceId()); - Assertions.assertEquals("loqxfuojrngif", model.propertyBag().get("rzpasccbiuimzdly")); - Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); - Assertions.assertEquals("xotngfdguge", model.targetInfo().containerId()); - Assertions.assertEquals("i", model.targetInfo().databaseName()); - Assertions.assertEquals("rkyui", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.WORKLOAD_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("nmfpp", model.targetVirtualMachineId()); - Assertions.assertEquals(true, model.shouldUseAlternateTargetLocation()); - Assertions.assertEquals(false, model.isNonRecoverable()); - Assertions.assertEquals(SqlDataDirectoryType.LOG, model.alternateDirectoryPaths().get(0).mappingType()); - Assertions.assertEquals("qrntv", model.alternateDirectoryPaths().get(0).sourceLogicalName()); - Assertions.assertEquals("ijpstte", model.alternateDirectoryPaths().get(0).sourcePath()); - Assertions.assertEquals("qqpwcyyuf", model.alternateDirectoryPaths().get(0).targetPath()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-30T04:43:06Z"), model.pointInTime()); - } - - @Test - public void testSerialize() { - AzureWorkloadSqlPointInTimeRestoreRequest model = - new AzureWorkloadSqlPointInTimeRestoreRequest() - .withRecoveryType(RecoveryType.OFFLINE) - .withSourceResourceId("ihrraiouaub") - .withPropertyBag(mapOf("rzpasccbiuimzdly", "loqxfuojrngif", "fdvruz", "dfqwmkyoq", "hpc", "lzo")) - .withTargetInfo( - new TargetRestoreInfo() - .withOverwriteOption(OverwriteOptions.INVALID) - .withContainerId("xotngfdguge") - .withDatabaseName("i") - .withTargetDirectoryForFileRestore("rkyui")) - .withRecoveryMode(RecoveryMode.WORKLOAD_RECOVERY) - .withTargetVirtualMachineId("nmfpp") - .withShouldUseAlternateTargetLocation(true) - .withIsNonRecoverable(false) - .withAlternateDirectoryPaths( - Arrays - .asList( - new SqlDataDirectoryMapping() - .withMappingType(SqlDataDirectoryType.LOG) - .withSourceLogicalName("qrntv") - .withSourcePath("ijpstte") - .withTargetPath("qqpwcyyuf"), - new SqlDataDirectoryMapping() - .withMappingType(SqlDataDirectoryType.INVALID) - .withSourceLogicalName("nc") - .withSourcePath("mqspkcdqzhlctdd") - .withTargetPath("qn"), - new SqlDataDirectoryMapping() - .withMappingType(SqlDataDirectoryType.LOG) - .withSourceLogicalName("chrqb") - .withSourcePath("jrcg") - .withTargetPath("ydcwboxjumv"))) - .withPointInTime(OffsetDateTime.parse("2021-04-30T04:43:06Z")); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSqlPointInTimeRestoreRequest.class); - Assertions.assertEquals(RecoveryType.OFFLINE, model.recoveryType()); - Assertions.assertEquals("ihrraiouaub", model.sourceResourceId()); - Assertions.assertEquals("loqxfuojrngif", model.propertyBag().get("rzpasccbiuimzdly")); - Assertions.assertEquals(OverwriteOptions.INVALID, model.targetInfo().overwriteOption()); - Assertions.assertEquals("xotngfdguge", model.targetInfo().containerId()); - Assertions.assertEquals("i", model.targetInfo().databaseName()); - Assertions.assertEquals("rkyui", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.WORKLOAD_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("nmfpp", model.targetVirtualMachineId()); - Assertions.assertEquals(true, model.shouldUseAlternateTargetLocation()); - Assertions.assertEquals(false, model.isNonRecoverable()); - Assertions.assertEquals(SqlDataDirectoryType.LOG, model.alternateDirectoryPaths().get(0).mappingType()); - Assertions.assertEquals("qrntv", model.alternateDirectoryPaths().get(0).sourceLogicalName()); - Assertions.assertEquals("ijpstte", model.alternateDirectoryPaths().get(0).sourcePath()); - Assertions.assertEquals("qqpwcyyuf", model.alternateDirectoryPaths().get(0).targetPath()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-30T04:43:06Z"), model.pointInTime()); - } - - @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/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequestTests.java deleted file mode 100644 index 64f433261a673..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequestTests.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.OverwriteOptions; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointRehydrationInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryType; -import com.azure.resourcemanager.recoveryservicesbackup.models.RehydrationPriority; -import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryMapping; -import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryType; -import com.azure.resourcemanager.recoveryservicesbackup.models.TargetRestoreInfo; -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; - -public final class AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequestTests { - @Test - public void testDeserialize() { - AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest\",\"recoveryPointRehydrationInfo\":{\"rehydrationRetentionDuration\":\"mkfqlwxldy\",\"rehydrationPriority\":\"Standard\"},\"pointInTime\":\"2020-12-24T02:24:20Z\",\"shouldUseAlternateTargetLocation\":true,\"isNonRecoverable\":true,\"alternateDirectoryPaths\":[{\"mappingType\":\"Log\",\"sourceLogicalName\":\"bmjk\",\"sourcePath\":\"bjgsjjxxahmrn\",\"targetPath\":\"zyqegxyiv\"},{\"mappingType\":\"Invalid\",\"sourceLogicalName\":\"mhwbjijkgqx\",\"sourcePath\":\"mbk\",\"targetPath\":\"njaujvaan\"},{\"mappingType\":\"Log\",\"sourceLogicalName\":\"ycwkdtaawx\",\"sourcePath\":\"ekaum\",\"targetPath\":\"qmbzmq\"},{\"mappingType\":\"Data\",\"sourceLogicalName\":\"bnxwbjsidbirkf\",\"sourcePath\":\"sokdgoge\",\"targetPath\":\"jymrhbg\"}],\"recoveryType\":\"Offline\",\"sourceResourceId\":\"kyewnfnzhhhqo\",\"propertyBag\":{\"g\":\"fjkutycyarnroo\",\"ocnhzqrottjzcfyj\":\"abzoghktdpyczhco\",\"rl\":\"pt\",\"pqinf\":\"h\"},\"targetInfo\":{\"overwriteOption\":\"Overwrite\",\"containerId\":\"lqdhmrjzr\",\"databaseName\":\"cxpjbyypsj\",\"targetDirectoryForFileRestore\":\"cjenkyhfqzvsqxf\"},\"recoveryMode\":\"Invalid\",\"targetVirtualMachineId\":\"gcm\"}") - .toObject(AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.class); - Assertions.assertEquals(RecoveryType.OFFLINE, model.recoveryType()); - Assertions.assertEquals("kyewnfnzhhhqo", model.sourceResourceId()); - Assertions.assertEquals("fjkutycyarnroo", model.propertyBag().get("g")); - Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); - Assertions.assertEquals("lqdhmrjzr", model.targetInfo().containerId()); - Assertions.assertEquals("cxpjbyypsj", model.targetInfo().databaseName()); - Assertions.assertEquals("cjenkyhfqzvsqxf", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); - Assertions.assertEquals("gcm", model.targetVirtualMachineId()); - Assertions.assertEquals(true, model.shouldUseAlternateTargetLocation()); - Assertions.assertEquals(true, model.isNonRecoverable()); - Assertions.assertEquals(SqlDataDirectoryType.LOG, model.alternateDirectoryPaths().get(0).mappingType()); - Assertions.assertEquals("bmjk", model.alternateDirectoryPaths().get(0).sourceLogicalName()); - Assertions.assertEquals("bjgsjjxxahmrn", model.alternateDirectoryPaths().get(0).sourcePath()); - Assertions.assertEquals("zyqegxyiv", model.alternateDirectoryPaths().get(0).targetPath()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-24T02:24:20Z"), model.pointInTime()); - Assertions.assertEquals("mkfqlwxldy", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); - Assertions - .assertEquals(RehydrationPriority.STANDARD, model.recoveryPointRehydrationInfo().rehydrationPriority()); - } - - @Test - public void testSerialize() { - AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest model = - new AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest() - .withRecoveryType(RecoveryType.OFFLINE) - .withSourceResourceId("kyewnfnzhhhqo") - .withPropertyBag( - mapOf("g", "fjkutycyarnroo", "ocnhzqrottjzcfyj", "abzoghktdpyczhco", "rl", "pt", "pqinf", "h")) - .withTargetInfo( - new TargetRestoreInfo() - .withOverwriteOption(OverwriteOptions.OVERWRITE) - .withContainerId("lqdhmrjzr") - .withDatabaseName("cxpjbyypsj") - .withTargetDirectoryForFileRestore("cjenkyhfqzvsqxf")) - .withRecoveryMode(RecoveryMode.INVALID) - .withTargetVirtualMachineId("gcm") - .withShouldUseAlternateTargetLocation(true) - .withIsNonRecoverable(true) - .withAlternateDirectoryPaths( - Arrays - .asList( - new SqlDataDirectoryMapping() - .withMappingType(SqlDataDirectoryType.LOG) - .withSourceLogicalName("bmjk") - .withSourcePath("bjgsjjxxahmrn") - .withTargetPath("zyqegxyiv"), - new SqlDataDirectoryMapping() - .withMappingType(SqlDataDirectoryType.INVALID) - .withSourceLogicalName("mhwbjijkgqx") - .withSourcePath("mbk") - .withTargetPath("njaujvaan"), - new SqlDataDirectoryMapping() - .withMappingType(SqlDataDirectoryType.LOG) - .withSourceLogicalName("ycwkdtaawx") - .withSourcePath("ekaum") - .withTargetPath("qmbzmq"), - new SqlDataDirectoryMapping() - .withMappingType(SqlDataDirectoryType.DATA) - .withSourceLogicalName("bnxwbjsidbirkf") - .withSourcePath("sokdgoge") - .withTargetPath("jymrhbg"))) - .withPointInTime(OffsetDateTime.parse("2020-12-24T02:24:20Z")) - .withRecoveryPointRehydrationInfo( - new RecoveryPointRehydrationInfo() - .withRehydrationRetentionDuration("mkfqlwxldy") - .withRehydrationPriority(RehydrationPriority.STANDARD)); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.class); - Assertions.assertEquals(RecoveryType.OFFLINE, model.recoveryType()); - Assertions.assertEquals("kyewnfnzhhhqo", model.sourceResourceId()); - Assertions.assertEquals("fjkutycyarnroo", model.propertyBag().get("g")); - Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); - Assertions.assertEquals("lqdhmrjzr", model.targetInfo().containerId()); - Assertions.assertEquals("cxpjbyypsj", model.targetInfo().databaseName()); - Assertions.assertEquals("cjenkyhfqzvsqxf", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.INVALID, model.recoveryMode()); - Assertions.assertEquals("gcm", model.targetVirtualMachineId()); - Assertions.assertEquals(true, model.shouldUseAlternateTargetLocation()); - Assertions.assertEquals(true, model.isNonRecoverable()); - Assertions.assertEquals(SqlDataDirectoryType.LOG, model.alternateDirectoryPaths().get(0).mappingType()); - Assertions.assertEquals("bmjk", model.alternateDirectoryPaths().get(0).sourceLogicalName()); - Assertions.assertEquals("bjgsjjxxahmrn", model.alternateDirectoryPaths().get(0).sourcePath()); - Assertions.assertEquals("zyqegxyiv", model.alternateDirectoryPaths().get(0).targetPath()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-24T02:24:20Z"), model.pointInTime()); - Assertions.assertEquals("mkfqlwxldy", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); - Assertions - .assertEquals(RehydrationPriority.STANDARD, model.recoveryPointRehydrationInfo().rehydrationPriority()); - } - - @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/AzureWorkloadSqlRecoveryPointExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRecoveryPointExtendedInfoTests.java deleted file mode 100644 index 525a304ec11b4..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRecoveryPointExtendedInfoTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class AzureWorkloadSqlRecoveryPointExtendedInfoTests { - @Test - public void testDeserialize() { - AzureWorkloadSqlRecoveryPointExtendedInfo model = - BinaryData - .fromString( - "{\"dataDirectoryTimeInUTC\":\"2021-05-11T16:50:17Z\",\"dataDirectoryPaths\":[{\"type\":\"Data\",\"path\":\"fovvacqpbtuodxes\",\"logicalName\":\"bbelawumuaslzk\"},{\"type\":\"Log\",\"path\":\"oycqucwy\",\"logicalName\":\"hnomdrkywuh\"},{\"type\":\"Data\",\"path\":\"uurutlwexxwlalni\",\"logicalName\":\"zsrzpgepq\"}]}") - .toObject(AzureWorkloadSqlRecoveryPointExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-11T16:50:17Z"), model.dataDirectoryTimeInUtc()); - Assertions.assertEquals(SqlDataDirectoryType.DATA, model.dataDirectoryPaths().get(0).type()); - Assertions.assertEquals("fovvacqpbtuodxes", model.dataDirectoryPaths().get(0).path()); - Assertions.assertEquals("bbelawumuaslzk", model.dataDirectoryPaths().get(0).logicalName()); - } - - @Test - public void testSerialize() { - AzureWorkloadSqlRecoveryPointExtendedInfo model = - new AzureWorkloadSqlRecoveryPointExtendedInfo() - .withDataDirectoryTimeInUtc(OffsetDateTime.parse("2021-05-11T16:50:17Z")) - .withDataDirectoryPaths( - Arrays - .asList( - new SqlDataDirectory() - .withType(SqlDataDirectoryType.DATA) - .withPath("fovvacqpbtuodxes") - .withLogicalName("bbelawumuaslzk"), - new SqlDataDirectory() - .withType(SqlDataDirectoryType.LOG) - .withPath("oycqucwy") - .withLogicalName("hnomdrkywuh"), - new SqlDataDirectory() - .withType(SqlDataDirectoryType.DATA) - .withPath("uurutlwexxwlalni") - .withLogicalName("zsrzpgepq"))); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSqlRecoveryPointExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-11T16:50:17Z"), model.dataDirectoryTimeInUtc()); - Assertions.assertEquals(SqlDataDirectoryType.DATA, model.dataDirectoryPaths().get(0).type()); - Assertions.assertEquals("fovvacqpbtuodxes", model.dataDirectoryPaths().get(0).path()); - Assertions.assertEquals("bbelawumuaslzk", model.dataDirectoryPaths().get(0).logicalName()); - } -} 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 deleted file mode 100644 index 61ccafe369388..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRecoveryPointTests.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.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 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; - -public final class AzureWorkloadSqlRecoveryPointTests { - @Test - public void testDeserialize() { - AzureWorkloadSqlRecoveryPoint model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadSQLRecoveryPoint\",\"extendedInfo\":{\"dataDirectoryTimeInUTC\":\"2021-01-15T12:49:43Z\",\"dataDirectoryPaths\":[{\"type\":\"Data\",\"path\":\"dxmeb\",\"logicalName\":\"scjpahlxv\"},{\"type\":\"Invalid\",\"path\":\"qxnmwmqt\",\"logicalName\":\"xyi\"},{\"type\":\"Log\",\"path\":\"vqcttadija\",\"logicalName\":\"kmr\"}]},\"recoveryPointTimeInUTC\":\"2021-09-17T14:17:20Z\",\"type\":\"Log\",\"recoveryPointTierDetails\":[{\"type\":\"ArchivedRP\",\"status\":\"Invalid\",\"extendedInfo\":{\"yxeb\":\"udqmeqwigpibudq\",\"tmhheioqa\":\"ybpmzznrtffyaq\"}},{\"type\":\"Invalid\",\"status\":\"Disabled\",\"extendedInfo\":{\"gql\":\"uqyrxpdl\",\"iosrsjuivfcdis\":\"ismjqfrddgamqu\",\"czexrxzbujrtrhqv\":\"irnxz\",\"zlrpiqywncvj\":\"revkhgnlnzo\"}},{\"type\":\"Invalid\",\"status\":\"Rehydrated\",\"extendedInfo\":{\"k\":\"zehtdhgb\",\"zmlovuanash\":\"reljeamur\",\"erbdk\":\"xlpm\"}}],\"recoveryPointMoveReadinessInfo\":{\"w\":{\"isReadyForMove\":false,\"additionalInfo\":\"zozsdbccxjmonfdg\"},\"qjctzenkeif\":{\"isReadyForMove\":true,\"additionalInfo\":\"uuwwltv\"},\"gsrboldforobw\":{\"isReadyForMove\":true,\"additionalInfo\":\"kdasvflyhbxcudch\"}}}") - .toObject(AzureWorkloadSqlRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-17T14:17:20Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.LOG, model.type()); - Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.INVALID, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("udqmeqwigpibudq", model.recoveryPointTierDetails().get(0).extendedInfo().get("yxeb")); - Assertions.assertEquals(false, model.recoveryPointMoveReadinessInfo().get("w").isReadyForMove()); - Assertions.assertEquals("zozsdbccxjmonfdg", model.recoveryPointMoveReadinessInfo().get("w").additionalInfo()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-01-15T12:49:43Z"), model.extendedInfo().dataDirectoryTimeInUtc()); - Assertions.assertEquals(SqlDataDirectoryType.DATA, model.extendedInfo().dataDirectoryPaths().get(0).type()); - Assertions.assertEquals("dxmeb", model.extendedInfo().dataDirectoryPaths().get(0).path()); - Assertions.assertEquals("scjpahlxv", model.extendedInfo().dataDirectoryPaths().get(0).logicalName()); - } - - @Test - public void testSerialize() { - AzureWorkloadSqlRecoveryPoint model = - new AzureWorkloadSqlRecoveryPoint() - .withRecoveryPointTimeInUtc(OffsetDateTime.parse("2021-09-17T14:17:20Z")) - .withType(RestorePointType.LOG) - .withRecoveryPointTierDetails( - Arrays - .asList( - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.ARCHIVED_RP) - .withStatus(RecoveryPointTierStatus.INVALID) - .withExtendedInfo(mapOf("yxeb", "udqmeqwigpibudq", "tmhheioqa", "ybpmzznrtffyaq")), - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.INVALID) - .withStatus(RecoveryPointTierStatus.DISABLED) - .withExtendedInfo( - mapOf( - "gql", - "uqyrxpdl", - "iosrsjuivfcdis", - "ismjqfrddgamqu", - "czexrxzbujrtrhqv", - "irnxz", - "zlrpiqywncvj", - "revkhgnlnzo")), - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.INVALID) - .withStatus(RecoveryPointTierStatus.REHYDRATED) - .withExtendedInfo(mapOf("k", "zehtdhgb", "zmlovuanash", "reljeamur", "erbdk", "xlpm")))) - .withRecoveryPointMoveReadinessInfo( - mapOf( - "w", - new RecoveryPointMoveReadinessInfo() - .withIsReadyForMove(false) - .withAdditionalInfo("zozsdbccxjmonfdg"), - "qjctzenkeif", - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(true).withAdditionalInfo("uuwwltv"), - "gsrboldforobw", - new RecoveryPointMoveReadinessInfo() - .withIsReadyForMove(true) - .withAdditionalInfo("kdasvflyhbxcudch"))) - .withExtendedInfo( - new AzureWorkloadSqlRecoveryPointExtendedInfo() - .withDataDirectoryTimeInUtc(OffsetDateTime.parse("2021-01-15T12:49:43Z")) - .withDataDirectoryPaths( - Arrays - .asList( - new SqlDataDirectory() - .withType(SqlDataDirectoryType.DATA) - .withPath("dxmeb") - .withLogicalName("scjpahlxv"), - new SqlDataDirectory() - .withType(SqlDataDirectoryType.INVALID) - .withPath("qxnmwmqt") - .withLogicalName("xyi"), - new SqlDataDirectory() - .withType(SqlDataDirectoryType.LOG) - .withPath("vqcttadija") - .withLogicalName("kmr")))); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSqlRecoveryPoint.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-17T14:17:20Z"), model.recoveryPointTimeInUtc()); - Assertions.assertEquals(RestorePointType.LOG, model.type()); - Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.recoveryPointTierDetails().get(0).type()); - Assertions.assertEquals(RecoveryPointTierStatus.INVALID, model.recoveryPointTierDetails().get(0).status()); - Assertions.assertEquals("udqmeqwigpibudq", model.recoveryPointTierDetails().get(0).extendedInfo().get("yxeb")); - Assertions.assertEquals(false, model.recoveryPointMoveReadinessInfo().get("w").isReadyForMove()); - Assertions.assertEquals("zozsdbccxjmonfdg", model.recoveryPointMoveReadinessInfo().get("w").additionalInfo()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-01-15T12:49:43Z"), model.extendedInfo().dataDirectoryTimeInUtc()); - Assertions.assertEquals(SqlDataDirectoryType.DATA, model.extendedInfo().dataDirectoryPaths().get(0).type()); - Assertions.assertEquals("dxmeb", model.extendedInfo().dataDirectoryPaths().get(0).path()); - Assertions.assertEquals("scjpahlxv", model.extendedInfo().dataDirectoryPaths().get(0).logicalName()); - } - - @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/AzureWorkloadSqlRestoreRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRestoreRequestTests.java deleted file mode 100644 index 10895e03f958b..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRestoreRequestTests.java +++ /dev/null @@ -1,109 +0,0 @@ -// 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.AzureWorkloadSqlRestoreRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.OverwriteOptions; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryType; -import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryMapping; -import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryType; -import com.azure.resourcemanager.recoveryservicesbackup.models.TargetRestoreInfo; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureWorkloadSqlRestoreRequestTests { - @Test - public void testDeserialize() { - AzureWorkloadSqlRestoreRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadSQLRestoreRequest\",\"shouldUseAlternateTargetLocation\":false,\"isNonRecoverable\":false,\"alternateDirectoryPaths\":[{\"mappingType\":\"Log\",\"sourceLogicalName\":\"sgzfczbg\",\"sourcePath\":\"fgbegl\",\"targetPath\":\"leohibetnluankr\"},{\"mappingType\":\"Data\",\"sourceLogicalName\":\"eebtijvacvb\",\"sourcePath\":\"z\",\"targetPath\":\"q\"},{\"mappingType\":\"Invalid\",\"sourceLogicalName\":\"rnwxacevehjkuyxo\",\"sourcePath\":\"gaoql\",\"targetPath\":\"aeylinm\"}],\"recoveryType\":\"OriginalLocation\",\"sourceResourceId\":\"irpghriypoqeyh\",\"propertyBag\":{\"iq\":\"ykprlpyznu\"},\"targetInfo\":{\"overwriteOption\":\"Overwrite\",\"containerId\":\"iitdfuxt\",\"databaseName\":\"siibmiybnnustgn\",\"targetDirectoryForFileRestore\":\"hnmgixhcm\"},\"recoveryMode\":\"WorkloadRecovery\",\"targetVirtualMachineId\":\"foudor\"}") - .toObject(AzureWorkloadSqlRestoreRequest.class); - 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.WORKLOAD_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("foudor", model.targetVirtualMachineId()); - Assertions.assertEquals(false, model.shouldUseAlternateTargetLocation()); - Assertions.assertEquals(false, model.isNonRecoverable()); - Assertions.assertEquals(SqlDataDirectoryType.LOG, model.alternateDirectoryPaths().get(0).mappingType()); - Assertions.assertEquals("sgzfczbg", model.alternateDirectoryPaths().get(0).sourceLogicalName()); - Assertions.assertEquals("fgbegl", model.alternateDirectoryPaths().get(0).sourcePath()); - Assertions.assertEquals("leohibetnluankr", model.alternateDirectoryPaths().get(0).targetPath()); - } - - @Test - public void testSerialize() { - AzureWorkloadSqlRestoreRequest model = - new AzureWorkloadSqlRestoreRequest() - .withRecoveryType(RecoveryType.ORIGINAL_LOCATION) - .withSourceResourceId("irpghriypoqeyh") - .withPropertyBag(mapOf("iq", "ykprlpyznu")) - .withTargetInfo( - new TargetRestoreInfo() - .withOverwriteOption(OverwriteOptions.OVERWRITE) - .withContainerId("iitdfuxt") - .withDatabaseName("siibmiybnnustgn") - .withTargetDirectoryForFileRestore("hnmgixhcm")) - .withRecoveryMode(RecoveryMode.WORKLOAD_RECOVERY) - .withTargetVirtualMachineId("foudor") - .withShouldUseAlternateTargetLocation(false) - .withIsNonRecoverable(false) - .withAlternateDirectoryPaths( - Arrays - .asList( - new SqlDataDirectoryMapping() - .withMappingType(SqlDataDirectoryType.LOG) - .withSourceLogicalName("sgzfczbg") - .withSourcePath("fgbegl") - .withTargetPath("leohibetnluankr"), - new SqlDataDirectoryMapping() - .withMappingType(SqlDataDirectoryType.DATA) - .withSourceLogicalName("eebtijvacvb") - .withSourcePath("z") - .withTargetPath("q"), - new SqlDataDirectoryMapping() - .withMappingType(SqlDataDirectoryType.INVALID) - .withSourceLogicalName("rnwxacevehjkuyxo") - .withSourcePath("gaoql") - .withTargetPath("aeylinm"))); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSqlRestoreRequest.class); - 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.WORKLOAD_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("foudor", model.targetVirtualMachineId()); - Assertions.assertEquals(false, model.shouldUseAlternateTargetLocation()); - Assertions.assertEquals(false, model.isNonRecoverable()); - Assertions.assertEquals(SqlDataDirectoryType.LOG, model.alternateDirectoryPaths().get(0).mappingType()); - Assertions.assertEquals("sgzfczbg", model.alternateDirectoryPaths().get(0).sourceLogicalName()); - Assertions.assertEquals("fgbegl", model.alternateDirectoryPaths().get(0).sourcePath()); - Assertions.assertEquals("leohibetnluankr", model.alternateDirectoryPaths().get(0).targetPath()); - } - - @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/AzureWorkloadSqlRestoreWithRehydrateRequestTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRestoreWithRehydrateRequestTests.java deleted file mode 100644 index 5cd4c1883b27c..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/AzureWorkloadSqlRestoreWithRehydrateRequestTests.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.AzureWorkloadSqlRestoreWithRehydrateRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.OverwriteOptions; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointRehydrationInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryType; -import com.azure.resourcemanager.recoveryservicesbackup.models.RehydrationPriority; -import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryMapping; -import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryType; -import com.azure.resourcemanager.recoveryservicesbackup.models.TargetRestoreInfo; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureWorkloadSqlRestoreWithRehydrateRequestTests { - @Test - public void testDeserialize() { - AzureWorkloadSqlRestoreWithRehydrateRequest model = - BinaryData - .fromString( - "{\"objectType\":\"AzureWorkloadSQLRestoreWithRehydrateRequest\",\"recoveryPointRehydrationInfo\":{\"rehydrationRetentionDuration\":\"jhhhqxu\",\"rehydrationPriority\":\"Standard\"},\"shouldUseAlternateTargetLocation\":true,\"isNonRecoverable\":true,\"alternateDirectoryPaths\":[{\"mappingType\":\"Invalid\",\"sourceLogicalName\":\"s\",\"sourcePath\":\"usjszlbscm\",\"targetPath\":\"zijiufehgmv\"}],\"recoveryType\":\"Offline\",\"sourceResourceId\":\"yvqkxr\",\"propertyBag\":{\"wxzut\":\"niylyly\",\"gh\":\"qztw\",\"abe\":\"upgxyjtcdxabbujf\"},\"targetInfo\":{\"overwriteOption\":\"Overwrite\",\"containerId\":\"qpxzucafeddwwn\",\"databaseName\":\"a\",\"targetDirectoryForFileRestore\":\"xud\"},\"recoveryMode\":\"WorkloadRecovery\",\"targetVirtualMachineId\":\"ookrtalvnbw\"}") - .toObject(AzureWorkloadSqlRestoreWithRehydrateRequest.class); - Assertions.assertEquals(RecoveryType.OFFLINE, model.recoveryType()); - Assertions.assertEquals("yvqkxr", model.sourceResourceId()); - Assertions.assertEquals("niylyly", model.propertyBag().get("wxzut")); - Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); - Assertions.assertEquals("qpxzucafeddwwn", model.targetInfo().containerId()); - Assertions.assertEquals("a", model.targetInfo().databaseName()); - Assertions.assertEquals("xud", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.WORKLOAD_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("ookrtalvnbw", model.targetVirtualMachineId()); - Assertions.assertEquals(true, model.shouldUseAlternateTargetLocation()); - Assertions.assertEquals(true, model.isNonRecoverable()); - Assertions.assertEquals(SqlDataDirectoryType.INVALID, model.alternateDirectoryPaths().get(0).mappingType()); - Assertions.assertEquals("s", model.alternateDirectoryPaths().get(0).sourceLogicalName()); - Assertions.assertEquals("usjszlbscm", model.alternateDirectoryPaths().get(0).sourcePath()); - Assertions.assertEquals("zijiufehgmv", model.alternateDirectoryPaths().get(0).targetPath()); - Assertions.assertEquals("jhhhqxu", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); - Assertions - .assertEquals(RehydrationPriority.STANDARD, model.recoveryPointRehydrationInfo().rehydrationPriority()); - } - - @Test - public void testSerialize() { - AzureWorkloadSqlRestoreWithRehydrateRequest model = - new AzureWorkloadSqlRestoreWithRehydrateRequest() - .withRecoveryType(RecoveryType.OFFLINE) - .withSourceResourceId("yvqkxr") - .withPropertyBag(mapOf("wxzut", "niylyly", "gh", "qztw", "abe", "upgxyjtcdxabbujf")) - .withTargetInfo( - new TargetRestoreInfo() - .withOverwriteOption(OverwriteOptions.OVERWRITE) - .withContainerId("qpxzucafeddwwn") - .withDatabaseName("a") - .withTargetDirectoryForFileRestore("xud")) - .withRecoveryMode(RecoveryMode.WORKLOAD_RECOVERY) - .withTargetVirtualMachineId("ookrtalvnbw") - .withShouldUseAlternateTargetLocation(true) - .withIsNonRecoverable(true) - .withAlternateDirectoryPaths( - Arrays - .asList( - new SqlDataDirectoryMapping() - .withMappingType(SqlDataDirectoryType.INVALID) - .withSourceLogicalName("s") - .withSourcePath("usjszlbscm") - .withTargetPath("zijiufehgmv"))) - .withRecoveryPointRehydrationInfo( - new RecoveryPointRehydrationInfo() - .withRehydrationRetentionDuration("jhhhqxu") - .withRehydrationPriority(RehydrationPriority.STANDARD)); - model = BinaryData.fromObject(model).toObject(AzureWorkloadSqlRestoreWithRehydrateRequest.class); - Assertions.assertEquals(RecoveryType.OFFLINE, model.recoveryType()); - Assertions.assertEquals("yvqkxr", model.sourceResourceId()); - Assertions.assertEquals("niylyly", model.propertyBag().get("wxzut")); - Assertions.assertEquals(OverwriteOptions.OVERWRITE, model.targetInfo().overwriteOption()); - Assertions.assertEquals("qpxzucafeddwwn", model.targetInfo().containerId()); - Assertions.assertEquals("a", model.targetInfo().databaseName()); - Assertions.assertEquals("xud", model.targetInfo().targetDirectoryForFileRestore()); - Assertions.assertEquals(RecoveryMode.WORKLOAD_RECOVERY, model.recoveryMode()); - Assertions.assertEquals("ookrtalvnbw", model.targetVirtualMachineId()); - Assertions.assertEquals(true, model.shouldUseAlternateTargetLocation()); - Assertions.assertEquals(true, model.isNonRecoverable()); - Assertions.assertEquals(SqlDataDirectoryType.INVALID, model.alternateDirectoryPaths().get(0).mappingType()); - Assertions.assertEquals("s", model.alternateDirectoryPaths().get(0).sourceLogicalName()); - Assertions.assertEquals("usjszlbscm", model.alternateDirectoryPaths().get(0).sourcePath()); - Assertions.assertEquals("zijiufehgmv", model.alternateDirectoryPaths().get(0).targetPath()); - Assertions.assertEquals("jhhhqxu", model.recoveryPointRehydrationInfo().rehydrationRetentionDuration()); - Assertions - .assertEquals(RehydrationPriority.STANDARD, model.recoveryPointRehydrationInfo().rehydrationPriority()); - } - - @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/BackupEngineBaseResourceInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineBaseResourceInnerTests.java deleted file mode 100644 index 98f3390ad6e4f..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineBaseResourceInnerTests.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class BackupEngineBaseResourceInnerTests { - @Test - public void testDeserialize() { - BackupEngineBaseResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"xcxrsl\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"wuoegrpk\",\"backupEngineState\":\"wniyqsluicpd\",\"healthStatus\":\"kzzlvmbmpaxmodf\",\"canReRegister\":false,\"backupEngineId\":\"yw\",\"dpmVersion\":\"pfvmwyhrfou\",\"azureBackupAgentVersion\":\"taakc\",\"isAzureBackupAgentUpgradeAvailable\":true,\"isDpmUpgradeAvailable\":true,\"extendedInfo\":{\"databaseName\":\"tmnubexkpzksmon\",\"protectedItemsCount\":1929847054,\"protectedServersCount\":1598005613,\"diskCount\":1083170526,\"usedDiskSpace\":81.92468371755585,\"availableDiskSpace\":99.15207166693078,\"refreshedAt\":\"2021-01-25T05:21:40Z\",\"azureProtectedInstances\":1364703724}},\"eTag\":\"ojvpa\",\"location\":\"qgxy\",\"tags\":{\"xozap\":\"cmbqfqvmk\",\"dd\":\"helxprglya\",\"rjxgciqib\":\"kcbcue\",\"sdqrhzoymibmrq\":\"hos\"},\"id\":\"ibahwflus\",\"name\":\"dtmhrkwofyyvoqa\",\"type\":\"piexpbtgiw\"}") - .toObject(BackupEngineBaseResourceInner.class); - Assertions.assertEquals("qgxy", model.location()); - Assertions.assertEquals("cmbqfqvmk", model.tags().get("xozap")); - Assertions.assertEquals("xcxrsl", model.properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.properties().backupManagementType()); - Assertions.assertEquals("wuoegrpk", model.properties().registrationStatus()); - Assertions.assertEquals("wniyqsluicpd", model.properties().backupEngineState()); - Assertions.assertEquals("kzzlvmbmpaxmodf", model.properties().healthStatus()); - Assertions.assertEquals(false, model.properties().canReRegister()); - Assertions.assertEquals("yw", model.properties().backupEngineId()); - Assertions.assertEquals("pfvmwyhrfou", model.properties().dpmVersion()); - Assertions.assertEquals("taakc", model.properties().azureBackupAgentVersion()); - Assertions.assertEquals(true, model.properties().isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(true, model.properties().isDpmUpgradeAvailable()); - Assertions.assertEquals("tmnubexkpzksmon", model.properties().extendedInfo().databaseName()); - Assertions.assertEquals(1929847054, model.properties().extendedInfo().protectedItemsCount()); - Assertions.assertEquals(1598005613, model.properties().extendedInfo().protectedServersCount()); - Assertions.assertEquals(1083170526, model.properties().extendedInfo().diskCount()); - Assertions.assertEquals(81.92468371755585D, model.properties().extendedInfo().usedDiskSpace()); - Assertions.assertEquals(99.15207166693078D, model.properties().extendedInfo().availableDiskSpace()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-01-25T05:21:40Z"), model.properties().extendedInfo().refreshedAt()); - Assertions.assertEquals(1364703724, model.properties().extendedInfo().azureProtectedInstances()); - Assertions.assertEquals("ojvpa", model.etag()); - } - - @Test - public void testSerialize() { - BackupEngineBaseResourceInner model = - new BackupEngineBaseResourceInner() - .withLocation("qgxy") - .withTags( - mapOf("xozap", "cmbqfqvmk", "dd", "helxprglya", "rjxgciqib", "kcbcue", "sdqrhzoymibmrq", "hos")) - .withProperties( - new BackupEngineBase() - .withFriendlyName("xcxrsl") - .withBackupManagementType(BackupManagementType.AZURE_WORKLOAD) - .withRegistrationStatus("wuoegrpk") - .withBackupEngineState("wniyqsluicpd") - .withHealthStatus("kzzlvmbmpaxmodf") - .withCanReRegister(false) - .withBackupEngineId("yw") - .withDpmVersion("pfvmwyhrfou") - .withAzureBackupAgentVersion("taakc") - .withIsAzureBackupAgentUpgradeAvailable(true) - .withIsDpmUpgradeAvailable(true) - .withExtendedInfo( - new BackupEngineExtendedInfo() - .withDatabaseName("tmnubexkpzksmon") - .withProtectedItemsCount(1929847054) - .withProtectedServersCount(1598005613) - .withDiskCount(1083170526) - .withUsedDiskSpace(81.92468371755585D) - .withAvailableDiskSpace(99.15207166693078D) - .withRefreshedAt(OffsetDateTime.parse("2021-01-25T05:21:40Z")) - .withAzureProtectedInstances(1364703724))) - .withEtag("ojvpa"); - model = BinaryData.fromObject(model).toObject(BackupEngineBaseResourceInner.class); - Assertions.assertEquals("qgxy", model.location()); - Assertions.assertEquals("cmbqfqvmk", model.tags().get("xozap")); - Assertions.assertEquals("xcxrsl", model.properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.properties().backupManagementType()); - Assertions.assertEquals("wuoegrpk", model.properties().registrationStatus()); - Assertions.assertEquals("wniyqsluicpd", model.properties().backupEngineState()); - Assertions.assertEquals("kzzlvmbmpaxmodf", model.properties().healthStatus()); - Assertions.assertEquals(false, model.properties().canReRegister()); - Assertions.assertEquals("yw", model.properties().backupEngineId()); - Assertions.assertEquals("pfvmwyhrfou", model.properties().dpmVersion()); - Assertions.assertEquals("taakc", model.properties().azureBackupAgentVersion()); - Assertions.assertEquals(true, model.properties().isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(true, model.properties().isDpmUpgradeAvailable()); - Assertions.assertEquals("tmnubexkpzksmon", model.properties().extendedInfo().databaseName()); - Assertions.assertEquals(1929847054, model.properties().extendedInfo().protectedItemsCount()); - Assertions.assertEquals(1598005613, model.properties().extendedInfo().protectedServersCount()); - Assertions.assertEquals(1083170526, model.properties().extendedInfo().diskCount()); - Assertions.assertEquals(81.92468371755585D, model.properties().extendedInfo().usedDiskSpace()); - Assertions.assertEquals(99.15207166693078D, model.properties().extendedInfo().availableDiskSpace()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-01-25T05:21:40Z"), model.properties().extendedInfo().refreshedAt()); - Assertions.assertEquals(1364703724, model.properties().extendedInfo().azureProtectedInstances()); - Assertions.assertEquals("ojvpa", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index df3f59e5e3071..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineBaseResourceListTests.java +++ /dev/null @@ -1,187 +0,0 @@ -// 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.fluent.models.BackupEngineBaseResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineBase; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineBaseResourceList; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BackupEngineBaseResourceListTests { - @Test - public void testDeserialize() { - BackupEngineBaseResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"hhkxbp\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"jhxxjyn\",\"backupEngineState\":\"divkrt\",\"healthStatus\":\"bxqz\",\"canReRegister\":false,\"backupEngineId\":\"fauvjfdxx\",\"dpmVersion\":\"e\",\"azureBackupAgentVersion\":\"t\",\"isAzureBackupAgentUpgradeAvailable\":true,\"isDpmUpgradeAvailable\":false},\"eTag\":\"qmcbxvwvxyslqbhs\",\"location\":\"xoblytkbl\",\"tags\":{\"rn\":\"wwwfbkr\",\"bfovasrruvwbhsq\":\"vshqjohxcr\",\"gjb\":\"sub\",\"rfbjf\":\"rxbpyb\"},\"id\":\"twss\",\"name\":\"t\",\"type\":\"tpvjzbexilzznfqq\"},{\"properties\":{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"pmqtaru\",\"backupManagementType\":\"MAB\",\"registrationStatus\":\"kcjhwqytjrybnwj\",\"backupEngineState\":\"gdrjervnaenqpe\",\"healthStatus\":\"ndoygmifthnzdnd\",\"canReRegister\":true,\"backupEngineId\":\"ayqigynduhav\",\"dpmVersion\":\"lkthu\",\"azureBackupAgentVersion\":\"qolbgyc\",\"isAzureBackupAgentUpgradeAvailable\":true,\"isDpmUpgradeAvailable\":false},\"eTag\":\"ccymvaolpsslql\",\"location\":\"mmdnbbglzps\",\"tags\":{\"cwyhzdxssa\":\"d\",\"od\":\"bzmnvdfznud\",\"cblylpstdbhhxsr\":\"xzb\",\"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},\"eTag\":\"ur\",\"location\":\"odkwobd\",\"tags\":{\"gqxndlkzgxhuripl\":\"tibqdxbxwakb\",\"bxmubyynt\":\"podxunkb\",\"tkoievseotgq\":\"lrb\",\"tmuwlauwzi\":\"l\"},\"id\":\"xbmp\",\"name\":\"cjefuzmu\",\"type\":\"pbttdum\"},{\"properties\":{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"pxebmnzbt\",\"backupManagementType\":\"AzureSql\",\"registrationStatus\":\"glkfg\",\"backupEngineState\":\"dneu\",\"healthStatus\":\"fphsdyhtozfikdow\",\"canReRegister\":false,\"backupEngineId\":\"v\",\"dpmVersion\":\"xclvit\",\"azureBackupAgentVersion\":\"qzonosggbhcohf\",\"isAzureBackupAgentUpgradeAvailable\":false,\"isDpmUpgradeAvailable\":false},\"eTag\":\"ljuti\",\"location\":\"swacffgdkzz\",\"tags\":{\"a\":\"fvhqc\",\"uflrwd\":\"lvpnpp\",\"hgw\":\"hdlxyjrxsagafcn\",\"q\":\"apnedgfbcvkc\"},\"id\":\"pkeqdcvdrhvoo\",\"name\":\"sotbob\",\"type\":\"dopcjwvnh\"}],\"nextLink\":\"d\"}") - .toObject(BackupEngineBaseResourceList.class); - Assertions.assertEquals("d", model.nextLink()); - Assertions.assertEquals("xoblytkbl", model.value().get(0).location()); - Assertions.assertEquals("wwwfbkr", model.value().get(0).tags().get("rn")); - Assertions.assertEquals("hhkxbp", model.value().get(0).properties().friendlyName()); - Assertions - .assertEquals( - BackupManagementType.AZURE_WORKLOAD, model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("jhxxjyn", model.value().get(0).properties().registrationStatus()); - Assertions.assertEquals("divkrt", model.value().get(0).properties().backupEngineState()); - Assertions.assertEquals("bxqz", model.value().get(0).properties().healthStatus()); - Assertions.assertEquals(false, model.value().get(0).properties().canReRegister()); - Assertions.assertEquals("fauvjfdxx", model.value().get(0).properties().backupEngineId()); - Assertions.assertEquals("e", model.value().get(0).properties().dpmVersion()); - Assertions.assertEquals("t", model.value().get(0).properties().azureBackupAgentVersion()); - Assertions.assertEquals(true, model.value().get(0).properties().isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(false, model.value().get(0).properties().isDpmUpgradeAvailable()); - Assertions.assertEquals("qmcbxvwvxyslqbhs", model.value().get(0).etag()); - } - - @Test - public void testSerialize() { - BackupEngineBaseResourceList model = - new BackupEngineBaseResourceList() - .withNextLink("d") - .withValue( - Arrays - .asList( - new BackupEngineBaseResourceInner() - .withLocation("xoblytkbl") - .withTags( - mapOf( - "rn", - "wwwfbkr", - "bfovasrruvwbhsq", - "vshqjohxcr", - "gjb", - "sub", - "rfbjf", - "rxbpyb")) - .withProperties( - new BackupEngineBase() - .withFriendlyName("hhkxbp") - .withBackupManagementType(BackupManagementType.AZURE_WORKLOAD) - .withRegistrationStatus("jhxxjyn") - .withBackupEngineState("divkrt") - .withHealthStatus("bxqz") - .withCanReRegister(false) - .withBackupEngineId("fauvjfdxx") - .withDpmVersion("e") - .withAzureBackupAgentVersion("t") - .withIsAzureBackupAgentUpgradeAvailable(true) - .withIsDpmUpgradeAvailable(false)) - .withEtag("qmcbxvwvxyslqbhs"), - new BackupEngineBaseResourceInner() - .withLocation("mmdnbbglzps") - .withTags( - mapOf( - "cwyhzdxssa", - "d", - "od", - "bzmnvdfznud", - "cblylpstdbhhxsr", - "xzb", - "erscdntne", - "dzu")) - .withProperties( - new BackupEngineBase() - .withFriendlyName("pmqtaru") - .withBackupManagementType(BackupManagementType.MAB) - .withRegistrationStatus("kcjhwqytjrybnwj") - .withBackupEngineState("gdrjervnaenqpe") - .withHealthStatus("ndoygmifthnzdnd") - .withCanReRegister(true) - .withBackupEngineId("ayqigynduhav") - .withDpmVersion("lkthu") - .withAzureBackupAgentVersion("qolbgyc") - .withIsAzureBackupAgentUpgradeAvailable(true) - .withIsDpmUpgradeAvailable(false)) - .withEtag("ccymvaolpsslql"), - new BackupEngineBaseResourceInner() - .withLocation("odkwobd") - .withTags( - mapOf( - "gqxndlkzgxhuripl", - "tibqdxbxwakb", - "bxmubyynt", - "podxunkb", - "tkoievseotgq", - "lrb", - "tmuwlauwzi", - "l")) - .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)) - .withEtag("ur"), - new BackupEngineBaseResourceInner() - .withLocation("swacffgdkzz") - .withTags( - mapOf( - "a", - "fvhqc", - "uflrwd", - "lvpnpp", - "hgw", - "hdlxyjrxsagafcn", - "q", - "apnedgfbcvkc")) - .withProperties( - new BackupEngineBase() - .withFriendlyName("pxebmnzbt") - .withBackupManagementType(BackupManagementType.AZURE_SQL) - .withRegistrationStatus("glkfg") - .withBackupEngineState("dneu") - .withHealthStatus("fphsdyhtozfikdow") - .withCanReRegister(false) - .withBackupEngineId("v") - .withDpmVersion("xclvit") - .withAzureBackupAgentVersion("qzonosggbhcohf") - .withIsAzureBackupAgentUpgradeAvailable(false) - .withIsDpmUpgradeAvailable(false)) - .withEtag("ljuti"))); - model = BinaryData.fromObject(model).toObject(BackupEngineBaseResourceList.class); - Assertions.assertEquals("d", model.nextLink()); - Assertions.assertEquals("xoblytkbl", model.value().get(0).location()); - Assertions.assertEquals("wwwfbkr", model.value().get(0).tags().get("rn")); - Assertions.assertEquals("hhkxbp", model.value().get(0).properties().friendlyName()); - Assertions - .assertEquals( - BackupManagementType.AZURE_WORKLOAD, model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("jhxxjyn", model.value().get(0).properties().registrationStatus()); - Assertions.assertEquals("divkrt", model.value().get(0).properties().backupEngineState()); - Assertions.assertEquals("bxqz", model.value().get(0).properties().healthStatus()); - Assertions.assertEquals(false, model.value().get(0).properties().canReRegister()); - Assertions.assertEquals("fauvjfdxx", model.value().get(0).properties().backupEngineId()); - Assertions.assertEquals("e", model.value().get(0).properties().dpmVersion()); - Assertions.assertEquals("t", model.value().get(0).properties().azureBackupAgentVersion()); - Assertions.assertEquals(true, model.value().get(0).properties().isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(false, model.value().get(0).properties().isDpmUpgradeAvailable()); - Assertions.assertEquals("qmcbxvwvxyslqbhs", model.value().get(0).etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 4e9009a49381d..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineBaseTests.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class BackupEngineBaseTests { - @Test - public void testDeserialize() { - BackupEngineBase model = - BinaryData - .fromString( - "{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"oenwashr\",\"backupManagementType\":\"Invalid\",\"registrationStatus\":\"cnqxwbpokulpi\",\"backupEngineState\":\"waasip\",\"healthStatus\":\"iobyu\",\"canReRegister\":false,\"backupEngineId\":\"qlpqwcciuq\",\"dpmVersion\":\"dbutauvfbtkuwhh\",\"azureBackupAgentVersion\":\"ykojoxafnndlpic\",\"isAzureBackupAgentUpgradeAvailable\":false,\"isDpmUpgradeAvailable\":true,\"extendedInfo\":{\"databaseName\":\"dyh\",\"protectedItemsCount\":1262943142,\"protectedServersCount\":823230249,\"diskCount\":426200809,\"usedDiskSpace\":65.57203087294614,\"availableDiskSpace\":82.71397462119481,\"refreshedAt\":\"2021-02-14T23:28:55Z\",\"azureProtectedInstances\":188406178}}") - .toObject(BackupEngineBase.class); - Assertions.assertEquals("oenwashr", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.INVALID, model.backupManagementType()); - Assertions.assertEquals("cnqxwbpokulpi", model.registrationStatus()); - Assertions.assertEquals("waasip", model.backupEngineState()); - Assertions.assertEquals("iobyu", model.healthStatus()); - Assertions.assertEquals(false, model.canReRegister()); - Assertions.assertEquals("qlpqwcciuq", model.backupEngineId()); - Assertions.assertEquals("dbutauvfbtkuwhh", model.dpmVersion()); - Assertions.assertEquals("ykojoxafnndlpic", model.azureBackupAgentVersion()); - Assertions.assertEquals(false, model.isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(true, model.isDpmUpgradeAvailable()); - Assertions.assertEquals("dyh", model.extendedInfo().databaseName()); - Assertions.assertEquals(1262943142, model.extendedInfo().protectedItemsCount()); - Assertions.assertEquals(823230249, model.extendedInfo().protectedServersCount()); - Assertions.assertEquals(426200809, model.extendedInfo().diskCount()); - Assertions.assertEquals(65.57203087294614D, model.extendedInfo().usedDiskSpace()); - Assertions.assertEquals(82.71397462119481D, model.extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-14T23:28:55Z"), model.extendedInfo().refreshedAt()); - Assertions.assertEquals(188406178, model.extendedInfo().azureProtectedInstances()); - } - - @Test - public void testSerialize() { - BackupEngineBase model = - new BackupEngineBase() - .withFriendlyName("oenwashr") - .withBackupManagementType(BackupManagementType.INVALID) - .withRegistrationStatus("cnqxwbpokulpi") - .withBackupEngineState("waasip") - .withHealthStatus("iobyu") - .withCanReRegister(false) - .withBackupEngineId("qlpqwcciuq") - .withDpmVersion("dbutauvfbtkuwhh") - .withAzureBackupAgentVersion("ykojoxafnndlpic") - .withIsAzureBackupAgentUpgradeAvailable(false) - .withIsDpmUpgradeAvailable(true) - .withExtendedInfo( - new BackupEngineExtendedInfo() - .withDatabaseName("dyh") - .withProtectedItemsCount(1262943142) - .withProtectedServersCount(823230249) - .withDiskCount(426200809) - .withUsedDiskSpace(65.57203087294614D) - .withAvailableDiskSpace(82.71397462119481D) - .withRefreshedAt(OffsetDateTime.parse("2021-02-14T23:28:55Z")) - .withAzureProtectedInstances(188406178)); - model = BinaryData.fromObject(model).toObject(BackupEngineBase.class); - Assertions.assertEquals("oenwashr", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.INVALID, model.backupManagementType()); - Assertions.assertEquals("cnqxwbpokulpi", model.registrationStatus()); - Assertions.assertEquals("waasip", model.backupEngineState()); - Assertions.assertEquals("iobyu", model.healthStatus()); - Assertions.assertEquals(false, model.canReRegister()); - Assertions.assertEquals("qlpqwcciuq", model.backupEngineId()); - Assertions.assertEquals("dbutauvfbtkuwhh", model.dpmVersion()); - Assertions.assertEquals("ykojoxafnndlpic", model.azureBackupAgentVersion()); - Assertions.assertEquals(false, model.isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(true, model.isDpmUpgradeAvailable()); - Assertions.assertEquals("dyh", model.extendedInfo().databaseName()); - Assertions.assertEquals(1262943142, model.extendedInfo().protectedItemsCount()); - Assertions.assertEquals(823230249, model.extendedInfo().protectedServersCount()); - Assertions.assertEquals(426200809, model.extendedInfo().diskCount()); - Assertions.assertEquals(65.57203087294614D, model.extendedInfo().usedDiskSpace()); - Assertions.assertEquals(82.71397462119481D, model.extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-14T23:28:55Z"), model.extendedInfo().refreshedAt()); - Assertions.assertEquals(188406178, 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 deleted file mode 100644 index 97a7fbfd36dd5..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEngineExtendedInfoTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineExtendedInfo; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BackupEngineExtendedInfoTests { - @Test - public void testDeserialize() { - BackupEngineExtendedInfo model = - BinaryData - .fromString( - "{\"databaseName\":\"ljxywsu\",\"protectedItemsCount\":678747249,\"protectedServersCount\":188945883,\"diskCount\":371488938,\"usedDiskSpace\":83.93898415898154,\"availableDiskSpace\":66.38788234362916,\"refreshedAt\":\"2021-10-23T00:50:26Z\",\"azureProtectedInstances\":1114834303}") - .toObject(BackupEngineExtendedInfo.class); - Assertions.assertEquals("ljxywsu", model.databaseName()); - Assertions.assertEquals(678747249, model.protectedItemsCount()); - Assertions.assertEquals(188945883, model.protectedServersCount()); - Assertions.assertEquals(371488938, model.diskCount()); - Assertions.assertEquals(83.93898415898154D, model.usedDiskSpace()); - Assertions.assertEquals(66.38788234362916D, model.availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-23T00:50:26Z"), model.refreshedAt()); - Assertions.assertEquals(1114834303, model.azureProtectedInstances()); - } - - @Test - public void testSerialize() { - BackupEngineExtendedInfo model = - new BackupEngineExtendedInfo() - .withDatabaseName("ljxywsu") - .withProtectedItemsCount(678747249) - .withProtectedServersCount(188945883) - .withDiskCount(371488938) - .withUsedDiskSpace(83.93898415898154D) - .withAvailableDiskSpace(66.38788234362916D) - .withRefreshedAt(OffsetDateTime.parse("2021-10-23T00:50:26Z")) - .withAzureProtectedInstances(1114834303); - model = BinaryData.fromObject(model).toObject(BackupEngineExtendedInfo.class); - Assertions.assertEquals("ljxywsu", model.databaseName()); - Assertions.assertEquals(678747249, model.protectedItemsCount()); - Assertions.assertEquals(188945883, model.protectedServersCount()); - Assertions.assertEquals(371488938, model.diskCount()); - Assertions.assertEquals(83.93898415898154D, model.usedDiskSpace()); - Assertions.assertEquals(66.38788234362916D, model.availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-23T00:50:26Z"), model.refreshedAt()); - Assertions.assertEquals(1114834303, model.azureProtectedInstances()); - } -} 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 deleted file mode 100644 index 056919fccb903..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupEnginesListMockTests.java +++ /dev/null @@ -1,103 +0,0 @@ -// 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupEngineBaseResource; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupEnginesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"backupEngineType\":\"BackupEngineBase\",\"friendlyName\":\"liys\",\"backupManagementType\":\"DefaultBackup\",\"registrationStatus\":\"vmwfauxxep\",\"backupEngineState\":\"wbormcqmi\",\"healthStatus\":\"ijqpkzfbojxjmcs\",\"canReRegister\":true,\"backupEngineId\":\"ixvcpwnkwywzwo\",\"dpmVersion\":\"lickduoi\",\"azureBackupAgentVersion\":\"amt\",\"isAzureBackupAgentUpgradeAvailable\":true,\"isDpmUpgradeAvailable\":true,\"extendedInfo\":{\"databaseName\":\"wzawnvsbcfhzagxn\",\"protectedItemsCount\":1729449606,\"protectedServersCount\":1098770693,\"diskCount\":1592002394,\"usedDiskSpace\":74.71663227511596,\"availableDiskSpace\":94.07358320935018,\"refreshedAt\":\"2021-08-18T00:01:16Z\",\"azureProtectedInstances\":1884652860}},\"eTag\":\"futrwpweryekzkd\",\"location\":\"meottawj\",\"tags\":{\"tfvpndpmiljpn\":\"xwwhnh\",\"zp\":\"ynudqllzsa\",\"zlrayme\":\"lxeehuxiq\"},\"id\":\"xls\",\"name\":\"ihmxrfdsajredn\",\"type\":\"yyshtuwgmevua\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.backupEngines().list("yh", "w", "v", "atbwbqam", Context.NONE); - - Assertions.assertEquals("meottawj", response.iterator().next().location()); - Assertions.assertEquals("xwwhnh", response.iterator().next().tags().get("tfvpndpmiljpn")); - Assertions.assertEquals("liys", response.iterator().next().properties().friendlyName()); - Assertions - .assertEquals( - BackupManagementType.DEFAULT_BACKUP, response.iterator().next().properties().backupManagementType()); - Assertions.assertEquals("vmwfauxxep", response.iterator().next().properties().registrationStatus()); - Assertions.assertEquals("wbormcqmi", response.iterator().next().properties().backupEngineState()); - Assertions.assertEquals("ijqpkzfbojxjmcs", response.iterator().next().properties().healthStatus()); - Assertions.assertEquals(true, response.iterator().next().properties().canReRegister()); - Assertions.assertEquals("ixvcpwnkwywzwo", response.iterator().next().properties().backupEngineId()); - Assertions.assertEquals("lickduoi", response.iterator().next().properties().dpmVersion()); - Assertions.assertEquals("amt", response.iterator().next().properties().azureBackupAgentVersion()); - Assertions.assertEquals(true, response.iterator().next().properties().isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(true, response.iterator().next().properties().isDpmUpgradeAvailable()); - Assertions - .assertEquals("wzawnvsbcfhzagxn", response.iterator().next().properties().extendedInfo().databaseName()); - Assertions - .assertEquals(1729449606, response.iterator().next().properties().extendedInfo().protectedItemsCount()); - Assertions - .assertEquals(1098770693, response.iterator().next().properties().extendedInfo().protectedServersCount()); - Assertions.assertEquals(1592002394, response.iterator().next().properties().extendedInfo().diskCount()); - Assertions - .assertEquals(74.71663227511596D, response.iterator().next().properties().extendedInfo().usedDiskSpace()); - Assertions - .assertEquals( - 94.07358320935018D, response.iterator().next().properties().extendedInfo().availableDiskSpace()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-08-18T00:01:16Z"), - response.iterator().next().properties().extendedInfo().refreshedAt()); - Assertions - .assertEquals(1884652860, response.iterator().next().properties().extendedInfo().azureProtectedInstances()); - Assertions.assertEquals("futrwpweryekzkd", 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 deleted file mode 100644 index 2209110ea4380..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupJobsListMockTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.JobResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupJobsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"jobType\":\"Job\",\"entityFriendlyName\":\"kuejk\",\"backupManagementType\":\"AzureSql\",\"operation\":\"ztjofqcvovjufyc\",\"status\":\"mlbemy\",\"startTime\":\"2021-08-26T00:52:57Z\",\"endTime\":\"2021-03-10T12:58:51Z\",\"activityId\":\"xeg\"},\"eTag\":\"ortudawlpjfel\",\"location\":\"erppt\",\"tags\":{\"alwcjgckbb\":\"qnzmnhiil\",\"fa\":\"ccgzpraoxnyu\"},\"id\":\"sgftipwc\",\"name\":\"byubhiqdxyurnpn\",\"type\":\"hza\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.backupJobs().list("z", "caqt", "ltcoqc", "jpds", Context.NONE); - - Assertions.assertEquals("erppt", response.iterator().next().location()); - Assertions.assertEquals("qnzmnhiil", response.iterator().next().tags().get("alwcjgckbb")); - Assertions.assertEquals("kuejk", response.iterator().next().properties().entityFriendlyName()); - Assertions - .assertEquals( - BackupManagementType.AZURE_SQL, response.iterator().next().properties().backupManagementType()); - Assertions.assertEquals("ztjofqcvovjufyc", response.iterator().next().properties().operation()); - Assertions.assertEquals("mlbemy", response.iterator().next().properties().status()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-08-26T00:52:57Z"), response.iterator().next().properties().startTime()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-03-10T12:58:51Z"), response.iterator().next().properties().endTime()); - Assertions.assertEquals("xeg", response.iterator().next().properties().activityId()); - Assertions.assertEquals("ortudawlpjfel", 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 deleted file mode 100644 index de38f37b810f6..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupManagementUsageInnerTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// 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.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; -import org.junit.jupiter.api.Test; - -public final class BackupManagementUsageInnerTests { - @Test - public void testDeserialize() { - BackupManagementUsageInner model = - BinaryData - .fromString( - "{\"unit\":\"Count\",\"quotaPeriod\":\"dvkaozw\",\"nextResetTime\":\"2021-02-22T11:39:16Z\",\"currentValue\":4625530429549295340,\"limit\":4205096906528038378,\"name\":{\"value\":\"k\",\"localizedValue\":\"yxolniwp\"}}") - .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()); - } - - @Test - public void testSerialize() { - 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()); - } -} 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 deleted file mode 100644 index c01abb06fec20..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupManagementUsageListTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.models.UsagesUnit; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BackupManagementUsageListTests { - @Test - public void testDeserialize() { - 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\"}}]}") - .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()); - } - - @Test - public void testSerialize() { - 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()); - } -} 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 deleted file mode 100644 index 1e9b487dddb2b..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupPoliciesListMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionPolicyResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupPoliciesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":873173770,\"resourceGuardOperationRequests\":[\"wqulsutrjbhxykf\",\"y\"]},\"eTag\":\"zvqqugdrftbcvexr\",\"location\":\"uquowtljvfwhr\",\"tags\":{\"ulmdgglm\":\"khyxvrqtvbcz\",\"ngpszngafpg\":\"pjpfseykgs\",\"ujcngo\":\"lkvec\",\"nub\":\"dyedmzrgjfo\"},\"id\":\"oitpkpztrgdgx\",\"name\":\"coqra\",\"type\":\"wugyx\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.backupPolicies().list("jkpdxphlkksnm", "zvyfijdkzuqnwsi", "huqol", Context.NONE); - - Assertions.assertEquals("uquowtljvfwhr", response.iterator().next().location()); - Assertions.assertEquals("khyxvrqtvbcz", response.iterator().next().tags().get("ulmdgglm")); - Assertions.assertEquals(873173770, response.iterator().next().properties().protectedItemsCount()); - Assertions - .assertEquals( - "wqulsutrjbhxykf", response.iterator().next().properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("zvqqugdrftbcvexr", 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 deleted file mode 100644 index ce506f730498d..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectableItemsListMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadProtectableItemResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupProtectableItemsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"nokcv\",\"workloadType\":\"ubseskvcuartr\",\"friendlyName\":\"nlp\",\"protectionState\":\"Protected\"},\"eTag\":\"ycndzf\",\"location\":\"ivjreuyk\",\"tags\":{\"bxoeeonql\":\"nwagl\",\"dbpb\":\"fwmyymv\",\"rcssbzhddubbnq\":\"fckdvez\"},\"id\":\"b\",\"name\":\"h\",\"type\":\"alehpav\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.backupProtectableItems().list("x", "mmpuj", "vyqlkjuvsmbmslzo", "ovwzdbpqvybefg", Context.NONE); - - Assertions.assertEquals("ivjreuyk", response.iterator().next().location()); - Assertions.assertEquals("nwagl", response.iterator().next().tags().get("bxoeeonql")); - Assertions.assertEquals("nokcv", response.iterator().next().properties().backupManagementType()); - Assertions.assertEquals("ubseskvcuartr", response.iterator().next().properties().workloadType()); - Assertions.assertEquals("nlp", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, response.iterator().next().properties().protectionState()); - Assertions.assertEquals("ycndzf", response.iterator().next().etag()); - } -} 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 deleted file mode 100644 index 57f8f8932656b..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectedItemsListMockTests.java +++ /dev/null @@ -1,95 +0,0 @@ -// 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItemResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupProtectedItemsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"DPM\",\"workloadType\":\"SQLDataBase\",\"containerName\":\"b\",\"sourceResourceId\":\"qxvhcsyhzlwxa\",\"policyId\":\"ov\",\"lastRecoveryPoint\":\"2021-07-10T01:02:29Z\",\"backupSetName\":\"dndsbdweade\",\"createMode\":\"Invalid\",\"deferredDeleteTimeInUTC\":\"2021-07-12T21:11:14Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"agttm\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":true,\"resourceGuardOperationRequests\":[\"qylkjztjiu\",\"zjcg\",\"xitp\"],\"isArchiveEnabled\":true,\"policyName\":\"cpdltkrlg\",\"softDeleteRetentionPeriod\":408763108},\"eTag\":\"drvcqguef\",\"location\":\"hompheqdurelyu\",\"tags\":{\"yec\":\"youmpc\",\"jbrzmqxucyc\":\"cdigpt\"},\"id\":\"joclxiutgjcyzy\",\"name\":\"jdnrqjbt\",\"type\":\"jeaoqaqbz\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.backupProtectedItems().list("ccnuhiig", "yl", "ui", "vxva", Context.NONE); - - Assertions.assertEquals("hompheqdurelyu", response.iterator().next().location()); - Assertions.assertEquals("youmpc", response.iterator().next().tags().get("yec")); - Assertions.assertEquals("b", response.iterator().next().properties().containerName()); - Assertions.assertEquals("qxvhcsyhzlwxa", response.iterator().next().properties().sourceResourceId()); - Assertions.assertEquals("ov", response.iterator().next().properties().policyId()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-07-10T01:02:29Z"), - response.iterator().next().properties().lastRecoveryPoint()); - Assertions.assertEquals("dndsbdweade", response.iterator().next().properties().backupSetName()); - Assertions.assertEquals(CreateMode.INVALID, response.iterator().next().properties().createMode()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-07-12T21:11:14Z"), - response.iterator().next().properties().deferredDeleteTimeInUtc()); - Assertions.assertEquals(true, response.iterator().next().properties().isScheduledForDeferredDelete()); - Assertions.assertEquals("agttm", response.iterator().next().properties().deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, response.iterator().next().properties().isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(true, response.iterator().next().properties().isRehydrate()); - Assertions - .assertEquals( - "qylkjztjiu", response.iterator().next().properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, response.iterator().next().properties().isArchiveEnabled()); - Assertions.assertEquals("cpdltkrlg", response.iterator().next().properties().policyName()); - Assertions.assertEquals(408763108, response.iterator().next().properties().softDeleteRetentionPeriod()); - Assertions.assertEquals("drvcqguef", 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 deleted file mode 100644 index 5a103a8c7028e..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionContainersListMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionContainerResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupProtectionContainersListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"vw\",\"backupManagementType\":\"AzureBackupServer\",\"registrationStatus\":\"ehchk\",\"healthStatus\":\"fmpqumqyjg\",\"protectableObjectType\":\"zulo\"},\"eTag\":\"aeuzanh\",\"location\":\"fnhsenwphp\",\"tags\":{\"ufwbeqrku\":\"gqjclidftujwj\",\"qnmdvhazcvjy\":\"rhtssr\",\"w\":\"iqswbqer\"},\"id\":\"iytxt\",\"name\":\"gukvlbpkt\",\"type\":\"dstyouam\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.backupProtectionContainers().list("wugiqjti", "gqgdminictteajoh", "ygspnbonhpczykm", Context.NONE); - - Assertions.assertEquals("fnhsenwphp", response.iterator().next().location()); - Assertions.assertEquals("gqjclidftujwj", response.iterator().next().tags().get("ufwbeqrku")); - Assertions.assertEquals("vw", response.iterator().next().properties().friendlyName()); - Assertions - .assertEquals( - BackupManagementType.AZURE_BACKUP_SERVER, - response.iterator().next().properties().backupManagementType()); - Assertions.assertEquals("ehchk", response.iterator().next().properties().registrationStatus()); - Assertions.assertEquals("fmpqumqyjg", response.iterator().next().properties().healthStatus()); - Assertions.assertEquals("zulo", response.iterator().next().properties().protectableObjectType()); - Assertions.assertEquals("aeuzanh", 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 deleted file mode 100644 index 312078f3db511..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupProtectionIntentsListMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionIntentResource; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupProtectionIntentsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"DefaultBackup\",\"sourceResourceId\":\"yxlzgs\",\"itemId\":\"kzzltafhbzf\",\"policyId\":\"vwmbjlzqsczpg\",\"protectionState\":\"NotProtected\"},\"eTag\":\"a\",\"location\":\"fdqwowftpt\",\"tags\":{\"h\":\"jtks\",\"hvyeldotj\":\"cgqyhleseyq\",\"kukjtasb\":\"dkwisw\",\"txfkndlqvt\":\"wispkxk\"},\"id\":\"knvgmmbugtywat\",\"name\":\"qaqkuea\",\"type\":\"groeshoyg\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.backupProtectionIntents().list("jjk", "ajb", "scgdu", "sioycblevpmcl", Context.NONE); - - Assertions.assertEquals("fdqwowftpt", response.iterator().next().location()); - Assertions.assertEquals("jtks", response.iterator().next().tags().get("h")); - Assertions - .assertEquals( - BackupManagementType.DEFAULT_BACKUP, response.iterator().next().properties().backupManagementType()); - Assertions.assertEquals("yxlzgs", response.iterator().next().properties().sourceResourceId()); - Assertions.assertEquals("kzzltafhbzf", response.iterator().next().properties().itemId()); - Assertions.assertEquals("vwmbjlzqsczpg", response.iterator().next().properties().policyId()); - Assertions - .assertEquals(ProtectionStatus.NOT_PROTECTED, response.iterator().next().properties().protectionState()); - Assertions.assertEquals("a", 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 deleted file mode 100644 index 29048e4ebe95d..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupRequestResourceTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupRequestResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BackupRequestResourceTests { - @Test - public void testDeserialize() { - BackupRequestResource model = - BinaryData - .fromString( - "{\"properties\":{\"objectType\":\"BackupRequest\"},\"eTag\":\"ntoe\",\"location\":\"okdwb\",\"tags\":{\"t\":\"szzcmrvexztv\",\"lmnguxaw\":\"gsfraoyzkoow\",\"uximerqfobw\":\"aldsy\",\"r\":\"znkbykutwpfhpagm\"},\"id\":\"kdsnfdsdoakgtdl\",\"name\":\"kkze\",\"type\":\"dlhewp\"}") - .toObject(BackupRequestResource.class); - Assertions.assertEquals("okdwb", model.location()); - Assertions.assertEquals("szzcmrvexztv", model.tags().get("t")); - Assertions.assertEquals("ntoe", model.etag()); - } - - @Test - public void testSerialize() { - BackupRequestResource model = - new BackupRequestResource() - .withLocation("okdwb") - .withTags( - mapOf( - "t", - "szzcmrvexztv", - "lmnguxaw", - "gsfraoyzkoow", - "uximerqfobw", - "aldsy", - "r", - "znkbykutwpfhpagm")) - .withProperties(new BackupRequest()) - .withEtag("ntoe"); - model = BinaryData.fromObject(model).toObject(BackupRequestResource.class); - Assertions.assertEquals("okdwb", model.location()); - Assertions.assertEquals("szzcmrvexztv", model.tags().get("t")); - Assertions.assertEquals("ntoe", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index cd6a8426a6687..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupRequestTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupRequest; -import org.junit.jupiter.api.Test; - -public final class BackupRequestTests { - @Test - public void testDeserialize() { - BackupRequest model = BinaryData.fromString("{\"objectType\":\"BackupRequest\"}").toObject(BackupRequest.class); - } - - @Test - public void testSerialize() { - BackupRequest model = new BackupRequest(); - model = BinaryData.fromObject(model).toObject(BackupRequest.class); - } -} 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 deleted file mode 100644 index 193df60a7cce4..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceConfigResourceInnerTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// 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.fluent.models.BackupResourceConfigResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceConfig; -import com.azure.resourcemanager.recoveryservicesbackup.models.DedupState; -import com.azure.resourcemanager.recoveryservicesbackup.models.StorageType; -import com.azure.resourcemanager.recoveryservicesbackup.models.StorageTypeState; -import com.azure.resourcemanager.recoveryservicesbackup.models.XcoolState; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BackupResourceConfigResourceInnerTests { - @Test - public void testDeserialize() { - 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\"}") - .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(StorageTypeState.INVALID, model.properties().storageTypeState()); - Assertions.assertEquals(false, model.properties().crossRegionRestoreFlag()); - Assertions.assertEquals(DedupState.INVALID, model.properties().dedupState()); - Assertions.assertEquals(XcoolState.DISABLED, model.properties().xcoolState()); - Assertions.assertEquals("m", model.etag()); - } - - @Test - public void testSerialize() { - BackupResourceConfigResourceInner model = - new BackupResourceConfigResourceInner() - .withLocation("hmtzopbsphrup") - .withTags(mapOf("ycm", "sybbejhph", "htbmuf", "xaobhdxbmtqioqjz", "rxybqsoq", "ownoizhw")) - .withProperties( - new BackupResourceConfig() - .withStorageModelType(StorageType.INVALID) - .withStorageType(StorageType.ZONE_REDUNDANT) - .withStorageTypeState(StorageTypeState.INVALID) - .withCrossRegionRestoreFlag(false) - .withDedupState(DedupState.INVALID) - .withXcoolState(XcoolState.DISABLED)) - .withEtag("m"); - 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(StorageTypeState.INVALID, model.properties().storageTypeState()); - Assertions.assertEquals(false, model.properties().crossRegionRestoreFlag()); - Assertions.assertEquals(DedupState.INVALID, model.properties().dedupState()); - Assertions.assertEquals(XcoolState.DISABLED, model.properties().xcoolState()); - Assertions.assertEquals("m", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index e401011fd09b9..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceConfigTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceConfig; -import com.azure.resourcemanager.recoveryservicesbackup.models.DedupState; -import com.azure.resourcemanager.recoveryservicesbackup.models.StorageType; -import com.azure.resourcemanager.recoveryservicesbackup.models.StorageTypeState; -import com.azure.resourcemanager.recoveryservicesbackup.models.XcoolState; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BackupResourceConfigTests { - @Test - public void testDeserialize() { - BackupResourceConfig model = - BinaryData - .fromString( - "{\"storageModelType\":\"Invalid\",\"storageType\":\"GeoRedundant\",\"storageTypeState\":\"Unlocked\",\"crossRegionRestoreFlag\":true,\"dedupState\":\"Enabled\",\"xcoolState\":\"Invalid\"}") - .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()); - } - - @Test - public void testSerialize() { - BackupResourceConfig model = - new BackupResourceConfig() - .withStorageModelType(StorageType.INVALID) - .withStorageType(StorageType.GEO_REDUNDANT) - .withStorageTypeState(StorageTypeState.UNLOCKED) - .withCrossRegionRestoreFlag(true) - .withDedupState(DedupState.ENABLED) - .withXcoolState(XcoolState.INVALID); - 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()); - } -} 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 deleted file mode 100644 index 333fa670d1f28..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigResourceInnerTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceVaultConfigResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceVaultConfig; -import com.azure.resourcemanager.recoveryservicesbackup.models.EnhancedSecurityState; -import com.azure.resourcemanager.recoveryservicesbackup.models.SoftDeleteFeatureState; -import com.azure.resourcemanager.recoveryservicesbackup.models.StorageType; -import com.azure.resourcemanager.recoveryservicesbackup.models.StorageTypeState; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BackupResourceVaultConfigResourceInnerTests { - @Test - public void testDeserialize() { - BackupResourceVaultConfigResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"storageModelType\":\"LocallyRedundant\",\"storageType\":\"ZoneRedundant\",\"storageTypeState\":\"Locked\",\"enhancedSecurityState\":\"Invalid\",\"softDeleteFeatureState\":\"Enabled\",\"resourceGuardOperationRequests\":[\"csglum\",\"a\",\"tjaodxobnb\"],\"isSoftDeleteFeatureStateEditable\":false},\"eTag\":\"pxokajionp\",\"location\":\"mexgstxgcp\",\"tags\":{\"mcl\":\"maajrmvdjwzrlo\",\"jctbza\":\"hijco\"},\"id\":\"s\",\"name\":\"sycbkbfk\",\"type\":\"ukdkexxppofmxa\"}") - .toObject(BackupResourceVaultConfigResourceInner.class); - Assertions.assertEquals("mexgstxgcp", model.location()); - Assertions.assertEquals("maajrmvdjwzrlo", model.tags().get("mcl")); - Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, model.properties().storageModelType()); - Assertions.assertEquals(StorageType.ZONE_REDUNDANT, model.properties().storageType()); - Assertions.assertEquals(StorageTypeState.LOCKED, model.properties().storageTypeState()); - Assertions.assertEquals(EnhancedSecurityState.INVALID, model.properties().enhancedSecurityState()); - Assertions.assertEquals(SoftDeleteFeatureState.ENABLED, model.properties().softDeleteFeatureState()); - Assertions.assertEquals("csglum", model.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.properties().isSoftDeleteFeatureStateEditable()); - Assertions.assertEquals("pxokajionp", model.etag()); - } - - @Test - public void testSerialize() { - BackupResourceVaultConfigResourceInner model = - new BackupResourceVaultConfigResourceInner() - .withLocation("mexgstxgcp") - .withTags(mapOf("mcl", "maajrmvdjwzrlo", "jctbza", "hijco")) - .withProperties( - new BackupResourceVaultConfig() - .withStorageModelType(StorageType.LOCALLY_REDUNDANT) - .withStorageType(StorageType.ZONE_REDUNDANT) - .withStorageTypeState(StorageTypeState.LOCKED) - .withEnhancedSecurityState(EnhancedSecurityState.INVALID) - .withSoftDeleteFeatureState(SoftDeleteFeatureState.ENABLED) - .withResourceGuardOperationRequests(Arrays.asList("csglum", "a", "tjaodxobnb")) - .withIsSoftDeleteFeatureStateEditable(false)) - .withEtag("pxokajionp"); - model = BinaryData.fromObject(model).toObject(BackupResourceVaultConfigResourceInner.class); - Assertions.assertEquals("mexgstxgcp", model.location()); - Assertions.assertEquals("maajrmvdjwzrlo", model.tags().get("mcl")); - Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, model.properties().storageModelType()); - Assertions.assertEquals(StorageType.ZONE_REDUNDANT, model.properties().storageType()); - Assertions.assertEquals(StorageTypeState.LOCKED, model.properties().storageTypeState()); - Assertions.assertEquals(EnhancedSecurityState.INVALID, model.properties().enhancedSecurityState()); - Assertions.assertEquals(SoftDeleteFeatureState.ENABLED, model.properties().softDeleteFeatureState()); - Assertions.assertEquals("csglum", model.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.properties().isSoftDeleteFeatureStateEditable()); - Assertions.assertEquals("pxokajionp", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 262b1ed8f3c35..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupResourceVaultConfigTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceVaultConfig; -import com.azure.resourcemanager.recoveryservicesbackup.models.EnhancedSecurityState; -import com.azure.resourcemanager.recoveryservicesbackup.models.SoftDeleteFeatureState; -import com.azure.resourcemanager.recoveryservicesbackup.models.StorageType; -import com.azure.resourcemanager.recoveryservicesbackup.models.StorageTypeState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BackupResourceVaultConfigTests { - @Test - public void testDeserialize() { - BackupResourceVaultConfig model = - BinaryData - .fromString( - "{\"storageModelType\":\"ReadAccessGeoZoneRedundant\",\"storageType\":\"LocallyRedundant\",\"storageTypeState\":\"Locked\",\"enhancedSecurityState\":\"Enabled\",\"softDeleteFeatureState\":\"Disabled\",\"resourceGuardOperationRequests\":[\"xhvpmoue\"],\"isSoftDeleteFeatureStateEditable\":true}") - .toObject(BackupResourceVaultConfig.class); - Assertions.assertEquals(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT, model.storageModelType()); - Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, model.storageType()); - Assertions.assertEquals(StorageTypeState.LOCKED, model.storageTypeState()); - Assertions.assertEquals(EnhancedSecurityState.ENABLED, model.enhancedSecurityState()); - Assertions.assertEquals(SoftDeleteFeatureState.DISABLED, model.softDeleteFeatureState()); - Assertions.assertEquals("xhvpmoue", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.isSoftDeleteFeatureStateEditable()); - } - - @Test - public void testSerialize() { - BackupResourceVaultConfig model = - new BackupResourceVaultConfig() - .withStorageModelType(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT) - .withStorageType(StorageType.LOCALLY_REDUNDANT) - .withStorageTypeState(StorageTypeState.LOCKED) - .withEnhancedSecurityState(EnhancedSecurityState.ENABLED) - .withSoftDeleteFeatureState(SoftDeleteFeatureState.DISABLED) - .withResourceGuardOperationRequests(Arrays.asList("xhvpmoue")) - .withIsSoftDeleteFeatureStateEditable(true); - model = BinaryData.fromObject(model).toObject(BackupResourceVaultConfig.class); - Assertions.assertEquals(StorageType.READ_ACCESS_GEO_ZONE_REDUNDANT, model.storageModelType()); - Assertions.assertEquals(StorageType.LOCALLY_REDUNDANT, model.storageType()); - Assertions.assertEquals(StorageTypeState.LOCKED, model.storageTypeState()); - Assertions.assertEquals(EnhancedSecurityState.ENABLED, model.enhancedSecurityState()); - Assertions.assertEquals(SoftDeleteFeatureState.DISABLED, model.softDeleteFeatureState()); - Assertions.assertEquals("xhvpmoue", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.isSoftDeleteFeatureStateEditable()); - } -} 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 deleted file mode 100644 index 61f62349fc5e3..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupStatusRequestTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupStatusRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.DataSourceType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BackupStatusRequestTests { - @Test - public void testDeserialize() { - 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()); - } - - @Test - public void testSerialize() { - BackupStatusRequest model = - new BackupStatusRequest() - .withResourceType(DataSourceType.VM) - .withResourceId("dkfo") - .withPoLogicalName("nygj"); - model = BinaryData.fromObject(model).toObject(BackupStatusRequest.class); - Assertions.assertEquals(DataSourceType.VM, model.resourceType()); - Assertions.assertEquals("dkfo", model.resourceId()); - Assertions.assertEquals("nygj", 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 deleted file mode 100644 index cd3c57ef11470..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupUsageSummariesListMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementUsage; -import com.azure.resourcemanager.recoveryservicesbackup.models.UsagesUnit; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupUsageSummariesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"unit\":\"BytesPerSecond\",\"quotaPeriod\":\"ljdjuskbrreqy\",\"nextResetTime\":\"2021-11-21T07:30:22Z\",\"currentValue\":6302992004022602829,\"limit\":1905948100625439372,\"name\":{\"value\":\"pl\",\"localizedValue\":\"ysh\"}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.backupUsageSummaries().list("cbyfqxkf", "oytehqpuvjm", "qm", "dwckygroe", Context.NONE); - - Assertions.assertEquals(UsagesUnit.BYTES_PER_SECOND, response.iterator().next().unit()); - Assertions.assertEquals("ljdjuskbrreqy", response.iterator().next().quotaPeriod()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-11-21T07:30:22Z"), response.iterator().next().nextResetTime()); - Assertions.assertEquals(6302992004022602829L, response.iterator().next().currentValue()); - Assertions.assertEquals(1905948100625439372L, response.iterator().next().limit()); - Assertions.assertEquals("pl", response.iterator().next().name().value()); - Assertions.assertEquals("ysh", 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 deleted file mode 100644 index 426ae00295467..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BackupWorkloadItemsListMockTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadItemResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BackupWorkloadItemsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"workloadItemType\":\"WorkloadItem\",\"backupManagementType\":\"qymtuowogtgits\",\"workloadType\":\"zvbrzcdbanfzndsc\",\"friendlyName\":\"xeatkd\",\"protectionState\":\"Invalid\"},\"eTag\":\"rdjyibqb\",\"location\":\"aomhjrmkuhmaxl\",\"tags\":{\"hcjmo\":\"f\",\"xxqcwgaxf\":\"cancd\"},\"id\":\"vaknokzwjj\",\"name\":\"r\",\"type\":\"tixldzyyfytpqs\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .backupWorkloadItems() - .list( - "nhq", - "skndnelqkaadlknw", - "oanniyopetxi", - "cnrly", - "nucaephblkwqpat", - "bqsdtcjbctvi", - Context.NONE); - - Assertions.assertEquals("aomhjrmkuhmaxl", response.iterator().next().location()); - Assertions.assertEquals("f", response.iterator().next().tags().get("hcjmo")); - Assertions.assertEquals("qymtuowogtgits", response.iterator().next().properties().backupManagementType()); - Assertions.assertEquals("zvbrzcdbanfzndsc", response.iterator().next().properties().workloadType()); - Assertions.assertEquals("xeatkd", response.iterator().next().properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.INVALID, response.iterator().next().properties().protectionState()); - Assertions.assertEquals("rdjyibqb", response.iterator().next().etag()); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BekDetailsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BekDetailsTests.java deleted file mode 100644 index 51e55e357558e..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/BekDetailsTests.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.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.BekDetails; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BekDetailsTests { - @Test - public void testDeserialize() { - BekDetails model = - BinaryData - .fromString( - "{\"secretUrl\":\"avlg\",\"secretVaultId\":\"bmftpmdt\",\"secretData\":\"jltfvnzcyjtotpv\"}") - .toObject(BekDetails.class); - Assertions.assertEquals("avlg", model.secretUrl()); - Assertions.assertEquals("bmftpmdt", model.secretVaultId()); - Assertions.assertEquals("jltfvnzcyjtotpv", model.secretData()); - } - - @Test - public void testSerialize() { - BekDetails model = - new BekDetails().withSecretUrl("avlg").withSecretVaultId("bmftpmdt").withSecretData("jltfvnzcyjtotpv"); - model = BinaryData.fromObject(model).toObject(BekDetails.class); - Assertions.assertEquals("avlg", model.secretUrl()); - Assertions.assertEquals("bmftpmdt", model.secretVaultId()); - Assertions.assertEquals("jltfvnzcyjtotpv", model.secretData()); - } -} 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 deleted file mode 100644 index 77c93c801dfd3..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryDisplayTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryDisplay; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ClientDiscoveryDisplayTests { - @Test - public void testDeserialize() { - ClientDiscoveryDisplay model = - BinaryData - .fromString( - "{\"provider\":\"y\",\"resource\":\"hr\",\"operation\":\"dfvzwdzuhty\",\"description\":\"isdkfthwxmnteiw\"}") - .toObject(ClientDiscoveryDisplay.class); - Assertions.assertEquals("y", model.provider()); - Assertions.assertEquals("hr", model.resource()); - Assertions.assertEquals("dfvzwdzuhty", model.operation()); - Assertions.assertEquals("isdkfthwxmnteiw", model.description()); - } - - @Test - public void testSerialize() { - ClientDiscoveryDisplay model = - new ClientDiscoveryDisplay() - .withProvider("y") - .withResource("hr") - .withOperation("dfvzwdzuhty") - .withDescription("isdkfthwxmnteiw"); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryDisplay.class); - Assertions.assertEquals("y", model.provider()); - Assertions.assertEquals("hr", model.resource()); - Assertions.assertEquals("dfvzwdzuhty", model.operation()); - Assertions.assertEquals("isdkfthwxmnteiw", 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 deleted file mode 100644 index 1cce1f8226eec..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryForLogSpecificationTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForLogSpecification; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ClientDiscoveryForLogSpecificationTests { - @Test - public void testDeserialize() { - ClientDiscoveryForLogSpecification model = - BinaryData - .fromString("{\"name\":\"dtqajzyulpkudj\",\"displayName\":\"lkhbz\",\"blobDuration\":\"epgzgqexz\"}") - .toObject(ClientDiscoveryForLogSpecification.class); - Assertions.assertEquals("dtqajzyulpkudj", model.name()); - Assertions.assertEquals("lkhbz", model.displayName()); - Assertions.assertEquals("epgzgqexz", model.blobDuration()); - } - - @Test - public void testSerialize() { - ClientDiscoveryForLogSpecification model = - new ClientDiscoveryForLogSpecification() - .withName("dtqajzyulpkudj") - .withDisplayName("lkhbz") - .withBlobDuration("epgzgqexz"); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryForLogSpecification.class); - Assertions.assertEquals("dtqajzyulpkudj", model.name()); - Assertions.assertEquals("lkhbz", model.displayName()); - Assertions.assertEquals("epgzgqexz", 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 deleted file mode 100644 index 0858289dde653..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryForPropertiesTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class ClientDiscoveryForPropertiesTests { - @Test - public void testDeserialize() { - ClientDiscoveryForProperties model = - BinaryData - .fromString( - "{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"mijcmmxdcufufs\",\"displayName\":\"ymzidn\",\"blobDuration\":\"zcxtbzsgfyccsn\"},{\"name\":\"mdwzjeiachboo\",\"displayName\":\"lnrosfqp\",\"blobDuration\":\"ehzzvypyqrim\"},{\"name\":\"npvswjdkirso\",\"displayName\":\"qxhcrmn\",\"blobDuration\":\"jtckwhdso\"},{\"name\":\"iy\",\"displayName\":\"jxsqwpgrjbz\",\"blobDuration\":\"rcjxvsnbyxqabn\"}]}}") - .toObject(ClientDiscoveryForProperties.class); - Assertions.assertEquals("mijcmmxdcufufs", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("ymzidn", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions - .assertEquals("zcxtbzsgfyccsn", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - } - - @Test - public void testSerialize() { - ClientDiscoveryForProperties model = - new ClientDiscoveryForProperties() - .withServiceSpecification( - new ClientDiscoveryForServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new ClientDiscoveryForLogSpecification() - .withName("mijcmmxdcufufs") - .withDisplayName("ymzidn") - .withBlobDuration("zcxtbzsgfyccsn"), - new ClientDiscoveryForLogSpecification() - .withName("mdwzjeiachboo") - .withDisplayName("lnrosfqp") - .withBlobDuration("ehzzvypyqrim"), - new ClientDiscoveryForLogSpecification() - .withName("npvswjdkirso") - .withDisplayName("qxhcrmn") - .withBlobDuration("jtckwhdso"), - new ClientDiscoveryForLogSpecification() - .withName("iy") - .withDisplayName("jxsqwpgrjbz") - .withBlobDuration("rcjxvsnbyxqabn")))); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryForProperties.class); - Assertions.assertEquals("mijcmmxdcufufs", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("ymzidn", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions - .assertEquals("zcxtbzsgfyccsn", 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 deleted file mode 100644 index 3906421dabe26..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryForServiceSpecificationTests.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.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; -import org.junit.jupiter.api.Test; - -public final class ClientDiscoveryForServiceSpecificationTests { - @Test - public void testDeserialize() { - ClientDiscoveryForServiceSpecification model = - BinaryData - .fromString( - "{\"logSpecifications\":[{\"name\":\"cyshurzafbljjgp\",\"displayName\":\"oq\",\"blobDuration\":\"mkljavb\"}]}") - .toObject(ClientDiscoveryForServiceSpecification.class); - Assertions.assertEquals("cyshurzafbljjgp", model.logSpecifications().get(0).name()); - Assertions.assertEquals("oq", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("mkljavb", model.logSpecifications().get(0).blobDuration()); - } - - @Test - public void testSerialize() { - ClientDiscoveryForServiceSpecification model = - new ClientDiscoveryForServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new ClientDiscoveryForLogSpecification() - .withName("cyshurzafbljjgp") - .withDisplayName("oq") - .withBlobDuration("mkljavb"))); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryForServiceSpecification.class); - Assertions.assertEquals("cyshurzafbljjgp", model.logSpecifications().get(0).name()); - Assertions.assertEquals("oq", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("mkljavb", 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 deleted file mode 100644 index 395bb045f2fd7..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryResponseTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.ClientDiscoveryForProperties; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ClientDiscoveryResponseTests { - @Test - public void testDeserialize() { - ClientDiscoveryResponse model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"cph\",\"display\":{\"provider\":\"ot\",\"resource\":\"qgoulznd\",\"operation\":\"kwy\",\"description\":\"gfgibm\"},\"origin\":\"gakeqsr\",\"properties\":{}},{\"name\":\"qqedqytbciqfou\",\"display\":{\"provider\":\"mnkzsmod\",\"resource\":\"lougpbkw\",\"operation\":\"utduqktapspwgcu\",\"description\":\"tumkdosvqwhbm\"},\"origin\":\"bbjfddgmbmbexp\",\"properties\":{}},{\"name\":\"q\",\"display\":{\"provider\":\"lfp\",\"resource\":\"s\",\"operation\":\"gbquxigj\",\"description\":\"gzjaoyfhrtxilne\"},\"origin\":\"ujysvle\",\"properties\":{}}],\"nextLink\":\"qawrlyxwj\"}") - .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("qawrlyxwj", model.nextLink()); - } - - @Test - public void testSerialize() { - 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()), - new ClientDiscoveryValueForSingleApiInner() - .withName("qqedqytbciqfou") - .withDisplay( - new ClientDiscoveryDisplay() - .withProvider("mnkzsmod") - .withResource("lougpbkw") - .withOperation("utduqktapspwgcu") - .withDescription("tumkdosvqwhbm")) - .withOrigin("bbjfddgmbmbexp") - .withProperties(new ClientDiscoveryForProperties()), - new ClientDiscoveryValueForSingleApiInner() - .withName("q") - .withDisplay( - new ClientDiscoveryDisplay() - .withProvider("lfp") - .withResource("s") - .withOperation("gbquxigj") - .withDescription("gzjaoyfhrtxilne")) - .withOrigin("ujysvle") - .withProperties(new ClientDiscoveryForProperties()))) - .withNextLink("qawrlyxwj"); - 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("qawrlyxwj", 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 deleted file mode 100644 index d3d21f5f635f6..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientDiscoveryValueForSingleApiInnerTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.ClientDiscoveryForProperties; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryForServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ClientDiscoveryValueForSingleApiInnerTests { - @Test - public void testDeserialize() { - ClientDiscoveryValueForSingleApiInner model = - BinaryData - .fromString( - "{\"name\":\"prbnwbxgjvtbv\",\"display\":{\"provider\":\"szdnr\",\"resource\":\"qguhmuo\",\"operation\":\"f\",\"description\":\"wzwbnguitn\"},\"origin\":\"izgazxu\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[]}}}") - .toObject(ClientDiscoveryValueForSingleApiInner.class); - Assertions.assertEquals("prbnwbxgjvtbv", model.name()); - Assertions.assertEquals("szdnr", model.display().provider()); - Assertions.assertEquals("qguhmuo", model.display().resource()); - Assertions.assertEquals("f", model.display().operation()); - Assertions.assertEquals("wzwbnguitn", model.display().description()); - Assertions.assertEquals("izgazxu", model.origin()); - } - - @Test - public void testSerialize() { - ClientDiscoveryValueForSingleApiInner model = - new ClientDiscoveryValueForSingleApiInner() - .withName("prbnwbxgjvtbv") - .withDisplay( - new ClientDiscoveryDisplay() - .withProvider("szdnr") - .withResource("qguhmuo") - .withOperation("f") - .withDescription("wzwbnguitn")) - .withOrigin("izgazxu") - .withProperties( - new ClientDiscoveryForProperties() - .withServiceSpecification( - new ClientDiscoveryForServiceSpecification().withLogSpecifications(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(ClientDiscoveryValueForSingleApiInner.class); - Assertions.assertEquals("prbnwbxgjvtbv", model.name()); - Assertions.assertEquals("szdnr", model.display().provider()); - Assertions.assertEquals("qguhmuo", model.display().resource()); - Assertions.assertEquals("f", model.display().operation()); - Assertions.assertEquals("wzwbnguitn", model.display().description()); - Assertions.assertEquals("izgazxu", model.origin()); - } -} 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 deleted file mode 100644 index be165b166d420..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ClientScriptForConnectTests.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.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientScriptForConnect; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ClientScriptForConnectTests { - @Test - public void testDeserialize() { - ClientScriptForConnect model = - BinaryData - .fromString( - "{\"scriptContent\":\"trczzydmxzjijp\",\"scriptExtension\":\"aurkihcirlde\",\"osType\":\"rdcoxnbkkj\",\"url\":\"urnnqbnqbpiz\",\"scriptNameSuffix\":\"ltgrdogypxrxv\"}") - .toObject(ClientScriptForConnect.class); - Assertions.assertEquals("trczzydmxzjijp", model.scriptContent()); - Assertions.assertEquals("aurkihcirlde", model.scriptExtension()); - Assertions.assertEquals("rdcoxnbkkj", model.osType()); - Assertions.assertEquals("urnnqbnqbpiz", model.url()); - Assertions.assertEquals("ltgrdogypxrxv", model.scriptNameSuffix()); - } - - @Test - public void testSerialize() { - ClientScriptForConnect model = - new ClientScriptForConnect() - .withScriptContent("trczzydmxzjijp") - .withScriptExtension("aurkihcirlde") - .withOsType("rdcoxnbkkj") - .withUrl("urnnqbnqbpiz") - .withScriptNameSuffix("ltgrdogypxrxv"); - model = BinaryData.fromObject(model).toObject(ClientScriptForConnect.class); - Assertions.assertEquals("trczzydmxzjijp", model.scriptContent()); - Assertions.assertEquals("aurkihcirlde", model.scriptExtension()); - Assertions.assertEquals("rdcoxnbkkj", model.osType()); - Assertions.assertEquals("urnnqbnqbpiz", model.url()); - Assertions.assertEquals("ltgrdogypxrxv", 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 deleted file mode 100644 index b2cb87ba227ff..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ContainerIdentityInfoTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ContainerIdentityInfo; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerIdentityInfoTests { - @Test - public void testDeserialize() { - ContainerIdentityInfo model = - BinaryData - .fromString( - "{\"uniqueName\":\"ihwuhvctafsrbxrb\",\"aadTenantId\":\"li\",\"servicePrincipalClientId\":\"xihspnxwq\",\"audience\":\"nepzwakls\"}") - .toObject(ContainerIdentityInfo.class); - Assertions.assertEquals("ihwuhvctafsrbxrb", model.uniqueName()); - Assertions.assertEquals("li", model.aadTenantId()); - Assertions.assertEquals("xihspnxwq", model.servicePrincipalClientId()); - Assertions.assertEquals("nepzwakls", model.audience()); - } - - @Test - public void testSerialize() { - ContainerIdentityInfo model = - new ContainerIdentityInfo() - .withUniqueName("ihwuhvctafsrbxrb") - .withAadTenantId("li") - .withServicePrincipalClientId("xihspnxwq") - .withAudience("nepzwakls"); - model = BinaryData.fromObject(model).toObject(ContainerIdentityInfo.class); - Assertions.assertEquals("ihwuhvctafsrbxrb", model.uniqueName()); - Assertions.assertEquals("li", model.aadTenantId()); - Assertions.assertEquals("xihspnxwq", model.servicePrincipalClientId()); - Assertions.assertEquals("nepzwakls", 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 deleted file mode 100644 index 52e6f58d47730..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DailyRetentionFormatTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DailyRetentionFormat; -import com.azure.resourcemanager.recoveryservicesbackup.models.Day; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DailyRetentionFormatTests { - @Test - public void testDeserialize() { - DailyRetentionFormat model = - BinaryData - .fromString( - "{\"daysOfTheMonth\":[{\"date\":24191265,\"isLast\":true},{\"date\":1410759489,\"isLast\":false},{\"date\":2048724944,\"isLast\":false}]}") - .toObject(DailyRetentionFormat.class); - Assertions.assertEquals(24191265, model.daysOfTheMonth().get(0).date()); - Assertions.assertEquals(true, model.daysOfTheMonth().get(0).isLast()); - } - - @Test - public void testSerialize() { - DailyRetentionFormat model = - new DailyRetentionFormat() - .withDaysOfTheMonth( - Arrays - .asList( - new Day().withDate(24191265).withIsLast(true), - new Day().withDate(1410759489).withIsLast(false), - new Day().withDate(2048724944).withIsLast(false))); - model = BinaryData.fromObject(model).toObject(DailyRetentionFormat.class); - Assertions.assertEquals(24191265, model.daysOfTheMonth().get(0).date()); - Assertions.assertEquals(true, 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 deleted file mode 100644 index aaf37951557b3..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DailyRetentionScheduleTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DailyRetentionSchedule; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDuration; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDurationType; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DailyRetentionScheduleTests { - @Test - public void testDeserialize() { - DailyRetentionSchedule model = - BinaryData - .fromString( - "{\"retentionTimes\":[\"2021-10-29T01:22:50Z\",\"2021-03-21T07:03:22Z\"],\"retentionDuration\":{\"count\":2139436014,\"durationType\":\"Weeks\"}}") - .toObject(DailyRetentionSchedule.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-29T01:22:50Z"), model.retentionTimes().get(0)); - Assertions.assertEquals(2139436014, model.retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.WEEKS, model.retentionDuration().durationType()); - } - - @Test - public void testSerialize() { - DailyRetentionSchedule model = - new DailyRetentionSchedule() - .withRetentionTimes( - Arrays - .asList( - OffsetDateTime.parse("2021-10-29T01:22:50Z"), OffsetDateTime.parse("2021-03-21T07:03:22Z"))) - .withRetentionDuration( - new RetentionDuration().withCount(2139436014).withDurationType(RetentionDurationType.WEEKS)); - model = BinaryData.fromObject(model).toObject(DailyRetentionSchedule.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-29T01:22:50Z"), model.retentionTimes().get(0)); - Assertions.assertEquals(2139436014, 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/DailyScheduleTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DailyScheduleTests.java deleted file mode 100644 index edbfe2fd39dcc..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DailyScheduleTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DailySchedule; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DailyScheduleTests { - @Test - public void testDeserialize() { - DailySchedule model = - BinaryData - .fromString( - "{\"scheduleRunTimes\":[\"2020-12-25T09:47:06Z\",\"2021-05-12T13:55:02Z\",\"2021-03-24T15:15:46Z\",\"2021-10-30T01:14:58Z\"]}") - .toObject(DailySchedule.class); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-25T09:47:06Z"), model.scheduleRunTimes().get(0)); - } - - @Test - public void testSerialize() { - DailySchedule model = - new DailySchedule() - .withScheduleRunTimes( - Arrays - .asList( - OffsetDateTime.parse("2020-12-25T09:47:06Z"), - OffsetDateTime.parse("2021-05-12T13:55:02Z"), - OffsetDateTime.parse("2021-03-24T15:15:46Z"), - OffsetDateTime.parse("2021-10-30T01:14:58Z"))); - model = BinaryData.fromObject(model).toObject(DailySchedule.class); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-25T09:47:06Z"), model.scheduleRunTimes().get(0)); - } -} 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 deleted file mode 100644 index dbb2f7ff9d24a..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DayTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.Day; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DayTests { - @Test - public void testDeserialize() { - Day model = BinaryData.fromString("{\"date\":421757360,\"isLast\":true}").toObject(Day.class); - Assertions.assertEquals(421757360, model.date()); - Assertions.assertEquals(true, model.isLast()); - } - - @Test - public void testSerialize() { - Day model = new Day().withDate(421757360).withIsLast(true); - model = BinaryData.fromObject(model).toObject(Day.class); - Assertions.assertEquals(421757360, model.date()); - Assertions.assertEquals(true, 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 deleted file mode 100644 index 5d27ce1194cf7..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DeletedProtectionContainersListMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionContainerResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DeletedProtectionContainersListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"eyguq\",\"backupManagementType\":\"AzureSql\",\"registrationStatus\":\"ii\",\"healthStatus\":\"spxlzde\",\"protectableObjectType\":\"grijwaiufanrayb\"},\"eTag\":\"eqfrojs\",\"location\":\"dgrhydkygywezs\",\"tags\":{\"ygzmxieqvdsmak\":\"ca\"},\"id\":\"ixqcahyhxalybxaw\",\"name\":\"ijpodtblxpkkwj\",\"type\":\"jodqhykincn\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.deletedProtectionContainers().list("ewres", "moweg", "mut", Context.NONE); - - Assertions.assertEquals("dgrhydkygywezs", response.iterator().next().location()); - Assertions.assertEquals("ca", response.iterator().next().tags().get("ygzmxieqvdsmak")); - Assertions.assertEquals("eyguq", response.iterator().next().properties().friendlyName()); - Assertions - .assertEquals( - BackupManagementType.AZURE_SQL, response.iterator().next().properties().backupManagementType()); - Assertions.assertEquals("ii", response.iterator().next().properties().registrationStatus()); - Assertions.assertEquals("spxlzde", response.iterator().next().properties().healthStatus()); - Assertions.assertEquals("grijwaiufanrayb", response.iterator().next().properties().protectableObjectType()); - Assertions.assertEquals("eqfrojs", 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 deleted file mode 100644 index f21f9853bb4ef..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DiskExclusionPropertiesTests.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.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DiskExclusionProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiskExclusionPropertiesTests { - @Test - public void testDeserialize() { - DiskExclusionProperties model = - BinaryData - .fromString("{\"diskLunList\":[1099313977,445879070,905512121,1481183671],\"isInclusionList\":false}") - .toObject(DiskExclusionProperties.class); - Assertions.assertEquals(1099313977, model.diskLunList().get(0)); - Assertions.assertEquals(false, model.isInclusionList()); - } - - @Test - public void testSerialize() { - DiskExclusionProperties model = - new DiskExclusionProperties() - .withDiskLunList(Arrays.asList(1099313977, 445879070, 905512121, 1481183671)) - .withIsInclusionList(false); - model = BinaryData.fromObject(model).toObject(DiskExclusionProperties.class); - Assertions.assertEquals(1099313977, model.diskLunList().get(0)); - Assertions.assertEquals(false, 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 deleted file mode 100644 index 216aa14c22713..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DiskInformationTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DiskInformation; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiskInformationTests { - @Test - public void testDeserialize() { - DiskInformation model = - BinaryData.fromString("{\"lun\":40795931,\"name\":\"bdb\"}").toObject(DiskInformation.class); - Assertions.assertEquals(40795931, model.lun()); - Assertions.assertEquals("bdb", model.name()); - } - - @Test - public void testSerialize() { - DiskInformation model = new DiskInformation().withLun(40795931).withName("bdb"); - model = BinaryData.fromObject(model).toObject(DiskInformation.class); - Assertions.assertEquals(40795931, model.lun()); - Assertions.assertEquals("bdb", 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 deleted file mode 100644 index 8a1c0ba0e8ace..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmBackupEngineTests.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DpmBackupEngineTests { - @Test - public void testDeserialize() { - DpmBackupEngine model = - BinaryData - .fromString( - "{\"backupEngineType\":\"DpmBackupEngine\",\"friendlyName\":\"bqqqagwwrxa\",\"backupManagementType\":\"AzureIaasVM\",\"registrationStatus\":\"sgl\",\"backupEngineState\":\"czezkhhlt\",\"healthStatus\":\"adhqoa\",\"canReRegister\":true,\"backupEngineId\":\"yueayfbpcmsp\",\"dpmVersion\":\"yrrueqth\",\"azureBackupAgentVersion\":\"gnmbscbbxigdhx\",\"isAzureBackupAgentUpgradeAvailable\":false,\"isDpmUpgradeAvailable\":true,\"extendedInfo\":{\"databaseName\":\"dbwdpyqyybxubmdn\",\"protectedItemsCount\":686332411,\"protectedServersCount\":2094812619,\"diskCount\":949316725,\"usedDiskSpace\":21.247784400207472,\"availableDiskSpace\":60.10911869816642,\"refreshedAt\":\"2021-05-06T00:38:14Z\",\"azureProtectedInstances\":2096097280}}") - .toObject(DpmBackupEngine.class); - Assertions.assertEquals("bqqqagwwrxa", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.backupManagementType()); - Assertions.assertEquals("sgl", model.registrationStatus()); - Assertions.assertEquals("czezkhhlt", model.backupEngineState()); - Assertions.assertEquals("adhqoa", model.healthStatus()); - Assertions.assertEquals(true, model.canReRegister()); - Assertions.assertEquals("yueayfbpcmsp", model.backupEngineId()); - Assertions.assertEquals("yrrueqth", model.dpmVersion()); - Assertions.assertEquals("gnmbscbbxigdhx", model.azureBackupAgentVersion()); - Assertions.assertEquals(false, model.isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(true, model.isDpmUpgradeAvailable()); - Assertions.assertEquals("dbwdpyqyybxubmdn", model.extendedInfo().databaseName()); - Assertions.assertEquals(686332411, model.extendedInfo().protectedItemsCount()); - Assertions.assertEquals(2094812619, model.extendedInfo().protectedServersCount()); - Assertions.assertEquals(949316725, model.extendedInfo().diskCount()); - Assertions.assertEquals(21.247784400207472D, model.extendedInfo().usedDiskSpace()); - Assertions.assertEquals(60.10911869816642D, model.extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T00:38:14Z"), model.extendedInfo().refreshedAt()); - Assertions.assertEquals(2096097280, model.extendedInfo().azureProtectedInstances()); - } - - @Test - public void testSerialize() { - DpmBackupEngine model = - new DpmBackupEngine() - .withFriendlyName("bqqqagwwrxa") - .withBackupManagementType(BackupManagementType.AZURE_IAAS_VM) - .withRegistrationStatus("sgl") - .withBackupEngineState("czezkhhlt") - .withHealthStatus("adhqoa") - .withCanReRegister(true) - .withBackupEngineId("yueayfbpcmsp") - .withDpmVersion("yrrueqth") - .withAzureBackupAgentVersion("gnmbscbbxigdhx") - .withIsAzureBackupAgentUpgradeAvailable(false) - .withIsDpmUpgradeAvailable(true) - .withExtendedInfo( - new BackupEngineExtendedInfo() - .withDatabaseName("dbwdpyqyybxubmdn") - .withProtectedItemsCount(686332411) - .withProtectedServersCount(2094812619) - .withDiskCount(949316725) - .withUsedDiskSpace(21.247784400207472D) - .withAvailableDiskSpace(60.10911869816642D) - .withRefreshedAt(OffsetDateTime.parse("2021-05-06T00:38:14Z")) - .withAzureProtectedInstances(2096097280)); - model = BinaryData.fromObject(model).toObject(DpmBackupEngine.class); - Assertions.assertEquals("bqqqagwwrxa", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.backupManagementType()); - Assertions.assertEquals("sgl", model.registrationStatus()); - Assertions.assertEquals("czezkhhlt", model.backupEngineState()); - Assertions.assertEquals("adhqoa", model.healthStatus()); - Assertions.assertEquals(true, model.canReRegister()); - Assertions.assertEquals("yueayfbpcmsp", model.backupEngineId()); - Assertions.assertEquals("yrrueqth", model.dpmVersion()); - Assertions.assertEquals("gnmbscbbxigdhx", model.azureBackupAgentVersion()); - Assertions.assertEquals(false, model.isAzureBackupAgentUpgradeAvailable()); - Assertions.assertEquals(true, model.isDpmUpgradeAvailable()); - Assertions.assertEquals("dbwdpyqyybxubmdn", model.extendedInfo().databaseName()); - Assertions.assertEquals(686332411, model.extendedInfo().protectedItemsCount()); - Assertions.assertEquals(2094812619, model.extendedInfo().protectedServersCount()); - Assertions.assertEquals(949316725, model.extendedInfo().diskCount()); - Assertions.assertEquals(21.247784400207472D, model.extendedInfo().usedDiskSpace()); - Assertions.assertEquals(60.10911869816642D, model.extendedInfo().availableDiskSpace()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-06T00:38:14Z"), model.extendedInfo().refreshedAt()); - Assertions.assertEquals(2096097280, 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 deleted file mode 100644 index 2a5f98fd197b8..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmContainerExtendedInfoTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DpmContainerExtendedInfo; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DpmContainerExtendedInfoTests { - @Test - public void testDeserialize() { - DpmContainerExtendedInfo model = - BinaryData - .fromString("{\"lastRefreshedAt\":\"2021-02-11T05:39:41Z\"}") - .toObject(DpmContainerExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-11T05:39:41Z"), model.lastRefreshedAt()); - } - - @Test - public void testSerialize() { - DpmContainerExtendedInfo model = - new DpmContainerExtendedInfo().withLastRefreshedAt(OffsetDateTime.parse("2021-02-11T05:39:41Z")); - model = BinaryData.fromObject(model).toObject(DpmContainerExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-11T05:39:41Z"), 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 deleted file mode 100644 index 3b6f30cc8e4d9..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmContainerTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.DpmContainer; -import com.azure.resourcemanager.recoveryservicesbackup.models.DpmContainerExtendedInfo; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DpmContainerTests { - @Test - public void testDeserialize() { - DpmContainer model = - BinaryData - .fromString( - "{\"containerType\":\"DPMContainer\",\"canReRegister\":true,\"containerId\":\"qy\",\"protectedItemCount\":5067731603385218000,\"dpmAgentVersion\":\"u\",\"dpmServers\":[\"dfzantkwcegy\",\"mlbnseq\",\"cjjvpilguooqja\"],\"upgradeAvailable\":false,\"protectionStatus\":\"tg\",\"extendedInfo\":{\"lastRefreshedAt\":\"2021-02-16T00:43:52Z\"},\"friendlyName\":\"kjbsah\",\"backupManagementType\":\"AzureBackupServer\",\"registrationStatus\":\"pdelqa\",\"healthStatus\":\"lmotoebnfxofvcj\",\"protectableObjectType\":\"dirazf\"}") - .toObject(DpmContainer.class); - Assertions.assertEquals("kjbsah", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); - Assertions.assertEquals("pdelqa", model.registrationStatus()); - Assertions.assertEquals("lmotoebnfxofvcj", model.healthStatus()); - Assertions.assertEquals("dirazf", model.protectableObjectType()); - Assertions.assertEquals(true, model.canReRegister()); - Assertions.assertEquals("qy", model.containerId()); - Assertions.assertEquals(5067731603385218000L, model.protectedItemCount()); - Assertions.assertEquals("u", model.dpmAgentVersion()); - Assertions.assertEquals("dfzantkwcegy", model.dpmServers().get(0)); - Assertions.assertEquals(false, model.upgradeAvailable()); - Assertions.assertEquals("tg", model.protectionStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-16T00:43:52Z"), model.extendedInfo().lastRefreshedAt()); - } - - @Test - public void testSerialize() { - DpmContainer model = - new DpmContainer() - .withFriendlyName("kjbsah") - .withBackupManagementType(BackupManagementType.AZURE_BACKUP_SERVER) - .withRegistrationStatus("pdelqa") - .withHealthStatus("lmotoebnfxofvcj") - .withProtectableObjectType("dirazf") - .withCanReRegister(true) - .withContainerId("qy") - .withProtectedItemCount(5067731603385218000L) - .withDpmAgentVersion("u") - .withDpmServers(Arrays.asList("dfzantkwcegy", "mlbnseq", "cjjvpilguooqja")) - .withUpgradeAvailable(false) - .withProtectionStatus("tg") - .withExtendedInfo( - new DpmContainerExtendedInfo().withLastRefreshedAt(OffsetDateTime.parse("2021-02-16T00:43:52Z"))); - model = BinaryData.fromObject(model).toObject(DpmContainer.class); - Assertions.assertEquals("kjbsah", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_BACKUP_SERVER, model.backupManagementType()); - Assertions.assertEquals("pdelqa", model.registrationStatus()); - Assertions.assertEquals("lmotoebnfxofvcj", model.healthStatus()); - Assertions.assertEquals("dirazf", model.protectableObjectType()); - Assertions.assertEquals(true, model.canReRegister()); - Assertions.assertEquals("qy", model.containerId()); - Assertions.assertEquals(5067731603385218000L, model.protectedItemCount()); - Assertions.assertEquals("u", model.dpmAgentVersion()); - Assertions.assertEquals("dfzantkwcegy", model.dpmServers().get(0)); - Assertions.assertEquals(false, model.upgradeAvailable()); - Assertions.assertEquals("tg", model.protectionStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-16T00:43:52Z"), 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 deleted file mode 100644 index c7ed01d5f8644..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmErrorInfoTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class DpmErrorInfoTests { - @Test - public void testDeserialize() { - DpmErrorInfo model = - BinaryData - .fromString("{\"errorString\":\"hsdtmc\",\"recommendations\":[\"ufcohdxbz\",\"mcmuapc\"]}") - .toObject(DpmErrorInfo.class); - Assertions.assertEquals("hsdtmc", model.errorString()); - Assertions.assertEquals("ufcohdxbz", model.recommendations().get(0)); - } - - @Test - public void testSerialize() { - DpmErrorInfo model = - new DpmErrorInfo().withErrorString("hsdtmc").withRecommendations(Arrays.asList("ufcohdxbz", "mcmuapc")); - model = BinaryData.fromObject(model).toObject(DpmErrorInfo.class); - Assertions.assertEquals("hsdtmc", model.errorString()); - Assertions.assertEquals("ufcohdxbz", 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 deleted file mode 100644 index 480ca860ef89b..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmJobExtendedInfoTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class DpmJobExtendedInfoTests { - @Test - public void testDeserialize() { - DpmJobExtendedInfo model = - BinaryData - .fromString( - "{\"tasksList\":[{\"taskId\":\"mlrqryxynqnz\",\"startTime\":\"2021-02-04T14:35:25Z\",\"endTime\":\"2021-03-13T11:56:36Z\",\"duration\":\"PT216H29M31S\",\"status\":\"zn\"}],\"propertyBag\":{\"b\":\"oeiy\",\"hv\":\"bp\",\"igjkskyrio\":\"slkvntjl\",\"mifrygznmma\":\"vzidsxwaab\"},\"dynamicErrorMessage\":\"izkzobgo\"}") - .toObject(DpmJobExtendedInfo.class); - Assertions.assertEquals("mlrqryxynqnz", model.tasksList().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-04T14:35:25Z"), model.tasksList().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-13T11:56:36Z"), model.tasksList().get(0).endTime()); - Assertions.assertEquals(Duration.parse("PT216H29M31S"), model.tasksList().get(0).duration()); - Assertions.assertEquals("zn", model.tasksList().get(0).status()); - Assertions.assertEquals("oeiy", model.propertyBag().get("b")); - Assertions.assertEquals("izkzobgo", model.dynamicErrorMessage()); - } - - @Test - public void testSerialize() { - DpmJobExtendedInfo model = - new DpmJobExtendedInfo() - .withTasksList( - Arrays - .asList( - new DpmJobTaskDetails() - .withTaskId("mlrqryxynqnz") - .withStartTime(OffsetDateTime.parse("2021-02-04T14:35:25Z")) - .withEndTime(OffsetDateTime.parse("2021-03-13T11:56:36Z")) - .withDuration(Duration.parse("PT216H29M31S")) - .withStatus("zn"))) - .withPropertyBag(mapOf("b", "oeiy", "hv", "bp", "igjkskyrio", "slkvntjl", "mifrygznmma", "vzidsxwaab")) - .withDynamicErrorMessage("izkzobgo"); - model = BinaryData.fromObject(model).toObject(DpmJobExtendedInfo.class); - Assertions.assertEquals("mlrqryxynqnz", model.tasksList().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-04T14:35:25Z"), model.tasksList().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-13T11:56:36Z"), model.tasksList().get(0).endTime()); - Assertions.assertEquals(Duration.parse("PT216H29M31S"), model.tasksList().get(0).duration()); - Assertions.assertEquals("zn", model.tasksList().get(0).status()); - Assertions.assertEquals("oeiy", model.propertyBag().get("b")); - Assertions.assertEquals("izkzobgo", model.dynamicErrorMessage()); - } - - @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/DpmJobTaskDetailsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmJobTaskDetailsTests.java deleted file mode 100644 index edbc6daab5b64..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmJobTaskDetailsTests.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.DpmJobTaskDetails; -import java.time.Duration; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DpmJobTaskDetailsTests { - @Test - public void testDeserialize() { - DpmJobTaskDetails model = - BinaryData - .fromString( - "{\"taskId\":\"lhslnelxieixyn\",\"startTime\":\"2021-05-18T07:09:15Z\",\"endTime\":\"2021-03-23T01:16:36Z\",\"duration\":\"PT96H12M52S\",\"status\":\"ojphslhc\"}") - .toObject(DpmJobTaskDetails.class); - Assertions.assertEquals("lhslnelxieixyn", model.taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-18T07:09:15Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-23T01:16:36Z"), model.endTime()); - Assertions.assertEquals(Duration.parse("PT96H12M52S"), model.duration()); - Assertions.assertEquals("ojphslhc", model.status()); - } - - @Test - public void testSerialize() { - DpmJobTaskDetails model = - new DpmJobTaskDetails() - .withTaskId("lhslnelxieixyn") - .withStartTime(OffsetDateTime.parse("2021-05-18T07:09:15Z")) - .withEndTime(OffsetDateTime.parse("2021-03-23T01:16:36Z")) - .withDuration(Duration.parse("PT96H12M52S")) - .withStatus("ojphslhc"); - model = BinaryData.fromObject(model).toObject(DpmJobTaskDetails.class); - Assertions.assertEquals("lhslnelxieixyn", model.taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-18T07:09:15Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-23T01:16:36Z"), model.endTime()); - Assertions.assertEquals(Duration.parse("PT96H12M52S"), model.duration()); - Assertions.assertEquals("ojphslhc", 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 deleted file mode 100644 index bfc87d43938a6..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmJobTests.java +++ /dev/null @@ -1,152 +0,0 @@ -// 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.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; -import org.junit.jupiter.api.Test; - -public final class DpmJobTests { - @Test - public void testDeserialize() { - DpmJob model = - BinaryData - .fromString( - "{\"jobType\":\"DpmJob\",\"duration\":\"PT198H48M45S\",\"dpmServerName\":\"evwqqxeyskonq\",\"containerName\":\"nkfkbgbzb\",\"containerType\":\"xeqoc\",\"workloadType\":\"mygvkzqkj\",\"actionsInfo\":[\"Invalid\",\"Invalid\"],\"errorDetails\":[{\"errorString\":\"ezrxcczurtleipqx\",\"recommendations\":[\"vz\"]},{\"errorString\":\"zvd\",\"recommendations\":[\"d\"]},{\"errorString\":\"zmqpnodawopqhewj\",\"recommendations\":[\"cgsbost\",\"eln\",\"la\",\"utmzlbiojlvfhrbb\"]},{\"errorString\":\"eqvcwwyyurmoch\",\"recommendations\":[\"prsnmokayzejn\",\"lbkpb\"]}],\"extendedInfo\":{\"tasksList\":[{\"taskId\":\"ljhah\",\"startTime\":\"2021-06-15T01:10:11Z\",\"endTime\":\"2021-01-17T08:38:30Z\",\"duration\":\"PT39H19M57S\",\"status\":\"nwieholewjw\"},{\"taskId\":\"ubwefqs\",\"startTime\":\"2021-09-02T16:11:18Z\",\"endTime\":\"2021-06-03T00:57:38Z\",\"duration\":\"PT18H36M33S\",\"status\":\"rrqwexjk\"},{\"taskId\":\"xap\",\"startTime\":\"2021-06-27T06:12:14Z\",\"endTime\":\"2021-10-30T06:15:08Z\",\"duration\":\"PT204H40S\",\"status\":\"bpudcdab\"}],\"propertyBag\":{\"sqbuc\":\"pwyawbz\",\"yexaoguy\":\"jg\"},\"dynamicErrorMessage\":\"p\"},\"entityFriendlyName\":\"sdaultxij\",\"backupManagementType\":\"AzureWorkload\",\"operation\":\"qwazlnqnmcjngzq\",\"status\":\"xtbjwgnyfusfzsv\",\"startTime\":\"2021-04-20T08:13:28Z\",\"endTime\":\"2021-03-01T07:50:01Z\",\"activityId\":\"jqg\"}") - .toObject(DpmJob.class); - Assertions.assertEquals("sdaultxij", model.entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.backupManagementType()); - Assertions.assertEquals("qwazlnqnmcjngzq", model.operation()); - Assertions.assertEquals("xtbjwgnyfusfzsv", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-20T08:13:28Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-01T07:50:01Z"), model.endTime()); - Assertions.assertEquals("jqg", model.activityId()); - Assertions.assertEquals(Duration.parse("PT198H48M45S"), model.duration()); - Assertions.assertEquals("evwqqxeyskonq", model.dpmServerName()); - Assertions.assertEquals("nkfkbgbzb", model.containerName()); - Assertions.assertEquals("xeqoc", model.containerType()); - Assertions.assertEquals("mygvkzqkj", model.workloadType()); - Assertions.assertEquals(JobSupportedAction.INVALID, model.actionsInfo().get(0)); - Assertions.assertEquals("ezrxcczurtleipqx", model.errorDetails().get(0).errorString()); - Assertions.assertEquals("vz", model.errorDetails().get(0).recommendations().get(0)); - Assertions.assertEquals("ljhah", model.extendedInfo().tasksList().get(0).taskId()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-06-15T01:10:11Z"), model.extendedInfo().tasksList().get(0).startTime()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-01-17T08:38:30Z"), model.extendedInfo().tasksList().get(0).endTime()); - Assertions.assertEquals(Duration.parse("PT39H19M57S"), model.extendedInfo().tasksList().get(0).duration()); - Assertions.assertEquals("nwieholewjw", model.extendedInfo().tasksList().get(0).status()); - Assertions.assertEquals("pwyawbz", model.extendedInfo().propertyBag().get("sqbuc")); - Assertions.assertEquals("p", model.extendedInfo().dynamicErrorMessage()); - } - - @Test - public void testSerialize() { - DpmJob model = - new DpmJob() - .withEntityFriendlyName("sdaultxij") - .withBackupManagementType(BackupManagementType.AZURE_WORKLOAD) - .withOperation("qwazlnqnmcjngzq") - .withStatus("xtbjwgnyfusfzsv") - .withStartTime(OffsetDateTime.parse("2021-04-20T08:13:28Z")) - .withEndTime(OffsetDateTime.parse("2021-03-01T07:50:01Z")) - .withActivityId("jqg") - .withDuration(Duration.parse("PT198H48M45S")) - .withDpmServerName("evwqqxeyskonq") - .withContainerName("nkfkbgbzb") - .withContainerType("xeqoc") - .withWorkloadType("mygvkzqkj") - .withActionsInfo(Arrays.asList(JobSupportedAction.INVALID, JobSupportedAction.INVALID)) - .withErrorDetails( - Arrays - .asList( - new DpmErrorInfo() - .withErrorString("ezrxcczurtleipqx") - .withRecommendations(Arrays.asList("vz")), - new DpmErrorInfo().withErrorString("zvd").withRecommendations(Arrays.asList("d")), - new DpmErrorInfo() - .withErrorString("zmqpnodawopqhewj") - .withRecommendations(Arrays.asList("cgsbost", "eln", "la", "utmzlbiojlvfhrbb")), - new DpmErrorInfo() - .withErrorString("eqvcwwyyurmoch") - .withRecommendations(Arrays.asList("prsnmokayzejn", "lbkpb")))) - .withExtendedInfo( - new DpmJobExtendedInfo() - .withTasksList( - Arrays - .asList( - new DpmJobTaskDetails() - .withTaskId("ljhah") - .withStartTime(OffsetDateTime.parse("2021-06-15T01:10:11Z")) - .withEndTime(OffsetDateTime.parse("2021-01-17T08:38:30Z")) - .withDuration(Duration.parse("PT39H19M57S")) - .withStatus("nwieholewjw"), - new DpmJobTaskDetails() - .withTaskId("ubwefqs") - .withStartTime(OffsetDateTime.parse("2021-09-02T16:11:18Z")) - .withEndTime(OffsetDateTime.parse("2021-06-03T00:57:38Z")) - .withDuration(Duration.parse("PT18H36M33S")) - .withStatus("rrqwexjk"), - new DpmJobTaskDetails() - .withTaskId("xap") - .withStartTime(OffsetDateTime.parse("2021-06-27T06:12:14Z")) - .withEndTime(OffsetDateTime.parse("2021-10-30T06:15:08Z")) - .withDuration(Duration.parse("PT204H40S")) - .withStatus("bpudcdab"))) - .withPropertyBag(mapOf("sqbuc", "pwyawbz", "yexaoguy", "jg")) - .withDynamicErrorMessage("p")); - model = BinaryData.fromObject(model).toObject(DpmJob.class); - Assertions.assertEquals("sdaultxij", model.entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.backupManagementType()); - Assertions.assertEquals("qwazlnqnmcjngzq", model.operation()); - Assertions.assertEquals("xtbjwgnyfusfzsv", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-20T08:13:28Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-01T07:50:01Z"), model.endTime()); - Assertions.assertEquals("jqg", model.activityId()); - Assertions.assertEquals(Duration.parse("PT198H48M45S"), model.duration()); - Assertions.assertEquals("evwqqxeyskonq", model.dpmServerName()); - Assertions.assertEquals("nkfkbgbzb", model.containerName()); - Assertions.assertEquals("xeqoc", model.containerType()); - Assertions.assertEquals("mygvkzqkj", model.workloadType()); - Assertions.assertEquals(JobSupportedAction.INVALID, model.actionsInfo().get(0)); - Assertions.assertEquals("ezrxcczurtleipqx", model.errorDetails().get(0).errorString()); - Assertions.assertEquals("vz", model.errorDetails().get(0).recommendations().get(0)); - Assertions.assertEquals("ljhah", model.extendedInfo().tasksList().get(0).taskId()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-06-15T01:10:11Z"), model.extendedInfo().tasksList().get(0).startTime()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-01-17T08:38:30Z"), model.extendedInfo().tasksList().get(0).endTime()); - Assertions.assertEquals(Duration.parse("PT39H19M57S"), model.extendedInfo().tasksList().get(0).duration()); - Assertions.assertEquals("nwieholewjw", model.extendedInfo().tasksList().get(0).status()); - Assertions.assertEquals("pwyawbz", model.extendedInfo().propertyBag().get("sqbuc")); - Assertions.assertEquals("p", model.extendedInfo().dynamicErrorMessage()); - } - - @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/DpmProtectedItemExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmProtectedItemExtendedInfoTests.java deleted file mode 100644 index 88b3b45488daa..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmProtectedItemExtendedInfoTests.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DpmProtectedItemExtendedInfo; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DpmProtectedItemExtendedInfoTests { - @Test - public void testDeserialize() { - DpmProtectedItemExtendedInfo model = - BinaryData - .fromString( - "{\"protectableObjectLoadPath\":{\"gegizvcjfel\":\"zuwfmdur\",\"zgakgacyrcmj\":\"sdjubggbqigkxkbs\",\"iofrzgbzjedmstk\":\"mspofapvuhryl\"},\"protected\":false,\"isPresentOnCloud\":true,\"lastBackupStatus\":\"c\",\"lastRefreshedAt\":\"2021-11-07T19:34:50Z\",\"oldestRecoveryPoint\":\"2021-03-22T01:54:17Z\",\"recoveryPointCount\":1363158856,\"onPremiseOldestRecoveryPoint\":\"2021-03-28T09:03:38Z\",\"onPremiseLatestRecoveryPoint\":\"2021-04-27T21:47:04Z\",\"onPremiseRecoveryPointCount\":386349585,\"isCollocated\":true,\"protectionGroupName\":\"ibmikostbzb\",\"diskStorageUsedInBytes\":\"wbuqn\",\"totalDiskStorageSizeInBytes\":\"phzfylsgcrp\"}") - .toObject(DpmProtectedItemExtendedInfo.class); - Assertions.assertEquals("zuwfmdur", model.protectableObjectLoadPath().get("gegizvcjfel")); - Assertions.assertEquals(false, model.protectedProperty()); - Assertions.assertEquals(true, model.isPresentOnCloud()); - Assertions.assertEquals("c", model.lastBackupStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T19:34:50Z"), model.lastRefreshedAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-22T01:54:17Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(1363158856, model.recoveryPointCount()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-28T09:03:38Z"), model.onPremiseOldestRecoveryPoint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T21:47:04Z"), model.onPremiseLatestRecoveryPoint()); - Assertions.assertEquals(386349585, model.onPremiseRecoveryPointCount()); - Assertions.assertEquals(true, model.isCollocated()); - Assertions.assertEquals("ibmikostbzb", model.protectionGroupName()); - Assertions.assertEquals("wbuqn", model.diskStorageUsedInBytes()); - Assertions.assertEquals("phzfylsgcrp", model.totalDiskStorageSizeInBytes()); - } - - @Test - public void testSerialize() { - DpmProtectedItemExtendedInfo model = - new DpmProtectedItemExtendedInfo() - .withProtectableObjectLoadPath( - mapOf( - "gegizvcjfel", - "zuwfmdur", - "zgakgacyrcmj", - "sdjubggbqigkxkbs", - "iofrzgbzjedmstk", - "mspofapvuhryl")) - .withProtectedProperty(false) - .withIsPresentOnCloud(true) - .withLastBackupStatus("c") - .withLastRefreshedAt(OffsetDateTime.parse("2021-11-07T19:34:50Z")) - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-03-22T01:54:17Z")) - .withRecoveryPointCount(1363158856) - .withOnPremiseOldestRecoveryPoint(OffsetDateTime.parse("2021-03-28T09:03:38Z")) - .withOnPremiseLatestRecoveryPoint(OffsetDateTime.parse("2021-04-27T21:47:04Z")) - .withOnPremiseRecoveryPointCount(386349585) - .withIsCollocated(true) - .withProtectionGroupName("ibmikostbzb") - .withDiskStorageUsedInBytes("wbuqn") - .withTotalDiskStorageSizeInBytes("phzfylsgcrp"); - model = BinaryData.fromObject(model).toObject(DpmProtectedItemExtendedInfo.class); - Assertions.assertEquals("zuwfmdur", model.protectableObjectLoadPath().get("gegizvcjfel")); - Assertions.assertEquals(false, model.protectedProperty()); - Assertions.assertEquals(true, model.isPresentOnCloud()); - Assertions.assertEquals("c", model.lastBackupStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T19:34:50Z"), model.lastRefreshedAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-22T01:54:17Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(1363158856, model.recoveryPointCount()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-28T09:03:38Z"), model.onPremiseOldestRecoveryPoint()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T21:47:04Z"), model.onPremiseLatestRecoveryPoint()); - Assertions.assertEquals(386349585, model.onPremiseRecoveryPointCount()); - Assertions.assertEquals(true, model.isCollocated()); - Assertions.assertEquals("ibmikostbzb", model.protectionGroupName()); - Assertions.assertEquals("wbuqn", model.diskStorageUsedInBytes()); - Assertions.assertEquals("phzfylsgcrp", model.totalDiskStorageSizeInBytes()); - } - - @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/DpmProtectedItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmProtectedItemTests.java deleted file mode 100644 index 45ebe26a1a492..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/DpmProtectedItemTests.java +++ /dev/null @@ -1,155 +0,0 @@ -// 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.CreateMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.DpmProtectedItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.DpmProtectedItemExtendedInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItemState; -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; - -public final class DpmProtectedItemTests { - @Test - public void testDeserialize() { - DpmProtectedItem model = - BinaryData - .fromString( - "{\"protectedItemType\":\"DPMProtectedItem\",\"friendlyName\":\"jutifdwfmvigorqj\",\"backupEngineName\":\"tzh\",\"protectionState\":\"Protected\",\"extendedInfo\":{\"protectableObjectLoadPath\":{\"opmx\":\"fhonqjujeickpzvc\",\"xxmlfmkqscazua\":\"lnwcltyjed\"},\"protected\":true,\"isPresentOnCloud\":false,\"lastBackupStatus\":\"uamwabzxrvxc\",\"lastRefreshedAt\":\"2021-11-23T17:17:10Z\",\"oldestRecoveryPoint\":\"2021-05-14T08:17:22Z\",\"recoveryPointCount\":1333151238,\"onPremiseOldestRecoveryPoint\":\"2021-09-14T20:20:24Z\",\"onPremiseLatestRecoveryPoint\":\"2021-08-02T22:27:38Z\",\"onPremiseRecoveryPointCount\":1448410077,\"isCollocated\":false,\"protectionGroupName\":\"vgsgzwywakoihkn\",\"diskStorageUsedInBytes\":\"jblmljhlnymz\",\"totalDiskStorageSizeInBytes\":\"qyryuzcbmqqvxm\"},\"backupManagementType\":\"Invalid\",\"workloadType\":\"AzureSqlDb\",\"containerName\":\"yxonsupe\",\"sourceResourceId\":\"lzqnhcvs\",\"policyId\":\"tnzoibgsxgnxfy\",\"lastRecoveryPoint\":\"2021-03-20T13:56:14Z\",\"backupSetName\":\"p\",\"createMode\":\"Recover\",\"deferredDeleteTimeInUTC\":\"2021-08-14T04:57:20Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"bxiqxeiiqbimht\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"hfqpofv\",\"bcblemb\",\"kbwvqvxkdiv\"],\"isArchiveEnabled\":false,\"policyName\":\"b\",\"softDeleteRetentionPeriod\":1610520770}") - .toObject(DpmProtectedItem.class); - Assertions.assertEquals("yxonsupe", model.containerName()); - Assertions.assertEquals("lzqnhcvs", model.sourceResourceId()); - Assertions.assertEquals("tnzoibgsxgnxfy", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-20T13:56:14Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("p", model.backupSetName()); - Assertions.assertEquals(CreateMode.RECOVER, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-14T04:57:20Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(true, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("bxiqxeiiqbimht", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, model.isRehydrate()); - Assertions.assertEquals("hfqpofv", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.isArchiveEnabled()); - Assertions.assertEquals("b", model.policyName()); - Assertions.assertEquals(1610520770, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("jutifdwfmvigorqj", model.friendlyName()); - Assertions.assertEquals("tzh", model.backupEngineName()); - Assertions.assertEquals(ProtectedItemState.PROTECTED, model.protectionState()); - Assertions.assertEquals("fhonqjujeickpzvc", model.extendedInfo().protectableObjectLoadPath().get("opmx")); - Assertions.assertEquals(true, model.extendedInfo().protectedProperty()); - Assertions.assertEquals(false, model.extendedInfo().isPresentOnCloud()); - Assertions.assertEquals("uamwabzxrvxc", model.extendedInfo().lastBackupStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-23T17:17:10Z"), model.extendedInfo().lastRefreshedAt()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-05-14T08:17:22Z"), model.extendedInfo().oldestRecoveryPoint()); - Assertions.assertEquals(1333151238, model.extendedInfo().recoveryPointCount()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-09-14T20:20:24Z"), model.extendedInfo().onPremiseOldestRecoveryPoint()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-08-02T22:27:38Z"), model.extendedInfo().onPremiseLatestRecoveryPoint()); - Assertions.assertEquals(1448410077, model.extendedInfo().onPremiseRecoveryPointCount()); - Assertions.assertEquals(false, model.extendedInfo().isCollocated()); - Assertions.assertEquals("vgsgzwywakoihkn", model.extendedInfo().protectionGroupName()); - Assertions.assertEquals("jblmljhlnymz", model.extendedInfo().diskStorageUsedInBytes()); - Assertions.assertEquals("qyryuzcbmqqvxm", model.extendedInfo().totalDiskStorageSizeInBytes()); - } - - @Test - public void testSerialize() { - DpmProtectedItem model = - new DpmProtectedItem() - .withContainerName("yxonsupe") - .withSourceResourceId("lzqnhcvs") - .withPolicyId("tnzoibgsxgnxfy") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-03-20T13:56:14Z")) - .withBackupSetName("p") - .withCreateMode(CreateMode.RECOVER) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-08-14T04:57:20Z")) - .withIsScheduledForDeferredDelete(true) - .withDeferredDeleteTimeRemaining("bxiqxeiiqbimht") - .withIsDeferredDeleteScheduleUpcoming(true) - .withIsRehydrate(false) - .withResourceGuardOperationRequests(Arrays.asList("hfqpofv", "bcblemb", "kbwvqvxkdiv")) - .withIsArchiveEnabled(false) - .withPolicyName("b") - .withSoftDeleteRetentionPeriod(1610520770) - .withFriendlyName("jutifdwfmvigorqj") - .withBackupEngineName("tzh") - .withProtectionState(ProtectedItemState.PROTECTED) - .withExtendedInfo( - new DpmProtectedItemExtendedInfo() - .withProtectableObjectLoadPath( - mapOf("opmx", "fhonqjujeickpzvc", "xxmlfmkqscazua", "lnwcltyjed")) - .withProtectedProperty(true) - .withIsPresentOnCloud(false) - .withLastBackupStatus("uamwabzxrvxc") - .withLastRefreshedAt(OffsetDateTime.parse("2021-11-23T17:17:10Z")) - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-05-14T08:17:22Z")) - .withRecoveryPointCount(1333151238) - .withOnPremiseOldestRecoveryPoint(OffsetDateTime.parse("2021-09-14T20:20:24Z")) - .withOnPremiseLatestRecoveryPoint(OffsetDateTime.parse("2021-08-02T22:27:38Z")) - .withOnPremiseRecoveryPointCount(1448410077) - .withIsCollocated(false) - .withProtectionGroupName("vgsgzwywakoihkn") - .withDiskStorageUsedInBytes("jblmljhlnymz") - .withTotalDiskStorageSizeInBytes("qyryuzcbmqqvxm")); - model = BinaryData.fromObject(model).toObject(DpmProtectedItem.class); - Assertions.assertEquals("yxonsupe", model.containerName()); - Assertions.assertEquals("lzqnhcvs", model.sourceResourceId()); - Assertions.assertEquals("tnzoibgsxgnxfy", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-20T13:56:14Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("p", model.backupSetName()); - Assertions.assertEquals(CreateMode.RECOVER, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-14T04:57:20Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(true, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("bxiqxeiiqbimht", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, model.isRehydrate()); - Assertions.assertEquals("hfqpofv", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.isArchiveEnabled()); - Assertions.assertEquals("b", model.policyName()); - Assertions.assertEquals(1610520770, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("jutifdwfmvigorqj", model.friendlyName()); - Assertions.assertEquals("tzh", model.backupEngineName()); - Assertions.assertEquals(ProtectedItemState.PROTECTED, model.protectionState()); - Assertions.assertEquals("fhonqjujeickpzvc", model.extendedInfo().protectableObjectLoadPath().get("opmx")); - Assertions.assertEquals(true, model.extendedInfo().protectedProperty()); - Assertions.assertEquals(false, model.extendedInfo().isPresentOnCloud()); - Assertions.assertEquals("uamwabzxrvxc", model.extendedInfo().lastBackupStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-23T17:17:10Z"), model.extendedInfo().lastRefreshedAt()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-05-14T08:17:22Z"), model.extendedInfo().oldestRecoveryPoint()); - Assertions.assertEquals(1333151238, model.extendedInfo().recoveryPointCount()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-09-14T20:20:24Z"), model.extendedInfo().onPremiseOldestRecoveryPoint()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-08-02T22:27:38Z"), model.extendedInfo().onPremiseLatestRecoveryPoint()); - Assertions.assertEquals(1448410077, model.extendedInfo().onPremiseRecoveryPointCount()); - Assertions.assertEquals(false, model.extendedInfo().isCollocated()); - Assertions.assertEquals("vgsgzwywakoihkn", model.extendedInfo().protectionGroupName()); - Assertions.assertEquals("jblmljhlnymz", model.extendedInfo().diskStorageUsedInBytes()); - Assertions.assertEquals("qyryuzcbmqqvxm", model.extendedInfo().totalDiskStorageSizeInBytes()); - } - - @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/ExtendedPropertiesTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ExtendedPropertiesTests.java deleted file mode 100644 index 169fee159257b..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ExtendedPropertiesTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DiskExclusionProperties; -import com.azure.resourcemanager.recoveryservicesbackup.models.ExtendedProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ExtendedPropertiesTests { - @Test - public void testDeserialize() { - ExtendedProperties model = - BinaryData - .fromString( - "{\"diskExclusionProperties\":{\"diskLunList\":[1393141923,901267810,1041320877],\"isInclusionList\":false},\"linuxVmApplicationName\":\"jfutacoebj\"}") - .toObject(ExtendedProperties.class); - Assertions.assertEquals(1393141923, model.diskExclusionProperties().diskLunList().get(0)); - Assertions.assertEquals(false, model.diskExclusionProperties().isInclusionList()); - Assertions.assertEquals("jfutacoebj", model.linuxVmApplicationName()); - } - - @Test - public void testSerialize() { - ExtendedProperties model = - new ExtendedProperties() - .withDiskExclusionProperties( - new DiskExclusionProperties() - .withDiskLunList(Arrays.asList(1393141923, 901267810, 1041320877)) - .withIsInclusionList(false)) - .withLinuxVmApplicationName("jfutacoebj"); - model = BinaryData.fromObject(model).toObject(ExtendedProperties.class); - Assertions.assertEquals(1393141923, model.diskExclusionProperties().diskLunList().get(0)); - Assertions.assertEquals(false, model.diskExclusionProperties().isInclusionList()); - Assertions.assertEquals("jfutacoebj", 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 deleted file mode 100644 index a271e7291e2c1..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/FeatureSupportRequestTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.FeatureSupportRequest; -import org.junit.jupiter.api.Test; - -public final class FeatureSupportRequestTests { - @Test - public void testDeserialize() { - FeatureSupportRequest model = - BinaryData.fromString("{\"featureType\":\"FeatureSupportRequest\"}").toObject(FeatureSupportRequest.class); - } - - @Test - public void testSerialize() { - FeatureSupportRequest model = new FeatureSupportRequest(); - model = BinaryData.fromObject(model).toObject(FeatureSupportRequest.class); - } -} 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 deleted file mode 100644 index 6ba9a237c13c5..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericContainerExtendedInfoTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ContainerIdentityInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.GenericContainerExtendedInfo; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class GenericContainerExtendedInfoTests { - @Test - public void testDeserialize() { - GenericContainerExtendedInfo model = - BinaryData - .fromString( - "{\"rawCertData\":\"wflj\",\"containerIdentityInfo\":{\"uniqueName\":\"amtuatmzwcjjnc\",\"aadTenantId\":\"jzmizv\",\"servicePrincipalClientId\":\"gat\",\"audience\":\"uvbxngr\"},\"serviceEndpoints\":{\"lswva\":\"ggahtt\",\"zasunwqrjzfrgq\":\"qfutlxjo\",\"r\":\"aohcmbuocn\",\"yvk\":\"hmbpyryxamebly\"}}") - .toObject(GenericContainerExtendedInfo.class); - Assertions.assertEquals("wflj", model.rawCertData()); - Assertions.assertEquals("amtuatmzwcjjnc", model.containerIdentityInfo().uniqueName()); - Assertions.assertEquals("jzmizv", model.containerIdentityInfo().aadTenantId()); - Assertions.assertEquals("gat", model.containerIdentityInfo().servicePrincipalClientId()); - Assertions.assertEquals("uvbxngr", model.containerIdentityInfo().audience()); - Assertions.assertEquals("ggahtt", model.serviceEndpoints().get("lswva")); - } - - @Test - public void testSerialize() { - GenericContainerExtendedInfo model = - new GenericContainerExtendedInfo() - .withRawCertData("wflj") - .withContainerIdentityInfo( - new ContainerIdentityInfo() - .withUniqueName("amtuatmzwcjjnc") - .withAadTenantId("jzmizv") - .withServicePrincipalClientId("gat") - .withAudience("uvbxngr")) - .withServiceEndpoints( - mapOf("lswva", "ggahtt", "zasunwqrjzfrgq", "qfutlxjo", "r", "aohcmbuocn", "yvk", "hmbpyryxamebly")); - model = BinaryData.fromObject(model).toObject(GenericContainerExtendedInfo.class); - Assertions.assertEquals("wflj", model.rawCertData()); - Assertions.assertEquals("amtuatmzwcjjnc", model.containerIdentityInfo().uniqueName()); - Assertions.assertEquals("jzmizv", model.containerIdentityInfo().aadTenantId()); - Assertions.assertEquals("gat", model.containerIdentityInfo().servicePrincipalClientId()); - Assertions.assertEquals("uvbxngr", model.containerIdentityInfo().audience()); - Assertions.assertEquals("ggahtt", model.serviceEndpoints().get("lswva")); - } - - @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/GenericContainerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericContainerTests.java deleted file mode 100644 index a6cf7b8b8f15a..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericContainerTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ContainerIdentityInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.GenericContainer; -import com.azure.resourcemanager.recoveryservicesbackup.models.GenericContainerExtendedInfo; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class GenericContainerTests { - @Test - public void testDeserialize() { - GenericContainer model = - BinaryData - .fromString( - "{\"containerType\":\"GenericContainer\",\"fabricName\":\"ele\",\"extendedInformation\":{\"rawCertData\":\"bvqvwzkjopwbeo\",\"containerIdentityInfo\":{\"uniqueName\":\"kwzdqybxcea\",\"aadTenantId\":\"cptsoqfyiase\",\"servicePrincipalClientId\":\"hkrttzrazis\",\"audience\":\"kiuemv\"},\"serviceEndpoints\":{\"rx\":\"wzohm\",\"inhmdptys\":\"bsojk\",\"jp\":\"rqsgnzx\"}},\"friendlyName\":\"svjgpliufiqwoyxq\",\"backupManagementType\":\"DefaultBackup\",\"registrationStatus\":\"ohhoucqpqojxcxz\",\"healthStatus\":\"dcgdzbenribca\",\"protectableObjectType\":\"tzqdd\"}") - .toObject(GenericContainer.class); - Assertions.assertEquals("svjgpliufiqwoyxq", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); - Assertions.assertEquals("ohhoucqpqojxcxz", model.registrationStatus()); - Assertions.assertEquals("dcgdzbenribca", model.healthStatus()); - Assertions.assertEquals("tzqdd", model.protectableObjectType()); - Assertions.assertEquals("ele", model.fabricName()); - Assertions.assertEquals("bvqvwzkjopwbeo", model.extendedInformation().rawCertData()); - Assertions.assertEquals("kwzdqybxcea", model.extendedInformation().containerIdentityInfo().uniqueName()); - Assertions.assertEquals("cptsoqfyiase", model.extendedInformation().containerIdentityInfo().aadTenantId()); - Assertions - .assertEquals( - "hkrttzrazis", model.extendedInformation().containerIdentityInfo().servicePrincipalClientId()); - Assertions.assertEquals("kiuemv", model.extendedInformation().containerIdentityInfo().audience()); - Assertions.assertEquals("wzohm", model.extendedInformation().serviceEndpoints().get("rx")); - } - - @Test - public void testSerialize() { - GenericContainer model = - new GenericContainer() - .withFriendlyName("svjgpliufiqwoyxq") - .withBackupManagementType(BackupManagementType.DEFAULT_BACKUP) - .withRegistrationStatus("ohhoucqpqojxcxz") - .withHealthStatus("dcgdzbenribca") - .withProtectableObjectType("tzqdd") - .withFabricName("ele") - .withExtendedInformation( - new GenericContainerExtendedInfo() - .withRawCertData("bvqvwzkjopwbeo") - .withContainerIdentityInfo( - new ContainerIdentityInfo() - .withUniqueName("kwzdqybxcea") - .withAadTenantId("cptsoqfyiase") - .withServicePrincipalClientId("hkrttzrazis") - .withAudience("kiuemv")) - .withServiceEndpoints(mapOf("rx", "wzohm", "inhmdptys", "bsojk", "jp", "rqsgnzx"))); - model = BinaryData.fromObject(model).toObject(GenericContainer.class); - Assertions.assertEquals("svjgpliufiqwoyxq", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.DEFAULT_BACKUP, model.backupManagementType()); - Assertions.assertEquals("ohhoucqpqojxcxz", model.registrationStatus()); - Assertions.assertEquals("dcgdzbenribca", model.healthStatus()); - Assertions.assertEquals("tzqdd", model.protectableObjectType()); - Assertions.assertEquals("ele", model.fabricName()); - Assertions.assertEquals("bvqvwzkjopwbeo", model.extendedInformation().rawCertData()); - Assertions.assertEquals("kwzdqybxcea", model.extendedInformation().containerIdentityInfo().uniqueName()); - Assertions.assertEquals("cptsoqfyiase", model.extendedInformation().containerIdentityInfo().aadTenantId()); - Assertions - .assertEquals( - "hkrttzrazis", model.extendedInformation().containerIdentityInfo().servicePrincipalClientId()); - Assertions.assertEquals("kiuemv", model.extendedInformation().containerIdentityInfo().audience()); - Assertions.assertEquals("wzohm", model.extendedInformation().serviceEndpoints().get("rx")); - } - - @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/GenericProtectedItemTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericProtectedItemTests.java deleted file mode 100644 index ef8a3589abcb9..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericProtectedItemTests.java +++ /dev/null @@ -1,108 +0,0 @@ -// 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.CreateMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.GenericProtectedItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionState; -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; - -public final class GenericProtectedItemTests { - @Test - public void testDeserialize() { - GenericProtectedItem model = - BinaryData - .fromString( - "{\"protectedItemType\":\"GenericProtectedItem\",\"friendlyName\":\"monstshiyxgve\",\"policyState\":\"clduc\",\"protectionState\":\"IRPending\",\"protectedItemId\":2121793057109407419,\"sourceAssociations\":{\"stmninwjizcilng\":\"wcobie\"},\"fabricName\":\"shejjtbxqm\",\"backupManagementType\":\"AzureIaasVM\",\"workloadType\":\"Exchange\",\"containerName\":\"qzvnersbycucr\",\"sourceResourceId\":\"amikzebrqbsm\",\"policyId\":\"ziqgfuh\",\"lastRecoveryPoint\":\"2021-01-11T08:57:38Z\",\"backupSetName\":\"uswhvhczznvfbycj\",\"createMode\":\"Invalid\",\"deferredDeleteTimeInUTC\":\"2021-07-04T04:10Z\",\"isScheduledForDeferredDelete\":false,\"deferredDeleteTimeRemaining\":\"vumwmxqh\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"ldsehaohdj\",\"hflzokxco\",\"pelnjetag\"],\"isArchiveEnabled\":false,\"policyName\":\"oatftgzpnpbswvef\",\"softDeleteRetentionPeriod\":1872397233}") - .toObject(GenericProtectedItem.class); - Assertions.assertEquals("qzvnersbycucr", model.containerName()); - Assertions.assertEquals("amikzebrqbsm", model.sourceResourceId()); - Assertions.assertEquals("ziqgfuh", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-11T08:57:38Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("uswhvhczznvfbycj", model.backupSetName()); - Assertions.assertEquals(CreateMode.INVALID, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-04T04:10Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("vumwmxqh", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, model.isRehydrate()); - Assertions.assertEquals("ldsehaohdj", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.isArchiveEnabled()); - Assertions.assertEquals("oatftgzpnpbswvef", model.policyName()); - Assertions.assertEquals(1872397233, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("monstshiyxgve", model.friendlyName()); - Assertions.assertEquals("clduc", model.policyState()); - Assertions.assertEquals(ProtectionState.IRPENDING, model.protectionState()); - Assertions.assertEquals(2121793057109407419L, model.protectedItemId()); - Assertions.assertEquals("wcobie", model.sourceAssociations().get("stmninwjizcilng")); - Assertions.assertEquals("shejjtbxqm", model.fabricName()); - } - - @Test - public void testSerialize() { - GenericProtectedItem model = - new GenericProtectedItem() - .withContainerName("qzvnersbycucr") - .withSourceResourceId("amikzebrqbsm") - .withPolicyId("ziqgfuh") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-01-11T08:57:38Z")) - .withBackupSetName("uswhvhczznvfbycj") - .withCreateMode(CreateMode.INVALID) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-07-04T04:10Z")) - .withIsScheduledForDeferredDelete(false) - .withDeferredDeleteTimeRemaining("vumwmxqh") - .withIsDeferredDeleteScheduleUpcoming(true) - .withIsRehydrate(false) - .withResourceGuardOperationRequests(Arrays.asList("ldsehaohdj", "hflzokxco", "pelnjetag")) - .withIsArchiveEnabled(false) - .withPolicyName("oatftgzpnpbswvef") - .withSoftDeleteRetentionPeriod(1872397233) - .withFriendlyName("monstshiyxgve") - .withPolicyState("clduc") - .withProtectionState(ProtectionState.IRPENDING) - .withProtectedItemId(2121793057109407419L) - .withSourceAssociations(mapOf("stmninwjizcilng", "wcobie")) - .withFabricName("shejjtbxqm"); - model = BinaryData.fromObject(model).toObject(GenericProtectedItem.class); - Assertions.assertEquals("qzvnersbycucr", model.containerName()); - Assertions.assertEquals("amikzebrqbsm", model.sourceResourceId()); - Assertions.assertEquals("ziqgfuh", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-11T08:57:38Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("uswhvhczznvfbycj", model.backupSetName()); - Assertions.assertEquals(CreateMode.INVALID, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-04T04:10Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("vumwmxqh", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, model.isRehydrate()); - Assertions.assertEquals("ldsehaohdj", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.isArchiveEnabled()); - Assertions.assertEquals("oatftgzpnpbswvef", model.policyName()); - Assertions.assertEquals(1872397233, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("monstshiyxgve", model.friendlyName()); - Assertions.assertEquals("clduc", model.policyState()); - Assertions.assertEquals(ProtectionState.IRPENDING, model.protectionState()); - Assertions.assertEquals(2121793057109407419L, model.protectedItemId()); - Assertions.assertEquals("wcobie", model.sourceAssociations().get("stmninwjizcilng")); - Assertions.assertEquals("shejjtbxqm", model.fabricName()); - } - - @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/GenericProtectionPolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericProtectionPolicyTests.java deleted file mode 100644 index 8ead841da5625..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericProtectionPolicyTests.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.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.GenericProtectionPolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.PolicyType; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionPolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.SchedulePolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.SubProtectionPolicy; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class GenericProtectionPolicyTests { - @Test - public void testDeserialize() { - GenericProtectionPolicy model = - BinaryData - .fromString( - "{\"backupManagementType\":\"GenericProtectionPolicy\",\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{}},{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{}},{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{}}],\"timeZone\":\"sylkks\",\"fabricName\":\"bffmbmxz\",\"protectedItemsCount\":30912450,\"resourceGuardOperationRequests\":[\"wpgj\"]}") - .toObject(GenericProtectionPolicy.class); - Assertions.assertEquals(30912450, model.protectedItemsCount()); - Assertions.assertEquals("wpgj", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(PolicyType.FULL, model.subProtectionPolicy().get(0).policyType()); - Assertions.assertEquals("sylkks", model.timeZone()); - Assertions.assertEquals("bffmbmxz", model.fabricName()); - } - - @Test - public void testSerialize() { - GenericProtectionPolicy model = - new GenericProtectionPolicy() - .withProtectedItemsCount(30912450) - .withResourceGuardOperationRequests(Arrays.asList("wpgj")) - .withSubProtectionPolicy( - Arrays - .asList( - new SubProtectionPolicy() - .withPolicyType(PolicyType.FULL) - .withSchedulePolicy(new SchedulePolicy()) - .withRetentionPolicy(new RetentionPolicy()) - .withTieringPolicy(mapOf()), - new SubProtectionPolicy() - .withPolicyType(PolicyType.DIFFERENTIAL) - .withSchedulePolicy(new SchedulePolicy()) - .withRetentionPolicy(new RetentionPolicy()) - .withTieringPolicy(mapOf()), - new SubProtectionPolicy() - .withPolicyType(PolicyType.DIFFERENTIAL) - .withSchedulePolicy(new SchedulePolicy()) - .withRetentionPolicy(new RetentionPolicy()) - .withTieringPolicy(mapOf()))) - .withTimeZone("sylkks") - .withFabricName("bffmbmxz"); - model = BinaryData.fromObject(model).toObject(GenericProtectionPolicy.class); - Assertions.assertEquals(30912450, model.protectedItemsCount()); - Assertions.assertEquals("wpgj", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(PolicyType.FULL, model.subProtectionPolicy().get(0).policyType()); - Assertions.assertEquals("sylkks", model.timeZone()); - Assertions.assertEquals("bffmbmxz", model.fabricName()); - } - - @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/GenericRecoveryPointTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericRecoveryPointTests.java deleted file mode 100644 index 2550da586233c..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/GenericRecoveryPointTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.GenericRecoveryPoint; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class GenericRecoveryPointTests { - @Test - public void testDeserialize() { - GenericRecoveryPoint model = - BinaryData - .fromString( - "{\"objectType\":\"GenericRecoveryPoint\",\"friendlyName\":\"srmozihmip\",\"recoveryPointType\":\"wtxxpkyjcx\",\"recoveryPointTime\":\"2021-10-15T15:19:43Z\",\"recoveryPointAdditionalInfo\":\"rytfmpcycil\"}") - .toObject(GenericRecoveryPoint.class); - Assertions.assertEquals("srmozihmip", model.friendlyName()); - Assertions.assertEquals("wtxxpkyjcx", model.recoveryPointType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-15T15:19:43Z"), model.recoveryPointTime()); - Assertions.assertEquals("rytfmpcycil", model.recoveryPointAdditionalInfo()); - } - - @Test - public void testSerialize() { - GenericRecoveryPoint model = - new GenericRecoveryPoint() - .withFriendlyName("srmozihmip") - .withRecoveryPointType("wtxxpkyjcx") - .withRecoveryPointTime(OffsetDateTime.parse("2021-10-15T15:19:43Z")) - .withRecoveryPointAdditionalInfo("rytfmpcycil"); - model = BinaryData.fromObject(model).toObject(GenericRecoveryPoint.class); - Assertions.assertEquals("srmozihmip", model.friendlyName()); - Assertions.assertEquals("wtxxpkyjcx", model.recoveryPointType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-15T15:19:43Z"), model.recoveryPointTime()); - Assertions.assertEquals("rytfmpcycil", model.recoveryPointAdditionalInfo()); - } -} 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 deleted file mode 100644 index 099a149eb1dac..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/HourlyScheduleTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.HourlySchedule; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class HourlyScheduleTests { - @Test - public void testDeserialize() { - HourlySchedule model = - BinaryData - .fromString( - "{\"interval\":2043467280,\"scheduleWindowStartTime\":\"2021-10-16T01:23:17Z\",\"scheduleWindowDuration\":277669482}") - .toObject(HourlySchedule.class); - Assertions.assertEquals(2043467280, model.interval()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-16T01:23:17Z"), model.scheduleWindowStartTime()); - Assertions.assertEquals(277669482, model.scheduleWindowDuration()); - } - - @Test - public void testSerialize() { - HourlySchedule model = - new HourlySchedule() - .withInterval(2043467280) - .withScheduleWindowStartTime(OffsetDateTime.parse("2021-10-16T01:23:17Z")) - .withScheduleWindowDuration(277669482); - model = BinaryData.fromObject(model).toObject(HourlySchedule.class); - Assertions.assertEquals(2043467280, model.interval()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-16T01:23:17Z"), model.scheduleWindowStartTime()); - Assertions.assertEquals(277669482, 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 deleted file mode 100644 index ce8ef2364d7fc..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaaSvmContainerTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.IaaSvmContainer; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class IaaSvmContainerTests { - @Test - public void testDeserialize() { - IaaSvmContainer model = - BinaryData - .fromString( - "{\"containerType\":\"IaasVMContainer\",\"virtualMachineId\":\"mqeq\",\"virtualMachineVersion\":\"h\",\"resourceGroup\":\"nhg\",\"friendlyName\":\"dyynfsvkhgb\",\"backupManagementType\":\"Invalid\",\"registrationStatus\":\"narfdlpukhpyrn\",\"healthStatus\":\"zjcpeogk\",\"protectableObjectType\":\"mgbro\"}") - .toObject(IaaSvmContainer.class); - Assertions.assertEquals("dyynfsvkhgb", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.INVALID, model.backupManagementType()); - Assertions.assertEquals("narfdlpukhpyrn", model.registrationStatus()); - Assertions.assertEquals("zjcpeogk", model.healthStatus()); - Assertions.assertEquals("mgbro", model.protectableObjectType()); - Assertions.assertEquals("mqeq", model.virtualMachineId()); - Assertions.assertEquals("h", model.virtualMachineVersion()); - Assertions.assertEquals("nhg", model.resourceGroup()); - } - - @Test - public void testSerialize() { - IaaSvmContainer model = - new IaaSvmContainer() - .withFriendlyName("dyynfsvkhgb") - .withBackupManagementType(BackupManagementType.INVALID) - .withRegistrationStatus("narfdlpukhpyrn") - .withHealthStatus("zjcpeogk") - .withProtectableObjectType("mgbro") - .withVirtualMachineId("mqeq") - .withVirtualMachineVersion("h") - .withResourceGroup("nhg"); - model = BinaryData.fromObject(model).toObject(IaaSvmContainer.class); - Assertions.assertEquals("dyynfsvkhgb", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.INVALID, model.backupManagementType()); - Assertions.assertEquals("narfdlpukhpyrn", model.registrationStatus()); - Assertions.assertEquals("zjcpeogk", model.healthStatus()); - Assertions.assertEquals("mgbro", model.protectableObjectType()); - Assertions.assertEquals("mqeq", model.virtualMachineId()); - Assertions.assertEquals("h", model.virtualMachineVersion()); - Assertions.assertEquals("nhg", 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 8df7e54bf851b..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaaSvmProtectableItemTests.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.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; -import org.junit.jupiter.api.Test; - -public final class IaaSvmProtectableItemTests { - @Test - public void testDeserialize() { - IaaSvmProtectableItem model = - BinaryData - .fromString( - "{\"protectableItemType\":\"IaaSVMProtectableItem\",\"virtualMachineId\":\"kfuarenlv\",\"virtualMachineVersion\":\"tklnvnafvvkyfed\",\"resourceGroup\":\"jboslcqxypok\",\"backupManagementType\":\"minqcym\",\"workloadType\":\"ngnbdxxew\",\"friendlyName\":\"invudbch\",\"protectionState\":\"Protecting\"}") - .toObject(IaaSvmProtectableItem.class); - Assertions.assertEquals("minqcym", model.backupManagementType()); - Assertions.assertEquals("ngnbdxxew", model.workloadType()); - Assertions.assertEquals("invudbch", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - Assertions.assertEquals("kfuarenlv", model.virtualMachineId()); - Assertions.assertEquals("tklnvnafvvkyfed", model.virtualMachineVersion()); - Assertions.assertEquals("jboslcqxypok", model.resourceGroup()); - } - - @Test - public void testSerialize() { - IaaSvmProtectableItem model = - new IaaSvmProtectableItem() - .withBackupManagementType("minqcym") - .withWorkloadType("ngnbdxxew") - .withFriendlyName("invudbch") - .withProtectionState(ProtectionStatus.PROTECTING) - .withVirtualMachineId("kfuarenlv") - .withVirtualMachineVersion("tklnvnafvvkyfed") - .withResourceGroup("jboslcqxypok"); - model = BinaryData.fromObject(model).toObject(IaaSvmProtectableItem.class); - Assertions.assertEquals("minqcym", model.backupManagementType()); - Assertions.assertEquals("ngnbdxxew", model.workloadType()); - Assertions.assertEquals("invudbch", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - Assertions.assertEquals("kfuarenlv", model.virtualMachineId()); - Assertions.assertEquals("tklnvnafvvkyfed", model.virtualMachineVersion()); - Assertions.assertEquals("jboslcqxypok", 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 deleted file mode 100644 index 0afe3d3b96698..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaasVMBackupRequestTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.IaasVMBackupRequest; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class IaasVMBackupRequestTests { - @Test - public void testDeserialize() { - IaasVMBackupRequest model = - BinaryData - .fromString( - "{\"objectType\":\"IaasVMBackupRequest\",\"recoveryPointExpiryTimeInUTC\":\"2021-05-17T22:41:54Z\"}") - .toObject(IaasVMBackupRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-17T22:41:54Z"), model.recoveryPointExpiryTimeInUtc()); - } - - @Test - public void testSerialize() { - IaasVMBackupRequest model = - new IaasVMBackupRequest().withRecoveryPointExpiryTimeInUtc(OffsetDateTime.parse("2021-05-17T22:41:54Z")); - model = BinaryData.fromObject(model).toObject(IaasVMBackupRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-17T22:41:54Z"), model.recoveryPointExpiryTimeInUtc()); - } -} 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 deleted file mode 100644 index 65d403c3c4767..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IaasVmilrRegistrationRequestTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.IaasVmilrRegistrationRequest; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class IaasVmilrRegistrationRequestTests { - @Test - public void testDeserialize() { - IaasVmilrRegistrationRequest model = - BinaryData - .fromString( - "{\"objectType\":\"IaasVMILRRegistrationRequest\",\"recoveryPointId\":\"ocxnehvsmtodl\",\"virtualMachineId\":\"yapucygvoa\",\"initiatorName\":\"unssxlghieegjl\",\"renewExistingRegistration\":true}") - .toObject(IaasVmilrRegistrationRequest.class); - Assertions.assertEquals("ocxnehvsmtodl", model.recoveryPointId()); - Assertions.assertEquals("yapucygvoa", model.virtualMachineId()); - Assertions.assertEquals("unssxlghieegjl", model.initiatorName()); - Assertions.assertEquals(true, model.renewExistingRegistration()); - } - - @Test - public void testSerialize() { - IaasVmilrRegistrationRequest model = - new IaasVmilrRegistrationRequest() - .withRecoveryPointId("ocxnehvsmtodl") - .withVirtualMachineId("yapucygvoa") - .withInitiatorName("unssxlghieegjl") - .withRenewExistingRegistration(true); - model = BinaryData.fromObject(model).toObject(IaasVmilrRegistrationRequest.class); - Assertions.assertEquals("ocxnehvsmtodl", model.recoveryPointId()); - Assertions.assertEquals("yapucygvoa", model.virtualMachineId()); - Assertions.assertEquals("unssxlghieegjl", model.initiatorName()); - Assertions.assertEquals(true, 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 deleted file mode 100644 index 49d9e8ad27476..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IdentityBasedRestoreDetailsTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.IdentityBasedRestoreDetails; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class IdentityBasedRestoreDetailsTests { - @Test - public void testDeserialize() { - IdentityBasedRestoreDetails model = - BinaryData - .fromString("{\"objectType\":\"tdewemxswvruu\",\"targetStorageAccountId\":\"zjgehkfkim\"}") - .toObject(IdentityBasedRestoreDetails.class); - Assertions.assertEquals("tdewemxswvruu", model.objectType()); - Assertions.assertEquals("zjgehkfkim", model.targetStorageAccountId()); - } - - @Test - public void testSerialize() { - IdentityBasedRestoreDetails model = - new IdentityBasedRestoreDetails().withObjectType("tdewemxswvruu").withTargetStorageAccountId("zjgehkfkim"); - model = BinaryData.fromObject(model).toObject(IdentityBasedRestoreDetails.class); - Assertions.assertEquals("tdewemxswvruu", model.objectType()); - Assertions.assertEquals("zjgehkfkim", 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 deleted file mode 100644 index ccc24fbb3ccd5..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IdentityInfoTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.IdentityInfo; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class IdentityInfoTests { - @Test - public void testDeserialize() { - IdentityInfo model = - BinaryData - .fromString("{\"isSystemAssignedIdentity\":true,\"managedIdentityResourceId\":\"okffqyinljqepqwh\"}") - .toObject(IdentityInfo.class); - Assertions.assertEquals(true, model.isSystemAssignedIdentity()); - Assertions.assertEquals("okffqyinljqepqwh", model.managedIdentityResourceId()); - } - - @Test - public void testSerialize() { - IdentityInfo model = - new IdentityInfo().withIsSystemAssignedIdentity(true).withManagedIdentityResourceId("okffqyinljqepqwh"); - model = BinaryData.fromObject(model).toObject(IdentityInfo.class); - Assertions.assertEquals(true, model.isSystemAssignedIdentity()); - Assertions.assertEquals("okffqyinljqepqwh", 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 deleted file mode 100644 index 693c51a1afa43..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IlrRequestResourceTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.IlrRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.IlrRequestResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class IlrRequestResourceTests { - @Test - public void testDeserialize() { - IlrRequestResource model = - BinaryData - .fromString( - "{\"properties\":{\"objectType\":\"IlrRequest\"},\"eTag\":\"sttwvogvbbe\",\"location\":\"dcngqqmoakufgmj\",\"tags\":{\"enuuzkopbm\":\"rdgrtw\"},\"id\":\"nrfdw\",\"name\":\"yuhhziu\",\"type\":\"efozbhdms\"}") - .toObject(IlrRequestResource.class); - Assertions.assertEquals("dcngqqmoakufgmj", model.location()); - Assertions.assertEquals("rdgrtw", model.tags().get("enuuzkopbm")); - Assertions.assertEquals("sttwvogvbbe", model.etag()); - } - - @Test - public void testSerialize() { - IlrRequestResource model = - new IlrRequestResource() - .withLocation("dcngqqmoakufgmj") - .withTags(mapOf("enuuzkopbm", "rdgrtw")) - .withProperties(new IlrRequest()) - .withEtag("sttwvogvbbe"); - model = BinaryData.fromObject(model).toObject(IlrRequestResource.class); - Assertions.assertEquals("dcngqqmoakufgmj", model.location()); - Assertions.assertEquals("rdgrtw", model.tags().get("enuuzkopbm")); - Assertions.assertEquals("sttwvogvbbe", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 2040635e15df4..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/IlrRequestTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.IlrRequest; -import org.junit.jupiter.api.Test; - -public final class IlrRequestTests { - @Test - public void testDeserialize() { - IlrRequest model = BinaryData.fromString("{\"objectType\":\"IlrRequest\"}").toObject(IlrRequest.class); - } - - @Test - public void testSerialize() { - IlrRequest model = new IlrRequest(); - model = BinaryData.fromObject(model).toObject(IlrRequest.class); - } -} 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 deleted file mode 100644 index 426b5caf50476..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/InstantItemRecoveryTargetTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class InstantItemRecoveryTargetTests { - @Test - public void testDeserialize() { - InstantItemRecoveryTarget model = - BinaryData - .fromString( - "{\"clientScripts\":[{\"scriptContent\":\"eksgbuxantuygd\",\"scriptExtension\":\"aq\",\"osType\":\"irpiwrqofulopmj\",\"url\":\"exwhcb\",\"scriptNameSuffix\":\"ibkeph\"},{\"scriptContent\":\"uerct\",\"scriptExtension\":\"oyin\",\"osType\":\"pbrlcyrduczkgofx\",\"url\":\"srucvcrrpcjtt\",\"scriptNameSuffix\":\"t\"},{\"scriptContent\":\"eaqnrmvvfkoxm\",\"scriptExtension\":\"hktuidvrma\",\"osType\":\"pdwwexymzvlazi\",\"url\":\"hpwvqsgnyyuu\",\"scriptNameSuffix\":\"vensrpm\"},{\"scriptContent\":\"yvpkpatlbijpzgsk\",\"scriptExtension\":\"fhfv\",\"osType\":\"mknbnxwcdommpv\",\"url\":\"awz\",\"scriptNameSuffix\":\"brttuiacl\"}]}") - .toObject(InstantItemRecoveryTarget.class); - Assertions.assertEquals("eksgbuxantuygd", model.clientScripts().get(0).scriptContent()); - Assertions.assertEquals("aq", model.clientScripts().get(0).scriptExtension()); - Assertions.assertEquals("irpiwrqofulopmj", model.clientScripts().get(0).osType()); - Assertions.assertEquals("exwhcb", model.clientScripts().get(0).url()); - Assertions.assertEquals("ibkeph", model.clientScripts().get(0).scriptNameSuffix()); - } - - @Test - public void testSerialize() { - InstantItemRecoveryTarget model = - new InstantItemRecoveryTarget() - .withClientScripts( - Arrays - .asList( - new ClientScriptForConnect() - .withScriptContent("eksgbuxantuygd") - .withScriptExtension("aq") - .withOsType("irpiwrqofulopmj") - .withUrl("exwhcb") - .withScriptNameSuffix("ibkeph"), - new ClientScriptForConnect() - .withScriptContent("uerct") - .withScriptExtension("oyin") - .withOsType("pbrlcyrduczkgofx") - .withUrl("srucvcrrpcjtt") - .withScriptNameSuffix("t"), - new ClientScriptForConnect() - .withScriptContent("eaqnrmvvfkoxm") - .withScriptExtension("hktuidvrma") - .withOsType("pdwwexymzvlazi") - .withUrl("hpwvqsgnyyuu") - .withScriptNameSuffix("vensrpm"), - new ClientScriptForConnect() - .withScriptContent("yvpkpatlbijpzgsk") - .withScriptExtension("fhfv") - .withOsType("mknbnxwcdommpv") - .withUrl("awz") - .withScriptNameSuffix("brttuiacl"))); - model = BinaryData.fromObject(model).toObject(InstantItemRecoveryTarget.class); - Assertions.assertEquals("eksgbuxantuygd", model.clientScripts().get(0).scriptContent()); - Assertions.assertEquals("aq", model.clientScripts().get(0).scriptExtension()); - Assertions.assertEquals("irpiwrqofulopmj", model.clientScripts().get(0).osType()); - Assertions.assertEquals("exwhcb", model.clientScripts().get(0).url()); - Assertions.assertEquals("ibkeph", 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 deleted file mode 100644 index 47bba56c01e2f..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/InstantRPAdditionalDetailsTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.InstantRPAdditionalDetails; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class InstantRPAdditionalDetailsTests { - @Test - public void testDeserialize() { - InstantRPAdditionalDetails model = - BinaryData - .fromString("{\"azureBackupRGNamePrefix\":\"nye\",\"azureBackupRGNameSuffix\":\"b\"}") - .toObject(InstantRPAdditionalDetails.class); - Assertions.assertEquals("nye", model.azureBackupRGNamePrefix()); - Assertions.assertEquals("b", model.azureBackupRGNameSuffix()); - } - - @Test - public void testSerialize() { - InstantRPAdditionalDetails model = - new InstantRPAdditionalDetails().withAzureBackupRGNamePrefix("nye").withAzureBackupRGNameSuffix("b"); - model = BinaryData.fromObject(model).toObject(InstantRPAdditionalDetails.class); - Assertions.assertEquals("nye", model.azureBackupRGNamePrefix()); - Assertions.assertEquals("b", model.azureBackupRGNameSuffix()); - } -} 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 deleted file mode 100644 index a77b71bdfe97f..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobResourceInnerTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class JobResourceInnerTests { - @Test - public void testDeserialize() { - JobResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"jobType\":\"Job\",\"entityFriendlyName\":\"anuzbpzkafkuw\",\"backupManagementType\":\"AzureIaasVM\",\"operation\":\"wbme\",\"status\":\"seyvj\",\"startTime\":\"2021-09-13T12:12:28Z\",\"endTime\":\"2021-06-01T12:34:05Z\",\"activityId\":\"hspkdeemao\"},\"eTag\":\"xagkvtmelmqkrh\",\"location\":\"hvljuahaquh\",\"tags\":{\"aex\":\"mdua\",\"vxpvgomz\":\"pvfadmwsrcr\"},\"id\":\"fmisg\",\"name\":\"bnbbeldawkz\",\"type\":\"ali\"}") - .toObject(JobResourceInner.class); - Assertions.assertEquals("hvljuahaquh", model.location()); - Assertions.assertEquals("mdua", model.tags().get("aex")); - Assertions.assertEquals("anuzbpzkafkuw", model.properties().entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.properties().backupManagementType()); - Assertions.assertEquals("wbme", model.properties().operation()); - Assertions.assertEquals("seyvj", model.properties().status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T12:12:28Z"), model.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-01T12:34:05Z"), model.properties().endTime()); - Assertions.assertEquals("hspkdeemao", model.properties().activityId()); - Assertions.assertEquals("xagkvtmelmqkrh", model.etag()); - } - - @Test - public void testSerialize() { - JobResourceInner model = - new JobResourceInner() - .withLocation("hvljuahaquh") - .withTags(mapOf("aex", "mdua", "vxpvgomz", "pvfadmwsrcr")) - .withProperties( - new Job() - .withEntityFriendlyName("anuzbpzkafkuw") - .withBackupManagementType(BackupManagementType.AZURE_IAAS_VM) - .withOperation("wbme") - .withStatus("seyvj") - .withStartTime(OffsetDateTime.parse("2021-09-13T12:12:28Z")) - .withEndTime(OffsetDateTime.parse("2021-06-01T12:34:05Z")) - .withActivityId("hspkdeemao")) - .withEtag("xagkvtmelmqkrh"); - model = BinaryData.fromObject(model).toObject(JobResourceInner.class); - Assertions.assertEquals("hvljuahaquh", model.location()); - Assertions.assertEquals("mdua", model.tags().get("aex")); - Assertions.assertEquals("anuzbpzkafkuw", model.properties().entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.properties().backupManagementType()); - Assertions.assertEquals("wbme", model.properties().operation()); - Assertions.assertEquals("seyvj", model.properties().status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T12:12:28Z"), model.properties().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-01T12:34:05Z"), model.properties().endTime()); - Assertions.assertEquals("hspkdeemao", model.properties().activityId()); - Assertions.assertEquals("xagkvtmelmqkrh", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index c65a7782bdf49..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobResourceListTests.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 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; -import org.junit.jupiter.api.Test; - -public final class JobResourceListTests { - @Test - public void testDeserialize() { - JobResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"jobType\":\"Job\",\"entityFriendlyName\":\"lopwiyig\",\"backupManagementType\":\"MAB\",\"operation\":\"dwzbaiue\",\"status\":\"a\",\"startTime\":\"2021-03-01T01:27:20Z\",\"endTime\":\"2021-03-15T03:03:20Z\",\"activityId\":\"ped\"},\"eTag\":\"jn\",\"location\":\"bckhsmtxpsi\",\"tags\":{\"rdqmhjjdhtldwkyz\":\"fhvpesaps\",\"cwsvlxotog\":\"uutkncw\",\"o\":\"wrupqsxvnmicykvc\",\"vnotyfjfcnj\":\"eil\"},\"id\":\"k\",\"name\":\"nxdhbt\",\"type\":\"kphywpnvjto\"},{\"properties\":{\"jobType\":\"Job\",\"entityFriendlyName\":\"rmclfplphoxu\",\"backupManagementType\":\"DefaultBackup\",\"operation\":\"abgy\",\"status\":\"sbj\",\"startTime\":\"2021-11-02T03:38:26Z\",\"endTime\":\"2021-10-14T16:25:44Z\",\"activityId\":\"xywpmueefjzwfqkq\"},\"eTag\":\"ids\",\"location\":\"yonobgl\",\"tags\":{\"tlmoyrx\":\"qxtccmgyudx\"},\"id\":\"wfudwpzntxhdzhl\",\"name\":\"qj\",\"type\":\"hckfrlhrx\"}],\"nextLink\":\"kyv\"}") - .toObject(JobResourceList.class); - Assertions.assertEquals("kyv", model.nextLink()); - Assertions.assertEquals("bckhsmtxpsi", model.value().get(0).location()); - Assertions.assertEquals("fhvpesaps", model.value().get(0).tags().get("rdqmhjjdhtldwkyz")); - Assertions.assertEquals("lopwiyig", model.value().get(0).properties().entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.MAB, model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("dwzbaiue", model.value().get(0).properties().operation()); - Assertions.assertEquals("a", model.value().get(0).properties().status()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-03-01T01:27:20Z"), model.value().get(0).properties().startTime()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-03-15T03:03:20Z"), model.value().get(0).properties().endTime()); - Assertions.assertEquals("ped", model.value().get(0).properties().activityId()); - Assertions.assertEquals("jn", model.value().get(0).etag()); - } - - @Test - public void testSerialize() { - JobResourceList model = - new JobResourceList() - .withNextLink("kyv") - .withValue( - Arrays - .asList( - new JobResourceInner() - .withLocation("bckhsmtxpsi") - .withTags( - mapOf( - "rdqmhjjdhtldwkyz", - "fhvpesaps", - "cwsvlxotog", - "uutkncw", - "o", - "wrupqsxvnmicykvc", - "vnotyfjfcnj", - "eil")) - .withProperties( - new Job() - .withEntityFriendlyName("lopwiyig") - .withBackupManagementType(BackupManagementType.MAB) - .withOperation("dwzbaiue") - .withStatus("a") - .withStartTime(OffsetDateTime.parse("2021-03-01T01:27:20Z")) - .withEndTime(OffsetDateTime.parse("2021-03-15T03:03:20Z")) - .withActivityId("ped")) - .withEtag("jn"), - new JobResourceInner() - .withLocation("yonobgl") - .withTags(mapOf("tlmoyrx", "qxtccmgyudx")) - .withProperties( - new Job() - .withEntityFriendlyName("rmclfplphoxu") - .withBackupManagementType(BackupManagementType.DEFAULT_BACKUP) - .withOperation("abgy") - .withStatus("sbj") - .withStartTime(OffsetDateTime.parse("2021-11-02T03:38:26Z")) - .withEndTime(OffsetDateTime.parse("2021-10-14T16:25:44Z")) - .withActivityId("xywpmueefjzwfqkq")) - .withEtag("ids"))); - model = BinaryData.fromObject(model).toObject(JobResourceList.class); - Assertions.assertEquals("kyv", model.nextLink()); - Assertions.assertEquals("bckhsmtxpsi", model.value().get(0).location()); - Assertions.assertEquals("fhvpesaps", model.value().get(0).tags().get("rdqmhjjdhtldwkyz")); - Assertions.assertEquals("lopwiyig", model.value().get(0).properties().entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.MAB, model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("dwzbaiue", model.value().get(0).properties().operation()); - Assertions.assertEquals("a", model.value().get(0).properties().status()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-03-01T01:27:20Z"), model.value().get(0).properties().startTime()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-03-15T03:03:20Z"), model.value().get(0).properties().endTime()); - Assertions.assertEquals("ped", model.value().get(0).properties().activityId()); - Assertions.assertEquals("jn", model.value().get(0).etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index cdea4be787bbf..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/JobTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// 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.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.Job; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class JobTests { - @Test - public void testDeserialize() { - Job model = - BinaryData - .fromString( - "{\"jobType\":\"Job\",\"entityFriendlyName\":\"rqhakauha\",\"backupManagementType\":\"AzureSql\",\"operation\":\"wxosowzxcug\",\"status\":\"jooxdjebw\",\"startTime\":\"2021-11-24T18:17:12Z\",\"endTime\":\"2021-05-20T12:38:42Z\",\"activityId\":\"vo\"}") - .toObject(Job.class); - Assertions.assertEquals("rqhakauha", model.entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_SQL, model.backupManagementType()); - Assertions.assertEquals("wxosowzxcug", model.operation()); - Assertions.assertEquals("jooxdjebw", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-24T18:17:12Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-20T12:38:42Z"), model.endTime()); - Assertions.assertEquals("vo", model.activityId()); - } - - @Test - public void testSerialize() { - Job model = - new Job() - .withEntityFriendlyName("rqhakauha") - .withBackupManagementType(BackupManagementType.AZURE_SQL) - .withOperation("wxosowzxcug") - .withStatus("jooxdjebw") - .withStartTime(OffsetDateTime.parse("2021-11-24T18:17:12Z")) - .withEndTime(OffsetDateTime.parse("2021-05-20T12:38:42Z")) - .withActivityId("vo"); - model = BinaryData.fromObject(model).toObject(Job.class); - Assertions.assertEquals("rqhakauha", model.entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_SQL, model.backupManagementType()); - Assertions.assertEquals("wxosowzxcug", model.operation()); - Assertions.assertEquals("jooxdjebw", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-24T18:17:12Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-20T12:38:42Z"), model.endTime()); - Assertions.assertEquals("vo", model.activityId()); - } -} 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 deleted file mode 100644 index a55bb0479094c..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ListRecoveryPointsRecommendedForMoveRequestTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ListRecoveryPointsRecommendedForMoveRequest; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ListRecoveryPointsRecommendedForMoveRequestTests { - @Test - public void testDeserialize() { - ListRecoveryPointsRecommendedForMoveRequest model = - BinaryData - .fromString( - "{\"objectType\":\"kw\",\"excludedRPList\":[\"jejveg\",\"hbpnaixexccbd\",\"eaxhcexdrrvqahqk\"]}") - .toObject(ListRecoveryPointsRecommendedForMoveRequest.class); - Assertions.assertEquals("kw", model.objectType()); - Assertions.assertEquals("jejveg", model.excludedRPList().get(0)); - } - - @Test - public void testSerialize() { - ListRecoveryPointsRecommendedForMoveRequest model = - new ListRecoveryPointsRecommendedForMoveRequest() - .withObjectType("kw") - .withExcludedRPList(Arrays.asList("jejveg", "hbpnaixexccbd", "eaxhcexdrrvqahqk")); - model = BinaryData.fromObject(model).toObject(ListRecoveryPointsRecommendedForMoveRequest.class); - Assertions.assertEquals("kw", model.objectType()); - Assertions.assertEquals("jejveg", 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 deleted file mode 100644 index f9563dac249ca..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/LogSchedulePolicyTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.LogSchedulePolicy; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class LogSchedulePolicyTests { - @Test - public void testDeserialize() { - LogSchedulePolicy model = - BinaryData - .fromString("{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":1075405640}") - .toObject(LogSchedulePolicy.class); - Assertions.assertEquals(1075405640, model.scheduleFrequencyInMins()); - } - - @Test - public void testSerialize() { - LogSchedulePolicy model = new LogSchedulePolicy().withScheduleFrequencyInMins(1075405640); - model = BinaryData.fromObject(model).toObject(LogSchedulePolicy.class); - Assertions.assertEquals(1075405640, 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 deleted file mode 100644 index 75f2b84c574be..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/LongTermRetentionPolicyTests.java +++ /dev/null @@ -1,159 +0,0 @@ -// 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.DailyRetentionFormat; -import com.azure.resourcemanager.recoveryservicesbackup.models.DailyRetentionSchedule; -import com.azure.resourcemanager.recoveryservicesbackup.models.DayOfWeek; -import com.azure.resourcemanager.recoveryservicesbackup.models.LongTermRetentionPolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.MonthOfYear; -import com.azure.resourcemanager.recoveryservicesbackup.models.MonthlyRetentionSchedule; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDuration; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDurationType; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionScheduleFormat; -import com.azure.resourcemanager.recoveryservicesbackup.models.WeekOfMonth; -import com.azure.resourcemanager.recoveryservicesbackup.models.WeeklyRetentionFormat; -import com.azure.resourcemanager.recoveryservicesbackup.models.WeeklyRetentionSchedule; -import com.azure.resourcemanager.recoveryservicesbackup.models.YearlyRetentionSchedule; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class LongTermRetentionPolicyTests { - @Test - public void testDeserialize() { - LongTermRetentionPolicy model = - BinaryData - .fromString( - "{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2021-04-27T20:58:15Z\"],\"retentionDuration\":{\"count\":202714227,\"durationType\":\"Weeks\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2021-03-10T23:34:34Z\"],\"retentionDuration\":{\"count\":1666158836,\"durationType\":\"Days\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Invalid\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Tuesday\"],\"weeksOfTheMonth\":[\"Third\",\"Invalid\",\"First\",\"Third\"]},\"retentionTimes\":[\"2021-11-19T00:15:10Z\",\"2021-06-07T10:40:46Z\"],\"retentionDuration\":{\"count\":277381231,\"durationType\":\"Years\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"February\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Wednesday\",\"Wednesday\",\"Sunday\"],\"weeksOfTheMonth\":[\"Last\",\"First\",\"Last\",\"Invalid\"]},\"retentionTimes\":[\"2021-11-17T11:32:04Z\"],\"retentionDuration\":{\"count\":1734135140,\"durationType\":\"Invalid\"}}}") - .toObject(LongTermRetentionPolicy.class); - Assertions - .assertEquals(OffsetDateTime.parse("2021-04-27T20:58:15Z"), model.dailySchedule().retentionTimes().get(0)); - Assertions.assertEquals(202714227, 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-03-10T23:34:34Z"), model.weeklySchedule().retentionTimes().get(0)); - Assertions.assertEquals(1666158836, model.weeklySchedule().retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.DAYS, model.weeklySchedule().retentionDuration().durationType()); - Assertions.assertEquals(RetentionScheduleFormat.INVALID, model.monthlySchedule().retentionScheduleFormatType()); - Assertions - .assertEquals(DayOfWeek.TUESDAY, model.monthlySchedule().retentionScheduleWeekly().daysOfTheWeek().get(0)); - Assertions - .assertEquals( - WeekOfMonth.THIRD, model.monthlySchedule().retentionScheduleWeekly().weeksOfTheMonth().get(0)); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-11-19T00:15:10Z"), model.monthlySchedule().retentionTimes().get(0)); - Assertions.assertEquals(277381231, model.monthlySchedule().retentionDuration().count()); - Assertions - .assertEquals(RetentionDurationType.YEARS, model.monthlySchedule().retentionDuration().durationType()); - Assertions.assertEquals(RetentionScheduleFormat.WEEKLY, model.yearlySchedule().retentionScheduleFormatType()); - Assertions.assertEquals(MonthOfYear.FEBRUARY, model.yearlySchedule().monthsOfYear().get(0)); - Assertions - .assertEquals(DayOfWeek.WEDNESDAY, model.yearlySchedule().retentionScheduleWeekly().daysOfTheWeek().get(0)); - Assertions - .assertEquals(WeekOfMonth.LAST, model.yearlySchedule().retentionScheduleWeekly().weeksOfTheMonth().get(0)); - Assertions - .assertEquals(OffsetDateTime.parse("2021-11-17T11:32:04Z"), model.yearlySchedule().retentionTimes().get(0)); - Assertions.assertEquals(1734135140, model.yearlySchedule().retentionDuration().count()); - Assertions - .assertEquals(RetentionDurationType.INVALID, model.yearlySchedule().retentionDuration().durationType()); - } - - @Test - public void testSerialize() { - LongTermRetentionPolicy model = - new LongTermRetentionPolicy() - .withDailySchedule( - new DailyRetentionSchedule() - .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-04-27T20:58:15Z"))) - .withRetentionDuration( - new RetentionDuration().withCount(202714227).withDurationType(RetentionDurationType.WEEKS))) - .withWeeklySchedule( - new WeeklyRetentionSchedule() - .withDaysOfTheWeek(Arrays.asList(DayOfWeek.SUNDAY)) - .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-03-10T23:34:34Z"))) - .withRetentionDuration( - new RetentionDuration().withCount(1666158836).withDurationType(RetentionDurationType.DAYS))) - .withMonthlySchedule( - new MonthlyRetentionSchedule() - .withRetentionScheduleFormatType(RetentionScheduleFormat.INVALID) - .withRetentionScheduleDaily(new DailyRetentionFormat().withDaysOfTheMonth(Arrays.asList())) - .withRetentionScheduleWeekly( - new WeeklyRetentionFormat() - .withDaysOfTheWeek(Arrays.asList(DayOfWeek.TUESDAY)) - .withWeeksOfTheMonth( - Arrays - .asList( - WeekOfMonth.THIRD, - WeekOfMonth.INVALID, - WeekOfMonth.FIRST, - WeekOfMonth.THIRD))) - .withRetentionTimes( - Arrays - .asList( - OffsetDateTime.parse("2021-11-19T00:15:10Z"), - OffsetDateTime.parse("2021-06-07T10:40:46Z"))) - .withRetentionDuration( - new RetentionDuration().withCount(277381231).withDurationType(RetentionDurationType.YEARS))) - .withYearlySchedule( - new YearlyRetentionSchedule() - .withRetentionScheduleFormatType(RetentionScheduleFormat.WEEKLY) - .withMonthsOfYear(Arrays.asList(MonthOfYear.FEBRUARY)) - .withRetentionScheduleDaily(new DailyRetentionFormat().withDaysOfTheMonth(Arrays.asList())) - .withRetentionScheduleWeekly( - new WeeklyRetentionFormat() - .withDaysOfTheWeek( - Arrays.asList(DayOfWeek.WEDNESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.SUNDAY)) - .withWeeksOfTheMonth( - Arrays - .asList( - WeekOfMonth.LAST, - WeekOfMonth.FIRST, - WeekOfMonth.LAST, - WeekOfMonth.INVALID))) - .withRetentionTimes(Arrays.asList(OffsetDateTime.parse("2021-11-17T11:32:04Z"))) - .withRetentionDuration( - new RetentionDuration() - .withCount(1734135140) - .withDurationType(RetentionDurationType.INVALID))); - model = BinaryData.fromObject(model).toObject(LongTermRetentionPolicy.class); - Assertions - .assertEquals(OffsetDateTime.parse("2021-04-27T20:58:15Z"), model.dailySchedule().retentionTimes().get(0)); - Assertions.assertEquals(202714227, 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-03-10T23:34:34Z"), model.weeklySchedule().retentionTimes().get(0)); - Assertions.assertEquals(1666158836, model.weeklySchedule().retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.DAYS, model.weeklySchedule().retentionDuration().durationType()); - Assertions.assertEquals(RetentionScheduleFormat.INVALID, model.monthlySchedule().retentionScheduleFormatType()); - Assertions - .assertEquals(DayOfWeek.TUESDAY, model.monthlySchedule().retentionScheduleWeekly().daysOfTheWeek().get(0)); - Assertions - .assertEquals( - WeekOfMonth.THIRD, model.monthlySchedule().retentionScheduleWeekly().weeksOfTheMonth().get(0)); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-11-19T00:15:10Z"), model.monthlySchedule().retentionTimes().get(0)); - Assertions.assertEquals(277381231, model.monthlySchedule().retentionDuration().count()); - Assertions - .assertEquals(RetentionDurationType.YEARS, model.monthlySchedule().retentionDuration().durationType()); - Assertions.assertEquals(RetentionScheduleFormat.WEEKLY, model.yearlySchedule().retentionScheduleFormatType()); - Assertions.assertEquals(MonthOfYear.FEBRUARY, model.yearlySchedule().monthsOfYear().get(0)); - Assertions - .assertEquals(DayOfWeek.WEDNESDAY, model.yearlySchedule().retentionScheduleWeekly().daysOfTheWeek().get(0)); - Assertions - .assertEquals(WeekOfMonth.LAST, model.yearlySchedule().retentionScheduleWeekly().weeksOfTheMonth().get(0)); - Assertions - .assertEquals(OffsetDateTime.parse("2021-11-17T11:32:04Z"), model.yearlySchedule().retentionTimes().get(0)); - Assertions.assertEquals(1734135140, model.yearlySchedule().retentionDuration().count()); - Assertions - .assertEquals(RetentionDurationType.INVALID, 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 deleted file mode 100644 index 0d3f437229a60..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/LongTermSchedulePolicyTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.LongTermSchedulePolicy; -import org.junit.jupiter.api.Test; - -public final class LongTermSchedulePolicyTests { - @Test - public void testDeserialize() { - LongTermSchedulePolicy model = - BinaryData - .fromString("{\"schedulePolicyType\":\"LongTermSchedulePolicy\"}") - .toObject(LongTermSchedulePolicy.class); - } - - @Test - public void testSerialize() { - LongTermSchedulePolicy model = new LongTermSchedulePolicy(); - model = BinaryData.fromObject(model).toObject(LongTermSchedulePolicy.class); - } -} 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 deleted file mode 100644 index c4a4364518c9d..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabContainerExtendedInfoTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupItemType; -import com.azure.resourcemanager.recoveryservicesbackup.models.MabContainerExtendedInfo; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class MabContainerExtendedInfoTests { - @Test - public void testDeserialize() { - MabContainerExtendedInfo model = - BinaryData - .fromString( - "{\"lastRefreshedAt\":\"2021-04-17T18:57:09Z\",\"backupItemType\":\"Exchange\",\"backupItems\":[\"kjj\",\"avfqnvhnqoewdogi\",\"etesypvidbztjhqt\",\"b\"],\"policyName\":\"nynkbwet\",\"lastBackupStatus\":\"uhpsprkzyaupia\"}") - .toObject(MabContainerExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-17T18:57:09Z"), model.lastRefreshedAt()); - Assertions.assertEquals(BackupItemType.EXCHANGE, model.backupItemType()); - Assertions.assertEquals("kjj", model.backupItems().get(0)); - Assertions.assertEquals("nynkbwet", model.policyName()); - Assertions.assertEquals("uhpsprkzyaupia", model.lastBackupStatus()); - } - - @Test - public void testSerialize() { - MabContainerExtendedInfo model = - new MabContainerExtendedInfo() - .withLastRefreshedAt(OffsetDateTime.parse("2021-04-17T18:57:09Z")) - .withBackupItemType(BackupItemType.EXCHANGE) - .withBackupItems(Arrays.asList("kjj", "avfqnvhnqoewdogi", "etesypvidbztjhqt", "b")) - .withPolicyName("nynkbwet") - .withLastBackupStatus("uhpsprkzyaupia"); - model = BinaryData.fromObject(model).toObject(MabContainerExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-17T18:57:09Z"), model.lastRefreshedAt()); - Assertions.assertEquals(BackupItemType.EXCHANGE, model.backupItemType()); - Assertions.assertEquals("kjj", model.backupItems().get(0)); - Assertions.assertEquals("nynkbwet", model.policyName()); - Assertions.assertEquals("uhpsprkzyaupia", 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 deleted file mode 100644 index d9d9078e3fb8f..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabErrorInfoTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.MabErrorInfo; -import org.junit.jupiter.api.Test; - -public final class MabErrorInfoTests { - @Test - public void testDeserialize() { - MabErrorInfo model = - BinaryData - .fromString("{\"errorString\":\"zdtmaajquhuxylrj\",\"recommendations\":[\"ygjbmzyospspsh\"]}") - .toObject(MabErrorInfo.class); - } - - @Test - public void testSerialize() { - MabErrorInfo model = new MabErrorInfo(); - model = BinaryData.fromObject(model).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 deleted file mode 100644 index 01a56e28587ee..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabFileFolderProtectedItemExtendedInfoTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.MabFileFolderProtectedItemExtendedInfo; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class MabFileFolderProtectedItemExtendedInfoTests { - @Test - public void testDeserialize() { - MabFileFolderProtectedItemExtendedInfo model = - BinaryData - .fromString( - "{\"lastRefreshedAt\":\"2021-10-27T01:56:45Z\",\"oldestRecoveryPoint\":\"2021-02-17T18:37:25Z\",\"recoveryPointCount\":282023299}") - .toObject(MabFileFolderProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T01:56:45Z"), model.lastRefreshedAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-17T18:37:25Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(282023299, model.recoveryPointCount()); - } - - @Test - public void testSerialize() { - MabFileFolderProtectedItemExtendedInfo model = - new MabFileFolderProtectedItemExtendedInfo() - .withLastRefreshedAt(OffsetDateTime.parse("2021-10-27T01:56:45Z")) - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-02-17T18:37:25Z")) - .withRecoveryPointCount(282023299); - model = BinaryData.fromObject(model).toObject(MabFileFolderProtectedItemExtendedInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T01:56:45Z"), model.lastRefreshedAt()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-17T18:37:25Z"), model.oldestRecoveryPoint()); - Assertions.assertEquals(282023299, 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 deleted file mode 100644 index ee438c5ae6dd3..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabFileFolderProtectedItemTests.java +++ /dev/null @@ -1,108 +0,0 @@ -// 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.CreateMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.MabFileFolderProtectedItem; -import com.azure.resourcemanager.recoveryservicesbackup.models.MabFileFolderProtectedItemExtendedInfo; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class MabFileFolderProtectedItemTests { - @Test - public void testDeserialize() { - MabFileFolderProtectedItem model = - BinaryData - .fromString( - "{\"protectedItemType\":\"MabFileFolderProtectedItem\",\"friendlyName\":\"fkyjpmspbpssdfpp\",\"computerName\":\"gt\",\"lastBackupStatus\":\"yujtvczkcnyx\",\"lastBackupTime\":\"2021-12-03T00:27:17Z\",\"protectionState\":\"njdxvglnkvxl\",\"deferredDeleteSyncTimeInUTC\":5297494256918918788,\"extendedInfo\":{\"lastRefreshedAt\":\"2021-04-27T12:20:50Z\",\"oldestRecoveryPoint\":\"2021-11-14T07:57:41Z\",\"recoveryPointCount\":391317433},\"backupManagementType\":\"AzureBackupServer\",\"workloadType\":\"SAPAseDatabase\",\"containerName\":\"zvuqdflvon\",\"sourceResourceId\":\"pfpubcpzgpx\",\"policyId\":\"vhjknidi\",\"lastRecoveryPoint\":\"2021-09-10T22:47:36Z\",\"backupSetName\":\"xgpnr\",\"createMode\":\"Recover\",\"deferredDeleteTimeInUTC\":\"2021-03-16T00:00:57Z\",\"isScheduledForDeferredDelete\":false,\"deferredDeleteTimeRemaining\":\"kqmhhaowjr\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"qzdfuydzvkfvxcn\",\"mx\",\"psw\",\"kmvkhl\"],\"isArchiveEnabled\":true,\"policyName\":\"bemzqkzszuwi\",\"softDeleteRetentionPeriod\":1086614322}") - .toObject(MabFileFolderProtectedItem.class); - Assertions.assertEquals("zvuqdflvon", model.containerName()); - Assertions.assertEquals("pfpubcpzgpx", model.sourceResourceId()); - Assertions.assertEquals("vhjknidi", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-10T22:47:36Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("xgpnr", model.backupSetName()); - Assertions.assertEquals(CreateMode.RECOVER, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-16T00:00:57Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("kqmhhaowjr", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, model.isRehydrate()); - Assertions.assertEquals("qzdfuydzvkfvxcn", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.isArchiveEnabled()); - Assertions.assertEquals("bemzqkzszuwi", model.policyName()); - Assertions.assertEquals(1086614322, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("fkyjpmspbpssdfpp", model.friendlyName()); - Assertions.assertEquals("gt", model.computerName()); - Assertions.assertEquals("yujtvczkcnyx", model.lastBackupStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T00:27:17Z"), model.lastBackupTime()); - Assertions.assertEquals("njdxvglnkvxl", model.protectionState()); - Assertions.assertEquals(5297494256918918788L, model.deferredDeleteSyncTimeInUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T12:20:50Z"), model.extendedInfo().lastRefreshedAt()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-11-14T07:57:41Z"), model.extendedInfo().oldestRecoveryPoint()); - Assertions.assertEquals(391317433, model.extendedInfo().recoveryPointCount()); - } - - @Test - public void testSerialize() { - MabFileFolderProtectedItem model = - new MabFileFolderProtectedItem() - .withContainerName("zvuqdflvon") - .withSourceResourceId("pfpubcpzgpx") - .withPolicyId("vhjknidi") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-09-10T22:47:36Z")) - .withBackupSetName("xgpnr") - .withCreateMode(CreateMode.RECOVER) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-03-16T00:00:57Z")) - .withIsScheduledForDeferredDelete(false) - .withDeferredDeleteTimeRemaining("kqmhhaowjr") - .withIsDeferredDeleteScheduleUpcoming(true) - .withIsRehydrate(false) - .withResourceGuardOperationRequests(Arrays.asList("qzdfuydzvkfvxcn", "mx", "psw", "kmvkhl")) - .withIsArchiveEnabled(true) - .withPolicyName("bemzqkzszuwi") - .withSoftDeleteRetentionPeriod(1086614322) - .withFriendlyName("fkyjpmspbpssdfpp") - .withComputerName("gt") - .withLastBackupStatus("yujtvczkcnyx") - .withLastBackupTime(OffsetDateTime.parse("2021-12-03T00:27:17Z")) - .withProtectionState("njdxvglnkvxl") - .withDeferredDeleteSyncTimeInUtc(5297494256918918788L) - .withExtendedInfo( - new MabFileFolderProtectedItemExtendedInfo() - .withLastRefreshedAt(OffsetDateTime.parse("2021-04-27T12:20:50Z")) - .withOldestRecoveryPoint(OffsetDateTime.parse("2021-11-14T07:57:41Z")) - .withRecoveryPointCount(391317433)); - model = BinaryData.fromObject(model).toObject(MabFileFolderProtectedItem.class); - Assertions.assertEquals("zvuqdflvon", model.containerName()); - Assertions.assertEquals("pfpubcpzgpx", model.sourceResourceId()); - Assertions.assertEquals("vhjknidi", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-10T22:47:36Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("xgpnr", model.backupSetName()); - Assertions.assertEquals(CreateMode.RECOVER, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-16T00:00:57Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("kqmhhaowjr", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, model.isRehydrate()); - Assertions.assertEquals("qzdfuydzvkfvxcn", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(true, model.isArchiveEnabled()); - Assertions.assertEquals("bemzqkzszuwi", model.policyName()); - Assertions.assertEquals(1086614322, model.softDeleteRetentionPeriod()); - Assertions.assertEquals("fkyjpmspbpssdfpp", model.friendlyName()); - Assertions.assertEquals("gt", model.computerName()); - Assertions.assertEquals("yujtvczkcnyx", model.lastBackupStatus()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-03T00:27:17Z"), model.lastBackupTime()); - Assertions.assertEquals("njdxvglnkvxl", model.protectionState()); - Assertions.assertEquals(5297494256918918788L, model.deferredDeleteSyncTimeInUtc()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-27T12:20:50Z"), model.extendedInfo().lastRefreshedAt()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-11-14T07:57:41Z"), model.extendedInfo().oldestRecoveryPoint()); - Assertions.assertEquals(391317433, 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 deleted file mode 100644 index a6da6130001e2..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabJobExtendedInfoTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class MabJobExtendedInfoTests { - @Test - public void testDeserialize() { - MabJobExtendedInfo model = - BinaryData - .fromString( - "{\"tasksList\":[{\"taskId\":\"auo\",\"startTime\":\"2021-02-09T23:33:17Z\",\"endTime\":\"2021-02-08T15:29:38Z\",\"duration\":\"PT99H32M43S\",\"status\":\"tiuky\"},{\"taskId\":\"chnmna\",\"startTime\":\"2021-10-24T02:34:44Z\",\"endTime\":\"2020-12-22T08:21:25Z\",\"duration\":\"PT88H49M38S\",\"status\":\"qirwrweoox\"},{\"taskId\":\"i\",\"startTime\":\"2021-05-19T03:14:53Z\",\"endTime\":\"2021-06-11T14:56:28Z\",\"duration\":\"PT70H39M46S\",\"status\":\"wmozqvbub\"}],\"propertyBag\":{\"sycxhxzgaz\":\"m\",\"hppubowsepdfgkmt\":\"taboidvmf\",\"c\":\"herngb\",\"obkauxofsh\":\"uahokq\"},\"dynamicErrorMessage\":\"hwpnulaiywzejywh\"}") - .toObject(MabJobExtendedInfo.class); - Assertions.assertEquals("auo", model.tasksList().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-09T23:33:17Z"), model.tasksList().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T15:29:38Z"), model.tasksList().get(0).endTime()); - Assertions.assertEquals(Duration.parse("PT99H32M43S"), model.tasksList().get(0).duration()); - Assertions.assertEquals("tiuky", model.tasksList().get(0).status()); - Assertions.assertEquals("m", model.propertyBag().get("sycxhxzgaz")); - Assertions.assertEquals("hwpnulaiywzejywh", model.dynamicErrorMessage()); - } - - @Test - public void testSerialize() { - MabJobExtendedInfo model = - new MabJobExtendedInfo() - .withTasksList( - Arrays - .asList( - new MabJobTaskDetails() - .withTaskId("auo") - .withStartTime(OffsetDateTime.parse("2021-02-09T23:33:17Z")) - .withEndTime(OffsetDateTime.parse("2021-02-08T15:29:38Z")) - .withDuration(Duration.parse("PT99H32M43S")) - .withStatus("tiuky"), - new MabJobTaskDetails() - .withTaskId("chnmna") - .withStartTime(OffsetDateTime.parse("2021-10-24T02:34:44Z")) - .withEndTime(OffsetDateTime.parse("2020-12-22T08:21:25Z")) - .withDuration(Duration.parse("PT88H49M38S")) - .withStatus("qirwrweoox"), - new MabJobTaskDetails() - .withTaskId("i") - .withStartTime(OffsetDateTime.parse("2021-05-19T03:14:53Z")) - .withEndTime(OffsetDateTime.parse("2021-06-11T14:56:28Z")) - .withDuration(Duration.parse("PT70H39M46S")) - .withStatus("wmozqvbub"))) - .withPropertyBag( - mapOf("sycxhxzgaz", "m", "hppubowsepdfgkmt", "taboidvmf", "c", "herngb", "obkauxofsh", "uahokq")) - .withDynamicErrorMessage("hwpnulaiywzejywh"); - model = BinaryData.fromObject(model).toObject(MabJobExtendedInfo.class); - Assertions.assertEquals("auo", model.tasksList().get(0).taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-09T23:33:17Z"), model.tasksList().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T15:29:38Z"), model.tasksList().get(0).endTime()); - Assertions.assertEquals(Duration.parse("PT99H32M43S"), model.tasksList().get(0).duration()); - Assertions.assertEquals("tiuky", model.tasksList().get(0).status()); - Assertions.assertEquals("m", model.propertyBag().get("sycxhxzgaz")); - Assertions.assertEquals("hwpnulaiywzejywh", model.dynamicErrorMessage()); - } - - @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/MabJobTaskDetailsTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabJobTaskDetailsTests.java deleted file mode 100644 index 22fb4f13a1955..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabJobTaskDetailsTests.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.MabJobTaskDetails; -import java.time.Duration; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class MabJobTaskDetailsTests { - @Test - public void testDeserialize() { - MabJobTaskDetails model = - BinaryData - .fromString( - "{\"taskId\":\"wkojpllndnpd\",\"startTime\":\"2021-01-15T15:33:07Z\",\"endTime\":\"2021-04-21T23:03:02Z\",\"duration\":\"PT204H2M23S\",\"status\":\"ug\"}") - .toObject(MabJobTaskDetails.class); - Assertions.assertEquals("wkojpllndnpd", model.taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-15T15:33:07Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-21T23:03:02Z"), model.endTime()); - Assertions.assertEquals(Duration.parse("PT204H2M23S"), model.duration()); - Assertions.assertEquals("ug", model.status()); - } - - @Test - public void testSerialize() { - MabJobTaskDetails model = - new MabJobTaskDetails() - .withTaskId("wkojpllndnpd") - .withStartTime(OffsetDateTime.parse("2021-01-15T15:33:07Z")) - .withEndTime(OffsetDateTime.parse("2021-04-21T23:03:02Z")) - .withDuration(Duration.parse("PT204H2M23S")) - .withStatus("ug"); - model = BinaryData.fromObject(model).toObject(MabJobTaskDetails.class); - Assertions.assertEquals("wkojpllndnpd", model.taskId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-15T15:33:07Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-21T23:03:02Z"), model.endTime()); - Assertions.assertEquals(Duration.parse("PT204H2M23S"), model.duration()); - Assertions.assertEquals("ug", 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 deleted file mode 100644 index eaf2b8f44e664..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabJobTests.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class MabJobTests { - @Test - public void testDeserialize() { - MabJob model = - BinaryData - .fromString( - "{\"jobType\":\"MabJob\",\"duration\":\"PT65H36M23S\",\"actionsInfo\":[\"Invalid\",\"Retriable\",\"Invalid\",\"Cancellable\"],\"mabServerName\":\"zhrgmqgjsxvpqc\",\"mabServerType\":\"AzureSqlContainer\",\"workloadType\":\"SQLDataBase\",\"errorDetails\":[{\"errorString\":\"hsqqgvriibakcl\",\"recommendations\":[\"fr\",\"xousxauzl\",\"vsg\",\"wohqfzizvu\"]}],\"extendedInfo\":{\"tasksList\":[{\"taskId\":\"svth\",\"startTime\":\"2021-07-04T11:04:10Z\",\"endTime\":\"2021-03-05T16:41:13Z\",\"duration\":\"PT133H10M52S\",\"status\":\"vmribiat\"},{\"taskId\":\"plucfotangcfhnyk\",\"startTime\":\"2021-04-07T10:16:52Z\",\"endTime\":\"2021-02-07T12:46:46Z\",\"duration\":\"PT221H57M54S\",\"status\":\"wlmzqwmvtxnjmxmc\"},{\"taskId\":\"udtc\",\"startTime\":\"2021-01-01T06:59:38Z\",\"endTime\":\"2021-04-13T08:58:27Z\",\"duration\":\"PT184H46M33S\",\"status\":\"k\"},{\"taskId\":\"fabuiyjibu\",\"startTime\":\"2021-07-04T05:28:17Z\",\"endTime\":\"2021-10-23T05:21:09Z\",\"duration\":\"PT49H3M48S\",\"status\":\"iknp\"}],\"propertyBag\":{\"ipq\":\"gjiuqhibto\",\"tvqylkmqpzoyhlfb\":\"jedmurrxxgewp\"},\"dynamicErrorMessage\":\"wgcloxoebqinji\"},\"entityFriendlyName\":\"wjfuj\",\"backupManagementType\":\"MAB\",\"operation\":\"cbahhpzpofoiy\",\"status\":\"p\",\"startTime\":\"2021-05-29T00:16:26Z\",\"endTime\":\"2021-09-14T14:45:14Z\",\"activityId\":\"kholvd\"}") - .toObject(MabJob.class); - Assertions.assertEquals("wjfuj", model.entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); - Assertions.assertEquals("cbahhpzpofoiy", model.operation()); - Assertions.assertEquals("p", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-29T00:16:26Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-14T14:45:14Z"), model.endTime()); - Assertions.assertEquals("kholvd", model.activityId()); - Assertions.assertEquals(Duration.parse("PT65H36M23S"), model.duration()); - Assertions.assertEquals(JobSupportedAction.INVALID, model.actionsInfo().get(0)); - Assertions.assertEquals("zhrgmqgjsxvpqc", model.mabServerName()); - Assertions.assertEquals(MabServerType.AZURE_SQL_CONTAINER, model.mabServerType()); - Assertions.assertEquals(WorkloadType.SQLDATA_BASE, model.workloadType()); - Assertions.assertEquals("svth", model.extendedInfo().tasksList().get(0).taskId()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-07-04T11:04:10Z"), model.extendedInfo().tasksList().get(0).startTime()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-03-05T16:41:13Z"), model.extendedInfo().tasksList().get(0).endTime()); - Assertions.assertEquals(Duration.parse("PT133H10M52S"), model.extendedInfo().tasksList().get(0).duration()); - Assertions.assertEquals("vmribiat", model.extendedInfo().tasksList().get(0).status()); - Assertions.assertEquals("gjiuqhibto", model.extendedInfo().propertyBag().get("ipq")); - Assertions.assertEquals("wgcloxoebqinji", model.extendedInfo().dynamicErrorMessage()); - } - - @Test - public void testSerialize() { - MabJob model = - new MabJob() - .withEntityFriendlyName("wjfuj") - .withBackupManagementType(BackupManagementType.MAB) - .withOperation("cbahhpzpofoiy") - .withStatus("p") - .withStartTime(OffsetDateTime.parse("2021-05-29T00:16:26Z")) - .withEndTime(OffsetDateTime.parse("2021-09-14T14:45:14Z")) - .withActivityId("kholvd") - .withDuration(Duration.parse("PT65H36M23S")) - .withActionsInfo( - Arrays - .asList( - JobSupportedAction.INVALID, - JobSupportedAction.RETRIABLE, - JobSupportedAction.INVALID, - JobSupportedAction.CANCELLABLE)) - .withMabServerName("zhrgmqgjsxvpqc") - .withMabServerType(MabServerType.AZURE_SQL_CONTAINER) - .withWorkloadType(WorkloadType.SQLDATA_BASE) - .withErrorDetails(Arrays.asList(new MabErrorInfo())) - .withExtendedInfo( - new MabJobExtendedInfo() - .withTasksList( - Arrays - .asList( - new MabJobTaskDetails() - .withTaskId("svth") - .withStartTime(OffsetDateTime.parse("2021-07-04T11:04:10Z")) - .withEndTime(OffsetDateTime.parse("2021-03-05T16:41:13Z")) - .withDuration(Duration.parse("PT133H10M52S")) - .withStatus("vmribiat"), - new MabJobTaskDetails() - .withTaskId("plucfotangcfhnyk") - .withStartTime(OffsetDateTime.parse("2021-04-07T10:16:52Z")) - .withEndTime(OffsetDateTime.parse("2021-02-07T12:46:46Z")) - .withDuration(Duration.parse("PT221H57M54S")) - .withStatus("wlmzqwmvtxnjmxmc"), - new MabJobTaskDetails() - .withTaskId("udtc") - .withStartTime(OffsetDateTime.parse("2021-01-01T06:59:38Z")) - .withEndTime(OffsetDateTime.parse("2021-04-13T08:58:27Z")) - .withDuration(Duration.parse("PT184H46M33S")) - .withStatus("k"), - new MabJobTaskDetails() - .withTaskId("fabuiyjibu") - .withStartTime(OffsetDateTime.parse("2021-07-04T05:28:17Z")) - .withEndTime(OffsetDateTime.parse("2021-10-23T05:21:09Z")) - .withDuration(Duration.parse("PT49H3M48S")) - .withStatus("iknp"))) - .withPropertyBag(mapOf("ipq", "gjiuqhibto", "tvqylkmqpzoyhlfb", "jedmurrxxgewp")) - .withDynamicErrorMessage("wgcloxoebqinji")); - model = BinaryData.fromObject(model).toObject(MabJob.class); - Assertions.assertEquals("wjfuj", model.entityFriendlyName()); - Assertions.assertEquals(BackupManagementType.MAB, model.backupManagementType()); - Assertions.assertEquals("cbahhpzpofoiy", model.operation()); - Assertions.assertEquals("p", model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-29T00:16:26Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-14T14:45:14Z"), model.endTime()); - Assertions.assertEquals("kholvd", model.activityId()); - Assertions.assertEquals(Duration.parse("PT65H36M23S"), model.duration()); - Assertions.assertEquals(JobSupportedAction.INVALID, model.actionsInfo().get(0)); - Assertions.assertEquals("zhrgmqgjsxvpqc", model.mabServerName()); - Assertions.assertEquals(MabServerType.AZURE_SQL_CONTAINER, model.mabServerType()); - Assertions.assertEquals(WorkloadType.SQLDATA_BASE, model.workloadType()); - Assertions.assertEquals("svth", model.extendedInfo().tasksList().get(0).taskId()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-07-04T11:04:10Z"), model.extendedInfo().tasksList().get(0).startTime()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-03-05T16:41:13Z"), model.extendedInfo().tasksList().get(0).endTime()); - Assertions.assertEquals(Duration.parse("PT133H10M52S"), model.extendedInfo().tasksList().get(0).duration()); - Assertions.assertEquals("vmribiat", model.extendedInfo().tasksList().get(0).status()); - Assertions.assertEquals("gjiuqhibto", model.extendedInfo().propertyBag().get("ipq")); - Assertions.assertEquals("wgcloxoebqinji", model.extendedInfo().dynamicErrorMessage()); - } - - @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/MabProtectionPolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabProtectionPolicyTests.java deleted file mode 100644 index ef53eccedcf47..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MabProtectionPolicyTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.MabProtectionPolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionPolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.SchedulePolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class MabProtectionPolicyTests { - @Test - public void testDeserialize() { - MabProtectionPolicy model = - BinaryData - .fromString( - "{\"backupManagementType\":\"MAB\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"protectedItemsCount\":1055225558,\"resourceGuardOperationRequests\":[\"tefypococtfjgti\"]}") - .toObject(MabProtectionPolicy.class); - Assertions.assertEquals(1055225558, model.protectedItemsCount()); - Assertions.assertEquals("tefypococtfjgti", model.resourceGuardOperationRequests().get(0)); - } - - @Test - public void testSerialize() { - MabProtectionPolicy model = - new MabProtectionPolicy() - .withProtectedItemsCount(1055225558) - .withResourceGuardOperationRequests(Arrays.asList("tefypococtfjgti")) - .withSchedulePolicy(new SchedulePolicy()) - .withRetentionPolicy(new RetentionPolicy()); - model = BinaryData.fromObject(model).toObject(MabProtectionPolicy.class); - Assertions.assertEquals(1055225558, model.protectedItemsCount()); - Assertions.assertEquals("tefypococtfjgti", 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 deleted file mode 100644 index 8b3a6fbd76335..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MonthlyRetentionScheduleTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DailyRetentionFormat; -import com.azure.resourcemanager.recoveryservicesbackup.models.Day; -import com.azure.resourcemanager.recoveryservicesbackup.models.DayOfWeek; -import com.azure.resourcemanager.recoveryservicesbackup.models.MonthlyRetentionSchedule; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDuration; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDurationType; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionScheduleFormat; -import com.azure.resourcemanager.recoveryservicesbackup.models.WeekOfMonth; -import com.azure.resourcemanager.recoveryservicesbackup.models.WeeklyRetentionFormat; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class MonthlyRetentionScheduleTests { - @Test - public void testDeserialize() { - MonthlyRetentionSchedule model = - BinaryData - .fromString( - "{\"retentionScheduleFormatType\":\"Invalid\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":340863806,\"isLast\":false},{\"date\":1072785835,\"isLast\":true}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Friday\",\"Thursday\",\"Friday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Invalid\"]},\"retentionTimes\":[\"2021-03-04T06:20:36Z\",\"2021-08-12T09:47:08Z\",\"2021-06-17T11:55:56Z\",\"2021-10-31T16:43:41Z\"],\"retentionDuration\":{\"count\":820090734,\"durationType\":\"Weeks\"}}") - .toObject(MonthlyRetentionSchedule.class); - Assertions.assertEquals(RetentionScheduleFormat.INVALID, model.retentionScheduleFormatType()); - Assertions.assertEquals(340863806, model.retentionScheduleDaily().daysOfTheMonth().get(0).date()); - Assertions.assertEquals(false, model.retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); - Assertions.assertEquals(DayOfWeek.FRIDAY, model.retentionScheduleWeekly().daysOfTheWeek().get(0)); - Assertions.assertEquals(WeekOfMonth.INVALID, model.retentionScheduleWeekly().weeksOfTheMonth().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T06:20:36Z"), model.retentionTimes().get(0)); - Assertions.assertEquals(820090734, model.retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.WEEKS, model.retentionDuration().durationType()); - } - - @Test - public void testSerialize() { - MonthlyRetentionSchedule model = - new MonthlyRetentionSchedule() - .withRetentionScheduleFormatType(RetentionScheduleFormat.INVALID) - .withRetentionScheduleDaily( - new DailyRetentionFormat() - .withDaysOfTheMonth( - Arrays - .asList( - new Day().withDate(340863806).withIsLast(false), - new Day().withDate(1072785835).withIsLast(true)))) - .withRetentionScheduleWeekly( - new WeeklyRetentionFormat() - .withDaysOfTheWeek( - Arrays.asList(DayOfWeek.FRIDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY, DayOfWeek.TUESDAY)) - .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.INVALID))) - .withRetentionTimes( - Arrays - .asList( - OffsetDateTime.parse("2021-03-04T06:20:36Z"), - OffsetDateTime.parse("2021-08-12T09:47:08Z"), - OffsetDateTime.parse("2021-06-17T11:55:56Z"), - OffsetDateTime.parse("2021-10-31T16:43:41Z"))) - .withRetentionDuration( - new RetentionDuration().withCount(820090734).withDurationType(RetentionDurationType.WEEKS)); - model = BinaryData.fromObject(model).toObject(MonthlyRetentionSchedule.class); - Assertions.assertEquals(RetentionScheduleFormat.INVALID, model.retentionScheduleFormatType()); - Assertions.assertEquals(340863806, model.retentionScheduleDaily().daysOfTheMonth().get(0).date()); - Assertions.assertEquals(false, model.retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); - Assertions.assertEquals(DayOfWeek.FRIDAY, model.retentionScheduleWeekly().daysOfTheWeek().get(0)); - Assertions.assertEquals(WeekOfMonth.INVALID, model.retentionScheduleWeekly().weeksOfTheMonth().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T06:20:36Z"), model.retentionTimes().get(0)); - Assertions.assertEquals(820090734, 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 deleted file mode 100644 index f6779fddc5a02..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/MoveRPAcrossTiersRequestTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.MoveRPAcrossTiersRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointTierType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class MoveRPAcrossTiersRequestTests { - @Test - public void testDeserialize() { - MoveRPAcrossTiersRequest model = - BinaryData - .fromString( - "{\"objectType\":\"gitvg\",\"sourceTierType\":\"InstantRP\",\"targetTierType\":\"ArchivedRP\"}") - .toObject(MoveRPAcrossTiersRequest.class); - Assertions.assertEquals("gitvg", model.objectType()); - Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.sourceTierType()); - Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.targetTierType()); - } - - @Test - public void testSerialize() { - MoveRPAcrossTiersRequest model = - new MoveRPAcrossTiersRequest() - .withObjectType("gitvg") - .withSourceTierType(RecoveryPointTierType.INSTANT_RP) - .withTargetTierType(RecoveryPointTierType.ARCHIVED_RP); - model = BinaryData.fromObject(model).toObject(MoveRPAcrossTiersRequest.class); - Assertions.assertEquals("gitvg", model.objectType()); - Assertions.assertEquals(RecoveryPointTierType.INSTANT_RP, model.sourceTierType()); - Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_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 deleted file mode 100644 index 23f832a1da85c..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/NameInfoTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.NameInfo; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class NameInfoTests { - @Test - public void testDeserialize() { - NameInfo model = - BinaryData - .fromString("{\"value\":\"ukjfkgiawxklr\",\"localizedValue\":\"lwckbasyypnddhs\"}") - .toObject(NameInfo.class); - Assertions.assertEquals("ukjfkgiawxklr", model.value()); - Assertions.assertEquals("lwckbasyypnddhs", model.localizedValue()); - } - - @Test - public void testSerialize() { - 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()); - } -} 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 deleted file mode 100644 index 698152acb82ef..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationResultInfoBaseTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.OperationResultInfoBase; -import org.junit.jupiter.api.Test; - -public final class OperationResultInfoBaseTests { - @Test - public void testDeserialize() { - OperationResultInfoBase model = - BinaryData - .fromString("{\"objectType\":\"OperationResultInfoBase\"}") - .toObject(OperationResultInfoBase.class); - } - - @Test - public void testSerialize() { - 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 deleted file mode 100644 index 4f6d825894042..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationResultInfoTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class OperationResultInfoTests { - @Test - public void testDeserialize() { - OperationResultInfo model = - BinaryData - .fromString("{\"objectType\":\"OperationResultInfo\",\"jobList\":[\"vzuyturmlmu\",\"wolba\"]}") - .toObject(OperationResultInfo.class); - Assertions.assertEquals("vzuyturmlmu", model.jobList().get(0)); - } - - @Test - public void testSerialize() { - OperationResultInfo model = new OperationResultInfo().withJobList(Arrays.asList("vzuyturmlmu", "wolba")); - model = BinaryData.fromObject(model).toObject(OperationResultInfo.class); - Assertions.assertEquals("vzuyturmlmu", 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 deleted file mode 100644 index f6472a749e4ad..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusExtendedInfoTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusExtendedInfo; -import org.junit.jupiter.api.Test; - -public final class OperationStatusExtendedInfoTests { - @Test - public void testDeserialize() { - OperationStatusExtendedInfo model = - BinaryData - .fromString("{\"objectType\":\"OperationStatusExtendedInfo\"}") - .toObject(OperationStatusExtendedInfo.class); - } - - @Test - public void testSerialize() { - 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 deleted file mode 100644 index 3c430b7cfc711..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusJobExtendedInfoTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.OperationStatusJobExtendedInfo; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationStatusJobExtendedInfoTests { - @Test - public void testDeserialize() { - OperationStatusJobExtendedInfo model = - BinaryData - .fromString("{\"objectType\":\"OperationStatusJobExtendedInfo\",\"jobId\":\"afbwqroohtuovmao\"}") - .toObject(OperationStatusJobExtendedInfo.class); - Assertions.assertEquals("afbwqroohtuovmao", model.jobId()); - } - - @Test - public void testSerialize() { - OperationStatusJobExtendedInfo model = new OperationStatusJobExtendedInfo().withJobId("afbwqroohtuovmao"); - model = BinaryData.fromObject(model).toObject(OperationStatusJobExtendedInfo.class); - Assertions.assertEquals("afbwqroohtuovmao", 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 deleted file mode 100644 index a29995ca3a828..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusJobsExtendedInfoTests.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.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; -import org.junit.jupiter.api.Test; - -public final class OperationStatusJobsExtendedInfoTests { - @Test - public void testDeserialize() { - OperationStatusJobsExtendedInfo model = - BinaryData - .fromString( - "{\"objectType\":\"OperationStatusJobsExtendedInfo\",\"jobIds\":[\"jtumgh\",\"hpv\",\"cmslclblyjxltbs\"],\"failedJobsError\":{\"sfxigctmgx\":\"c\",\"eukdqkkyih\":\"upbezqccydrt\",\"qm\":\"tg\"}}") - .toObject(OperationStatusJobsExtendedInfo.class); - Assertions.assertEquals("jtumgh", model.jobIds().get(0)); - Assertions.assertEquals("c", model.failedJobsError().get("sfxigctmgx")); - } - - @Test - public void testSerialize() { - OperationStatusJobsExtendedInfo model = - new OperationStatusJobsExtendedInfo() - .withJobIds(Arrays.asList("jtumgh", "hpv", "cmslclblyjxltbs")) - .withFailedJobsError(mapOf("sfxigctmgx", "c", "eukdqkkyih", "upbezqccydrt", "qm", "tg")); - model = BinaryData.fromObject(model).toObject(OperationStatusJobsExtendedInfo.class); - Assertions.assertEquals("jtumgh", model.jobIds().get(0)); - Assertions.assertEquals("c", model.failedJobsError().get("sfxigctmgx")); - } - - @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/OperationStatusProvisionIlrExtendedInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusProvisionIlrExtendedInfoTests.java deleted file mode 100644 index e0ffbfa4c31d0..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationStatusProvisionIlrExtendedInfoTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class OperationStatusProvisionIlrExtendedInfoTests { - @Test - public void testDeserialize() { - OperationStatusProvisionIlrExtendedInfo model = - BinaryData - .fromString( - "{\"objectType\":\"OperationStatusProvisionILRExtendedInfo\",\"recoveryTarget\":{\"clientScripts\":[{\"scriptContent\":\"ldoychi\",\"scriptExtension\":\"cecfehuwaoaguh\",\"osType\":\"qllizstac\",\"url\":\"vhrweftkwqejpmv\",\"scriptNameSuffix\":\"ehaepwamcxtc\"},{\"scriptContent\":\"upeuknijduyye\",\"scriptExtension\":\"ydjfb\",\"osType\":\"yv\",\"url\":\"ulrtywikdmh\",\"scriptNameSuffix\":\"kuflgbh\"}]}}") - .toObject(OperationStatusProvisionIlrExtendedInfo.class); - Assertions.assertEquals("ldoychi", model.recoveryTarget().clientScripts().get(0).scriptContent()); - Assertions.assertEquals("cecfehuwaoaguh", model.recoveryTarget().clientScripts().get(0).scriptExtension()); - Assertions.assertEquals("qllizstac", model.recoveryTarget().clientScripts().get(0).osType()); - Assertions.assertEquals("vhrweftkwqejpmv", model.recoveryTarget().clientScripts().get(0).url()); - Assertions.assertEquals("ehaepwamcxtc", model.recoveryTarget().clientScripts().get(0).scriptNameSuffix()); - } - - @Test - public void testSerialize() { - OperationStatusProvisionIlrExtendedInfo model = - new OperationStatusProvisionIlrExtendedInfo() - .withRecoveryTarget( - new InstantItemRecoveryTarget() - .withClientScripts( - Arrays - .asList( - new ClientScriptForConnect() - .withScriptContent("ldoychi") - .withScriptExtension("cecfehuwaoaguh") - .withOsType("qllizstac") - .withUrl("vhrweftkwqejpmv") - .withScriptNameSuffix("ehaepwamcxtc"), - new ClientScriptForConnect() - .withScriptContent("upeuknijduyye") - .withScriptExtension("ydjfb") - .withOsType("yv") - .withUrl("ulrtywikdmh") - .withScriptNameSuffix("kuflgbh")))); - model = BinaryData.fromObject(model).toObject(OperationStatusProvisionIlrExtendedInfo.class); - Assertions.assertEquals("ldoychi", model.recoveryTarget().clientScripts().get(0).scriptContent()); - Assertions.assertEquals("cecfehuwaoaguh", model.recoveryTarget().clientScripts().get(0).scriptExtension()); - Assertions.assertEquals("qllizstac", model.recoveryTarget().clientScripts().get(0).osType()); - Assertions.assertEquals("vhrweftkwqejpmv", model.recoveryTarget().clientScripts().get(0).url()); - Assertions.assertEquals("ehaepwamcxtc", 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 deleted file mode 100644 index 71cc44ea67731..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/OperationsListMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryValueForSingleApi; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"d\",\"display\":{\"provider\":\"xgkqusybwp\",\"resource\":\"acarvvlf\",\"operation\":\"ymtpo\",\"description\":\"enazerohzrsqals\"},\"origin\":\"dnwqapfg\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[]}}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(Context.NONE); - - Assertions.assertEquals("d", response.iterator().next().name()); - Assertions.assertEquals("xgkqusybwp", response.iterator().next().display().provider()); - Assertions.assertEquals("acarvvlf", response.iterator().next().display().resource()); - Assertions.assertEquals("ymtpo", response.iterator().next().display().operation()); - Assertions.assertEquals("enazerohzrsqals", response.iterator().next().display().description()); - Assertions.assertEquals("dnwqapfg", response.iterator().next().origin()); - } -} 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 deleted file mode 100644 index 5105c20901967..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PointInTimeRangeTests.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.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.PointInTimeRange; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PointInTimeRangeTests { - @Test - public void testDeserialize() { - PointInTimeRange model = - BinaryData - .fromString("{\"startTime\":\"2021-09-05T07:02:59Z\",\"endTime\":\"2021-09-10T21:52:33Z\"}") - .toObject(PointInTimeRange.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T07:02:59Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-10T21:52:33Z"), model.endTime()); - } - - @Test - public void testSerialize() { - PointInTimeRange model = - new PointInTimeRange() - .withStartTime(OffsetDateTime.parse("2021-09-05T07:02:59Z")) - .withEndTime(OffsetDateTime.parse("2021-09-10T21:52:33Z")); - model = BinaryData.fromObject(model).toObject(PointInTimeRange.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T07:02:59Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-10T21:52:33Z"), 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 deleted file mode 100644 index 1575e7700b175..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PreValidateEnableBackupRequestTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DataSourceType; -import com.azure.resourcemanager.recoveryservicesbackup.models.PreValidateEnableBackupRequest; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PreValidateEnableBackupRequestTests { - @Test - public void testDeserialize() { - PreValidateEnableBackupRequest model = - BinaryData - .fromString( - "{\"resourceType\":\"Sharepoint\",\"resourceId\":\"gdf\",\"vaultId\":\"lzl\",\"properties\":\"xrifkwmrvkts\"}") - .toObject(PreValidateEnableBackupRequest.class); - Assertions.assertEquals(DataSourceType.SHAREPOINT, model.resourceType()); - Assertions.assertEquals("gdf", model.resourceId()); - Assertions.assertEquals("lzl", model.vaultId()); - Assertions.assertEquals("xrifkwmrvkts", model.properties()); - } - - @Test - public void testSerialize() { - PreValidateEnableBackupRequest model = - new PreValidateEnableBackupRequest() - .withResourceType(DataSourceType.SHAREPOINT) - .withResourceId("gdf") - .withVaultId("lzl") - .withProperties("xrifkwmrvkts"); - 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()); - } -} 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 deleted file mode 100644 index dcbf1ca7ddea9..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrepareDataMoveRequestTests.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.DataMoveLevel; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrepareDataMoveRequest; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrepareDataMoveRequestTests { - @Test - public void testDeserialize() { - PrepareDataMoveRequest model = - BinaryData - .fromString( - "{\"targetResourceId\":\"y\",\"targetRegion\":\"enjbdlwtgrhp\",\"dataMoveLevel\":\"Vault\",\"sourceContainerArmIds\":[\"umasxazjpq\",\"e\"],\"ignoreMoved\":false}") - .toObject(PrepareDataMoveRequest.class); - Assertions.assertEquals("y", model.targetResourceId()); - Assertions.assertEquals("enjbdlwtgrhp", model.targetRegion()); - Assertions.assertEquals(DataMoveLevel.VAULT, model.dataMoveLevel()); - Assertions.assertEquals("umasxazjpq", model.sourceContainerArmIds().get(0)); - Assertions.assertEquals(false, model.ignoreMoved()); - } - - @Test - public void testSerialize() { - PrepareDataMoveRequest model = - new PrepareDataMoveRequest() - .withTargetResourceId("y") - .withTargetRegion("enjbdlwtgrhp") - .withDataMoveLevel(DataMoveLevel.VAULT) - .withSourceContainerArmIds(Arrays.asList("umasxazjpq", "e")) - .withIgnoreMoved(false); - model = BinaryData.fromObject(model).toObject(PrepareDataMoveRequest.class); - Assertions.assertEquals("y", model.targetResourceId()); - Assertions.assertEquals("enjbdlwtgrhp", model.targetRegion()); - Assertions.assertEquals(DataMoveLevel.VAULT, model.dataMoveLevel()); - Assertions.assertEquals("umasxazjpq", model.sourceContainerArmIds().get(0)); - Assertions.assertEquals(false, 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 deleted file mode 100644 index 16104a108fc83..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrepareDataMoveResponseTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class PrepareDataMoveResponseTests { - @Test - public void testDeserialize() { - PrepareDataMoveResponse model = - BinaryData - .fromString( - "{\"objectType\":\"PrepareDataMoveResponse\",\"correlationId\":\"ropions\",\"sourceVaultProperties\":{\"jinnix\":\"wpng\"}}") - .toObject(PrepareDataMoveResponse.class); - Assertions.assertEquals("ropions", model.correlationId()); - Assertions.assertEquals("wpng", model.sourceVaultProperties().get("jinnix")); - } - - @Test - public void testSerialize() { - PrepareDataMoveResponse model = - new PrepareDataMoveResponse() - .withCorrelationId("ropions") - .withSourceVaultProperties(mapOf("jinnix", "wpng")); - model = BinaryData.fromObject(model).toObject(PrepareDataMoveResponse.class); - Assertions.assertEquals("ropions", model.correlationId()); - Assertions.assertEquals("wpng", model.sourceVaultProperties().get("jinnix")); - } - - @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/PrivateEndpointConnectionResourceInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionResourceInnerTests.java deleted file mode 100644 index df41033a20b4c..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionResourceInnerTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.PrivateEndpointConnectionResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpoint; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnection; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnectionStatus; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProvisioningState; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateEndpointConnectionResourceInnerTests { - @Test - public void testDeserialize() { - PrivateEndpointConnectionResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"privateEndpoint\":{\"id\":\"topbobjogh\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"m\",\"actionRequired\":\"hrzayvvtpgvdf\"}},\"eTag\":\"otkftutqxlngx\",\"location\":\"efgugnxk\",\"tags\":{\"tthzrvqd\":\"qmi\",\"ehoqfbowskan\":\"abhjybi\"},\"id\":\"ktzlcuiywg\",\"name\":\"ywgndrv\",\"type\":\"nhzgpphrcgyn\"}") - .toObject(PrivateEndpointConnectionResourceInner.class); - Assertions.assertEquals("efgugnxk", model.location()); - Assertions.assertEquals("qmi", model.tags().get("tthzrvqd")); - Assertions.assertEquals(ProvisioningState.FAILED, model.properties().provisioningState()); - Assertions.assertEquals("topbobjogh", model.properties().privateEndpoint().id()); - Assertions - .assertEquals( - PrivateEndpointConnectionStatus.PENDING, - model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("m", model.properties().privateLinkServiceConnectionState().description()); - Assertions - .assertEquals("hrzayvvtpgvdf", model.properties().privateLinkServiceConnectionState().actionRequired()); - Assertions.assertEquals("otkftutqxlngx", model.etag()); - } - - @Test - public void testSerialize() { - PrivateEndpointConnectionResourceInner model = - new PrivateEndpointConnectionResourceInner() - .withLocation("efgugnxk") - .withTags(mapOf("tthzrvqd", "qmi", "ehoqfbowskan", "abhjybi")) - .withProperties( - new PrivateEndpointConnection() - .withProvisioningState(ProvisioningState.FAILED) - .withPrivateEndpoint(new PrivateEndpoint().withId("topbobjogh")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointConnectionStatus.PENDING) - .withDescription("m") - .withActionRequired("hrzayvvtpgvdf"))) - .withEtag("otkftutqxlngx"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionResourceInner.class); - Assertions.assertEquals("efgugnxk", model.location()); - Assertions.assertEquals("qmi", model.tags().get("tthzrvqd")); - Assertions.assertEquals(ProvisioningState.FAILED, model.properties().provisioningState()); - Assertions.assertEquals("topbobjogh", model.properties().privateEndpoint().id()); - Assertions - .assertEquals( - PrivateEndpointConnectionStatus.PENDING, - model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("m", model.properties().privateLinkServiceConnectionState().description()); - Assertions - .assertEquals("hrzayvvtpgvdf", model.properties().privateLinkServiceConnectionState().actionRequired()); - Assertions.assertEquals("otkftutqxlngx", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 1e12cacde953e..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpoint; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnection; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnectionStatus; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProvisioningState; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateEndpointConnectionTests { - @Test - public void testDeserialize() { - PrivateEndpointConnection model = - BinaryData - .fromString( - "{\"provisioningState\":\"Pending\",\"privateEndpoint\":{\"id\":\"cfvmmco\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"zevgb\",\"actionRequired\":\"jqabcypmivkwlzuv\"}}") - .toObject(PrivateEndpointConnection.class); - Assertions.assertEquals(ProvisioningState.PENDING, model.provisioningState()); - Assertions.assertEquals("cfvmmco", model.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateEndpointConnectionStatus.DISCONNECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("zevgb", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("jqabcypmivkwlzuv", model.privateLinkServiceConnectionState().actionRequired()); - } - - @Test - public void testSerialize() { - PrivateEndpointConnection model = - new PrivateEndpointConnection() - .withProvisioningState(ProvisioningState.PENDING) - .withPrivateEndpoint(new PrivateEndpoint().withId("cfvmmco")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointConnectionStatus.DISCONNECTED) - .withDescription("zevgb") - .withActionRequired("jqabcypmivkwlzuv")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnection.class); - Assertions.assertEquals(ProvisioningState.PENDING, model.provisioningState()); - Assertions.assertEquals("cfvmmco", model.privateEndpoint().id()); - Assertions - .assertEquals( - PrivateEndpointConnectionStatus.DISCONNECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("zevgb", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("jqabcypmivkwlzuv", 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 deleted file mode 100644 index 37b1ce69efe42..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionsDeleteMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.privateEndpointConnections().delete("vessm", "hhkuuip", "dqq", Context.NONE); - } -} 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 deleted file mode 100644 index 38aa3dd05f17f..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointConnectionsPutMockTests.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpoint; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnection; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnectionResource; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnectionStatus; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProvisioningState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsPutMockTests { - @Test - public void testPut() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"lqjbekpeek\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"dqhjvyklxeslkhhu\",\"actionRequired\":\"cpoq\"}},\"eTag\":\"vnwqjwgo\",\"location\":\"nlejjjkxybwf\",\"tags\":{\"vkzykjtjknsxf\":\"jbzten\",\"cdp\":\"us\",\"kuwxeoiojfizfavk\":\"upnqrmgjfb\",\"fwxrzxmdew\":\"zwfbcyaykmmfzs\"},\"id\":\"rsxkr\",\"name\":\"lbjazejww\",\"type\":\"iyoypsuhbrnnhj\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnectionResource response = - manager - .privateEndpointConnections() - .define("qyv") - .withRegion("igsyeipqdsmjt") - .withExistingVault("tekva", "blhtjq") - .withTags(mapOf("eplkcsm", "gdgkki", "qfloygbdgwum", "nhwtbbaedorvv", "pabgdexjddvjsaqw", "xdgd")) - .withProperties( - new PrivateEndpointConnection() - .withProvisioningState(ProvisioningState.SUCCEEDED) - .withPrivateEndpoint(new PrivateEndpoint().withId("mxhzzysevus")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointConnectionStatus.APPROVED) - .withDescription("rryveimipskdy") - .withActionRequired("tv"))) - .withEtag("zkaftjvvrux") - .create(); - - Assertions.assertEquals("nlejjjkxybwf", response.location()); - Assertions.assertEquals("jbzten", response.tags().get("vkzykjtjknsxf")); - Assertions.assertEquals(ProvisioningState.SUCCEEDED, response.properties().provisioningState()); - Assertions.assertEquals("lqjbekpeek", response.properties().privateEndpoint().id()); - Assertions - .assertEquals( - PrivateEndpointConnectionStatus.APPROVED, - response.properties().privateLinkServiceConnectionState().status()); - Assertions - .assertEquals("dqhjvyklxeslkhhu", response.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("cpoq", response.properties().privateLinkServiceConnectionState().actionRequired()); - Assertions.assertEquals("vnwqjwgo", response.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index e3bd9d9a5ec48..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateEndpointTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpoint; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateEndpointTests { - @Test - public void testDeserialize() { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"fwnfnb\"}").toObject(PrivateEndpoint.class); - Assertions.assertEquals("fwnfnb", model.id()); - } - - @Test - public void testSerialize() { - PrivateEndpoint model = new PrivateEndpoint().withId("fwnfnb"); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - Assertions.assertEquals("fwnfnb", 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 deleted file mode 100644 index 88759846ade6a..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/PrivateLinkServiceConnectionStateTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnectionStatus; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateLinkServiceConnectionStateTests { - @Test - public void testDeserialize() { - PrivateLinkServiceConnectionState model = - BinaryData - .fromString( - "{\"status\":\"Approved\",\"description\":\"onlebxetqgtzxdpn\",\"actionRequired\":\"qqwx\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointConnectionStatus.APPROVED, model.status()); - Assertions.assertEquals("onlebxetqgtzxdpn", model.description()); - Assertions.assertEquals("qqwx", model.actionRequired()); - } - - @Test - public void testSerialize() { - PrivateLinkServiceConnectionState model = - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointConnectionStatus.APPROVED) - .withDescription("onlebxetqgtzxdpn") - .withActionRequired("qqwx"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointConnectionStatus.APPROVED, model.status()); - Assertions.assertEquals("onlebxetqgtzxdpn", model.description()); - Assertions.assertEquals("qqwx", 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 deleted file mode 100644 index 764fb5c1dcb10..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainerResourceInnerTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class ProtectableContainerResourceInnerTests { - @Test - public void testDeserialize() { - ProtectableContainerResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"jos\",\"backupManagementType\":\"AzureWorkload\",\"healthStatus\":\"ulpjr\",\"containerId\":\"ag\"},\"eTag\":\"vimjwos\",\"location\":\"tx\",\"tags\":{\"tq\":\"skfc\",\"gqggebdunygae\":\"miekkezzikhlyfjh\",\"fatpxllrxcyjmoa\":\"idb\",\"arm\":\"su\"},\"id\":\"wdmjsjqbjhhyx\",\"name\":\"rw\",\"type\":\"yc\"}") - .toObject(ProtectableContainerResourceInner.class); - Assertions.assertEquals("tx", model.location()); - Assertions.assertEquals("skfc", model.tags().get("tq")); - Assertions.assertEquals("jos", model.properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.properties().backupManagementType()); - Assertions.assertEquals("ulpjr", model.properties().healthStatus()); - Assertions.assertEquals("ag", model.properties().containerId()); - Assertions.assertEquals("vimjwos", model.etag()); - } - - @Test - public void testSerialize() { - ProtectableContainerResourceInner model = - new ProtectableContainerResourceInner() - .withLocation("tx") - .withTags( - mapOf("tq", "skfc", "gqggebdunygae", "miekkezzikhlyfjh", "fatpxllrxcyjmoa", "idb", "arm", "su")) - .withProperties( - new ProtectableContainer() - .withFriendlyName("jos") - .withBackupManagementType(BackupManagementType.AZURE_WORKLOAD) - .withHealthStatus("ulpjr") - .withContainerId("ag")) - .withEtag("vimjwos"); - model = BinaryData.fromObject(model).toObject(ProtectableContainerResourceInner.class); - Assertions.assertEquals("tx", model.location()); - Assertions.assertEquals("skfc", model.tags().get("tq")); - Assertions.assertEquals("jos", model.properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_WORKLOAD, model.properties().backupManagementType()); - Assertions.assertEquals("ulpjr", model.properties().healthStatus()); - Assertions.assertEquals("ag", model.properties().containerId()); - Assertions.assertEquals("vimjwos", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 800bd085f51c3..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainerResourceListTests.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainerResourceList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProtectableContainerResourceListTests { - @Test - public void testDeserialize() { - ProtectableContainerResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"e\",\"backupManagementType\":\"AzureBackupServer\",\"healthStatus\":\"rrwlquuijfqkace\",\"containerId\":\"ipfpubji\"},\"eTag\":\"wifto\",\"location\":\"qkvpuvksgplsakn\",\"tags\":{\"iyntorzihle\":\"synljphuopxodl\",\"yzrpzbchckqqzq\":\"sjswsrms\",\"ysuiizynkedya\":\"ox\"},\"id\":\"rwyhqmibzyhwitsm\",\"name\":\"pyy\",\"type\":\"pcdpumnz\"},{\"properties\":{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"z\",\"backupManagementType\":\"MAB\",\"healthStatus\":\"iknsorgjh\",\"containerId\":\"ldtlwwr\"},\"eTag\":\"dmtnc\",\"location\":\"ok\",\"tags\":{\"gsyocogj\":\"lxdy\",\"kvci\":\"tdtbnnhadooc\"},\"id\":\"hnvpamqgxq\",\"name\":\"u\",\"type\":\"zikywgg\"},{\"properties\":{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"lla\",\"backupManagementType\":\"AzureIaasVM\",\"healthStatus\":\"wuipiccjzkzivg\",\"containerId\":\"c\"},\"eTag\":\"y\",\"location\":\"hyrnxxmu\",\"tags\":{\"tchealmf\":\"ndrdvstkwq\",\"iohgwxrtfud\":\"tdaaygdvwvg\",\"mnpkukghimdblxg\":\"epxgyqagvr\",\"mszkkfo\":\"imfnjhfjx\"},\"id\":\"rey\",\"name\":\"kzikfjawneaivxwc\",\"type\":\"elpcirelsfeaenwa\"}],\"nextLink\":\"atklddxbjhwuaa\"}") - .toObject(ProtectableContainerResourceList.class); - Assertions.assertEquals("atklddxbjhwuaa", model.nextLink()); - Assertions.assertEquals("qkvpuvksgplsakn", model.value().get(0).location()); - Assertions.assertEquals("synljphuopxodl", model.value().get(0).tags().get("iyntorzihle")); - Assertions.assertEquals("e", model.value().get(0).properties().friendlyName()); - Assertions - .assertEquals( - BackupManagementType.AZURE_BACKUP_SERVER, model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("rrwlquuijfqkace", model.value().get(0).properties().healthStatus()); - Assertions.assertEquals("ipfpubji", model.value().get(0).properties().containerId()); - Assertions.assertEquals("wifto", model.value().get(0).etag()); - } - - @Test - public void testSerialize() { - ProtectableContainerResourceList model = - new ProtectableContainerResourceList() - .withNextLink("atklddxbjhwuaa") - .withValue( - Arrays - .asList( - new ProtectableContainerResourceInner() - .withLocation("qkvpuvksgplsakn") - .withTags( - mapOf( - "iyntorzihle", - "synljphuopxodl", - "yzrpzbchckqqzq", - "sjswsrms", - "ysuiizynkedya", - "ox")) - .withProperties( - new ProtectableContainer() - .withFriendlyName("e") - .withBackupManagementType(BackupManagementType.AZURE_BACKUP_SERVER) - .withHealthStatus("rrwlquuijfqkace") - .withContainerId("ipfpubji")) - .withEtag("wifto"), - new ProtectableContainerResourceInner() - .withLocation("ok") - .withTags(mapOf("gsyocogj", "lxdy", "kvci", "tdtbnnhadooc")) - .withProperties( - new ProtectableContainer() - .withFriendlyName("z") - .withBackupManagementType(BackupManagementType.MAB) - .withHealthStatus("iknsorgjh") - .withContainerId("ldtlwwr")) - .withEtag("dmtnc"), - new ProtectableContainerResourceInner() - .withLocation("hyrnxxmu") - .withTags( - mapOf( - "tchealmf", - "ndrdvstkwq", - "iohgwxrtfud", - "tdaaygdvwvg", - "mnpkukghimdblxg", - "epxgyqagvr", - "mszkkfo", - "imfnjhfjx")) - .withProperties( - new ProtectableContainer() - .withFriendlyName("lla") - .withBackupManagementType(BackupManagementType.AZURE_IAAS_VM) - .withHealthStatus("wuipiccjzkzivg") - .withContainerId("c")) - .withEtag("y"))); - model = BinaryData.fromObject(model).toObject(ProtectableContainerResourceList.class); - Assertions.assertEquals("atklddxbjhwuaa", model.nextLink()); - Assertions.assertEquals("qkvpuvksgplsakn", model.value().get(0).location()); - Assertions.assertEquals("synljphuopxodl", model.value().get(0).tags().get("iyntorzihle")); - Assertions.assertEquals("e", model.value().get(0).properties().friendlyName()); - Assertions - .assertEquals( - BackupManagementType.AZURE_BACKUP_SERVER, model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("rrwlquuijfqkace", model.value().get(0).properties().healthStatus()); - Assertions.assertEquals("ipfpubji", model.value().get(0).properties().containerId()); - Assertions.assertEquals("wifto", model.value().get(0).etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 6280399718c0b..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainerTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainer; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProtectableContainerTests { - @Test - public void testDeserialize() { - ProtectableContainer model = - BinaryData - .fromString( - "{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"uhpkxkgymar\",\"backupManagementType\":\"AzureIaasVM\",\"healthStatus\":\"jxqugjhky\",\"containerId\":\"beddgssofw\"}") - .toObject(ProtectableContainer.class); - Assertions.assertEquals("uhpkxkgymar", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.backupManagementType()); - Assertions.assertEquals("jxqugjhky", model.healthStatus()); - Assertions.assertEquals("beddgssofw", model.containerId()); - } - - @Test - public void testSerialize() { - ProtectableContainer model = - new ProtectableContainer() - .withFriendlyName("uhpkxkgymar") - .withBackupManagementType(BackupManagementType.AZURE_IAAS_VM) - .withHealthStatus("jxqugjhky") - .withContainerId("beddgssofw"); - model = BinaryData.fromObject(model).toObject(ProtectableContainer.class); - Assertions.assertEquals("uhpkxkgymar", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.AZURE_IAAS_VM, model.backupManagementType()); - Assertions.assertEquals("jxqugjhky", model.healthStatus()); - Assertions.assertEquals("beddgssofw", 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 deleted file mode 100644 index 4e66f5ab5856d..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectableContainersListMockTests.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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainerResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ProtectableContainersListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"protectableContainerType\":\"ProtectableContainer\",\"friendlyName\":\"abnsmj\",\"backupManagementType\":\"AzureSql\",\"healthStatus\":\"qxaekqsykv\",\"containerId\":\"tqpkevmy\"},\"eTag\":\"jcrspxklurcclfgx\",\"location\":\"nnnoytz\",\"tags\":{\"maupxvpi\":\"ewxigpxvk\",\"ds\":\"dfaifyzyzeyuube\",\"ytoithgygvfl\":\"l\"},\"id\":\"gvdihoynkrxwetwk\",\"name\":\"rcyrucpcunnu\",\"type\":\"dqumoenodnai\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.protectableContainers().list("pwzyi", "rkgwltxeqip", "gzdyimsfayorp", "avkjog", Context.NONE); - - Assertions.assertEquals("nnnoytz", response.iterator().next().location()); - Assertions.assertEquals("ewxigpxvk", response.iterator().next().tags().get("maupxvpi")); - Assertions.assertEquals("abnsmj", response.iterator().next().properties().friendlyName()); - Assertions - .assertEquals( - BackupManagementType.AZURE_SQL, response.iterator().next().properties().backupManagementType()); - Assertions.assertEquals("qxaekqsykv", response.iterator().next().properties().healthStatus()); - Assertions.assertEquals("tqpkevmy", response.iterator().next().properties().containerId()); - Assertions.assertEquals("jcrspxklurcclfgx", response.iterator().next().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 deleted file mode 100644 index dfa770f03d139..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemResourceInnerTests.java +++ /dev/null @@ -1,103 +0,0 @@ -// 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.fluent.models.ProtectedItemResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItem; -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; - -public final class ProtectedItemResourceInnerTests { - @Test - public void testDeserialize() { - ProtectedItemResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"Invalid\",\"workloadType\":\"SAPHanaDBInstance\",\"containerName\":\"gujjugwdkcglh\",\"sourceResourceId\":\"azjdyggd\",\"policyId\":\"ixhbkuofqweykhm\",\"lastRecoveryPoint\":\"2021-08-01T10:52:51Z\",\"backupSetName\":\"fyexfwhy\",\"createMode\":\"Recover\",\"deferredDeleteTimeInUTC\":\"2021-02-12T00:37:49Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"c\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":true,\"resourceGuardOperationRequests\":[\"amdecte\",\"f\"],\"isArchiveEnabled\":false,\"policyName\":\"jeyp\",\"softDeleteRetentionPeriod\":1237692135},\"eTag\":\"rkgqhcjrefo\",\"location\":\"gm\",\"tags\":{\"qjpkcattpngjcrc\":\"leyyvx\"},\"id\":\"zsqpjhvmdajvny\",\"name\":\"ounqecano\",\"type\":\"eupfhyhltrpm\"}") - .toObject(ProtectedItemResourceInner.class); - Assertions.assertEquals("gm", model.location()); - Assertions.assertEquals("leyyvx", model.tags().get("qjpkcattpngjcrc")); - Assertions.assertEquals("gujjugwdkcglh", model.properties().containerName()); - Assertions.assertEquals("azjdyggd", model.properties().sourceResourceId()); - Assertions.assertEquals("ixhbkuofqweykhm", model.properties().policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-01T10:52:51Z"), model.properties().lastRecoveryPoint()); - Assertions.assertEquals("fyexfwhy", model.properties().backupSetName()); - Assertions.assertEquals(CreateMode.RECOVER, model.properties().createMode()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-02-12T00:37:49Z"), model.properties().deferredDeleteTimeInUtc()); - Assertions.assertEquals(true, model.properties().isScheduledForDeferredDelete()); - Assertions.assertEquals("c", model.properties().deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.properties().isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(true, model.properties().isRehydrate()); - Assertions.assertEquals("amdecte", model.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.properties().isArchiveEnabled()); - Assertions.assertEquals("jeyp", model.properties().policyName()); - Assertions.assertEquals(1237692135, model.properties().softDeleteRetentionPeriod()); - Assertions.assertEquals("rkgqhcjrefo", model.etag()); - } - - @Test - public void testSerialize() { - ProtectedItemResourceInner model = - new ProtectedItemResourceInner() - .withLocation("gm") - .withTags(mapOf("qjpkcattpngjcrc", "leyyvx")) - .withProperties( - new ProtectedItem() - .withContainerName("gujjugwdkcglh") - .withSourceResourceId("azjdyggd") - .withPolicyId("ixhbkuofqweykhm") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-08-01T10:52:51Z")) - .withBackupSetName("fyexfwhy") - .withCreateMode(CreateMode.RECOVER) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-02-12T00:37:49Z")) - .withIsScheduledForDeferredDelete(true) - .withDeferredDeleteTimeRemaining("c") - .withIsDeferredDeleteScheduleUpcoming(true) - .withIsRehydrate(true) - .withResourceGuardOperationRequests(Arrays.asList("amdecte", "f")) - .withIsArchiveEnabled(false) - .withPolicyName("jeyp") - .withSoftDeleteRetentionPeriod(1237692135)) - .withEtag("rkgqhcjrefo"); - model = BinaryData.fromObject(model).toObject(ProtectedItemResourceInner.class); - Assertions.assertEquals("gm", model.location()); - Assertions.assertEquals("leyyvx", model.tags().get("qjpkcattpngjcrc")); - Assertions.assertEquals("gujjugwdkcglh", model.properties().containerName()); - Assertions.assertEquals("azjdyggd", model.properties().sourceResourceId()); - Assertions.assertEquals("ixhbkuofqweykhm", model.properties().policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-01T10:52:51Z"), model.properties().lastRecoveryPoint()); - Assertions.assertEquals("fyexfwhy", model.properties().backupSetName()); - Assertions.assertEquals(CreateMode.RECOVER, model.properties().createMode()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-02-12T00:37:49Z"), model.properties().deferredDeleteTimeInUtc()); - Assertions.assertEquals(true, model.properties().isScheduledForDeferredDelete()); - Assertions.assertEquals("c", model.properties().deferredDeleteTimeRemaining()); - Assertions.assertEquals(true, model.properties().isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(true, model.properties().isRehydrate()); - Assertions.assertEquals("amdecte", model.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.properties().isArchiveEnabled()); - Assertions.assertEquals("jeyp", model.properties().policyName()); - Assertions.assertEquals(1237692135, model.properties().softDeleteRetentionPeriod()); - Assertions.assertEquals("rkgqhcjrefo", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 5cb584f95036d..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemResourceListTests.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -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.ProtectedItemResourceList; -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; - -public final class ProtectedItemResourceListTests { - @Test - public void testDeserialize() { - ProtectedItemResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"Invalid\",\"workloadType\":\"Client\",\"containerName\":\"euojgjrwju\",\"sourceResourceId\":\"otwmcdyt\",\"policyId\":\"wit\",\"lastRecoveryPoint\":\"2021-05-14T21:36:27Z\",\"backupSetName\":\"awgqwgxhni\",\"createMode\":\"Invalid\",\"deferredDeleteTimeInUTC\":\"2021-05-28T01:48:43Z\",\"isScheduledForDeferredDelete\":false,\"deferredDeleteTimeRemaining\":\"cg\",\"isDeferredDeleteScheduleUpcoming\":false,\"isRehydrate\":true,\"resourceGuardOperationRequests\":[],\"isArchiveEnabled\":false,\"policyName\":\"auwhvylwzbtdhx\",\"softDeleteRetentionPeriod\":1267034334},\"eTag\":\"bm\",\"location\":\"ow\",\"tags\":{\"lupj\":\"rzqlveu\",\"riplrbpbewtg\":\"khfxobbcswsrt\"},\"id\":\"fgb\",\"name\":\"c\",\"type\":\"wxzvlvqhjkb\"},{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"DefaultBackup\",\"workloadType\":\"SAPAseDatabase\",\"containerName\":\"xiebwwaloayqcg\",\"sourceResourceId\":\"tzjuzgwyzmhtxo\",\"policyId\":\"mtsavjcbpwxqp\",\"lastRecoveryPoint\":\"2021-07-31T13:26:15Z\",\"backupSetName\":\"ftguv\",\"createMode\":\"Invalid\",\"deferredDeleteTimeInUTC\":\"2021-06-29T08:45:17Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"dyvxqtayriww\",\"isDeferredDeleteScheduleUpcoming\":true,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[],\"isArchiveEnabled\":false,\"policyName\":\"cqibycnojv\",\"softDeleteRetentionPeriod\":2121055666},\"eTag\":\"fqsgzvahapjy\",\"location\":\"hpvgqz\",\"tags\":{\"zovawjvz\":\"vxdjzlmwlxkvugf\",\"nxipeil\":\"nluthnnp\",\"dzumveekg\":\"jzuaejxdultskzbb\"},\"id\":\"wozuhkf\",\"name\":\"bsjyofdx\",\"type\":\"uusdttouwa\"},{\"properties\":{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"AzureIaasVM\",\"workloadType\":\"Invalid\",\"containerName\":\"elnsmvbxw\",\"sourceResourceId\":\"sflhhca\",\"policyId\":\"n\",\"lastRecoveryPoint\":\"2021-03-25T19:19:56Z\",\"backupSetName\":\"sxyawjoyaqcs\",\"createMode\":\"Default\",\"deferredDeleteTimeInUTC\":\"2021-01-08T06:10:15Z\",\"isScheduledForDeferredDelete\":true,\"deferredDeleteTimeRemaining\":\"zyexzn\",\"isDeferredDeleteScheduleUpcoming\":false,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[],\"isArchiveEnabled\":true,\"policyName\":\"folhbnxknal\",\"softDeleteRetentionPeriod\":338367472},\"eTag\":\"p\",\"location\":\"gdtpnapnyiro\",\"tags\":{\"edjvcslynqw\":\"pigvpgylgqgitx\",\"zhxgktrmgucn\":\"ncw\"},\"id\":\"pkteo\",\"name\":\"llwptfdy\",\"type\":\"pfqbuaceopzf\"}],\"nextLink\":\"hhuao\"}") - .toObject(ProtectedItemResourceList.class); - Assertions.assertEquals("hhuao", model.nextLink()); - Assertions.assertEquals("ow", model.value().get(0).location()); - Assertions.assertEquals("rzqlveu", model.value().get(0).tags().get("lupj")); - Assertions.assertEquals("euojgjrwju", model.value().get(0).properties().containerName()); - Assertions.assertEquals("otwmcdyt", model.value().get(0).properties().sourceResourceId()); - Assertions.assertEquals("wit", model.value().get(0).properties().policyId()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-05-14T21:36:27Z"), model.value().get(0).properties().lastRecoveryPoint()); - Assertions.assertEquals("awgqwgxhni", model.value().get(0).properties().backupSetName()); - Assertions.assertEquals(CreateMode.INVALID, model.value().get(0).properties().createMode()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-05-28T01:48:43Z"), - model.value().get(0).properties().deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.value().get(0).properties().isScheduledForDeferredDelete()); - Assertions.assertEquals("cg", model.value().get(0).properties().deferredDeleteTimeRemaining()); - Assertions.assertEquals(false, model.value().get(0).properties().isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(true, model.value().get(0).properties().isRehydrate()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchiveEnabled()); - Assertions.assertEquals("auwhvylwzbtdhx", model.value().get(0).properties().policyName()); - Assertions.assertEquals(1267034334, model.value().get(0).properties().softDeleteRetentionPeriod()); - Assertions.assertEquals("bm", model.value().get(0).etag()); - } - - @Test - public void testSerialize() { - ProtectedItemResourceList model = - new ProtectedItemResourceList() - .withNextLink("hhuao") - .withValue( - Arrays - .asList( - new ProtectedItemResourceInner() - .withLocation("ow") - .withTags(mapOf("lupj", "rzqlveu", "riplrbpbewtg", "khfxobbcswsrt")) - .withProperties( - new ProtectedItem() - .withContainerName("euojgjrwju") - .withSourceResourceId("otwmcdyt") - .withPolicyId("wit") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-05-14T21:36:27Z")) - .withBackupSetName("awgqwgxhni") - .withCreateMode(CreateMode.INVALID) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-05-28T01:48:43Z")) - .withIsScheduledForDeferredDelete(false) - .withDeferredDeleteTimeRemaining("cg") - .withIsDeferredDeleteScheduleUpcoming(false) - .withIsRehydrate(true) - .withResourceGuardOperationRequests(Arrays.asList()) - .withIsArchiveEnabled(false) - .withPolicyName("auwhvylwzbtdhx") - .withSoftDeleteRetentionPeriod(1267034334)) - .withEtag("bm"), - new ProtectedItemResourceInner() - .withLocation("hpvgqz") - .withTags( - mapOf( - "zovawjvz", - "vxdjzlmwlxkvugf", - "nxipeil", - "nluthnnp", - "dzumveekg", - "jzuaejxdultskzbb")) - .withProperties( - new ProtectedItem() - .withContainerName("xiebwwaloayqcg") - .withSourceResourceId("tzjuzgwyzmhtxo") - .withPolicyId("mtsavjcbpwxqp") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-07-31T13:26:15Z")) - .withBackupSetName("ftguv") - .withCreateMode(CreateMode.INVALID) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-06-29T08:45:17Z")) - .withIsScheduledForDeferredDelete(true) - .withDeferredDeleteTimeRemaining("dyvxqtayriww") - .withIsDeferredDeleteScheduleUpcoming(true) - .withIsRehydrate(false) - .withResourceGuardOperationRequests(Arrays.asList()) - .withIsArchiveEnabled(false) - .withPolicyName("cqibycnojv") - .withSoftDeleteRetentionPeriod(2121055666)) - .withEtag("fqsgzvahapjy"), - new ProtectedItemResourceInner() - .withLocation("gdtpnapnyiro") - .withTags(mapOf("edjvcslynqw", "pigvpgylgqgitx", "zhxgktrmgucn", "ncw")) - .withProperties( - new ProtectedItem() - .withContainerName("elnsmvbxw") - .withSourceResourceId("sflhhca") - .withPolicyId("n") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-03-25T19:19:56Z")) - .withBackupSetName("sxyawjoyaqcs") - .withCreateMode(CreateMode.DEFAULT) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-01-08T06:10:15Z")) - .withIsScheduledForDeferredDelete(true) - .withDeferredDeleteTimeRemaining("zyexzn") - .withIsDeferredDeleteScheduleUpcoming(false) - .withIsRehydrate(false) - .withResourceGuardOperationRequests(Arrays.asList()) - .withIsArchiveEnabled(true) - .withPolicyName("folhbnxknal") - .withSoftDeleteRetentionPeriod(338367472)) - .withEtag("p"))); - model = BinaryData.fromObject(model).toObject(ProtectedItemResourceList.class); - Assertions.assertEquals("hhuao", model.nextLink()); - Assertions.assertEquals("ow", model.value().get(0).location()); - Assertions.assertEquals("rzqlveu", model.value().get(0).tags().get("lupj")); - Assertions.assertEquals("euojgjrwju", model.value().get(0).properties().containerName()); - Assertions.assertEquals("otwmcdyt", model.value().get(0).properties().sourceResourceId()); - Assertions.assertEquals("wit", model.value().get(0).properties().policyId()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-05-14T21:36:27Z"), model.value().get(0).properties().lastRecoveryPoint()); - Assertions.assertEquals("awgqwgxhni", model.value().get(0).properties().backupSetName()); - Assertions.assertEquals(CreateMode.INVALID, model.value().get(0).properties().createMode()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-05-28T01:48:43Z"), - model.value().get(0).properties().deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.value().get(0).properties().isScheduledForDeferredDelete()); - Assertions.assertEquals("cg", model.value().get(0).properties().deferredDeleteTimeRemaining()); - Assertions.assertEquals(false, model.value().get(0).properties().isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(true, model.value().get(0).properties().isRehydrate()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchiveEnabled()); - Assertions.assertEquals("auwhvylwzbtdhx", model.value().get(0).properties().policyName()); - Assertions.assertEquals(1267034334, model.value().get(0).properties().softDeleteRetentionPeriod()); - Assertions.assertEquals("bm", model.value().get(0).etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index f1f4612725662..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.CreateMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectedItem; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProtectedItemTests { - @Test - public void testDeserialize() { - ProtectedItem model = - BinaryData - .fromString( - "{\"protectedItemType\":\"ProtectedItem\",\"backupManagementType\":\"MAB\",\"workloadType\":\"FileFolder\",\"containerName\":\"atuokthfuiu\",\"sourceResourceId\":\"dsfcpkvxodpuoz\",\"policyId\":\"zydagfuaxbezyiuo\",\"lastRecoveryPoint\":\"2021-09-30T07:23:02Z\",\"backupSetName\":\"hrdxwzywqsmbs\",\"createMode\":\"Default\",\"deferredDeleteTimeInUTC\":\"2021-08-23T03:52:49Z\",\"isScheduledForDeferredDelete\":false,\"deferredDeleteTimeRemaining\":\"yocf\",\"isDeferredDeleteScheduleUpcoming\":false,\"isRehydrate\":false,\"resourceGuardOperationRequests\":[\"dystkiiuxhqyud\",\"o\",\"rq\",\"b\"],\"isArchiveEnabled\":false,\"policyName\":\"vyifqrvkdvjsl\",\"softDeleteRetentionPeriod\":952204067}") - .toObject(ProtectedItem.class); - Assertions.assertEquals("atuokthfuiu", model.containerName()); - Assertions.assertEquals("dsfcpkvxodpuoz", model.sourceResourceId()); - Assertions.assertEquals("zydagfuaxbezyiuo", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-30T07:23:02Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("hrdxwzywqsmbs", model.backupSetName()); - Assertions.assertEquals(CreateMode.DEFAULT, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-23T03:52:49Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("yocf", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(false, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, model.isRehydrate()); - Assertions.assertEquals("dystkiiuxhqyud", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.isArchiveEnabled()); - Assertions.assertEquals("vyifqrvkdvjsl", model.policyName()); - Assertions.assertEquals(952204067, model.softDeleteRetentionPeriod()); - } - - @Test - public void testSerialize() { - ProtectedItem model = - new ProtectedItem() - .withContainerName("atuokthfuiu") - .withSourceResourceId("dsfcpkvxodpuoz") - .withPolicyId("zydagfuaxbezyiuo") - .withLastRecoveryPoint(OffsetDateTime.parse("2021-09-30T07:23:02Z")) - .withBackupSetName("hrdxwzywqsmbs") - .withCreateMode(CreateMode.DEFAULT) - .withDeferredDeleteTimeInUtc(OffsetDateTime.parse("2021-08-23T03:52:49Z")) - .withIsScheduledForDeferredDelete(false) - .withDeferredDeleteTimeRemaining("yocf") - .withIsDeferredDeleteScheduleUpcoming(false) - .withIsRehydrate(false) - .withResourceGuardOperationRequests(Arrays.asList("dystkiiuxhqyud", "o", "rq", "b")) - .withIsArchiveEnabled(false) - .withPolicyName("vyifqrvkdvjsl") - .withSoftDeleteRetentionPeriod(952204067); - model = BinaryData.fromObject(model).toObject(ProtectedItem.class); - Assertions.assertEquals("atuokthfuiu", model.containerName()); - Assertions.assertEquals("dsfcpkvxodpuoz", model.sourceResourceId()); - Assertions.assertEquals("zydagfuaxbezyiuo", model.policyId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-30T07:23:02Z"), model.lastRecoveryPoint()); - Assertions.assertEquals("hrdxwzywqsmbs", model.backupSetName()); - Assertions.assertEquals(CreateMode.DEFAULT, model.createMode()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-23T03:52:49Z"), model.deferredDeleteTimeInUtc()); - Assertions.assertEquals(false, model.isScheduledForDeferredDelete()); - Assertions.assertEquals("yocf", model.deferredDeleteTimeRemaining()); - Assertions.assertEquals(false, model.isDeferredDeleteScheduleUpcoming()); - Assertions.assertEquals(false, model.isRehydrate()); - Assertions.assertEquals("dystkiiuxhqyud", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals(false, model.isArchiveEnabled()); - Assertions.assertEquals("vyifqrvkdvjsl", model.policyName()); - Assertions.assertEquals(952204067, model.softDeleteRetentionPeriod()); - } -} 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 deleted file mode 100644 index d91858b1dcdf6..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerResourceInnerTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionContainerResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionContainer; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProtectionContainerResourceInnerTests { - @Test - public void testDeserialize() { - ProtectionContainerResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"qal\",\"backupManagementType\":\"MAB\",\"registrationStatus\":\"jijpxac\",\"healthStatus\":\"udfnbyxba\",\"protectableObjectType\":\"bjyvay\"},\"eTag\":\"imrzrtuzqog\",\"location\":\"exn\",\"tags\":{\"wmewzsyy\":\"dnw\"},\"id\":\"euzsoi\",\"name\":\"judpfrxt\",\"type\":\"thzvaytdwkqbrqu\"}") - .toObject(ProtectionContainerResourceInner.class); - Assertions.assertEquals("exn", model.location()); - Assertions.assertEquals("dnw", model.tags().get("wmewzsyy")); - Assertions.assertEquals("qal", model.properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.MAB, model.properties().backupManagementType()); - Assertions.assertEquals("jijpxac", model.properties().registrationStatus()); - Assertions.assertEquals("udfnbyxba", model.properties().healthStatus()); - Assertions.assertEquals("bjyvay", model.properties().protectableObjectType()); - Assertions.assertEquals("imrzrtuzqog", model.etag()); - } - - @Test - public void testSerialize() { - ProtectionContainerResourceInner model = - new ProtectionContainerResourceInner() - .withLocation("exn") - .withTags(mapOf("wmewzsyy", "dnw")) - .withProperties( - new ProtectionContainer() - .withFriendlyName("qal") - .withBackupManagementType(BackupManagementType.MAB) - .withRegistrationStatus("jijpxac") - .withHealthStatus("udfnbyxba") - .withProtectableObjectType("bjyvay")) - .withEtag("imrzrtuzqog"); - model = BinaryData.fromObject(model).toObject(ProtectionContainerResourceInner.class); - Assertions.assertEquals("exn", model.location()); - Assertions.assertEquals("dnw", model.tags().get("wmewzsyy")); - Assertions.assertEquals("qal", model.properties().friendlyName()); - Assertions.assertEquals(BackupManagementType.MAB, model.properties().backupManagementType()); - Assertions.assertEquals("jijpxac", model.properties().registrationStatus()); - Assertions.assertEquals("udfnbyxba", model.properties().healthStatus()); - Assertions.assertEquals("bjyvay", model.properties().protectableObjectType()); - Assertions.assertEquals("imrzrtuzqog", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 63b3bfca8dc5e..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerResourceListTests.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionContainerResourceInner; -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; -import org.junit.jupiter.api.Test; - -public final class ProtectionContainerResourceListTests { - @Test - public void testDeserialize() { - ProtectionContainerResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"igrjguufzdm\",\"backupManagementType\":\"AzureSql\",\"registrationStatus\":\"fi\",\"healthStatus\":\"hbotzingamvppho\",\"protectableObjectType\":\"qzudphq\"},\"eTag\":\"vdkfwynwcvtbvk\",\"location\":\"yhmtnvyqiat\",\"tags\":{\"zcjaesgvvsccy\":\"pcnp\"},\"id\":\"jguq\",\"name\":\"hwyg\",\"type\":\"lvdnkfx\"},{\"properties\":{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"mdwzrmuhapfcqdps\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"psvuoymgc\",\"healthStatus\":\"lvez\",\"protectableObjectType\":\"pqlmfe\"},\"eTag\":\"erqwkyhkobopg\",\"location\":\"edkowepbqpcrfk\",\"tags\":{\"khtj\":\"csnjvcdwxlpqekft\",\"ngwfqatm\":\"y\",\"szywkbirryu\":\"dhtmdvypgikd\",\"nrvgoupmfiibfgg\":\"hlhkjoqrvqqaatj\"},\"id\":\"ioolvrwxkvtkkgll\",\"name\":\"wjygvjayvblmhvk\",\"type\":\"uhbxvvy\"}],\"nextLink\":\"s\"}") - .toObject(ProtectionContainerResourceList.class); - Assertions.assertEquals("s", model.nextLink()); - Assertions.assertEquals("yhmtnvyqiat", model.value().get(0).location()); - Assertions.assertEquals("pcnp", model.value().get(0).tags().get("zcjaesgvvsccy")); - Assertions.assertEquals("igrjguufzdm", model.value().get(0).properties().friendlyName()); - Assertions - .assertEquals(BackupManagementType.AZURE_SQL, model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("fi", model.value().get(0).properties().registrationStatus()); - Assertions.assertEquals("hbotzingamvppho", model.value().get(0).properties().healthStatus()); - Assertions.assertEquals("qzudphq", model.value().get(0).properties().protectableObjectType()); - Assertions.assertEquals("vdkfwynwcvtbvk", model.value().get(0).etag()); - } - - @Test - public void testSerialize() { - ProtectionContainerResourceList model = - new ProtectionContainerResourceList() - .withNextLink("s") - .withValue( - Arrays - .asList( - new ProtectionContainerResourceInner() - .withLocation("yhmtnvyqiat") - .withTags(mapOf("zcjaesgvvsccy", "pcnp")) - .withProperties( - new ProtectionContainer() - .withFriendlyName("igrjguufzdm") - .withBackupManagementType(BackupManagementType.AZURE_SQL) - .withRegistrationStatus("fi") - .withHealthStatus("hbotzingamvppho") - .withProtectableObjectType("qzudphq")) - .withEtag("vdkfwynwcvtbvk"), - new ProtectionContainerResourceInner() - .withLocation("edkowepbqpcrfk") - .withTags( - mapOf( - "khtj", - "csnjvcdwxlpqekft", - "ngwfqatm", - "y", - "szywkbirryu", - "dhtmdvypgikd", - "nrvgoupmfiibfgg", - "hlhkjoqrvqqaatj")) - .withProperties( - new ProtectionContainer() - .withFriendlyName("mdwzrmuhapfcqdps") - .withBackupManagementType(BackupManagementType.AZURE_WORKLOAD) - .withRegistrationStatus("psvuoymgc") - .withHealthStatus("lvez") - .withProtectableObjectType("pqlmfe")) - .withEtag("erqwkyhkobopg"))); - model = BinaryData.fromObject(model).toObject(ProtectionContainerResourceList.class); - Assertions.assertEquals("s", model.nextLink()); - Assertions.assertEquals("yhmtnvyqiat", model.value().get(0).location()); - Assertions.assertEquals("pcnp", model.value().get(0).tags().get("zcjaesgvvsccy")); - Assertions.assertEquals("igrjguufzdm", model.value().get(0).properties().friendlyName()); - Assertions - .assertEquals(BackupManagementType.AZURE_SQL, model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("fi", model.value().get(0).properties().registrationStatus()); - Assertions.assertEquals("hbotzingamvppho", model.value().get(0).properties().healthStatus()); - Assertions.assertEquals("qzudphq", model.value().get(0).properties().protectableObjectType()); - Assertions.assertEquals("vdkfwynwcvtbvk", model.value().get(0).etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index b3374cd6066e2..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionContainerTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionContainer; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProtectionContainerTests { - @Test - public void testDeserialize() { - ProtectionContainer model = - BinaryData - .fromString( - "{\"containerType\":\"ProtectionContainer\",\"friendlyName\":\"axhexiilivp\",\"backupManagementType\":\"DPM\",\"registrationStatus\":\"r\",\"healthStatus\":\"d\",\"protectableObjectType\":\"axoruzfgsquy\"}") - .toObject(ProtectionContainer.class); - Assertions.assertEquals("axhexiilivp", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.DPM, model.backupManagementType()); - Assertions.assertEquals("r", model.registrationStatus()); - Assertions.assertEquals("d", model.healthStatus()); - Assertions.assertEquals("axoruzfgsquy", model.protectableObjectType()); - } - - @Test - public void testSerialize() { - ProtectionContainer model = - new ProtectionContainer() - .withFriendlyName("axhexiilivp") - .withBackupManagementType(BackupManagementType.DPM) - .withRegistrationStatus("r") - .withHealthStatus("d") - .withProtectableObjectType("axoruzfgsquy"); - model = BinaryData.fromObject(model).toObject(ProtectionContainer.class); - Assertions.assertEquals("axhexiilivp", model.friendlyName()); - Assertions.assertEquals(BackupManagementType.DPM, model.backupManagementType()); - Assertions.assertEquals("r", model.registrationStatus()); - Assertions.assertEquals("d", model.healthStatus()); - Assertions.assertEquals("axoruzfgsquy", model.protectableObjectType()); - } -} 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 deleted file mode 100644 index dc67b909e52b3..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentResourceInnerTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionIntentResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionIntent; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProtectionIntentResourceInnerTests { - @Test - public void testDeserialize() { - 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\"}") - .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()); - } - - @Test - public void testSerialize() { - 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"); - 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()); - } - - @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/ProtectionIntentResourceListTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentResourceListTests.java deleted file mode 100644 index e1142b5944fc4..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentResourceListTests.java +++ /dev/null @@ -1,98 +0,0 @@ -// 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.fluent.models.ProtectionIntentResourceInner; -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; -import org.junit.jupiter.api.Test; - -public final class ProtectionIntentResourceListTests { - @Test - public void testDeserialize() { - 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\"}") - .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()); - } - - @Test - public void testSerialize() { - 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()); - } - - @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/ProtectionIntentTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentTests.java deleted file mode 100644 index 61d2b37b00542..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionIntentTests.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.BackupManagementType; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionIntent; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProtectionIntentTests { - @Test - public void testDeserialize() { - ProtectionIntent model = - BinaryData - .fromString( - "{\"protectionIntentItemType\":\"ProtectionIntent\",\"backupManagementType\":\"AzureSql\",\"sourceResourceId\":\"kvnipjoxz\",\"itemId\":\"chgejspodm\",\"policyId\":\"lzydehojwyahux\",\"protectionState\":\"ProtectionFailed\"}") - .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()); - } - - @Test - public void testSerialize() { - ProtectionIntent model = - new ProtectionIntent() - .withBackupManagementType(BackupManagementType.AZURE_SQL) - .withSourceResourceId("kvnipjoxz") - .withItemId("chgejspodm") - .withPolicyId("lzydehojwyahux") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED); - 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()); - } -} 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 deleted file mode 100644 index 792d8e4a53545..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPoliciesDeleteMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ProtectionPoliciesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.protectionPolicies().delete("qi", "we", "alwvskbu", Context.NONE); - } -} 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 deleted file mode 100644 index e354633e95034..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyResourceInnerTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ProtectionPolicyResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionPolicy; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProtectionPolicyResourceInnerTests { - @Test - public void testDeserialize() { - ProtectionPolicyResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":1529613290,\"resourceGuardOperationRequests\":[\"edckzywbiexzfey\",\"eaxib\"]},\"eTag\":\"jwbhqwalmuz\",\"location\":\"oxaepd\",\"tags\":{\"bavxbniwdjswzt\":\"ancuxrhd\",\"xbzpfzab\":\"dbpgnxytxhp\"},\"id\":\"lcuhxwtctyqiklb\",\"name\":\"ovplw\",\"type\":\"bhvgy\"}") - .toObject(ProtectionPolicyResourceInner.class); - Assertions.assertEquals("oxaepd", model.location()); - Assertions.assertEquals("ancuxrhd", model.tags().get("bavxbniwdjswzt")); - Assertions.assertEquals(1529613290, model.properties().protectedItemsCount()); - Assertions.assertEquals("edckzywbiexzfey", model.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("jwbhqwalmuz", model.etag()); - } - - @Test - public void testSerialize() { - ProtectionPolicyResourceInner model = - new ProtectionPolicyResourceInner() - .withLocation("oxaepd") - .withTags(mapOf("bavxbniwdjswzt", "ancuxrhd", "xbzpfzab", "dbpgnxytxhp")) - .withProperties( - new ProtectionPolicy() - .withProtectedItemsCount(1529613290) - .withResourceGuardOperationRequests(Arrays.asList("edckzywbiexzfey", "eaxib"))) - .withEtag("jwbhqwalmuz"); - model = BinaryData.fromObject(model).toObject(ProtectionPolicyResourceInner.class); - Assertions.assertEquals("oxaepd", model.location()); - Assertions.assertEquals("ancuxrhd", model.tags().get("bavxbniwdjswzt")); - Assertions.assertEquals(1529613290, model.properties().protectedItemsCount()); - Assertions.assertEquals("edckzywbiexzfey", model.properties().resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("jwbhqwalmuz", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index f776ac50b93ab..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyResourceListTests.java +++ /dev/null @@ -1,98 +0,0 @@ -// 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.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 org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProtectionPolicyResourceListTests { - @Test - public void testDeserialize() { - ProtectionPolicyResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":752212445,\"resourceGuardOperationRequests\":[]},\"eTag\":\"senhwlrs\",\"location\":\"frzpwvlqdqgb\",\"tags\":{\"vf\":\"lihkaetcktvfc\",\"xerf\":\"nkymuctqhjfbebrj\",\"phxepcyvahf\":\"wutttxfvjrbi\"},\"id\":\"ljkyqxjvuuj\",\"name\":\"gidokgjljyoxgvcl\",\"type\":\"bgsncghkjeszzhb\"},{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":1508297714,\"resourceGuardOperationRequests\":[]},\"eTag\":\"vgxbfs\",\"location\":\"xnehmpvec\",\"tags\":{\"flz\":\"debfqkkrbmpukgri\",\"qzahmgkbrp\":\"fbxzpuzycisp\",\"hibnuqqkpika\":\"y\",\"buynhijggm\":\"rgvtqag\"},\"id\":\"bfs\",\"name\":\"arbu\",\"type\":\"rcvpnazzmhjrunmp\"},{\"properties\":{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":808779778,\"resourceGuardOperationRequests\":[]},\"eTag\":\"rbnlankxmyskp\",\"location\":\"henbtkcxywnytn\",\"tags\":{\"lhaaxdbabp\":\"nlqidybyxczf\"},\"id\":\"lwrq\",\"name\":\"fkts\",\"type\":\"hsucoc\"}],\"nextLink\":\"yyazttbt\"}") - .toObject(ProtectionPolicyResourceList.class); - Assertions.assertEquals("yyazttbt", model.nextLink()); - Assertions.assertEquals("frzpwvlqdqgb", model.value().get(0).location()); - Assertions.assertEquals("lihkaetcktvfc", model.value().get(0).tags().get("vf")); - Assertions.assertEquals(752212445, model.value().get(0).properties().protectedItemsCount()); - Assertions.assertEquals("senhwlrs", model.value().get(0).etag()); - } - - @Test - public void testSerialize() { - ProtectionPolicyResourceList model = - new ProtectionPolicyResourceList() - .withNextLink("yyazttbt") - .withValue( - Arrays - .asList( - new ProtectionPolicyResourceInner() - .withLocation("frzpwvlqdqgb") - .withTags( - mapOf( - "vf", - "lihkaetcktvfc", - "xerf", - "nkymuctqhjfbebrj", - "phxepcyvahf", - "wutttxfvjrbi")) - .withProperties( - new ProtectionPolicy() - .withProtectedItemsCount(752212445) - .withResourceGuardOperationRequests(Arrays.asList())) - .withEtag("senhwlrs"), - new ProtectionPolicyResourceInner() - .withLocation("xnehmpvec") - .withTags( - mapOf( - "flz", - "debfqkkrbmpukgri", - "qzahmgkbrp", - "fbxzpuzycisp", - "hibnuqqkpika", - "y", - "buynhijggm", - "rgvtqag")) - .withProperties( - new ProtectionPolicy() - .withProtectedItemsCount(1508297714) - .withResourceGuardOperationRequests(Arrays.asList())) - .withEtag("vgxbfs"), - new ProtectionPolicyResourceInner() - .withLocation("henbtkcxywnytn") - .withTags(mapOf("lhaaxdbabp", "nlqidybyxczf")) - .withProperties( - new ProtectionPolicy() - .withProtectedItemsCount(808779778) - .withResourceGuardOperationRequests(Arrays.asList())) - .withEtag("rbnlankxmyskp"))); - model = BinaryData.fromObject(model).toObject(ProtectionPolicyResourceList.class); - Assertions.assertEquals("yyazttbt", model.nextLink()); - Assertions.assertEquals("frzpwvlqdqgb", model.value().get(0).location()); - Assertions.assertEquals("lihkaetcktvfc", model.value().get(0).tags().get("vf")); - Assertions.assertEquals(752212445, model.value().get(0).properties().protectedItemsCount()); - Assertions.assertEquals("senhwlrs", model.value().get(0).etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 81decefab649b..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectionPolicyTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProtectionPolicyTests { - @Test - public void testDeserialize() { - ProtectionPolicy model = - BinaryData - .fromString( - "{\"backupManagementType\":\"ProtectionPolicy\",\"protectedItemsCount\":1408848677,\"resourceGuardOperationRequests\":[\"vmkfssxqu\",\"kfplgmgsxnk\",\"zkd\"]}") - .toObject(ProtectionPolicy.class); - Assertions.assertEquals(1408848677, model.protectedItemsCount()); - Assertions.assertEquals("vmkfssxqu", model.resourceGuardOperationRequests().get(0)); - } - - @Test - public void testSerialize() { - ProtectionPolicy model = - new ProtectionPolicy() - .withProtectedItemsCount(1408848677) - .withResourceGuardOperationRequests(Arrays.asList("vmkfssxqu", "kfplgmgsxnk", "zkd")); - model = BinaryData.fromObject(model).toObject(ProtectionPolicy.class); - Assertions.assertEquals(1408848677, model.protectedItemsCount()); - Assertions.assertEquals("vmkfssxqu", 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 deleted file mode 100644 index 2c4249bb0e41a..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointDiskConfigurationTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class RecoveryPointDiskConfigurationTests { - @Test - public void testDeserialize() { - RecoveryPointDiskConfiguration model = - BinaryData - .fromString( - "{\"numberOfDisksIncludedInBackup\":354453186,\"numberOfDisksAttachedToVm\":1850637307,\"includedDiskList\":[{\"lun\":542903246,\"name\":\"mznnbsoqeqalarvl\"},{\"lun\":532136084,\"name\":\"btgfeb\"},{\"lun\":1962331095,\"name\":\"mhyreeudz\"},{\"lun\":1880601088,\"name\":\"pdqmjxlyyzglgouw\"}],\"excludedDiskList\":[{\"lun\":2050380690,\"name\":\"uojqt\"},{\"lun\":1608405115,\"name\":\"kjeytunl\"}]}") - .toObject(RecoveryPointDiskConfiguration.class); - Assertions.assertEquals(354453186, model.numberOfDisksIncludedInBackup()); - Assertions.assertEquals(1850637307, model.numberOfDisksAttachedToVm()); - Assertions.assertEquals(542903246, model.includedDiskList().get(0).lun()); - Assertions.assertEquals("mznnbsoqeqalarvl", model.includedDiskList().get(0).name()); - Assertions.assertEquals(2050380690, model.excludedDiskList().get(0).lun()); - Assertions.assertEquals("uojqt", model.excludedDiskList().get(0).name()); - } - - @Test - public void testSerialize() { - RecoveryPointDiskConfiguration model = - new RecoveryPointDiskConfiguration() - .withNumberOfDisksIncludedInBackup(354453186) - .withNumberOfDisksAttachedToVm(1850637307) - .withIncludedDiskList( - Arrays - .asList( - new DiskInformation().withLun(542903246).withName("mznnbsoqeqalarvl"), - new DiskInformation().withLun(532136084).withName("btgfeb"), - new DiskInformation().withLun(1962331095).withName("mhyreeudz"), - new DiskInformation().withLun(1880601088).withName("pdqmjxlyyzglgouw"))) - .withExcludedDiskList( - Arrays - .asList( - new DiskInformation().withLun(2050380690).withName("uojqt"), - new DiskInformation().withLun(1608405115).withName("kjeytunl"))); - model = BinaryData.fromObject(model).toObject(RecoveryPointDiskConfiguration.class); - Assertions.assertEquals(354453186, model.numberOfDisksIncludedInBackup()); - Assertions.assertEquals(1850637307, model.numberOfDisksAttachedToVm()); - Assertions.assertEquals(542903246, model.includedDiskList().get(0).lun()); - Assertions.assertEquals("mznnbsoqeqalarvl", model.includedDiskList().get(0).name()); - Assertions.assertEquals(2050380690, model.excludedDiskList().get(0).lun()); - Assertions.assertEquals("uojqt", 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 deleted file mode 100644 index 16d573174f2d9..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointMoveReadinessInfoTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointMoveReadinessInfo; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RecoveryPointMoveReadinessInfoTests { - @Test - public void testDeserialize() { - RecoveryPointMoveReadinessInfo model = - BinaryData - .fromString("{\"isReadyForMove\":false,\"additionalInfo\":\"fz\"}") - .toObject(RecoveryPointMoveReadinessInfo.class); - Assertions.assertEquals(false, model.isReadyForMove()); - Assertions.assertEquals("fz", model.additionalInfo()); - } - - @Test - public void testSerialize() { - RecoveryPointMoveReadinessInfo model = - new RecoveryPointMoveReadinessInfo().withIsReadyForMove(false).withAdditionalInfo("fz"); - model = BinaryData.fromObject(model).toObject(RecoveryPointMoveReadinessInfo.class); - Assertions.assertEquals(false, model.isReadyForMove()); - Assertions.assertEquals("fz", model.additionalInfo()); - } -} 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 deleted file mode 100644 index b8f59867bafe5..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointRehydrationInfoTests.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.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointRehydrationInfo; -import com.azure.resourcemanager.recoveryservicesbackup.models.RehydrationPriority; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RecoveryPointRehydrationInfoTests { - @Test - public void testDeserialize() { - RecoveryPointRehydrationInfo model = - BinaryData - .fromString("{\"rehydrationRetentionDuration\":\"rmmuabwibvjo\",\"rehydrationPriority\":\"High\"}") - .toObject(RecoveryPointRehydrationInfo.class); - Assertions.assertEquals("rmmuabwibvjo", model.rehydrationRetentionDuration()); - Assertions.assertEquals(RehydrationPriority.HIGH, model.rehydrationPriority()); - } - - @Test - public void testSerialize() { - RecoveryPointRehydrationInfo model = - new RecoveryPointRehydrationInfo() - .withRehydrationRetentionDuration("rmmuabwibvjo") - .withRehydrationPriority(RehydrationPriority.HIGH); - model = BinaryData.fromObject(model).toObject(RecoveryPointRehydrationInfo.class); - Assertions.assertEquals("rmmuabwibvjo", 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 deleted file mode 100644 index a50b76e86ddea..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointResourceInnerTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RecoveryPointResourceInnerTests { - @Test - public void testDeserialize() { - RecoveryPointResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"objectType\":\"RecoveryPoint\"},\"eTag\":\"hxdeoejz\",\"location\":\"cwif\",\"tags\":{\"jdeyeamdpha\":\"tgzfbishcbkh\",\"wkgshwa\":\"alpbuxwgipwhon\"},\"id\":\"kix\",\"name\":\"bin\",\"type\":\"eputtmrywnuzoqf\"}") - .toObject(RecoveryPointResourceInner.class); - Assertions.assertEquals("cwif", model.location()); - Assertions.assertEquals("tgzfbishcbkh", model.tags().get("jdeyeamdpha")); - Assertions.assertEquals("hxdeoejz", model.etag()); - } - - @Test - public void testSerialize() { - RecoveryPointResourceInner model = - new RecoveryPointResourceInner() - .withLocation("cwif") - .withTags(mapOf("jdeyeamdpha", "tgzfbishcbkh", "wkgshwa", "alpbuxwgipwhon")) - .withProperties(new RecoveryPoint()) - .withEtag("hxdeoejz"); - model = BinaryData.fromObject(model).toObject(RecoveryPointResourceInner.class); - Assertions.assertEquals("cwif", model.location()); - Assertions.assertEquals("tgzfbishcbkh", model.tags().get("jdeyeamdpha")); - Assertions.assertEquals("hxdeoejz", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 886d5386ccf69..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointResourceListTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RecoveryPointResourceListTests { - @Test - public void testDeserialize() { - RecoveryPointResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"objectType\":\"RecoveryPoint\"},\"eTag\":\"watkpnpulexxb\",\"location\":\"zwtruwiqzbqjvsov\",\"tags\":{\"hzdobpxjmflbvvnc\":\"kacspkw\",\"rsa\":\"rkcciwwzjuqk\"},\"id\":\"iwkuofos\",\"name\":\"ghsauuimjmvxied\",\"type\":\"ugidyjrr\"},{\"properties\":{\"objectType\":\"RecoveryPoint\"},\"eTag\":\"aos\",\"location\":\"e\",\"tags\":{\"hocohslkev\":\"onpc\",\"hfmvfaxkffe\":\"eggzfb\",\"sbbzo\":\"ithlvmezyvshxm\"},\"id\":\"gigr\",\"name\":\"wburvjxxjnspydpt\",\"type\":\"oenkouknvudwti\"},{\"properties\":{\"objectType\":\"RecoveryPoint\"},\"eTag\":\"ldngkpoci\",\"location\":\"azyxoegukg\",\"tags\":{\"yp\":\"iucgygevqzn\"},\"id\":\"rbpizc\",\"name\":\"r\",\"type\":\"j\"}],\"nextLink\":\"pyd\"}") - .toObject(RecoveryPointResourceList.class); - Assertions.assertEquals("pyd", model.nextLink()); - Assertions.assertEquals("zwtruwiqzbqjvsov", model.value().get(0).location()); - Assertions.assertEquals("kacspkw", model.value().get(0).tags().get("hzdobpxjmflbvvnc")); - Assertions.assertEquals("watkpnpulexxb", model.value().get(0).etag()); - } - - @Test - public void testSerialize() { - RecoveryPointResourceList model = - new RecoveryPointResourceList() - .withNextLink("pyd") - .withValue( - Arrays - .asList( - new RecoveryPointResourceInner() - .withLocation("zwtruwiqzbqjvsov") - .withTags(mapOf("hzdobpxjmflbvvnc", "kacspkw", "rsa", "rkcciwwzjuqk")) - .withProperties(new RecoveryPoint()) - .withEtag("watkpnpulexxb"), - new RecoveryPointResourceInner() - .withLocation("e") - .withTags( - mapOf("hocohslkev", "onpc", "hfmvfaxkffe", "eggzfb", "sbbzo", "ithlvmezyvshxm")) - .withProperties(new RecoveryPoint()) - .withEtag("aos"), - new RecoveryPointResourceInner() - .withLocation("azyxoegukg") - .withTags(mapOf("yp", "iucgygevqzn")) - .withProperties(new RecoveryPoint()) - .withEtag("ldngkpoci"))); - model = BinaryData.fromObject(model).toObject(RecoveryPointResourceList.class); - Assertions.assertEquals("pyd", model.nextLink()); - Assertions.assertEquals("zwtruwiqzbqjvsov", model.value().get(0).location()); - Assertions.assertEquals("kacspkw", model.value().get(0).tags().get("hzdobpxjmflbvvnc")); - Assertions.assertEquals("watkpnpulexxb", model.value().get(0).etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 9facad3696dd3..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPoint; -import org.junit.jupiter.api.Test; - -public final class RecoveryPointTests { - @Test - public void testDeserialize() { - RecoveryPoint model = BinaryData.fromString("{\"objectType\":\"RecoveryPoint\"}").toObject(RecoveryPoint.class); - } - - @Test - public void testSerialize() { - RecoveryPoint model = new RecoveryPoint(); - model = BinaryData.fromObject(model).toObject(RecoveryPoint.class); - } -} 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 deleted file mode 100644 index 1d4820c2ea84f..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointTierInformationTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -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; -import org.junit.jupiter.api.Test; - -public final class RecoveryPointTierInformationTests { - @Test - public void testDeserialize() { - RecoveryPointTierInformation model = - BinaryData - .fromString( - "{\"type\":\"ArchivedRP\",\"status\":\"Invalid\",\"extendedInfo\":{\"talhsnvkcdmxzr\":\"jwltlwtjjgu\",\"aaomylweazu\":\"oaimlnw\",\"hwwn\":\"cse\"}}") - .toObject(RecoveryPointTierInformation.class); - Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.type()); - Assertions.assertEquals(RecoveryPointTierStatus.INVALID, model.status()); - Assertions.assertEquals("jwltlwtjjgu", model.extendedInfo().get("talhsnvkcdmxzr")); - } - - @Test - public void testSerialize() { - RecoveryPointTierInformation model = - new RecoveryPointTierInformation() - .withType(RecoveryPointTierType.ARCHIVED_RP) - .withStatus(RecoveryPointTierStatus.INVALID) - .withExtendedInfo(mapOf("talhsnvkcdmxzr", "jwltlwtjjgu", "aaomylweazu", "oaimlnw", "hwwn", "cse")); - model = BinaryData.fromObject(model).toObject(RecoveryPointTierInformation.class); - Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.type()); - Assertions.assertEquals(RecoveryPointTierStatus.INVALID, model.status()); - Assertions.assertEquals("jwltlwtjjgu", model.extendedInfo().get("talhsnvkcdmxzr")); - } - - @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/RecoveryPointTierInformationV2Tests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointTierInformationV2Tests.java deleted file mode 100644 index 2ad1375aa3804..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointTierInformationV2Tests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -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; -import org.junit.jupiter.api.Test; - -public final class RecoveryPointTierInformationV2Tests { - @Test - public void testDeserialize() { - RecoveryPointTierInformationV2 model = - BinaryData - .fromString( - "{\"type\":\"ArchivedRP\",\"status\":\"Deleted\",\"extendedInfo\":{\"lkb\":\"jswtwkozzwc\"}}") - .toObject(RecoveryPointTierInformationV2.class); - Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.type()); - Assertions.assertEquals(RecoveryPointTierStatus.DELETED, model.status()); - Assertions.assertEquals("jswtwkozzwc", model.extendedInfo().get("lkb")); - } - - @Test - public void testSerialize() { - RecoveryPointTierInformationV2 model = - new RecoveryPointTierInformationV2() - .withType(RecoveryPointTierType.ARCHIVED_RP) - .withStatus(RecoveryPointTierStatus.DELETED) - .withExtendedInfo(mapOf("lkb", "jswtwkozzwc")); - model = BinaryData.fromObject(model).toObject(RecoveryPointTierInformationV2.class); - Assertions.assertEquals(RecoveryPointTierType.ARCHIVED_RP, model.type()); - Assertions.assertEquals(RecoveryPointTierStatus.DELETED, model.status()); - Assertions.assertEquals("jswtwkozzwc", model.extendedInfo().get("lkb")); - } - - @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/RecoveryPointsListMockTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsListMockTests.java deleted file mode 100644 index 7a60587c55ca1..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsListMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class RecoveryPointsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"objectType\":\"RecoveryPoint\"},\"eTag\":\"hmpejtlkexaonw\",\"location\":\"vkcqhr\",\"tags\":{\"jubyqjfkakfq\":\"knlccrmmkyup\"},\"id\":\"rke\",\"name\":\"yildudxjascow\",\"type\":\"f\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .recoveryPoints() - .list("umtggmuwdchozfn", "fexl", "xn", "akizvoaikna", "lnuwiguy", "lykwphvxz", Context.NONE); - - Assertions.assertEquals("vkcqhr", response.iterator().next().location()); - Assertions.assertEquals("knlccrmmkyup", response.iterator().next().tags().get("jubyqjfkakfq")); - Assertions.assertEquals("hmpejtlkexaonw", 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 deleted file mode 100644 index 2509c87f08f68..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RecoveryPointsRecommendedForMovesListMockTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.ListRecoveryPointsRecommendedForMoveRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.RecoveryPointResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class RecoveryPointsRecommendedForMovesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"objectType\":\"RecoveryPoint\"},\"eTag\":\"ltrfowtdvrf\",\"location\":\"vlihcvjd\",\"tags\":{\"yojbfqzdkf\":\"rjidhftukvhdxl\",\"atqxmbjroumzzn\":\"jyixhaf\",\"jrhuzgf\":\"al\"},\"id\":\"on\",\"name\":\"tpusllywp\",\"type\":\"tiotzb\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .recoveryPointsRecommendedForMoves() - .list( - "emehllizh", - "eumoqod", - "adppyibn", - "qladywrxwhydtlu", - "vadswzs", - new ListRecoveryPointsRecommendedForMoveRequest() - .withObjectType("yemlowuowhlxln") - .withExcludedRPList(Arrays.asList("mouvbl", "mo")), - Context.NONE); - - Assertions.assertEquals("vlihcvjd", response.iterator().next().location()); - Assertions.assertEquals("rjidhftukvhdxl", response.iterator().next().tags().get("yojbfqzdkf")); - Assertions.assertEquals("ltrfowtdvrf", response.iterator().next().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 deleted file mode 100644 index ea7cff8f77f91..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardOperationDetailTests.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.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardOperationDetail; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ResourceGuardOperationDetailTests { - @Test - public void testDeserialize() { - ResourceGuardOperationDetail model = - BinaryData - .fromString("{\"vaultCriticalOperation\":\"frpdsofbshrns\",\"defaultResourceRequest\":\"uswdv\"}") - .toObject(ResourceGuardOperationDetail.class); - Assertions.assertEquals("frpdsofbshrns", model.vaultCriticalOperation()); - Assertions.assertEquals("uswdv", model.defaultResourceRequest()); - } - - @Test - public void testSerialize() { - ResourceGuardOperationDetail model = - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("frpdsofbshrns") - .withDefaultResourceRequest("uswdv"); - model = BinaryData.fromObject(model).toObject(ResourceGuardOperationDetail.class); - Assertions.assertEquals("frpdsofbshrns", model.vaultCriticalOperation()); - Assertions.assertEquals("uswdv", 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 cb6d019325035..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxiesGetMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBaseResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceGuardProxiesGetMockTests { - @Test - public void testGet() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"resourceGuardResourceId\":\"uasigr\",\"resourceGuardOperationDetails\":[],\"lastUpdatedTime\":\"c\",\"description\":\"quygdjboqgrmtq\"},\"eTag\":\"qevadrmmw\",\"location\":\"uawvcmjzk\",\"tags\":{\"oqiqazugamx\":\"disczskos\",\"cekuz\":\"krrcoiisbamnpp\",\"zxuizhyhnepkpe\":\"dsbezaxyfu\"},\"id\":\"iarxqiubxdukec\",\"name\":\"xdazv\",\"type\":\"hctmmkosz\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.resourceGuardProxies().get("d", "ollgry", Context.NONE); - - Assertions.assertEquals("uawvcmjzk", response.iterator().next().location()); - Assertions.assertEquals("disczskos", response.iterator().next().tags().get("oqiqazugamx")); - Assertions.assertEquals("uasigr", response.iterator().next().properties().resourceGuardResourceId()); - Assertions.assertEquals("c", response.iterator().next().properties().lastUpdatedTime()); - Assertions.assertEquals("quygdjboqgrmtq", response.iterator().next().properties().description()); - Assertions.assertEquals("qevadrmmw", 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 deleted file mode 100644 index a2e4e16e39dfe..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyBaseResourceInnerTests.java +++ /dev/null @@ -1,87 +0,0 @@ -// 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.fluent.models.ResourceGuardProxyBaseResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardOperationDetail; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBase; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ResourceGuardProxyBaseResourceInnerTests { - @Test - public void testDeserialize() { - ResourceGuardProxyBaseResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"resourceGuardResourceId\":\"ozphvwauyqncygu\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"p\",\"defaultResourceRequest\":\"scw\"},{\"vaultCriticalOperation\":\"upev\",\"defaultResourceRequest\":\"f\"},{\"vaultCriticalOperation\":\"otxhojujby\",\"defaultResourceRequest\":\"lmcuvhixb\"},{\"vaultCriticalOperation\":\"yfwnylr\",\"defaultResourceRequest\":\"o\"}],\"lastUpdatedTime\":\"ttpkiwkkbnujrywv\",\"description\":\"lbfpncurd\"},\"eTag\":\"wiithtywub\",\"location\":\"cbihwqk\",\"tags\":{\"dgoihxumwctondzj\":\"ntwjch\",\"fdlwg\":\"uu\",\"gseinq\":\"ytsbwtovv\"},\"id\":\"iufxqknpir\",\"name\":\"nepttwqmsni\",\"type\":\"fcdmqnrojlpijn\"}") - .toObject(ResourceGuardProxyBaseResourceInner.class); - Assertions.assertEquals("cbihwqk", model.location()); - Assertions.assertEquals("ntwjch", model.tags().get("dgoihxumwctondzj")); - Assertions.assertEquals("ozphvwauyqncygu", model.properties().resourceGuardResourceId()); - Assertions - .assertEquals("p", model.properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions - .assertEquals("scw", model.properties().resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("ttpkiwkkbnujrywv", model.properties().lastUpdatedTime()); - Assertions.assertEquals("lbfpncurd", model.properties().description()); - Assertions.assertEquals("wiithtywub", model.etag()); - } - - @Test - public void testSerialize() { - ResourceGuardProxyBaseResourceInner model = - new ResourceGuardProxyBaseResourceInner() - .withLocation("cbihwqk") - .withTags(mapOf("dgoihxumwctondzj", "ntwjch", "fdlwg", "uu", "gseinq", "ytsbwtovv")) - .withProperties( - new ResourceGuardProxyBase() - .withResourceGuardResourceId("ozphvwauyqncygu") - .withResourceGuardOperationDetails( - Arrays - .asList( - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("p") - .withDefaultResourceRequest("scw"), - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("upev") - .withDefaultResourceRequest("f"), - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("otxhojujby") - .withDefaultResourceRequest("lmcuvhixb"), - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("yfwnylr") - .withDefaultResourceRequest("o"))) - .withLastUpdatedTime("ttpkiwkkbnujrywv") - .withDescription("lbfpncurd")) - .withEtag("wiithtywub"); - model = BinaryData.fromObject(model).toObject(ResourceGuardProxyBaseResourceInner.class); - Assertions.assertEquals("cbihwqk", model.location()); - Assertions.assertEquals("ntwjch", model.tags().get("dgoihxumwctondzj")); - Assertions.assertEquals("ozphvwauyqncygu", model.properties().resourceGuardResourceId()); - Assertions - .assertEquals("p", model.properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions - .assertEquals("scw", model.properties().resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("ttpkiwkkbnujrywv", model.properties().lastUpdatedTime()); - Assertions.assertEquals("lbfpncurd", model.properties().description()); - Assertions.assertEquals("wiithtywub", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index f8ecf576213ea..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyBaseResourceListTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ResourceGuardProxyBaseResourceInner; -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 org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ResourceGuardProxyBaseResourceListTests { - @Test - public void testDeserialize() { - ResourceGuardProxyBaseResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"resourceGuardResourceId\":\"ijnhyjsvfycxzbf\",\"resourceGuardOperationDetails\":[],\"lastUpdatedTime\":\"wvrvmtg\",\"description\":\"ppyostronzmyhgf\"},\"eTag\":\"nsxkmcwaekrrjr\",\"location\":\"afxtsgum\",\"tags\":{\"xwslolbqpv\":\"lik\",\"crpw\":\"zlmvfelfktgp\",\"brnjwmw\":\"xeznoi\"},\"id\":\"pn\",\"name\":\"saz\",\"type\":\"jjoqkagf\"},{\"properties\":{\"resourceGuardResourceId\":\"ttaugzxnfaazp\",\"resourceGuardOperationDetails\":[],\"lastUpdatedTime\":\"n\",\"description\":\"mkqjj\"},\"eTag\":\"uenvrkp\",\"location\":\"ou\",\"tags\":{\"xqtnq\":\"rebqaaysjk\"},\"id\":\"tezlwff\",\"name\":\"iakp\",\"type\":\"pqqmted\"}],\"nextLink\":\"mmji\"}") - .toObject(ResourceGuardProxyBaseResourceList.class); - Assertions.assertEquals("mmji", model.nextLink()); - Assertions.assertEquals("afxtsgum", model.value().get(0).location()); - Assertions.assertEquals("lik", model.value().get(0).tags().get("xwslolbqpv")); - Assertions.assertEquals("ijnhyjsvfycxzbf", model.value().get(0).properties().resourceGuardResourceId()); - Assertions.assertEquals("wvrvmtg", model.value().get(0).properties().lastUpdatedTime()); - Assertions.assertEquals("ppyostronzmyhgf", model.value().get(0).properties().description()); - Assertions.assertEquals("nsxkmcwaekrrjr", model.value().get(0).etag()); - } - - @Test - public void testSerialize() { - ResourceGuardProxyBaseResourceList model = - new ResourceGuardProxyBaseResourceList() - .withNextLink("mmji") - .withValue( - Arrays - .asList( - new ResourceGuardProxyBaseResourceInner() - .withLocation("afxtsgum") - .withTags(mapOf("xwslolbqpv", "lik", "crpw", "zlmvfelfktgp", "brnjwmw", "xeznoi")) - .withProperties( - new ResourceGuardProxyBase() - .withResourceGuardResourceId("ijnhyjsvfycxzbf") - .withResourceGuardOperationDetails(Arrays.asList()) - .withLastUpdatedTime("wvrvmtg") - .withDescription("ppyostronzmyhgf")) - .withEtag("nsxkmcwaekrrjr"), - new ResourceGuardProxyBaseResourceInner() - .withLocation("ou") - .withTags(mapOf("xqtnq", "rebqaaysjk")) - .withProperties( - new ResourceGuardProxyBase() - .withResourceGuardResourceId("ttaugzxnfaazp") - .withResourceGuardOperationDetails(Arrays.asList()) - .withLastUpdatedTime("n") - .withDescription("mkqjj")) - .withEtag("uenvrkp"))); - model = BinaryData.fromObject(model).toObject(ResourceGuardProxyBaseResourceList.class); - Assertions.assertEquals("mmji", model.nextLink()); - Assertions.assertEquals("afxtsgum", model.value().get(0).location()); - Assertions.assertEquals("lik", model.value().get(0).tags().get("xwslolbqpv")); - Assertions.assertEquals("ijnhyjsvfycxzbf", model.value().get(0).properties().resourceGuardResourceId()); - Assertions.assertEquals("wvrvmtg", model.value().get(0).properties().lastUpdatedTime()); - Assertions.assertEquals("ppyostronzmyhgf", model.value().get(0).properties().description()); - Assertions.assertEquals("nsxkmcwaekrrjr", model.value().get(0).etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index aa9e1eac13c29..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceGuardProxyBaseTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardOperationDetail; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceGuardProxyBase; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ResourceGuardProxyBaseTests { - @Test - public void testDeserialize() { - ResourceGuardProxyBase model = - BinaryData - .fromString( - "{\"resourceGuardResourceId\":\"xfrdd\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"tizzronasxif\",\"defaultResourceRequest\":\"zq\"},{\"vaultCriticalOperation\":\"hftwesgog\",\"defaultResourceRequest\":\"honnxkrlgnyhmos\"}],\"lastUpdatedTime\":\"kkgthr\",\"description\":\"hxjbdhqxvc\"}") - .toObject(ResourceGuardProxyBase.class); - Assertions.assertEquals("xfrdd", model.resourceGuardResourceId()); - Assertions.assertEquals("tizzronasxif", model.resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions.assertEquals("zq", model.resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("kkgthr", model.lastUpdatedTime()); - Assertions.assertEquals("hxjbdhqxvc", model.description()); - } - - @Test - public void testSerialize() { - ResourceGuardProxyBase model = - new ResourceGuardProxyBase() - .withResourceGuardResourceId("xfrdd") - .withResourceGuardOperationDetails( - Arrays - .asList( - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("tizzronasxif") - .withDefaultResourceRequest("zq"), - new ResourceGuardOperationDetail() - .withVaultCriticalOperation("hftwesgog") - .withDefaultResourceRequest("honnxkrlgnyhmos"))) - .withLastUpdatedTime("kkgthr") - .withDescription("hxjbdhqxvc"); - model = BinaryData.fromObject(model).toObject(ResourceGuardProxyBase.class); - Assertions.assertEquals("xfrdd", model.resourceGuardResourceId()); - Assertions.assertEquals("tizzronasxif", model.resourceGuardOperationDetails().get(0).vaultCriticalOperation()); - Assertions.assertEquals("zq", model.resourceGuardOperationDetails().get(0).defaultResourceRequest()); - Assertions.assertEquals("kkgthr", model.lastUpdatedTime()); - Assertions.assertEquals("hxjbdhqxvc", model.description()); - } -} 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 deleted file mode 100644 index 305f41599c91c..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceListTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ResourceList; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ResourceListTests { - @Test - public void testDeserialize() { - ResourceList model = BinaryData.fromString("{\"nextLink\":\"bkzgcwrwclx\"}").toObject(ResourceList.class); - Assertions.assertEquals("bkzgcwrwclx", model.nextLink()); - } - - @Test - public void testSerialize() { - ResourceList model = new ResourceList().withNextLink("bkzgcwrwclx"); - model = BinaryData.fromObject(model).toObject(ResourceList.class); - Assertions.assertEquals("bkzgcwrwclx", 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 deleted file mode 100644 index d66cc52c6766f..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProvidersBmsPrepareDataMoveMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.DataMoveLevel; -import com.azure.resourcemanager.recoveryservicesbackup.models.PrepareDataMoveRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceProvidersBmsPrepareDataMoveMockTests { - @Test - public void testBmsPrepareDataMove() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .resourceProviders() - .bmsPrepareDataMove( - "sqwjhqkbiwetpozy", - "yqiq", - new PrepareDataMoveRequest() - .withTargetResourceId("hgf") - .withTargetRegion("etzlexbsfledynoj") - .withDataMoveLevel(DataMoveLevel.CONTAINER) - .withSourceContainerArmIds(Arrays.asList("wfbzkkdt", "hqsycljselp", "pbafvafhlbylc", "bevxrhyzd")) - .withIgnoreMoved(true), - 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 deleted file mode 100644 index 59653f00ec81e..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ResourceProvidersBmsTriggerDataMoveMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager; -import com.azure.resourcemanager.recoveryservicesbackup.models.DataMoveLevel; -import com.azure.resourcemanager.recoveryservicesbackup.models.TriggerDataMoveRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceProvidersBmsTriggerDataMoveMockTests { - @Test - public void testBmsTriggerDataMove() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - RecoveryServicesBackupManager manager = - RecoveryServicesBackupManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .resourceProviders() - .bmsTriggerDataMove( - "sofpltd", - "mairrh", - new TriggerDataMoveRequest() - .withSourceResourceId("hfnrac") - .withSourceRegion("npq") - .withDataMoveLevel(DataMoveLevel.VAULT) - .withCorrelationId("tuujwouh") - .withSourceContainerArmIds(Arrays.asList("s", "grbjbxsjybvitvqk", "y")) - .withPauseGC(false), - 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 deleted file mode 100644 index bc91b816ab73d..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoreFileSpecsTests.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.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.RestoreFileSpecs; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RestoreFileSpecsTests { - @Test - public void testDeserialize() { - RestoreFileSpecs model = - BinaryData - .fromString("{\"path\":\"wqiok\",\"fileSpecType\":\"sx\",\"targetFolderPath\":\"jmsvpkjp\"}") - .toObject(RestoreFileSpecs.class); - Assertions.assertEquals("wqiok", model.path()); - Assertions.assertEquals("sx", model.fileSpecType()); - Assertions.assertEquals("jmsvpkjp", model.targetFolderPath()); - } - - @Test - public void testSerialize() { - RestoreFileSpecs model = - new RestoreFileSpecs().withPath("wqiok").withFileSpecType("sx").withTargetFolderPath("jmsvpkjp"); - model = BinaryData.fromObject(model).toObject(RestoreFileSpecs.class); - Assertions.assertEquals("wqiok", model.path()); - Assertions.assertEquals("sx", model.fileSpecType()); - Assertions.assertEquals("jmsvpkjp", 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 deleted file mode 100644 index 9dc94cd9f9882..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoreRequestResourceTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.RestoreRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.RestoreRequestResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RestoreRequestResourceTests { - @Test - public void testDeserialize() { - RestoreRequestResource model = - BinaryData - .fromString( - "{\"properties\":{\"objectType\":\"RestoreRequest\"},\"eTag\":\"qzrnkcqvyxlwhz\",\"location\":\"sicohoqqnwvlry\",\"tags\":{\"konocu\":\"hheunmmqhgyx\"},\"id\":\"oklyaxuconuq\",\"name\":\"zf\",\"type\":\"beypewrmjmw\"}") - .toObject(RestoreRequestResource.class); - Assertions.assertEquals("sicohoqqnwvlry", model.location()); - Assertions.assertEquals("hheunmmqhgyx", model.tags().get("konocu")); - Assertions.assertEquals("qzrnkcqvyxlwhz", model.etag()); - } - - @Test - public void testSerialize() { - RestoreRequestResource model = - new RestoreRequestResource() - .withLocation("sicohoqqnwvlry") - .withTags(mapOf("konocu", "hheunmmqhgyx")) - .withProperties(new RestoreRequest()) - .withEtag("qzrnkcqvyxlwhz"); - model = BinaryData.fromObject(model).toObject(RestoreRequestResource.class); - Assertions.assertEquals("sicohoqqnwvlry", model.location()); - Assertions.assertEquals("hheunmmqhgyx", model.tags().get("konocu")); - Assertions.assertEquals("qzrnkcqvyxlwhz", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index ad271962ae9d1..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RestoreRequestTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.RestoreRequest; -import org.junit.jupiter.api.Test; - -public final class RestoreRequestTests { - @Test - public void testDeserialize() { - RestoreRequest model = - BinaryData.fromString("{\"objectType\":\"RestoreRequest\"}").toObject(RestoreRequest.class); - } - - @Test - public void testSerialize() { - RestoreRequest model = new RestoreRequest(); - model = BinaryData.fromObject(model).toObject(RestoreRequest.class); - } -} 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 deleted file mode 100644 index 2e4d82fd90e6e..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RetentionDurationTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDuration; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDurationType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RetentionDurationTests { - @Test - public void testDeserialize() { - RetentionDuration model = - BinaryData.fromString("{\"count\":1568742845,\"durationType\":\"Days\"}").toObject(RetentionDuration.class); - Assertions.assertEquals(1568742845, model.count()); - Assertions.assertEquals(RetentionDurationType.DAYS, model.durationType()); - } - - @Test - public void testSerialize() { - RetentionDuration model = - new RetentionDuration().withCount(1568742845).withDurationType(RetentionDurationType.DAYS); - model = BinaryData.fromObject(model).toObject(RetentionDuration.class); - Assertions.assertEquals(1568742845, model.count()); - Assertions.assertEquals(RetentionDurationType.DAYS, 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 deleted file mode 100644 index e413a7b6d9eb5..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/RetentionPolicyTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.RetentionPolicy; -import org.junit.jupiter.api.Test; - -public final class RetentionPolicyTests { - @Test - public void testDeserialize() { - RetentionPolicy model = - BinaryData.fromString("{\"retentionPolicyType\":\"RetentionPolicy\"}").toObject(RetentionPolicy.class); - } - - @Test - public void testSerialize() { - RetentionPolicy model = new RetentionPolicy(); - model = BinaryData.fromObject(model).toObject(RetentionPolicy.class); - } -} 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 deleted file mode 100644 index 84977d3f4052d..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SchedulePolicyTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// 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.SchedulePolicy; -import org.junit.jupiter.api.Test; - -public final class SchedulePolicyTests { - @Test - public void testDeserialize() { - SchedulePolicy model = - BinaryData.fromString("{\"schedulePolicyType\":\"SchedulePolicy\"}").toObject(SchedulePolicy.class); - } - - @Test - public void testSerialize() { - SchedulePolicy model = new SchedulePolicy(); - model = BinaryData.fromObject(model).toObject(SchedulePolicy.class); - } -} 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 deleted file mode 100644 index 15a86350e559d..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SecurityPinBaseTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.SecurityPinBase; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SecurityPinBaseTests { - @Test - public void testDeserialize() { - SecurityPinBase model = - BinaryData - .fromString("{\"resourceGuardOperationRequests\":[\"yrqufegxuvwz\",\"bnhlmc\"]}") - .toObject(SecurityPinBase.class); - Assertions.assertEquals("yrqufegxuvwz", model.resourceGuardOperationRequests().get(0)); - } - - @Test - public void testSerialize() { - SecurityPinBase model = - new SecurityPinBase().withResourceGuardOperationRequests(Arrays.asList("yrqufegxuvwz", "bnhlmc")); - model = BinaryData.fromObject(model).toObject(SecurityPinBase.class); - Assertions.assertEquals("yrqufegxuvwz", 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 deleted file mode 100644 index b351b47163900..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SettingsTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.Settings; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SettingsTests { - @Test - public void testDeserialize() { - Settings model = - BinaryData - .fromString("{\"timeZone\":\"vdxec\",\"issqlcompression\":false,\"isCompression\":true}") - .toObject(Settings.class); - Assertions.assertEquals("vdxec", model.timeZone()); - Assertions.assertEquals(false, model.issqlcompression()); - Assertions.assertEquals(true, model.isCompression()); - } - - @Test - public void testSerialize() { - Settings model = new Settings().withTimeZone("vdxec").withIssqlcompression(false).withIsCompression(true); - model = BinaryData.fromObject(model).toObject(Settings.class); - Assertions.assertEquals("vdxec", model.timeZone()); - Assertions.assertEquals(false, model.issqlcompression()); - Assertions.assertEquals(true, 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 deleted file mode 100644 index 838aae4fba524..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SimpleRetentionPolicyTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDuration; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDurationType; -import com.azure.resourcemanager.recoveryservicesbackup.models.SimpleRetentionPolicy; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SimpleRetentionPolicyTests { - @Test - public void testDeserialize() { - SimpleRetentionPolicy model = - BinaryData - .fromString( - "{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":1472417276,\"durationType\":\"Invalid\"}}") - .toObject(SimpleRetentionPolicy.class); - Assertions.assertEquals(1472417276, model.retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.INVALID, model.retentionDuration().durationType()); - } - - @Test - public void testSerialize() { - SimpleRetentionPolicy model = - new SimpleRetentionPolicy() - .withRetentionDuration( - new RetentionDuration().withCount(1472417276).withDurationType(RetentionDurationType.INVALID)); - model = BinaryData.fromObject(model).toObject(SimpleRetentionPolicy.class); - Assertions.assertEquals(1472417276, 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/SimpleSchedulePolicyTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SimpleSchedulePolicyTests.java deleted file mode 100644 index 7e75410a277cf..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SimpleSchedulePolicyTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DayOfWeek; -import com.azure.resourcemanager.recoveryservicesbackup.models.HourlySchedule; -import com.azure.resourcemanager.recoveryservicesbackup.models.ScheduleRunType; -import com.azure.resourcemanager.recoveryservicesbackup.models.SimpleSchedulePolicy; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SimpleSchedulePolicyTests { - @Test - public void testDeserialize() { - SimpleSchedulePolicy model = - BinaryData - .fromString( - "{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Tuesday\"],\"scheduleRunTimes\":[\"2021-06-25T01:17:09Z\",\"2021-11-22T17:29:03Z\",\"2021-07-27T15:44:21Z\",\"2021-09-20T20:46:09Z\"],\"hourlySchedule\":{\"interval\":963389591,\"scheduleWindowStartTime\":\"2021-03-21T04:45:07Z\",\"scheduleWindowDuration\":1700362881},\"scheduleWeeklyFrequency\":1766557067}") - .toObject(SimpleSchedulePolicy.class); - Assertions.assertEquals(ScheduleRunType.WEEKLY, model.scheduleRunFrequency()); - Assertions.assertEquals(DayOfWeek.TUESDAY, model.scheduleRunDays().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-25T01:17:09Z"), model.scheduleRunTimes().get(0)); - Assertions.assertEquals(963389591, model.hourlySchedule().interval()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-03-21T04:45:07Z"), model.hourlySchedule().scheduleWindowStartTime()); - Assertions.assertEquals(1700362881, model.hourlySchedule().scheduleWindowDuration()); - Assertions.assertEquals(1766557067, model.scheduleWeeklyFrequency()); - } - - @Test - public void testSerialize() { - SimpleSchedulePolicy model = - new SimpleSchedulePolicy() - .withScheduleRunFrequency(ScheduleRunType.WEEKLY) - .withScheduleRunDays(Arrays.asList(DayOfWeek.TUESDAY, DayOfWeek.TUESDAY)) - .withScheduleRunTimes( - Arrays - .asList( - OffsetDateTime.parse("2021-06-25T01:17:09Z"), - OffsetDateTime.parse("2021-11-22T17:29:03Z"), - OffsetDateTime.parse("2021-07-27T15:44:21Z"), - OffsetDateTime.parse("2021-09-20T20:46:09Z"))) - .withHourlySchedule( - new HourlySchedule() - .withInterval(963389591) - .withScheduleWindowStartTime(OffsetDateTime.parse("2021-03-21T04:45:07Z")) - .withScheduleWindowDuration(1700362881)) - .withScheduleWeeklyFrequency(1766557067); - model = BinaryData.fromObject(model).toObject(SimpleSchedulePolicy.class); - Assertions.assertEquals(ScheduleRunType.WEEKLY, model.scheduleRunFrequency()); - Assertions.assertEquals(DayOfWeek.TUESDAY, model.scheduleRunDays().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-25T01:17:09Z"), model.scheduleRunTimes().get(0)); - Assertions.assertEquals(963389591, model.hourlySchedule().interval()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-03-21T04:45:07Z"), model.hourlySchedule().scheduleWindowStartTime()); - Assertions.assertEquals(1700362881, model.hourlySchedule().scheduleWindowDuration()); - Assertions.assertEquals(1766557067, 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 deleted file mode 100644 index 1133053f8e20a..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SimpleSchedulePolicyV2Tests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DailySchedule; -import com.azure.resourcemanager.recoveryservicesbackup.models.DayOfWeek; -import com.azure.resourcemanager.recoveryservicesbackup.models.HourlySchedule; -import com.azure.resourcemanager.recoveryservicesbackup.models.ScheduleRunType; -import com.azure.resourcemanager.recoveryservicesbackup.models.SimpleSchedulePolicyV2; -import com.azure.resourcemanager.recoveryservicesbackup.models.WeeklySchedule; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SimpleSchedulePolicyV2Tests { - @Test - public void testDeserialize() { - SimpleSchedulePolicyV2 model = - BinaryData - .fromString( - "{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Hourly\",\"hourlySchedule\":{\"interval\":350343564,\"scheduleWindowStartTime\":\"2021-09-11T05:10:01Z\",\"scheduleWindowDuration\":1567868178},\"dailySchedule\":{\"scheduleRunTimes\":[\"2021-11-09T07:07:59Z\",\"2021-03-18T04:16:31Z\",\"2021-02-27T16:14:21Z\"]},\"weeklySchedule\":{\"scheduleRunDays\":[\"Monday\",\"Tuesday\"],\"scheduleRunTimes\":[\"2021-10-27T16:39:39Z\"]}}") - .toObject(SimpleSchedulePolicyV2.class); - Assertions.assertEquals(ScheduleRunType.HOURLY, model.scheduleRunFrequency()); - Assertions.assertEquals(350343564, model.hourlySchedule().interval()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-09-11T05:10:01Z"), model.hourlySchedule().scheduleWindowStartTime()); - Assertions.assertEquals(1567868178, model.hourlySchedule().scheduleWindowDuration()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-11-09T07:07:59Z"), model.dailySchedule().scheduleRunTimes().get(0)); - Assertions.assertEquals(DayOfWeek.MONDAY, model.weeklySchedule().scheduleRunDays().get(0)); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-10-27T16:39:39Z"), model.weeklySchedule().scheduleRunTimes().get(0)); - } - - @Test - public void testSerialize() { - SimpleSchedulePolicyV2 model = - new SimpleSchedulePolicyV2() - .withScheduleRunFrequency(ScheduleRunType.HOURLY) - .withHourlySchedule( - new HourlySchedule() - .withInterval(350343564) - .withScheduleWindowStartTime(OffsetDateTime.parse("2021-09-11T05:10:01Z")) - .withScheduleWindowDuration(1567868178)) - .withDailySchedule( - new DailySchedule() - .withScheduleRunTimes( - Arrays - .asList( - OffsetDateTime.parse("2021-11-09T07:07:59Z"), - OffsetDateTime.parse("2021-03-18T04:16:31Z"), - OffsetDateTime.parse("2021-02-27T16:14:21Z")))) - .withWeeklySchedule( - new WeeklySchedule() - .withScheduleRunDays(Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.TUESDAY)) - .withScheduleRunTimes(Arrays.asList(OffsetDateTime.parse("2021-10-27T16:39:39Z")))); - model = BinaryData.fromObject(model).toObject(SimpleSchedulePolicyV2.class); - Assertions.assertEquals(ScheduleRunType.HOURLY, model.scheduleRunFrequency()); - Assertions.assertEquals(350343564, model.hourlySchedule().interval()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-09-11T05:10:01Z"), model.hourlySchedule().scheduleWindowStartTime()); - Assertions.assertEquals(1567868178, model.hourlySchedule().scheduleWindowDuration()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-11-09T07:07:59Z"), model.dailySchedule().scheduleRunTimes().get(0)); - Assertions.assertEquals(DayOfWeek.MONDAY, model.weeklySchedule().scheduleRunDays().get(0)); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-10-27T16:39:39Z"), model.weeklySchedule().scheduleRunTimes().get(0)); - } -} 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 deleted file mode 100644 index 9868bb25d870a..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SqlDataDirectoryMappingTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryMapping; -import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SqlDataDirectoryMappingTests { - @Test - public void testDeserialize() { - SqlDataDirectoryMapping model = - BinaryData - .fromString( - "{\"mappingType\":\"Log\",\"sourceLogicalName\":\"yprotwyp\",\"sourcePath\":\"d\",\"targetPath\":\"xhugcm\"}") - .toObject(SqlDataDirectoryMapping.class); - Assertions.assertEquals(SqlDataDirectoryType.LOG, model.mappingType()); - Assertions.assertEquals("yprotwyp", model.sourceLogicalName()); - Assertions.assertEquals("d", model.sourcePath()); - Assertions.assertEquals("xhugcm", model.targetPath()); - } - - @Test - public void testSerialize() { - SqlDataDirectoryMapping model = - new SqlDataDirectoryMapping() - .withMappingType(SqlDataDirectoryType.LOG) - .withSourceLogicalName("yprotwyp") - .withSourcePath("d") - .withTargetPath("xhugcm"); - model = BinaryData.fromObject(model).toObject(SqlDataDirectoryMapping.class); - Assertions.assertEquals(SqlDataDirectoryType.LOG, model.mappingType()); - Assertions.assertEquals("yprotwyp", model.sourceLogicalName()); - Assertions.assertEquals("d", model.sourcePath()); - Assertions.assertEquals("xhugcm", 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 deleted file mode 100644 index 38b38af2be4dd..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SqlDataDirectoryTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectory; -import com.azure.resourcemanager.recoveryservicesbackup.models.SqlDataDirectoryType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SqlDataDirectoryTests { - @Test - public void testDeserialize() { - SqlDataDirectory model = - BinaryData - .fromString("{\"type\":\"Data\",\"path\":\"wwpgdakchzyvlixq\",\"logicalName\":\"kcxk\"}") - .toObject(SqlDataDirectory.class); - Assertions.assertEquals(SqlDataDirectoryType.DATA, model.type()); - Assertions.assertEquals("wwpgdakchzyvlixq", model.path()); - Assertions.assertEquals("kcxk", model.logicalName()); - } - - @Test - public void testSerialize() { - SqlDataDirectory model = - new SqlDataDirectory() - .withType(SqlDataDirectoryType.DATA) - .withPath("wwpgdakchzyvlixq") - .withLogicalName("kcxk"); - model = BinaryData.fromObject(model).toObject(SqlDataDirectory.class); - Assertions.assertEquals(SqlDataDirectoryType.DATA, model.type()); - Assertions.assertEquals("wwpgdakchzyvlixq", model.path()); - Assertions.assertEquals("kcxk", 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 deleted file mode 100644 index 7407f0974248c..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/SubProtectionPolicyTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// 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.PolicyType; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDurationType; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionPolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.SchedulePolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.SubProtectionPolicy; -import com.azure.resourcemanager.recoveryservicesbackup.models.TieringMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.TieringPolicy; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SubProtectionPolicyTests { - @Test - public void testDeserialize() { - SubProtectionPolicy model = - BinaryData - .fromString( - "{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"SchedulePolicy\"},\"retentionPolicy\":{\"retentionPolicyType\":\"RetentionPolicy\"},\"tieringPolicy\":{\"kdl\":{\"tieringMode\":\"DoNotTier\",\"duration\":693304246,\"durationType\":\"Months\"}}}") - .toObject(SubProtectionPolicy.class); - Assertions.assertEquals(PolicyType.LOG, model.policyType()); - Assertions.assertEquals(TieringMode.DO_NOT_TIER, model.tieringPolicy().get("kdl").tieringMode()); - Assertions.assertEquals(693304246, model.tieringPolicy().get("kdl").duration()); - Assertions.assertEquals(RetentionDurationType.MONTHS, model.tieringPolicy().get("kdl").durationType()); - } - - @Test - public void testSerialize() { - SubProtectionPolicy model = - new SubProtectionPolicy() - .withPolicyType(PolicyType.LOG) - .withSchedulePolicy(new SchedulePolicy()) - .withRetentionPolicy(new RetentionPolicy()) - .withTieringPolicy( - mapOf( - "kdl", - new TieringPolicy() - .withTieringMode(TieringMode.DO_NOT_TIER) - .withDuration(693304246) - .withDurationType(RetentionDurationType.MONTHS))); - model = BinaryData.fromObject(model).toObject(SubProtectionPolicy.class); - Assertions.assertEquals(PolicyType.LOG, model.policyType()); - Assertions.assertEquals(TieringMode.DO_NOT_TIER, model.tieringPolicy().get("kdl").tieringMode()); - Assertions.assertEquals(693304246, model.tieringPolicy().get("kdl").duration()); - Assertions.assertEquals(RetentionDurationType.MONTHS, model.tieringPolicy().get("kdl").durationType()); - } - - @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/TargetAfsRestoreInfoTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TargetAfsRestoreInfoTests.java deleted file mode 100644 index a8a819700c9f7..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TargetAfsRestoreInfoTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.TargetAfsRestoreInfo; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class TargetAfsRestoreInfoTests { - @Test - public void testDeserialize() { - TargetAfsRestoreInfo model = - BinaryData - .fromString("{\"name\":\"kwcf\",\"targetResourceId\":\"ljyxgtczhe\"}") - .toObject(TargetAfsRestoreInfo.class); - Assertions.assertEquals("kwcf", model.name()); - Assertions.assertEquals("ljyxgtczhe", model.targetResourceId()); - } - - @Test - public void testSerialize() { - TargetAfsRestoreInfo model = new TargetAfsRestoreInfo().withName("kwcf").withTargetResourceId("ljyxgtczhe"); - model = BinaryData.fromObject(model).toObject(TargetAfsRestoreInfo.class); - Assertions.assertEquals("kwcf", model.name()); - Assertions.assertEquals("ljyxgtczhe", model.targetResourceId()); - } -} 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 deleted file mode 100644 index 6ead7936a34e6..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TargetRestoreInfoTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.OverwriteOptions; -import com.azure.resourcemanager.recoveryservicesbackup.models.TargetRestoreInfo; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class TargetRestoreInfoTests { - @Test - public void testDeserialize() { - TargetRestoreInfo model = - BinaryData - .fromString( - "{\"overwriteOption\":\"Invalid\",\"containerId\":\"dxgketwzhhzjhfj\",\"databaseName\":\"vvmu\",\"targetDirectoryForFileRestore\":\"pmuneqsx\"}") - .toObject(TargetRestoreInfo.class); - Assertions.assertEquals(OverwriteOptions.INVALID, model.overwriteOption()); - Assertions.assertEquals("dxgketwzhhzjhfj", model.containerId()); - Assertions.assertEquals("vvmu", model.databaseName()); - Assertions.assertEquals("pmuneqsx", model.targetDirectoryForFileRestore()); - } - - @Test - public void testSerialize() { - TargetRestoreInfo model = - new TargetRestoreInfo() - .withOverwriteOption(OverwriteOptions.INVALID) - .withContainerId("dxgketwzhhzjhfj") - .withDatabaseName("vvmu") - .withTargetDirectoryForFileRestore("pmuneqsx"); - model = BinaryData.fromObject(model).toObject(TargetRestoreInfo.class); - Assertions.assertEquals(OverwriteOptions.INVALID, model.overwriteOption()); - Assertions.assertEquals("dxgketwzhhzjhfj", model.containerId()); - Assertions.assertEquals("vvmu", model.databaseName()); - Assertions.assertEquals("pmuneqsx", model.targetDirectoryForFileRestore()); - } -} 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 deleted file mode 100644 index ba63ecfcb2c4c..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TieringPolicyTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDurationType; -import com.azure.resourcemanager.recoveryservicesbackup.models.TieringMode; -import com.azure.resourcemanager.recoveryservicesbackup.models.TieringPolicy; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class TieringPolicyTests { - @Test - public void testDeserialize() { - TieringPolicy model = - BinaryData - .fromString("{\"tieringMode\":\"DoNotTier\",\"duration\":551279051,\"durationType\":\"Weeks\"}") - .toObject(TieringPolicy.class); - Assertions.assertEquals(TieringMode.DO_NOT_TIER, model.tieringMode()); - Assertions.assertEquals(551279051, model.duration()); - Assertions.assertEquals(RetentionDurationType.WEEKS, model.durationType()); - } - - @Test - public void testSerialize() { - TieringPolicy model = - new TieringPolicy() - .withTieringMode(TieringMode.DO_NOT_TIER) - .withDuration(551279051) - .withDurationType(RetentionDurationType.WEEKS); - model = BinaryData.fromObject(model).toObject(TieringPolicy.class); - Assertions.assertEquals(TieringMode.DO_NOT_TIER, model.tieringMode()); - Assertions.assertEquals(551279051, model.duration()); - Assertions.assertEquals(RetentionDurationType.WEEKS, 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 deleted file mode 100644 index e3eb8f61871e7..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/TriggerDataMoveRequestTests.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.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DataMoveLevel; -import com.azure.resourcemanager.recoveryservicesbackup.models.TriggerDataMoveRequest; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class TriggerDataMoveRequestTests { - @Test - public void testDeserialize() { - TriggerDataMoveRequest model = - BinaryData - .fromString( - "{\"sourceResourceId\":\"lhbxxhejjzzvdud\",\"sourceRegion\":\"wdslfhotwmcy\",\"dataMoveLevel\":\"Vault\",\"correlationId\":\"wlbjnpgacftade\",\"sourceContainerArmIds\":[\"ltyfsop\",\"usue\",\"nzwdejba\",\"orxzdmohctbqvud\"],\"pauseGC\":false}") - .toObject(TriggerDataMoveRequest.class); - Assertions.assertEquals("lhbxxhejjzzvdud", model.sourceResourceId()); - Assertions.assertEquals("wdslfhotwmcy", model.sourceRegion()); - Assertions.assertEquals(DataMoveLevel.VAULT, model.dataMoveLevel()); - Assertions.assertEquals("wlbjnpgacftade", model.correlationId()); - Assertions.assertEquals("ltyfsop", model.sourceContainerArmIds().get(0)); - Assertions.assertEquals(false, model.pauseGC()); - } - - @Test - public void testSerialize() { - TriggerDataMoveRequest model = - new TriggerDataMoveRequest() - .withSourceResourceId("lhbxxhejjzzvdud") - .withSourceRegion("wdslfhotwmcy") - .withDataMoveLevel(DataMoveLevel.VAULT) - .withCorrelationId("wlbjnpgacftade") - .withSourceContainerArmIds(Arrays.asList("ltyfsop", "usue", "nzwdejba", "orxzdmohctbqvud")) - .withPauseGC(false); - model = BinaryData.fromObject(model).toObject(TriggerDataMoveRequest.class); - Assertions.assertEquals("lhbxxhejjzzvdud", model.sourceResourceId()); - Assertions.assertEquals("wdslfhotwmcy", model.sourceRegion()); - Assertions.assertEquals(DataMoveLevel.VAULT, model.dataMoveLevel()); - Assertions.assertEquals("wlbjnpgacftade", model.correlationId()); - Assertions.assertEquals("ltyfsop", model.sourceContainerArmIds().get(0)); - Assertions.assertEquals(false, 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 deleted file mode 100644 index 7670fa28de189..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UnlockDeleteRequestTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.UnlockDeleteRequest; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class UnlockDeleteRequestTests { - @Test - public void testDeserialize() { - UnlockDeleteRequest model = - BinaryData - .fromString( - "{\"resourceGuardOperationRequests\":[\"bycnunvjsrtkf\",\"wnopqgikyzirtx\",\"yuxzejntpsewgi\"],\"resourceToBeDeleted\":\"l\"}") - .toObject(UnlockDeleteRequest.class); - Assertions.assertEquals("bycnunvjsrtkf", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("l", model.resourceToBeDeleted()); - } - - @Test - public void testSerialize() { - UnlockDeleteRequest model = - new UnlockDeleteRequest() - .withResourceGuardOperationRequests(Arrays.asList("bycnunvjsrtkf", "wnopqgikyzirtx", "yuxzejntpsewgi")) - .withResourceToBeDeleted("l"); - model = BinaryData.fromObject(model).toObject(UnlockDeleteRequest.class); - Assertions.assertEquals("bycnunvjsrtkf", model.resourceGuardOperationRequests().get(0)); - Assertions.assertEquals("l", 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 deleted file mode 100644 index a232d607759d3..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/UnlockDeleteResponseInnerTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.UnlockDeleteResponseInner; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class UnlockDeleteResponseInnerTests { - @Test - public void testDeserialize() { - UnlockDeleteResponseInner model = - BinaryData.fromString("{\"unlockDeleteExpiryTime\":\"kr\"}").toObject(UnlockDeleteResponseInner.class); - Assertions.assertEquals("kr", model.unlockDeleteExpiryTime()); - } - - @Test - public void testSerialize() { - UnlockDeleteResponseInner model = new UnlockDeleteResponseInner().withUnlockDeleteExpiryTime("kr"); - model = BinaryData.fromObject(model).toObject(UnlockDeleteResponseInner.class); - Assertions.assertEquals("kr", model.unlockDeleteExpiryTime()); - } -} 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 deleted file mode 100644 index 05fd0b4a1e5d6..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateIaasVMRestoreOperationRequestTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.RestoreRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateIaasVMRestoreOperationRequest; -import org.junit.jupiter.api.Test; - -public final class ValidateIaasVMRestoreOperationRequestTests { - @Test - public void testDeserialize() { - ValidateIaasVMRestoreOperationRequest model = - BinaryData - .fromString( - "{\"objectType\":\"ValidateIaasVMRestoreOperationRequest\",\"restoreRequest\":{\"objectType\":\"RestoreRequest\"}}") - .toObject(ValidateIaasVMRestoreOperationRequest.class); - } - - @Test - public void testSerialize() { - ValidateIaasVMRestoreOperationRequest model = - new ValidateIaasVMRestoreOperationRequest().withRestoreRequest(new RestoreRequest()); - model = BinaryData.fromObject(model).toObject(ValidateIaasVMRestoreOperationRequest.class); - } -} 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 deleted file mode 100644 index a44a15c23aae8..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateOperationRequestTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequest; -import org.junit.jupiter.api.Test; - -public final class ValidateOperationRequestTests { - @Test - public void testDeserialize() { - ValidateOperationRequest model = - BinaryData - .fromString("{\"objectType\":\"ValidateOperationRequest\"}") - .toObject(ValidateOperationRequest.class); - } - - @Test - public void testSerialize() { - ValidateOperationRequest model = new ValidateOperationRequest(); - model = BinaryData.fromObject(model).toObject(ValidateOperationRequest.class); - } -} 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 deleted file mode 100644 index c78d8aef71820..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ValidateRestoreOperationRequestTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.RestoreRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateRestoreOperationRequest; -import org.junit.jupiter.api.Test; - -public final class ValidateRestoreOperationRequestTests { - @Test - public void testDeserialize() { - ValidateRestoreOperationRequest model = - BinaryData - .fromString( - "{\"objectType\":\"ValidateRestoreOperationRequest\",\"restoreRequest\":{\"objectType\":\"RestoreRequest\"}}") - .toObject(ValidateRestoreOperationRequest.class); - } - - @Test - public void testSerialize() { - ValidateRestoreOperationRequest model = - new ValidateRestoreOperationRequest().withRestoreRequest(new RestoreRequest()); - model = BinaryData.fromObject(model).toObject(ValidateRestoreOperationRequest.class); - } -} 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 deleted file mode 100644 index 61f4de520bc07..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/VaultJobExtendedInfoTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class VaultJobExtendedInfoTests { - @Test - public void testDeserialize() { - VaultJobExtendedInfo model = - BinaryData - .fromString("{\"propertyBag\":{\"ecjxe\":\"iziesfuughtuq\"}}") - .toObject(VaultJobExtendedInfo.class); - Assertions.assertEquals("iziesfuughtuq", model.propertyBag().get("ecjxe")); - } - - @Test - public void testSerialize() { - VaultJobExtendedInfo model = new VaultJobExtendedInfo().withPropertyBag(mapOf("ecjxe", "iziesfuughtuq")); - model = BinaryData.fromObject(model).toObject(VaultJobExtendedInfo.class); - Assertions.assertEquals("iziesfuughtuq", model.propertyBag().get("ecjxe")); - } - - @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/VaultStorageConfigOperationResultResponseInnerTests.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/VaultStorageConfigOperationResultResponseInnerTests.java deleted file mode 100644 index d7d2e2994be07..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/VaultStorageConfigOperationResultResponseInnerTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.VaultStorageConfigOperationResultResponseInner; -import org.junit.jupiter.api.Test; - -public final class VaultStorageConfigOperationResultResponseInnerTests { - @Test - public void testDeserialize() { - VaultStorageConfigOperationResultResponseInner model = - BinaryData - .fromString("{\"objectType\":\"VaultStorageConfigOperationResultResponse\"}") - .toObject(VaultStorageConfigOperationResultResponseInner.class); - } - - @Test - public void testSerialize() { - 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 deleted file mode 100644 index 0ca5e12603992..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WeeklyRetentionFormatTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DayOfWeek; -import com.azure.resourcemanager.recoveryservicesbackup.models.WeekOfMonth; -import com.azure.resourcemanager.recoveryservicesbackup.models.WeeklyRetentionFormat; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WeeklyRetentionFormatTests { - @Test - public void testDeserialize() { - WeeklyRetentionFormat model = - BinaryData - .fromString("{\"daysOfTheWeek\":[\"Friday\"],\"weeksOfTheMonth\":[\"Last\"]}") - .toObject(WeeklyRetentionFormat.class); - Assertions.assertEquals(DayOfWeek.FRIDAY, model.daysOfTheWeek().get(0)); - Assertions.assertEquals(WeekOfMonth.LAST, model.weeksOfTheMonth().get(0)); - } - - @Test - public void testSerialize() { - WeeklyRetentionFormat model = - new WeeklyRetentionFormat() - .withDaysOfTheWeek(Arrays.asList(DayOfWeek.FRIDAY)) - .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.LAST)); - model = BinaryData.fromObject(model).toObject(WeeklyRetentionFormat.class); - Assertions.assertEquals(DayOfWeek.FRIDAY, model.daysOfTheWeek().get(0)); - Assertions.assertEquals(WeekOfMonth.LAST, 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 deleted file mode 100644 index eb9855299ac57..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WeeklyRetentionScheduleTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// 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.DayOfWeek; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDuration; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDurationType; -import com.azure.resourcemanager.recoveryservicesbackup.models.WeeklyRetentionSchedule; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WeeklyRetentionScheduleTests { - @Test - public void testDeserialize() { - WeeklyRetentionSchedule model = - BinaryData - .fromString( - "{\"daysOfTheWeek\":[\"Friday\",\"Friday\",\"Wednesday\"],\"retentionTimes\":[\"2021-04-12T22:42:56Z\",\"2021-07-13T11:30:30Z\",\"2021-10-26T11:31:47Z\",\"2021-03-10T09:25:33Z\"],\"retentionDuration\":{\"count\":1974888424,\"durationType\":\"Years\"}}") - .toObject(WeeklyRetentionSchedule.class); - Assertions.assertEquals(DayOfWeek.FRIDAY, model.daysOfTheWeek().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-12T22:42:56Z"), model.retentionTimes().get(0)); - Assertions.assertEquals(1974888424, model.retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.YEARS, model.retentionDuration().durationType()); - } - - @Test - public void testSerialize() { - WeeklyRetentionSchedule model = - new WeeklyRetentionSchedule() - .withDaysOfTheWeek(Arrays.asList(DayOfWeek.FRIDAY, DayOfWeek.FRIDAY, DayOfWeek.WEDNESDAY)) - .withRetentionTimes( - Arrays - .asList( - OffsetDateTime.parse("2021-04-12T22:42:56Z"), - OffsetDateTime.parse("2021-07-13T11:30:30Z"), - OffsetDateTime.parse("2021-10-26T11:31:47Z"), - OffsetDateTime.parse("2021-03-10T09:25:33Z"))) - .withRetentionDuration( - new RetentionDuration().withCount(1974888424).withDurationType(RetentionDurationType.YEARS)); - model = BinaryData.fromObject(model).toObject(WeeklyRetentionSchedule.class); - Assertions.assertEquals(DayOfWeek.FRIDAY, model.daysOfTheWeek().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-12T22:42:56Z"), model.retentionTimes().get(0)); - Assertions.assertEquals(1974888424, model.retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.YEARS, 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 deleted file mode 100644 index ef74493e1bffe..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WeeklyScheduleTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DayOfWeek; -import com.azure.resourcemanager.recoveryservicesbackup.models.WeeklySchedule; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WeeklyScheduleTests { - @Test - public void testDeserialize() { - WeeklySchedule model = - BinaryData - .fromString( - "{\"scheduleRunDays\":[\"Wednesday\"],\"scheduleRunTimes\":[\"2021-08-10T02:41:29Z\",\"2021-07-31T03:17:47Z\",\"2021-05-14T07:37:58Z\"]}") - .toObject(WeeklySchedule.class); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.scheduleRunDays().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-10T02:41:29Z"), model.scheduleRunTimes().get(0)); - } - - @Test - public void testSerialize() { - WeeklySchedule model = - new WeeklySchedule() - .withScheduleRunDays(Arrays.asList(DayOfWeek.WEDNESDAY)) - .withScheduleRunTimes( - Arrays - .asList( - OffsetDateTime.parse("2021-08-10T02:41:29Z"), - OffsetDateTime.parse("2021-07-31T03:17:47Z"), - OffsetDateTime.parse("2021-05-14T07:37:58Z"))); - model = BinaryData.fromObject(model).toObject(WeeklySchedule.class); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.scheduleRunDays().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-10T02:41:29Z"), 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 deleted file mode 100644 index 18756d424985a..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadItemResourceInnerTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class WorkloadItemResourceInnerTests { - @Test - public void testDeserialize() { - WorkloadItemResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"workloadItemType\":\"WorkloadItem\",\"backupManagementType\":\"knnqvsaznq\",\"workloadType\":\"orudsgsa\",\"friendlyName\":\"kycgrauwj\",\"protectionState\":\"Protected\"},\"eTag\":\"eburu\",\"location\":\"dmovsm\",\"tags\":{\"oefki\":\"wabm\",\"qujmqlgkf\":\"rvtp\"},\"id\":\"tndoaongbjc\",\"name\":\"tujitcjedft\",\"type\":\"waezkojvd\"}") - .toObject(WorkloadItemResourceInner.class); - Assertions.assertEquals("dmovsm", model.location()); - Assertions.assertEquals("wabm", model.tags().get("oefki")); - Assertions.assertEquals("knnqvsaznq", model.properties().backupManagementType()); - Assertions.assertEquals("orudsgsa", model.properties().workloadType()); - Assertions.assertEquals("kycgrauwj", model.properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.properties().protectionState()); - Assertions.assertEquals("eburu", model.etag()); - } - - @Test - public void testSerialize() { - WorkloadItemResourceInner model = - new WorkloadItemResourceInner() - .withLocation("dmovsm") - .withTags(mapOf("oefki", "wabm", "qujmqlgkf", "rvtp")) - .withProperties( - new WorkloadItem() - .withBackupManagementType("knnqvsaznq") - .withWorkloadType("orudsgsa") - .withFriendlyName("kycgrauwj") - .withProtectionState(ProtectionStatus.PROTECTED)) - .withEtag("eburu"); - model = BinaryData.fromObject(model).toObject(WorkloadItemResourceInner.class); - Assertions.assertEquals("dmovsm", model.location()); - Assertions.assertEquals("wabm", model.tags().get("oefki")); - Assertions.assertEquals("knnqvsaznq", model.properties().backupManagementType()); - Assertions.assertEquals("orudsgsa", model.properties().workloadType()); - Assertions.assertEquals("kycgrauwj", model.properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.properties().protectionState()); - Assertions.assertEquals("eburu", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 68be65a0f0430..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadItemResourceListTests.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.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 com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadItemResourceList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WorkloadItemResourceListTests { - @Test - public void testDeserialize() { - WorkloadItemResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"workloadItemType\":\"WorkloadItem\",\"backupManagementType\":\"l\",\"workloadType\":\"tramxjez\",\"friendlyName\":\"wnwxuqlcvyd\",\"protectionState\":\"Protecting\"},\"eTag\":\"dooaojkniodko\",\"location\":\"ebwnujhe\",\"tags\":{\"wj\":\"bvdkcrodtjin\",\"f\":\"fltkacjv\",\"gaowpulpqblylsyx\":\"dlfoakggkfp\",\"xsdszuempsb\":\"qjnsjervtia\"},\"id\":\"kfzbeyvpnqicvi\",\"name\":\"v\",\"type\":\"jjxd\"},{\"properties\":{\"workloadItemType\":\"WorkloadItem\",\"backupManagementType\":\"uukzclewyhmlw\",\"workloadType\":\"ztzp\",\"friendlyName\":\"ncckw\",\"protectionState\":\"ProtectionFailed\"},\"eTag\":\"whxxbuyqax\",\"location\":\"feqztppriol\",\"tags\":{\"sobqw\":\"jaltolmnc\",\"vglsbjjca\":\"sdbnwdcfhucqdpf\",\"t\":\"vxb\"},\"id\":\"udutnco\",\"name\":\"mr\",\"type\":\"xqtvcofu\"}],\"nextLink\":\"lvkgju\"}") - .toObject(WorkloadItemResourceList.class); - Assertions.assertEquals("lvkgju", model.nextLink()); - Assertions.assertEquals("ebwnujhe", model.value().get(0).location()); - Assertions.assertEquals("bvdkcrodtjin", model.value().get(0).tags().get("wj")); - Assertions.assertEquals("l", model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("tramxjez", model.value().get(0).properties().workloadType()); - Assertions.assertEquals("wnwxuqlcvyd", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.value().get(0).properties().protectionState()); - Assertions.assertEquals("dooaojkniodko", model.value().get(0).etag()); - } - - @Test - public void testSerialize() { - WorkloadItemResourceList model = - new WorkloadItemResourceList() - .withNextLink("lvkgju") - .withValue( - Arrays - .asList( - new WorkloadItemResourceInner() - .withLocation("ebwnujhe") - .withTags( - mapOf( - "wj", - "bvdkcrodtjin", - "f", - "fltkacjv", - "gaowpulpqblylsyx", - "dlfoakggkfp", - "xsdszuempsb", - "qjnsjervtia")) - .withProperties( - new WorkloadItem() - .withBackupManagementType("l") - .withWorkloadType("tramxjez") - .withFriendlyName("wnwxuqlcvyd") - .withProtectionState(ProtectionStatus.PROTECTING)) - .withEtag("dooaojkniodko"), - new WorkloadItemResourceInner() - .withLocation("feqztppriol") - .withTags(mapOf("sobqw", "jaltolmnc", "vglsbjjca", "sdbnwdcfhucqdpf", "t", "vxb")) - .withProperties( - new WorkloadItem() - .withBackupManagementType("uukzclewyhmlw") - .withWorkloadType("ztzp") - .withFriendlyName("ncckw") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED)) - .withEtag("whxxbuyqax"))); - model = BinaryData.fromObject(model).toObject(WorkloadItemResourceList.class); - Assertions.assertEquals("lvkgju", model.nextLink()); - Assertions.assertEquals("ebwnujhe", model.value().get(0).location()); - Assertions.assertEquals("bvdkcrodtjin", model.value().get(0).tags().get("wj")); - Assertions.assertEquals("l", model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("tramxjez", model.value().get(0).properties().workloadType()); - Assertions.assertEquals("wnwxuqlcvyd", model.value().get(0).properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.value().get(0).properties().protectionState()); - Assertions.assertEquals("dooaojkniodko", model.value().get(0).etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 256fde3784068..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadItemTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadItem; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WorkloadItemTests { - @Test - public void testDeserialize() { - WorkloadItem model = - BinaryData - .fromString( - "{\"workloadItemType\":\"WorkloadItem\",\"backupManagementType\":\"zfoqouicybxar\",\"workloadType\":\"szufoxciqopidoa\",\"friendlyName\":\"iodhkhazxkhnz\",\"protectionState\":\"Protected\"}") - .toObject(WorkloadItem.class); - Assertions.assertEquals("zfoqouicybxar", model.backupManagementType()); - Assertions.assertEquals("szufoxciqopidoa", model.workloadType()); - Assertions.assertEquals("iodhkhazxkhnz", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.protectionState()); - } - - @Test - public void testSerialize() { - WorkloadItem model = - new WorkloadItem() - .withBackupManagementType("zfoqouicybxar") - .withWorkloadType("szufoxciqopidoa") - .withFriendlyName("iodhkhazxkhnz") - .withProtectionState(ProtectionStatus.PROTECTED); - model = BinaryData.fromObject(model).toObject(WorkloadItem.class); - Assertions.assertEquals("zfoqouicybxar", model.backupManagementType()); - Assertions.assertEquals("szufoxciqopidoa", model.workloadType()); - Assertions.assertEquals("iodhkhazxkhnz", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, 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 deleted file mode 100644 index a7c2831a1c0d5..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadProtectableItemResourceInnerTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; -import org.junit.jupiter.api.Test; - -public final class WorkloadProtectableItemResourceInnerTests { - @Test - public void testDeserialize() { - WorkloadProtectableItemResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"pikpz\",\"workloadType\":\"ejzanlfz\",\"friendlyName\":\"av\",\"protectionState\":\"Protected\"},\"eTag\":\"onok\",\"location\":\"xrjqcirgzpfrlazs\",\"tags\":{\"wp\":\"woiindf\",\"jvfbgofelja\":\"ylwbtlhflsjcdhsz\"},\"id\":\"rqmq\",\"name\":\"ldvriiiojnalghfk\",\"type\":\"tvsexsowuel\"}") - .toObject(WorkloadProtectableItemResourceInner.class); - Assertions.assertEquals("xrjqcirgzpfrlazs", model.location()); - Assertions.assertEquals("woiindf", model.tags().get("wp")); - Assertions.assertEquals("pikpz", model.properties().backupManagementType()); - Assertions.assertEquals("ejzanlfz", model.properties().workloadType()); - Assertions.assertEquals("av", model.properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.properties().protectionState()); - Assertions.assertEquals("onok", model.etag()); - } - - @Test - public void testSerialize() { - WorkloadProtectableItemResourceInner model = - new WorkloadProtectableItemResourceInner() - .withLocation("xrjqcirgzpfrlazs") - .withTags(mapOf("wp", "woiindf", "jvfbgofelja", "ylwbtlhflsjcdhsz")) - .withProperties( - new WorkloadProtectableItem() - .withBackupManagementType("pikpz") - .withWorkloadType("ejzanlfz") - .withFriendlyName("av") - .withProtectionState(ProtectionStatus.PROTECTED)) - .withEtag("onok"); - model = BinaryData.fromObject(model).toObject(WorkloadProtectableItemResourceInner.class); - Assertions.assertEquals("xrjqcirgzpfrlazs", model.location()); - Assertions.assertEquals("woiindf", model.tags().get("wp")); - Assertions.assertEquals("pikpz", model.properties().backupManagementType()); - Assertions.assertEquals("ejzanlfz", model.properties().workloadType()); - Assertions.assertEquals("av", model.properties().friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTED, model.properties().protectionState()); - Assertions.assertEquals("onok", model.etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 3e4e81f3872bd..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadProtectableItemResourceListTests.java +++ /dev/null @@ -1,108 +0,0 @@ -// 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.fluent.models.WorkloadProtectableItemResourceInner; -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; -import org.junit.jupiter.api.Test; - -public final class WorkloadProtectableItemResourceListTests { - @Test - public void testDeserialize() { - WorkloadProtectableItemResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"hoftr\",\"workloadType\":\"equi\",\"friendlyName\":\"xicslfao\",\"protectionState\":\"ProtectionFailed\"},\"eTag\":\"yylhalnswhccsp\",\"location\":\"kaivwit\",\"tags\":{\"wem\":\"ywuggwoluhcz\",\"sbrgz\":\"ai\",\"ggicccnxqhue\":\"wmsweypqwd\"},\"id\":\"mkttlstvlzywem\",\"name\":\"zrncsdt\",\"type\":\"lusiy\"},{\"properties\":{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"fgytguslfeadcyg\",\"workloadType\":\"kyhejhzisxgf\",\"friendlyName\":\"lolp\",\"protectionState\":\"Protecting\"},\"eTag\":\"r\",\"location\":\"qvujzraehtwdwrf\",\"tags\":{\"cdl\":\"iby\"},\"id\":\"h\",\"name\":\"hfwpracstwit\",\"type\":\"khevxccedc\"},{\"properties\":{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"dyodnwzxltj\",\"workloadType\":\"nhltiugcxn\",\"friendlyName\":\"vwxqibyqunyo\",\"protectionState\":\"Protected\"},\"eTag\":\"mdjrkvfgbvfvp\",\"location\":\"bodacizsjq\",\"tags\":{\"ibqipqkg\":\"rribd\",\"mkrefajpjorwkq\":\"vxndz\",\"sjabibs\":\"yhgbijtjivfx\"},\"id\":\"stawfsdjpvkv\",\"name\":\"bjxbkzbzk\",\"type\":\"vncjabudurgk\"},{\"properties\":{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"o\",\"workloadType\":\"hjjklff\",\"friendlyName\":\"ouw\",\"protectionState\":\"NotProtected\"},\"eTag\":\"rfzeey\",\"location\":\"bizikayuhq\",\"tags\":{\"bbqwrvtldg\":\"bs\",\"vm\":\"fp\"},\"id\":\"ipaslthaqfxssmwu\",\"name\":\"wbdsr\",\"type\":\"zpdrhneu\"}],\"nextLink\":\"wqkdwytisibi\"}") - .toObject(WorkloadProtectableItemResourceList.class); - Assertions.assertEquals("wqkdwytisibi", model.nextLink()); - Assertions.assertEquals("kaivwit", model.value().get(0).location()); - Assertions.assertEquals("ywuggwoluhcz", model.value().get(0).tags().get("wem")); - Assertions.assertEquals("hoftr", model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("equi", model.value().get(0).properties().workloadType()); - Assertions.assertEquals("xicslfao", model.value().get(0).properties().friendlyName()); - Assertions - .assertEquals(ProtectionStatus.PROTECTION_FAILED, model.value().get(0).properties().protectionState()); - Assertions.assertEquals("yylhalnswhccsp", model.value().get(0).etag()); - } - - @Test - public void testSerialize() { - WorkloadProtectableItemResourceList model = - new WorkloadProtectableItemResourceList() - .withNextLink("wqkdwytisibi") - .withValue( - Arrays - .asList( - new WorkloadProtectableItemResourceInner() - .withLocation("kaivwit") - .withTags(mapOf("wem", "ywuggwoluhcz", "sbrgz", "ai", "ggicccnxqhue", "wmsweypqwd")) - .withProperties( - new WorkloadProtectableItem() - .withBackupManagementType("hoftr") - .withWorkloadType("equi") - .withFriendlyName("xicslfao") - .withProtectionState(ProtectionStatus.PROTECTION_FAILED)) - .withEtag("yylhalnswhccsp"), - new WorkloadProtectableItemResourceInner() - .withLocation("qvujzraehtwdwrf") - .withTags(mapOf("cdl", "iby")) - .withProperties( - new WorkloadProtectableItem() - .withBackupManagementType("fgytguslfeadcyg") - .withWorkloadType("kyhejhzisxgf") - .withFriendlyName("lolp") - .withProtectionState(ProtectionStatus.PROTECTING)) - .withEtag("r"), - new WorkloadProtectableItemResourceInner() - .withLocation("bodacizsjq") - .withTags( - mapOf("ibqipqkg", "rribd", "mkrefajpjorwkq", "vxndz", "sjabibs", "yhgbijtjivfx")) - .withProperties( - new WorkloadProtectableItem() - .withBackupManagementType("dyodnwzxltj") - .withWorkloadType("nhltiugcxn") - .withFriendlyName("vwxqibyqunyo") - .withProtectionState(ProtectionStatus.PROTECTED)) - .withEtag("mdjrkvfgbvfvp"), - new WorkloadProtectableItemResourceInner() - .withLocation("bizikayuhq") - .withTags(mapOf("bbqwrvtldg", "bs", "vm", "fp")) - .withProperties( - new WorkloadProtectableItem() - .withBackupManagementType("o") - .withWorkloadType("hjjklff") - .withFriendlyName("ouw") - .withProtectionState(ProtectionStatus.NOT_PROTECTED)) - .withEtag("rfzeey"))); - model = BinaryData.fromObject(model).toObject(WorkloadProtectableItemResourceList.class); - Assertions.assertEquals("wqkdwytisibi", model.nextLink()); - Assertions.assertEquals("kaivwit", model.value().get(0).location()); - Assertions.assertEquals("ywuggwoluhcz", model.value().get(0).tags().get("wem")); - Assertions.assertEquals("hoftr", model.value().get(0).properties().backupManagementType()); - Assertions.assertEquals("equi", model.value().get(0).properties().workloadType()); - Assertions.assertEquals("xicslfao", model.value().get(0).properties().friendlyName()); - Assertions - .assertEquals(ProtectionStatus.PROTECTION_FAILED, model.value().get(0).properties().protectionState()); - Assertions.assertEquals("yylhalnswhccsp", model.value().get(0).etag()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 deleted file mode 100644 index 966899c0b4670..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/WorkloadProtectableItemTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionStatus; -import com.azure.resourcemanager.recoveryservicesbackup.models.WorkloadProtectableItem; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WorkloadProtectableItemTests { - @Test - public void testDeserialize() { - WorkloadProtectableItem model = - BinaryData - .fromString( - "{\"protectableItemType\":\"WorkloadProtectableItem\",\"backupManagementType\":\"hhahhxvrhmzkwpjg\",\"workloadType\":\"spughftqsxhq\",\"friendlyName\":\"j\",\"protectionState\":\"Protecting\"}") - .toObject(WorkloadProtectableItem.class); - Assertions.assertEquals("hhahhxvrhmzkwpjg", model.backupManagementType()); - Assertions.assertEquals("spughftqsxhq", model.workloadType()); - Assertions.assertEquals("j", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, model.protectionState()); - } - - @Test - public void testSerialize() { - WorkloadProtectableItem model = - new WorkloadProtectableItem() - .withBackupManagementType("hhahhxvrhmzkwpjg") - .withWorkloadType("spughftqsxhq") - .withFriendlyName("j") - .withProtectionState(ProtectionStatus.PROTECTING); - model = BinaryData.fromObject(model).toObject(WorkloadProtectableItem.class); - Assertions.assertEquals("hhahhxvrhmzkwpjg", model.backupManagementType()); - Assertions.assertEquals("spughftqsxhq", model.workloadType()); - Assertions.assertEquals("j", model.friendlyName()); - Assertions.assertEquals(ProtectionStatus.PROTECTING, 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 deleted file mode 100644 index fe5296e2f90ab..0000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/test/java/com/azure/resourcemanager/recoveryservicesbackup/generated/YearlyRetentionScheduleTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.recoveryservicesbackup.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.recoveryservicesbackup.models.DailyRetentionFormat; -import com.azure.resourcemanager.recoveryservicesbackup.models.Day; -import com.azure.resourcemanager.recoveryservicesbackup.models.DayOfWeek; -import com.azure.resourcemanager.recoveryservicesbackup.models.MonthOfYear; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDuration; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionDurationType; -import com.azure.resourcemanager.recoveryservicesbackup.models.RetentionScheduleFormat; -import com.azure.resourcemanager.recoveryservicesbackup.models.WeekOfMonth; -import com.azure.resourcemanager.recoveryservicesbackup.models.WeeklyRetentionFormat; -import com.azure.resourcemanager.recoveryservicesbackup.models.YearlyRetentionSchedule; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class YearlyRetentionScheduleTests { - @Test - public void testDeserialize() { - YearlyRetentionSchedule model = - BinaryData - .fromString( - "{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"March\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":2066157212,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Tuesday\",\"Monday\"],\"weeksOfTheMonth\":[\"Invalid\",\"Fourth\",\"Last\"]},\"retentionTimes\":[\"2021-02-25T23:08:25Z\",\"2021-06-17T00:54:33Z\"],\"retentionDuration\":{\"count\":1488889865,\"durationType\":\"Years\"}}") - .toObject(YearlyRetentionSchedule.class); - Assertions.assertEquals(RetentionScheduleFormat.WEEKLY, model.retentionScheduleFormatType()); - Assertions.assertEquals(MonthOfYear.MARCH, model.monthsOfYear().get(0)); - Assertions.assertEquals(2066157212, model.retentionScheduleDaily().daysOfTheMonth().get(0).date()); - Assertions.assertEquals(false, model.retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); - Assertions.assertEquals(DayOfWeek.TUESDAY, model.retentionScheduleWeekly().daysOfTheWeek().get(0)); - Assertions.assertEquals(WeekOfMonth.INVALID, model.retentionScheduleWeekly().weeksOfTheMonth().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-25T23:08:25Z"), model.retentionTimes().get(0)); - Assertions.assertEquals(1488889865, model.retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.YEARS, model.retentionDuration().durationType()); - } - - @Test - public void testSerialize() { - YearlyRetentionSchedule model = - new YearlyRetentionSchedule() - .withRetentionScheduleFormatType(RetentionScheduleFormat.WEEKLY) - .withMonthsOfYear(Arrays.asList(MonthOfYear.MARCH)) - .withRetentionScheduleDaily( - new DailyRetentionFormat() - .withDaysOfTheMonth(Arrays.asList(new Day().withDate(2066157212).withIsLast(false)))) - .withRetentionScheduleWeekly( - new WeeklyRetentionFormat() - .withDaysOfTheWeek(Arrays.asList(DayOfWeek.TUESDAY, DayOfWeek.MONDAY)) - .withWeeksOfTheMonth(Arrays.asList(WeekOfMonth.INVALID, WeekOfMonth.FOURTH, WeekOfMonth.LAST))) - .withRetentionTimes( - Arrays - .asList( - OffsetDateTime.parse("2021-02-25T23:08:25Z"), OffsetDateTime.parse("2021-06-17T00:54:33Z"))) - .withRetentionDuration( - new RetentionDuration().withCount(1488889865).withDurationType(RetentionDurationType.YEARS)); - model = BinaryData.fromObject(model).toObject(YearlyRetentionSchedule.class); - Assertions.assertEquals(RetentionScheduleFormat.WEEKLY, model.retentionScheduleFormatType()); - Assertions.assertEquals(MonthOfYear.MARCH, model.monthsOfYear().get(0)); - Assertions.assertEquals(2066157212, model.retentionScheduleDaily().daysOfTheMonth().get(0).date()); - Assertions.assertEquals(false, model.retentionScheduleDaily().daysOfTheMonth().get(0).isLast()); - Assertions.assertEquals(DayOfWeek.TUESDAY, model.retentionScheduleWeekly().daysOfTheWeek().get(0)); - Assertions.assertEquals(WeekOfMonth.INVALID, model.retentionScheduleWeekly().weeksOfTheMonth().get(0)); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-25T23:08:25Z"), model.retentionTimes().get(0)); - Assertions.assertEquals(1488889865, model.retentionDuration().count()); - Assertions.assertEquals(RetentionDurationType.YEARS, model.retentionDuration().durationType()); - } -}