diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/CHANGELOG.md b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/CHANGELOG.md index 12929eb68349..172c9f01eba0 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/CHANGELOG.md +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.6 (Unreleased) +## 1.0.0-beta.1 (2024-06-04) + +- Azure Resource Manager MySql client library for Java. This package contains Microsoft Azure SDK for MySql Management SDK. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. Package tag package-flexibleserver-2024-02-01-preview. 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/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/README.md b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/README.md index 3a7f517d8018..8bf47b93d366 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/README.md +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/README.md @@ -2,7 +2,7 @@ Azure Resource Manager MySql client library for Java. -This package contains Microsoft Azure SDK for MySql Management SDK. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. Package tag package-flexibleserver-2023-12-30. 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 MySql Management SDK. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. Package tag package-flexibleserver-2024-02-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-mysqlflexibleserver - 1.0.0-beta.5 + 1.0.0-beta.6 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/SAMPLE.md b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/SAMPLE.md index 89953a968f74..08a02c313f0b 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/SAMPLE.md +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/SAMPLE.md @@ -112,6 +112,7 @@ - [Create](#servers_create) - [Delete](#servers_delete) +- [DetachVNet](#servers_detachvnet) - [Failover](#servers_failover) - [GetByResourceGroup](#servers_getbyresourcegroup) - [List](#servers_list) @@ -136,7 +137,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtec */ public final class AdvancedThreatProtectionSettingsGetSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsGet.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/AdvancedThreatProtectionSettingsGet.json */ /** * Sample code: Get a server's Advanced Threat Protection settings. @@ -160,7 +161,7 @@ public final class AdvancedThreatProtectionSettingsGetSamples { */ public final class AdvancedThreatProtectionSettingsListSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsList.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/AdvancedThreatProtectionSettingsList.json */ /** * Sample code: Get list of server's Advanced Threat Protection settings. @@ -187,7 +188,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtec */ public final class AdvancedThreatProtectionSettingsUpdateSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPatchDisabled.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/AdvancedThreatProtectionSettingsPatchDisabled.json */ /** * Sample code: Disable a server's Advanced Threat Protection settings with all parameters. @@ -203,7 +204,7 @@ public final class AdvancedThreatProtectionSettingsUpdateSamples { } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPatchEnabled.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/AdvancedThreatProtectionSettingsPatchEnabled.json */ /** * Sample code: Enable a server's Advanced Threat Protection settings. @@ -232,7 +233,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtec */ public final class AdvancedThreatProtectionSettingsUpdatePutSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPutDisabled.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/AdvancedThreatProtectionSettingsPutDisabled.json */ /** * Sample code: Disable a server's Advanced Threat Protection settings with all parameters using PUT. @@ -248,7 +249,7 @@ public final class AdvancedThreatProtectionSettingsUpdatePutSamples { } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPutEnabled.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/AdvancedThreatProtectionSettingsPutEnabled.json */ /** * Sample code: Enable a server's Advanced Threat Protection settings using PUT. @@ -497,7 +498,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.models.NameAvailabilityRequ */ public final class CheckNameAvailabilityExecuteSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckNameAvailability.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CheckNameAvailability.json */ /** * Sample code: Check name availability. @@ -523,7 +524,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.models.NameAvailabilityRequ */ public final class CheckNameAvailabilityWithoutLocationExecuteSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckNameAvailability.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CheckNameAvailability.json */ /** * Sample code: Check name availability. @@ -549,7 +550,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.models.VirtualNetworkSubnet */ public final class CheckVirtualNetworkSubnetUsageExecuteSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckVirtualNetworkSubnetUsage.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CheckVirtualNetworkSubnetUsage.json */ /** * Sample code: CheckVirtualNetworkSubnetUsage. @@ -883,7 +884,7 @@ public final class FirewallRulesListByServerSamples { */ public final class GetPrivateDnsZoneSuffixExecuteSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/GetPrivateDnsZoneSuffix.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/GetPrivateDnsZoneSuffix.json */ /** * Sample code: GetPrivateDnsZoneSuffix. @@ -904,7 +905,7 @@ public final class GetPrivateDnsZoneSuffixExecuteSamples { */ public final class LocationBasedCapabilitiesListSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitiesByLocationList.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CapabilitiesByLocationList.json */ /** * Sample code: CapabilitiesList. @@ -925,7 +926,7 @@ public final class LocationBasedCapabilitiesListSamples { */ public final class LocationBasedCapabilitySetGetSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetByLocation.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CapabilitySetByLocation.json */ /** * Sample code: CapabilityResult. @@ -946,7 +947,7 @@ public final class LocationBasedCapabilitySetGetSamples { */ public final class LocationBasedCapabilitySetListSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetListByLocation.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CapabilitySetListByLocation.json */ /** * Sample code: CapabilitySetsResult. @@ -1126,7 +1127,7 @@ public final class MaintenancesUpdateSamples { */ public final class OperationProgressGetSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationProgress_Get_BackupAndExport.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/OperationProgress_Get_BackupAndExport.json */ /** * Sample code: OperationProgress_Get BackupAndExport. @@ -1140,7 +1141,7 @@ public final class OperationProgressGetSamples { } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationProgress_Get_ImportFromStorage.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/OperationProgress_Get_ImportFromStorage.json */ /** * Sample code: OperationProgress_Get ImportFromStorage. @@ -1163,7 +1164,7 @@ public final class OperationProgressGetSamples { */ public final class OperationResultsGetSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationResults_Get.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/OperationResults_Get.json */ /** * Sample code: OperationResults_Get. @@ -1185,7 +1186,7 @@ public final class OperationResultsGetSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationsList.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/OperationsList.json */ /** * Sample code: OperationList. @@ -1206,7 +1207,7 @@ public final class OperationsListSamples { */ public final class ReplicasListByServerSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ReplicasListByServer.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ReplicasListByServer.json */ /** * Sample code: List replicas for a server. @@ -1237,6 +1238,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.models.MySqlServerSku; import com.azure.resourcemanager.mysqlflexibleserver.models.ServerSkuTier; import com.azure.resourcemanager.mysqlflexibleserver.models.ServerVersion; import com.azure.resourcemanager.mysqlflexibleserver.models.Storage; +import com.azure.resourcemanager.mysqlflexibleserver.models.StorageRedundancyEnum; import java.io.IOException; import java.time.OffsetDateTime; import java.util.HashMap; @@ -1247,7 +1249,7 @@ import java.util.Map; */ public final class ServersCreateSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreateReplica.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerCreateReplica.json */ /** * Sample code: Create a replica server. @@ -1266,7 +1268,7 @@ public final class ServersCreateSamples { } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreate.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerCreate.json */ /** * Sample code: Create a new server. @@ -1285,7 +1287,10 @@ public final class ServersCreateSamples { .withVersion(ServerVersion.FIVE_SEVEN) .withAvailabilityZone("1") .withCreateMode(CreateMode.DEFAULT) - .withStorage(new Storage().withStorageSizeGB(100).withIops(600).withAutoGrow(EnableStatusEnum.DISABLED)) + .withStorage(new Storage().withStorageSizeGB(100) + .withIops(600) + .withAutoGrow(EnableStatusEnum.DISABLED) + .withStorageRedundancy(StorageRedundancyEnum.LOCAL_REDUNDANCY)) .withBackup(new Backup().withBackupRetentionDays(7) .withBackupIntervalHours(24) .withGeoRedundantBackup(EnableStatusEnum.DISABLED)) @@ -1295,7 +1300,7 @@ public final class ServersCreateSamples { } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreateWithBYOK.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerCreateWithBYOK.json */ /** * Sample code: Create a server with byok. @@ -1327,7 +1332,10 @@ public final class ServersCreateSamples { "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity") .withGeoBackupKeyUri("fakeTokenPlaceholder") .withType(DataEncryptionType.AZURE_KEY_VAULT)) - .withStorage(new Storage().withStorageSizeGB(100).withIops(600).withAutoGrow(EnableStatusEnum.DISABLED)) + .withStorage(new Storage().withStorageSizeGB(100) + .withIops(600) + .withAutoGrow(EnableStatusEnum.DISABLED) + .withStorageRedundancy(StorageRedundancyEnum.LOCAL_REDUNDANCY)) .withBackup(new Backup().withBackupRetentionDays(7) .withBackupIntervalHours(24) .withGeoRedundantBackup(EnableStatusEnum.DISABLED)) @@ -1337,7 +1345,7 @@ public final class ServersCreateSamples { } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreateWithPointInTimeRestore.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerCreateWithPointInTimeRestore.json */ /** * Sample code: Create a server as a point in time restore. @@ -1381,7 +1389,7 @@ public final class ServersCreateSamples { */ public final class ServersDeleteSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerDelete.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerDelete.json */ /** * Sample code: Delete a server. @@ -1394,6 +1402,33 @@ public final class ServersDeleteSamples { } ``` +### Servers_DetachVNet + +```java +import com.azure.resourcemanager.mysqlflexibleserver.models.EnableStatusEnum; +import com.azure.resourcemanager.mysqlflexibleserver.models.ServerDetachVNetParameter; + +/** + * Samples for Servers DetachVNet. + */ +public final class ServersDetachVNetSamples { + /* + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerDetachVNet.json + */ + /** + * Sample code: Detach VNet on a server. + * + * @param manager Entry point to MySqlManager. + */ + public static void detachVNetOnAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) { + manager.servers() + .detachVNet("TestGroup", "testserver", + new ServerDetachVNetParameter().withPublicNetworkAccess(EnableStatusEnum.ENABLED), + com.azure.core.util.Context.NONE); + } +} +``` + ### Servers_Failover ```java @@ -1402,7 +1437,7 @@ public final class ServersDeleteSamples { */ public final class ServersFailoverSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerFailover.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerFailover.json */ /** * Sample code: Restart a server. @@ -1423,7 +1458,7 @@ public final class ServersFailoverSamples { */ public final class ServersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGetWithVnet.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerGetWithVnet.json */ /** * Sample code: Get a server with vnet. @@ -1435,7 +1470,7 @@ public final class ServersGetByResourceGroupSamples { } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGet.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerGet.json */ /** * Sample code: Get a server. @@ -1456,7 +1491,7 @@ public final class ServersGetByResourceGroupSamples { */ public final class ServersListSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServersList.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServersList.json */ /** * Sample code: List servers in a subscription. @@ -1477,7 +1512,7 @@ public final class ServersListSamples { */ public final class ServersListByResourceGroupSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServersListByResourceGroup.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServersListByResourceGroup.json */ /** * Sample code: List servers in a resource group. @@ -1500,7 +1535,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.models.ServerGtidSetParamet */ public final class ServersResetGtidSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerResetGtid.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerResetGtid.json */ /** * Sample code: Reset GTID on a server. @@ -1527,7 +1562,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.models.ServerRestartParamet */ public final class ServersRestartSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerRestart.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerRestart.json */ /** * Sample code: Restart a server. @@ -1552,7 +1587,7 @@ public final class ServersRestartSamples { */ public final class ServersStartSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerStart.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerStart.json */ /** * Sample code: Start a server. @@ -1573,7 +1608,7 @@ public final class ServersStartSamples { */ public final class ServersStopSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerStop.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerStop.json */ /** * Sample code: Stop a server. @@ -1609,7 +1644,7 @@ import java.util.Map; */ public final class ServersUpdateSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithCustomerMaintenanceWindow.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json */ /** * Sample code: Update server customer maintenance window. @@ -1630,7 +1665,7 @@ public final class ServersUpdateSamples { } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithBYOK.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerUpdateWithBYOK.json */ /** * Sample code: Update server with byok. @@ -1659,7 +1694,7 @@ public final class ServersUpdateSamples { } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdate.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerUpdate.json */ /** * Sample code: Update a server. @@ -1703,7 +1738,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.HighAvailabil */ public final class ServersValidateEstimateHighAvailabilitySamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerValidateEstimateHighAvailability.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerValidateEstimateHighAvailability.json */ /** * Sample code: Validate a validation and estimation of high availability. @@ -1728,7 +1763,7 @@ public final class ServersValidateEstimateHighAvailabilitySamples { */ public final class ServersMigrationCutoverMigrationSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/CutoverMigration.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/CutoverMigration.json */ /** * Sample code: Cutover migration for MySQL import. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/pom.xml b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/pom.xml index 955b9f56f112..a62b0aef9662 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/pom.xml +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for MySql Management - This package contains Microsoft Azure SDK for MySql Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. Package tag package-flexibleserver-2023-12-30. + This package contains Microsoft Azure SDK for MySql Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. Package tag package-flexibleserver-2024-02-01-preview. https://github.com/Azure/azure-sdk-for-java @@ -61,7 +61,7 @@ com.azure azure-core-test - 1.26.0-beta.1 + 1.25.0 test diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/MySqlManager.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/MySqlManager.java index 956691931790..b09e48057716 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/MySqlManager.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/MySqlManager.java @@ -294,7 +294,7 @@ public MySqlManager authenticate(TokenCredential credential, AzureProfile profil .append("-") .append("com.azure.resourcemanager.mysqlflexibleserver") .append("/") - .append("1.0.0-beta.5"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/ServersClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/ServersClient.java index 12b95a2b0e19..f97733c29726 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/ServersClient.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/ServersClient.java @@ -13,6 +13,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.HighAvailabilityValidationEstimationInner; import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerInner; +import com.azure.resourcemanager.mysqlflexibleserver.models.ServerDetachVNetParameter; import com.azure.resourcemanager.mysqlflexibleserver.models.ServerForUpdate; import com.azure.resourcemanager.mysqlflexibleserver.models.ServerGtidSetParameter; import com.azure.resourcemanager.mysqlflexibleserver.models.ServerRestartParameter; @@ -574,4 +575,65 @@ SyncPoller, Void> beginResetGtid(String resourceGroupName, Stri */ @ServiceMethod(returns = ReturnType.SINGLE) void resetGtid(String resourceGroupName, String serverName, ServerGtidSetParameter parameters, Context context); + + /** + * Detach VNet on a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for detach vnet on a server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents a server. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ServerInner> beginDetachVNet(String resourceGroupName, String serverName, + ServerDetachVNetParameter parameters); + + /** + * Detach VNet on a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for detach vnet on a server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents a server. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ServerInner> beginDetachVNet(String resourceGroupName, String serverName, + ServerDetachVNetParameter parameters, Context context); + + /** + * Detach VNet on a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for detach vnet on a server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ServerInner detachVNet(String resourceGroupName, String serverName, ServerDetachVNetParameter parameters); + + /** + * Detach VNet on a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for detach vnet on a server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ServerInner detachVNet(String resourceGroupName, String serverName, ServerDetachVNetParameter parameters, + Context context); } diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java index b88216b500d9..c4f42ec97eda 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java @@ -156,7 +156,7 @@ private Mono> getWithResponseAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, serverName, @@ -199,7 +199,7 @@ private Mono> getWithResponseAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), resourceGroupName, serverName, advancedThreatProtectionName, @@ -299,7 +299,7 @@ private Mono>> updateWithResponseAsync(String resource } else { parameters.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, serverName, @@ -349,7 +349,7 @@ private Mono>> updateWithResponseAsync(String resource } else { parameters.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), resourceGroupName, serverName, advancedThreatProtectionName, @@ -563,7 +563,7 @@ private Mono>> updatePutWithResponseAsync(String resou } else { parameters.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.updatePut(this.client.getEndpoint(), resourceGroupName, serverName, @@ -613,7 +613,7 @@ private Mono>> updatePutWithResponseAsync(String resou } else { parameters.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.updatePut(this.client.getEndpoint(), resourceGroupName, serverName, advancedThreatProtectionName, @@ -818,7 +818,7 @@ private Mono> listSinglePageAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, serverName, @@ -858,7 +858,7 @@ private Mono> listSinglePageAsync(S return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java index b175f018d258..436330c2701e 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckNameAvailabilitiesClientImpl.java @@ -101,7 +101,7 @@ private Mono> executeWithResponseAsync(String lo } else { nameAvailabilityRequest.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.execute(this.client.getEndpoint(), apiVersion, @@ -141,7 +141,7 @@ private Mono> executeWithResponseAsync(String lo } else { nameAvailabilityRequest.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.execute(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), locationName, diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckNameAvailabilityWithoutLocationsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckNameAvailabilityWithoutLocationsClientImpl.java index 3bcaab571016..3ecff8e800b0 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckNameAvailabilityWithoutLocationsClientImpl.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckNameAvailabilityWithoutLocationsClientImpl.java @@ -98,7 +98,7 @@ Mono> execute(@HostParam("$host") String endpoin } else { nameAvailabilityRequest.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.execute(this.client.getEndpoint(), apiVersion, @@ -134,7 +134,7 @@ Mono> execute(@HostParam("$host") String endpoin } else { nameAvailabilityRequest.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.execute(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckVirtualNetworkSubnetUsagesClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckVirtualNetworkSubnetUsagesClientImpl.java index 3f3a94f7ca4a..3a179ab2ae19 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckVirtualNetworkSubnetUsagesClientImpl.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/CheckVirtualNetworkSubnetUsagesClientImpl.java @@ -100,7 +100,7 @@ private Mono> executeWithResponse } else { parameters.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.execute(this.client.getEndpoint(), apiVersion, @@ -139,7 +139,7 @@ private Mono> executeWithResponse } else { parameters.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.execute(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), locationName, diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java index b2e05216b8c7..759fc44f63e0 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/GetPrivateDnsZoneSuffixesClientImpl.java @@ -78,7 +78,7 @@ private Mono> executeWithResponse return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.execute(this.client.getEndpoint(), apiVersion, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -100,7 +100,7 @@ private Mono> executeWithResponse return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.execute(this.client.getEndpoint(), apiVersion, accept, context); diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java index fafe27c4e42d..b89180fb872a 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitiesClientImpl.java @@ -101,7 +101,7 @@ private Mono> listSinglePageAsync(Strin if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -135,7 +135,7 @@ private Mono> listSinglePageAsync(Strin if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitySetsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitySetsClientImpl.java index b85ebd890228..e3b2895003a2 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitySetsClientImpl.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/LocationBasedCapabilitySetsClientImpl.java @@ -110,7 +110,7 @@ private Mono> listSinglePageAsync(String location if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -144,7 +144,7 @@ private Mono> listSinglePageAsync(String location if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -242,7 +242,7 @@ private Mono> getWithResponseAsync(String locationName return Mono .error(new IllegalArgumentException("Parameter capabilitySetName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -280,7 +280,7 @@ private Mono> getWithResponseAsync(String locationName return Mono .error(new IllegalArgumentException("Parameter capabilitySetName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), locationName, diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationProgressClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationProgressClientImpl.java index 734b1b53f533..17b00377ac9d 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationProgressClientImpl.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationProgressClientImpl.java @@ -94,7 +94,7 @@ private Mono> getWithResponseAsync(String if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -131,7 +131,7 @@ private Mono> getWithResponseAsync(String if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, locationName, diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationResultsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationResultsClientImpl.java index e33b9a0b3cd2..95d01c010f88 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationResultsClientImpl.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationResultsClientImpl.java @@ -95,7 +95,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, @@ -132,7 +132,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, locationName, diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationsClientImpl.java index a1c7e282cb6f..9ece465e2dd0 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationsClientImpl.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/OperationsClientImpl.java @@ -91,7 +91,7 @@ private Mono> listSinglePageAsync() { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -115,7 +115,7 @@ private Mono> listSinglePageAsync(Context context) return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2023-12-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, accept, context) diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ReplicasClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ReplicasClientImpl.java index 464d3dce78b0..1a2328b83416 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ReplicasClientImpl.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ReplicasClientImpl.java @@ -106,7 +106,7 @@ private Mono> listByServerSinglePageAsync(String reso if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByServer(this.client.getEndpoint(), apiVersion, @@ -145,7 +145,7 @@ private Mono> listByServerSinglePageAsync(String reso if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServerImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServerImpl.java index 601ad76ad906..74874dd33d6e 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServerImpl.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServerImpl.java @@ -23,6 +23,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpointConnection; import com.azure.resourcemanager.mysqlflexibleserver.models.ReplicationRole; import com.azure.resourcemanager.mysqlflexibleserver.models.Server; +import com.azure.resourcemanager.mysqlflexibleserver.models.ServerDetachVNetParameter; import com.azure.resourcemanager.mysqlflexibleserver.models.ServerForUpdate; import com.azure.resourcemanager.mysqlflexibleserver.models.ServerGtidSetParameter; import com.azure.resourcemanager.mysqlflexibleserver.models.ServerRestartParameter; @@ -301,6 +302,14 @@ public void resetGtid(ServerGtidSetParameter parameters, Context context) { serviceManager.servers().resetGtid(resourceGroupName, serverName, parameters, context); } + public Server detachVNet(ServerDetachVNetParameter parameters) { + return serviceManager.servers().detachVNet(resourceGroupName, serverName, parameters); + } + + public Server detachVNet(ServerDetachVNetParameter parameters, Context context) { + return serviceManager.servers().detachVNet(resourceGroupName, serverName, parameters, context); + } + public ServerImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersClientImpl.java index 630407c3928d..b533cfa564e8 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersClientImpl.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersClientImpl.java @@ -36,6 +36,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.fluent.ServersClient; import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.HighAvailabilityValidationEstimationInner; import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerInner; +import com.azure.resourcemanager.mysqlflexibleserver.models.ServerDetachVNetParameter; import com.azure.resourcemanager.mysqlflexibleserver.models.ServerForUpdate; import com.azure.resourcemanager.mysqlflexibleserver.models.ServerGtidSetParameter; import com.azure.resourcemanager.mysqlflexibleserver.models.ServerListResult; @@ -188,6 +189,16 @@ Mono>> resetGtid(@HostParam("$host") String endpoint, @BodyParam("application/json") ServerGtidSetParameter parameters, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/detachVNet") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> detachVNet(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, + @BodyParam("application/json") ServerDetachVNetParameter parameters, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -238,7 +249,7 @@ private Mono>> createWithResponseAsync(String resource } else { parameters.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.create(this.client.getEndpoint(), apiVersion, @@ -281,7 +292,7 @@ private Mono>> createWithResponseAsync(String resource } else { parameters.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.create(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -468,7 +479,7 @@ private Mono>> updateWithResponseAsync(String resource } else { parameters.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), apiVersion, @@ -512,7 +523,7 @@ private Mono>> updateWithResponseAsync(String resource } else { parameters.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.update(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -700,7 +711,7 @@ private Mono>> deleteWithResponseAsync(String resource if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), apiVersion, @@ -737,7 +748,7 @@ private Mono>> deleteWithResponseAsync(String resource if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -902,7 +913,7 @@ private Mono> getByResourceGroupWithResponseAsync(String r if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), apiVersion, @@ -939,7 +950,7 @@ private Mono> getByResourceGroupWithResponseAsync(String r if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.getByResourceGroup(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1017,7 +1028,7 @@ private Mono> listByResourceGroupSinglePageAsync(Stri return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), apiVersion, @@ -1052,7 +1063,7 @@ private Mono> listByResourceGroupSinglePageAsync(Stri return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1139,7 +1150,7 @@ private Mono> listSinglePageAsync() { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1168,7 +1179,7 @@ private Mono> listSinglePageAsync(Context context) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context) @@ -1256,7 +1267,7 @@ private Mono>> failoverWithResponseAsync(String resour if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.failover(this.client.getEndpoint(), apiVersion, @@ -1293,7 +1304,7 @@ private Mono>> failoverWithResponseAsync(String resour if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.failover(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1465,7 +1476,7 @@ private Mono> validateEstima } else { parameters.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.validateEstimateHighAvailability(this.client.getEndpoint(), apiVersion, @@ -1510,7 +1521,7 @@ private Mono> validateEstima } else { parameters.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.validateEstimateHighAvailability(this.client.getEndpoint(), apiVersion, @@ -1607,7 +1618,7 @@ private Mono>> restartWithResponseAsync(String resourc } else { parameters.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.restart(this.client.getEndpoint(), apiVersion, @@ -1650,7 +1661,7 @@ private Mono>> restartWithResponseAsync(String resourc } else { parameters.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.restart(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -1828,7 +1839,7 @@ private Mono>> startWithResponseAsync(String resourceG if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.start(this.client.getEndpoint(), apiVersion, @@ -1865,7 +1876,7 @@ private Mono>> startWithResponseAsync(String resourceG if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.start(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -2028,7 +2039,7 @@ private Mono>> stopWithResponseAsync(String resourceGr if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.stop(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -2065,7 +2076,7 @@ private Mono>> stopWithResponseAsync(String resourceGr if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.stop(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, @@ -2235,7 +2246,7 @@ private Mono>> resetGtidWithResponseAsync(String resou } else { parameters.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.resetGtid(this.client.getEndpoint(), apiVersion, @@ -2278,7 +2289,7 @@ private Mono>> resetGtidWithResponseAsync(String resou } else { parameters.validate(); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.resetGtid(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), @@ -2429,6 +2440,237 @@ public void resetGtid(String resourceGroupName, String serverName, ServerGtidSet resetGtidAsync(resourceGroupName, serverName, parameters, context).block(); } + /** + * Detach VNet on a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for detach vnet on a server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> detachVNetWithResponseAsync(String resourceGroupName, String serverName, + ServerDetachVNetParameter parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2024-02-01-preview"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.detachVNet(this.client.getEndpoint(), apiVersion, + this.client.getSubscriptionId(), resourceGroupName, serverName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Detach VNet on a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for detach vnet on a server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> detachVNetWithResponseAsync(String resourceGroupName, String serverName, + ServerDetachVNetParameter parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (serverName == null) { + return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2024-02-01-preview"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.detachVNet(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), + resourceGroupName, serverName, parameters, accept, context); + } + + /** + * Detach VNet on a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for detach vnet on a server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of represents a server. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ServerInner> beginDetachVNetAsync(String resourceGroupName, + String serverName, ServerDetachVNetParameter parameters) { + Mono>> mono = detachVNetWithResponseAsync(resourceGroupName, serverName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServerInner.class, ServerInner.class, this.client.getContext()); + } + + /** + * Detach VNet on a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for detach vnet on a server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of represents a server. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ServerInner> beginDetachVNetAsync(String resourceGroupName, + String serverName, ServerDetachVNetParameter parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = detachVNetWithResponseAsync(resourceGroupName, serverName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ServerInner.class, ServerInner.class, context); + } + + /** + * Detach VNet on a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for detach vnet on a server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents a server. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ServerInner> beginDetachVNet(String resourceGroupName, String serverName, + ServerDetachVNetParameter parameters) { + return this.beginDetachVNetAsync(resourceGroupName, serverName, parameters).getSyncPoller(); + } + + /** + * Detach VNet on a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for detach vnet on a server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of represents a server. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ServerInner> beginDetachVNet(String resourceGroupName, String serverName, + ServerDetachVNetParameter parameters, Context context) { + return this.beginDetachVNetAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); + } + + /** + * Detach VNet on a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for detach vnet on a server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono detachVNetAsync(String resourceGroupName, String serverName, + ServerDetachVNetParameter parameters) { + return beginDetachVNetAsync(resourceGroupName, serverName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Detach VNet on a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for detach vnet on a server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a server on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono detachVNetAsync(String resourceGroupName, String serverName, + ServerDetachVNetParameter parameters, Context context) { + return beginDetachVNetAsync(resourceGroupName, serverName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Detach VNet on a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for detach vnet on a server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ServerInner detachVNet(String resourceGroupName, String serverName, ServerDetachVNetParameter parameters) { + return detachVNetAsync(resourceGroupName, serverName, parameters).block(); + } + + /** + * Detach VNet on a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for detach vnet on a server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a server. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ServerInner detachVNet(String resourceGroupName, String serverName, ServerDetachVNetParameter parameters, + Context context) { + return detachVNetAsync(resourceGroupName, serverName, parameters, context).block(); + } + /** * Get the next page of items. * diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersImpl.java index 191412501e48..cb0878f7046c 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersImpl.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersImpl.java @@ -14,6 +14,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerInner; import com.azure.resourcemanager.mysqlflexibleserver.models.HighAvailabilityValidationEstimation; import com.azure.resourcemanager.mysqlflexibleserver.models.Server; +import com.azure.resourcemanager.mysqlflexibleserver.models.ServerDetachVNetParameter; import com.azure.resourcemanager.mysqlflexibleserver.models.ServerGtidSetParameter; import com.azure.resourcemanager.mysqlflexibleserver.models.ServerRestartParameter; import com.azure.resourcemanager.mysqlflexibleserver.models.Servers; @@ -146,6 +147,25 @@ public void resetGtid(String resourceGroupName, String serverName, ServerGtidSet this.serviceClient().resetGtid(resourceGroupName, serverName, parameters, context); } + public Server detachVNet(String resourceGroupName, String serverName, ServerDetachVNetParameter parameters) { + ServerInner inner = this.serviceClient().detachVNet(resourceGroupName, serverName, parameters); + if (inner != null) { + return new ServerImpl(inner, this.manager()); + } else { + return null; + } + } + + public Server detachVNet(String resourceGroupName, String serverName, ServerDetachVNetParameter parameters, + Context context) { + ServerInner inner = this.serviceClient().detachVNet(resourceGroupName, serverName, parameters, context); + if (inner != null) { + return new ServerImpl(inner, this.manager()); + } else { + return null; + } + } + public Server getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersMigrationsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersMigrationsClientImpl.java index 6d8755649aea..05e9b8abf43d 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersMigrationsClientImpl.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ServersMigrationsClientImpl.java @@ -100,7 +100,7 @@ private Mono>> cutoverMigrationWithResponseAsync(Strin if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.cutoverMigration(this.client.getEndpoint(), apiVersion, @@ -137,7 +137,7 @@ private Mono>> cutoverMigrationWithResponseAsync(Strin if (serverName == null) { return Mono.error(new IllegalArgumentException("Parameter serverName is required and cannot be null.")); } - final String apiVersion = "2023-12-30"; + final String apiVersion = "2024-02-01-preview"; final String accept = "application/json"; context = this.client.mergeContext(context); return service.cutoverMigration(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Server.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Server.java index 92ccd8f5e9e4..e80eb1546b1e 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Server.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Server.java @@ -869,4 +869,27 @@ Response validateEstimateHighAvailabilityW * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void resetGtid(ServerGtidSetParameter parameters, Context context); + + /** + * Detach VNet on a server. + * + * @param parameters The required parameters for detach vnet on a server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a server. + */ + Server detachVNet(ServerDetachVNetParameter parameters); + + /** + * Detach VNet on a server. + * + * @param parameters The required parameters for detach vnet on a server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a server. + */ + Server detachVNet(ServerDetachVNetParameter parameters, Context context); } diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerDetachVNetParameter.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerDetachVNetParameter.java new file mode 100644 index 000000000000..7599151fe189 --- /dev/null +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerDetachVNetParameter.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mysqlflexibleserver.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters to detach Vnet. + */ +@Fluent +public final class ServerDetachVNetParameter { + /* + * Whether or not public network access is allowed for this server. Value is 'Disabled' when server has VNet integration. + */ + @JsonProperty(value = "publicNetworkAccess") + private EnableStatusEnum publicNetworkAccess; + + /** + * Creates an instance of ServerDetachVNetParameter class. + */ + public ServerDetachVNetParameter() { + } + + /** + * Get the publicNetworkAccess property: Whether or not public network access is allowed for this server. Value is + * 'Disabled' when server has VNet integration. + * + * @return the publicNetworkAccess value. + */ + public EnableStatusEnum publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Whether or not public network access is allowed for this server. Value is + * 'Disabled' when server has VNet integration. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the ServerDetachVNetParameter object itself. + */ + public ServerDetachVNetParameter withPublicNetworkAccess(EnableStatusEnum publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerGtidSetParameter.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerGtidSetParameter.java index 90a14d323823..5b18153b8a57 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerGtidSetParameter.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/ServerGtidSetParameter.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Server Gtid set parameters. + * Server Gtid set parameters: Replication with Global Transaction Identifiers. */ @Fluent public final class ServerGtidSetParameter { diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Servers.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Servers.java index 6d9e3a1ed37d..cbc15517d7ab 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Servers.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Servers.java @@ -253,6 +253,34 @@ HighAvailabilityValidationEstimation validateEstimateHighAvailability(String res */ void resetGtid(String resourceGroupName, String serverName, ServerGtidSetParameter parameters, Context context); + /** + * Detach VNet on a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for detach vnet on a server. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a server. + */ + Server detachVNet(String resourceGroupName, String serverName, ServerDetachVNetParameter parameters); + + /** + * Detach VNet on a server. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param serverName The name of the server. + * @param parameters The required parameters for detach vnet on a server. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a server. + */ + Server detachVNet(String resourceGroupName, String serverName, ServerDetachVNetParameter parameters, + Context context); + /** * Gets information about a server. * diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Storage.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Storage.java index 371a8b2aee78..496aca08ba81 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Storage.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/Storage.java @@ -48,6 +48,12 @@ public final class Storage { @JsonProperty(value = "autoIoScaling") private EnableStatusEnum autoIoScaling; + /* + * The redundant type of the server storage. The parameter is used for server creation. + */ + @JsonProperty(value = "storageRedundancy") + private StorageRedundancyEnum storageRedundancy; + /** * Creates an instance of Storage class. */ @@ -163,6 +169,28 @@ public Storage withAutoIoScaling(EnableStatusEnum autoIoScaling) { return this; } + /** + * Get the storageRedundancy property: The redundant type of the server storage. The parameter is used for server + * creation. + * + * @return the storageRedundancy value. + */ + public StorageRedundancyEnum storageRedundancy() { + return this.storageRedundancy; + } + + /** + * Set the storageRedundancy property: The redundant type of the server storage. The parameter is used for server + * creation. + * + * @param storageRedundancy the storageRedundancy value to set. + * @return the Storage object itself. + */ + public Storage withStorageRedundancy(StorageRedundancyEnum storageRedundancy) { + this.storageRedundancy = storageRedundancy; + return this; + } + /** * Validates the instance. * diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/StorageRedundancyEnum.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/StorageRedundancyEnum.java new file mode 100644 index 000000000000..29391984616e --- /dev/null +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/models/StorageRedundancyEnum.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mysqlflexibleserver.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Enum to indicate whether storage sku value is 'ZoneRedundancy' or 'LocalRedundancy'. + */ +public final class StorageRedundancyEnum extends ExpandableStringEnum { + /** + * Static value LocalRedundancy for StorageRedundancyEnum. + */ + public static final StorageRedundancyEnum LOCAL_REDUNDANCY = fromString("LocalRedundancy"); + + /** + * Static value ZoneRedundancy for StorageRedundancyEnum. + */ + public static final StorageRedundancyEnum ZONE_REDUNDANCY = fromString("ZoneRedundancy"); + + /** + * Creates a new instance of StorageRedundancyEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StorageRedundancyEnum() { + } + + /** + * Creates or finds a StorageRedundancyEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding StorageRedundancyEnum. + */ + @JsonCreator + public static StorageRedundancyEnum fromString(String name) { + return fromString(name, StorageRedundancyEnum.class); + } + + /** + * Gets known StorageRedundancyEnum values. + * + * @return known StorageRedundancyEnum values. + */ + public static Collection values() { + return values(StorageRedundancyEnum.class); + } +} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mysqlflexibleserver/reflect-config.json b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mysqlflexibleserver/reflect-config.json index 757fcc4df139..04be83c8a70d 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mysqlflexibleserver/reflect-config.json +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-mysqlflexibleserver/reflect-config.json @@ -248,6 +248,11 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.mysqlflexibleserver.models.ServerDetachVNetParameter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionInner", "allDeclaredConstructors" : true, @@ -538,6 +543,11 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.mysqlflexibleserver.models.StorageRedundancyEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.mysqlflexibleserver.models.HighAvailabilityMode", "allDeclaredConstructors" : true, diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetSamples.java index 2d4be749f58c..3510aec26a93 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetSamples.java @@ -11,7 +11,7 @@ */ public final class AdvancedThreatProtectionSettingsGetSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsGet.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/AdvancedThreatProtectionSettingsGet.json */ /** * Sample code: Get a server's Advanced Threat Protection settings. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsListSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsListSamples.java index 406f89672245..a716fa8a28a7 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsListSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsListSamples.java @@ -9,7 +9,7 @@ */ public final class AdvancedThreatProtectionSettingsListSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsList.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/AdvancedThreatProtectionSettingsList.json */ /** * Sample code: Get list of server's Advanced Threat Protection settings. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsUpdatePutSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsUpdatePutSamples.java index 7343819682b2..2eb57012a1d5 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsUpdatePutSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsUpdatePutSamples.java @@ -13,7 +13,7 @@ */ public final class AdvancedThreatProtectionSettingsUpdatePutSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPutDisabled.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/AdvancedThreatProtectionSettingsPutDisabled.json */ /** * Sample code: Disable a server's Advanced Threat Protection settings with all parameters using PUT. @@ -29,7 +29,7 @@ public static void disableAServerSAdvancedThreatProtectionSettingsWithAllParamet } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPutEnabled.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/AdvancedThreatProtectionSettingsPutEnabled.json */ /** * Sample code: Enable a server's Advanced Threat Protection settings using PUT. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsUpdateSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsUpdateSamples.java index 5ee317478658..ab2ff5c1d87a 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsUpdateSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class AdvancedThreatProtectionSettingsUpdateSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPatchDisabled.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/AdvancedThreatProtectionSettingsPatchDisabled.json */ /** * Sample code: Disable a server's Advanced Threat Protection settings with all parameters. @@ -29,7 +29,7 @@ public static void disableAServerSAdvancedThreatProtectionSettingsWithAllParamet } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPatchEnabled.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/AdvancedThreatProtectionSettingsPatchEnabled.json */ /** * Sample code: Enable a server's Advanced Threat Protection settings. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityExecuteSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityExecuteSamples.java index 9b32d1868594..4b50b88772f3 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityExecuteSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityExecuteSamples.java @@ -11,7 +11,7 @@ */ public final class CheckNameAvailabilityExecuteSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckNameAvailability.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CheckNameAvailability.json */ /** * Sample code: Check name availability. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityWithoutLocationExecuteSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityWithoutLocationExecuteSamples.java index bb718ca9be68..35dd20312967 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityWithoutLocationExecuteSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityWithoutLocationExecuteSamples.java @@ -11,7 +11,7 @@ */ public final class CheckNameAvailabilityWithoutLocationExecuteSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckNameAvailability.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CheckNameAvailability.json */ /** * Sample code: Check name availability. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckVirtualNetworkSubnetUsageExecuteSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckVirtualNetworkSubnetUsageExecuteSamples.java index 81314616303d..8d853e5d8567 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckVirtualNetworkSubnetUsageExecuteSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckVirtualNetworkSubnetUsageExecuteSamples.java @@ -11,7 +11,7 @@ */ public final class CheckVirtualNetworkSubnetUsageExecuteSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckVirtualNetworkSubnetUsage.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CheckVirtualNetworkSubnetUsage.json */ /** * Sample code: CheckVirtualNetworkSubnetUsage. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/GetPrivateDnsZoneSuffixExecuteSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/GetPrivateDnsZoneSuffixExecuteSamples.java index 71a1a3c83df3..b93e997bf8bd 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/GetPrivateDnsZoneSuffixExecuteSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/GetPrivateDnsZoneSuffixExecuteSamples.java @@ -9,7 +9,7 @@ */ public final class GetPrivateDnsZoneSuffixExecuteSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/GetPrivateDnsZoneSuffix.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/GetPrivateDnsZoneSuffix.json */ /** * Sample code: GetPrivateDnsZoneSuffix. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitiesListSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitiesListSamples.java index 56ece840fa23..1e3dce34956e 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitiesListSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitiesListSamples.java @@ -9,7 +9,7 @@ */ public final class LocationBasedCapabilitiesListSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitiesByLocationList.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CapabilitiesByLocationList.json */ /** * Sample code: CapabilitiesList. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitySetGetSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitySetGetSamples.java index fe78d99be17e..96dab12cd508 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitySetGetSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitySetGetSamples.java @@ -9,7 +9,7 @@ */ public final class LocationBasedCapabilitySetGetSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetByLocation.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CapabilitySetByLocation.json */ /** * Sample code: CapabilityResult. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitySetListSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitySetListSamples.java index d8cc8cd99fc5..a9d5c8de5bf6 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitySetListSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitySetListSamples.java @@ -9,7 +9,7 @@ */ public final class LocationBasedCapabilitySetListSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetListByLocation.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CapabilitySetListByLocation.json */ /** * Sample code: CapabilitySetsResult. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationProgressGetSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationProgressGetSamples.java index 45b3589aaecd..ba3f7fca979f 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationProgressGetSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationProgressGetSamples.java @@ -9,7 +9,7 @@ */ public final class OperationProgressGetSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationProgress_Get_BackupAndExport.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/OperationProgress_Get_BackupAndExport.json */ /** * Sample code: OperationProgress_Get BackupAndExport. @@ -23,7 +23,7 @@ public final class OperationProgressGetSamples { } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationProgress_Get_ImportFromStorage.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/OperationProgress_Get_ImportFromStorage.json */ /** * Sample code: OperationProgress_Get ImportFromStorage. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationResultsGetSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationResultsGetSamples.java index 1369cbc1a58f..619491642b1f 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationResultsGetSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationResultsGetSamples.java @@ -9,7 +9,7 @@ */ public final class OperationResultsGetSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationResults_Get.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/OperationResults_Get.json */ /** * Sample code: OperationResults_Get. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationsListSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationsListSamples.java index f8567056bb04..317ad448aed9 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationsListSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationsList.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/OperationsList.json */ /** * Sample code: OperationList. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ReplicasListByServerSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ReplicasListByServerSamples.java index 87c8fae1d8f1..9bb8a1e229cc 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ReplicasListByServerSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ReplicasListByServerSamples.java @@ -9,7 +9,7 @@ */ public final class ReplicasListByServerSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ReplicasListByServer.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ReplicasListByServer.json */ /** * Sample code: List replicas for a server. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersCreateSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersCreateSamples.java index 0584bfefe478..14060d84b1c7 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersCreateSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersCreateSamples.java @@ -19,6 +19,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.models.ServerSkuTier; import com.azure.resourcemanager.mysqlflexibleserver.models.ServerVersion; import com.azure.resourcemanager.mysqlflexibleserver.models.Storage; +import com.azure.resourcemanager.mysqlflexibleserver.models.StorageRedundancyEnum; import java.io.IOException; import java.time.OffsetDateTime; import java.util.HashMap; @@ -29,7 +30,7 @@ */ public final class ServersCreateSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreateReplica.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerCreateReplica.json */ /** * Sample code: Create a replica server. @@ -48,7 +49,7 @@ public static void createAReplicaServer(com.azure.resourcemanager.mysqlflexibles } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreate.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerCreate.json */ /** * Sample code: Create a new server. @@ -67,7 +68,10 @@ public static void createANewServer(com.azure.resourcemanager.mysqlflexibleserve .withVersion(ServerVersion.FIVE_SEVEN) .withAvailabilityZone("1") .withCreateMode(CreateMode.DEFAULT) - .withStorage(new Storage().withStorageSizeGB(100).withIops(600).withAutoGrow(EnableStatusEnum.DISABLED)) + .withStorage(new Storage().withStorageSizeGB(100) + .withIops(600) + .withAutoGrow(EnableStatusEnum.DISABLED) + .withStorageRedundancy(StorageRedundancyEnum.LOCAL_REDUNDANCY)) .withBackup(new Backup().withBackupRetentionDays(7) .withBackupIntervalHours(24) .withGeoRedundantBackup(EnableStatusEnum.DISABLED)) @@ -77,7 +81,7 @@ public static void createANewServer(com.azure.resourcemanager.mysqlflexibleserve } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreateWithBYOK.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerCreateWithBYOK.json */ /** * Sample code: Create a server with byok. @@ -109,7 +113,10 @@ public static void createAServerWithByok(com.azure.resourcemanager.mysqlflexible "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-geo-identity") .withGeoBackupKeyUri("fakeTokenPlaceholder") .withType(DataEncryptionType.AZURE_KEY_VAULT)) - .withStorage(new Storage().withStorageSizeGB(100).withIops(600).withAutoGrow(EnableStatusEnum.DISABLED)) + .withStorage(new Storage().withStorageSizeGB(100) + .withIops(600) + .withAutoGrow(EnableStatusEnum.DISABLED) + .withStorageRedundancy(StorageRedundancyEnum.LOCAL_REDUNDANCY)) .withBackup(new Backup().withBackupRetentionDays(7) .withBackupIntervalHours(24) .withGeoRedundantBackup(EnableStatusEnum.DISABLED)) @@ -119,7 +126,7 @@ public static void createAServerWithByok(com.azure.resourcemanager.mysqlflexible } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreateWithPointInTimeRestore.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerCreateWithPointInTimeRestore.json */ /** * Sample code: Create a server as a point in time restore. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersDeleteSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersDeleteSamples.java index 1fb774f9a094..38fb3d1744e0 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersDeleteSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ServersDeleteSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerDelete.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerDelete.json */ /** * Sample code: Delete a server. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersDetachVNetSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersDetachVNetSamples.java new file mode 100644 index 000000000000..fc8143a199eb --- /dev/null +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersDetachVNetSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mysqlflexibleserver.generated; + +import com.azure.resourcemanager.mysqlflexibleserver.models.EnableStatusEnum; +import com.azure.resourcemanager.mysqlflexibleserver.models.ServerDetachVNetParameter; + +/** + * Samples for Servers DetachVNet. + */ +public final class ServersDetachVNetSamples { + /* + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerDetachVNet.json + */ + /** + * Sample code: Detach VNet on a server. + * + * @param manager Entry point to MySqlManager. + */ + public static void detachVNetOnAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) { + manager.servers() + .detachVNet("TestGroup", "testserver", + new ServerDetachVNetParameter().withPublicNetworkAccess(EnableStatusEnum.ENABLED), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersFailoverSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersFailoverSamples.java index fd06cb923dea..a647d1ee3001 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersFailoverSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersFailoverSamples.java @@ -9,7 +9,7 @@ */ public final class ServersFailoverSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerFailover.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerFailover.json */ /** * Sample code: Restart a server. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersGetByResourceGroupSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersGetByResourceGroupSamples.java index 74890b118d97..1204cfd2dc59 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersGetByResourceGroupSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ServersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGetWithVnet.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerGetWithVnet.json */ /** * Sample code: Get a server with vnet. @@ -21,7 +21,7 @@ public static void getAServerWithVnet(com.azure.resourcemanager.mysqlflexibleser } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGet.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerGet.json */ /** * Sample code: Get a server. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersListByResourceGroupSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersListByResourceGroupSamples.java index cd36b4c11ec4..e69c5a603459 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersListByResourceGroupSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ServersListByResourceGroupSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServersListByResourceGroup.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServersListByResourceGroup.json */ /** * Sample code: List servers in a resource group. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersListSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersListSamples.java index aa40f1c894b9..3223efd1e586 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersListSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersListSamples.java @@ -9,7 +9,7 @@ */ public final class ServersListSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServersList.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServersList.json */ /** * Sample code: List servers in a subscription. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersMigrationCutoverMigrationSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersMigrationCutoverMigrationSamples.java index 67835ecb542e..7e53b61bf13c 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersMigrationCutoverMigrationSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersMigrationCutoverMigrationSamples.java @@ -9,7 +9,7 @@ */ public final class ServersMigrationCutoverMigrationSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/CutoverMigration.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/CutoverMigration.json */ /** * Sample code: Cutover migration for MySQL import. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersResetGtidSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersResetGtidSamples.java index 20af02dc325f..26ff03ac4bb2 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersResetGtidSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersResetGtidSamples.java @@ -11,7 +11,7 @@ */ public final class ServersResetGtidSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerResetGtid.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerResetGtid.json */ /** * Sample code: Reset GTID on a server. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersRestartSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersRestartSamples.java index 878f393009da..6e6fd373d543 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersRestartSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersRestartSamples.java @@ -12,7 +12,7 @@ */ public final class ServersRestartSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerRestart.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerRestart.json */ /** * Sample code: Restart a server. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStartSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStartSamples.java index 301990845c23..9e3bb1ef24f6 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStartSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStartSamples.java @@ -9,7 +9,7 @@ */ public final class ServersStartSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerStart.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerStart.json */ /** * Sample code: Start a server. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStopSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStopSamples.java index df260eed4e50..bb4ce16c4c37 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStopSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStopSamples.java @@ -9,7 +9,7 @@ */ public final class ServersStopSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerStop.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerStop.json */ /** * Sample code: Stop a server. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersUpdateSamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersUpdateSamples.java index b48f683df36d..0ca3268e9353 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersUpdateSamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersUpdateSamples.java @@ -24,7 +24,7 @@ */ public final class ServersUpdateSamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithCustomerMaintenanceWindow.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json */ /** * Sample code: Update server customer maintenance window. @@ -45,7 +45,7 @@ public final class ServersUpdateSamples { } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithBYOK.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerUpdateWithBYOK.json */ /** * Sample code: Update server with byok. @@ -74,7 +74,7 @@ public static void updateServerWithByok(com.azure.resourcemanager.mysqlflexibles } /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdate.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerUpdate.json */ /** * Sample code: Update a server. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersValidateEstimateHighAvailabilitySamples.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersValidateEstimateHighAvailabilitySamples.java index bba61c6b7787..6f4b6005a6b1 100644 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersValidateEstimateHighAvailabilitySamples.java +++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersValidateEstimateHighAvailabilitySamples.java @@ -11,7 +11,7 @@ */ public final class ServersValidateEstimateHighAvailabilitySamples { /* - * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerValidateEstimateHighAvailability.json + * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2024-02-01-preview/examples/ServerValidateEstimateHighAvailability.json */ /** * Sample code: Validate a validation and estimation of high availability. diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdministratorListResultTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdministratorListResultTests.java deleted file mode 100644 index 0ad909cd176d..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdministratorListResultTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AzureADAdministratorInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorListResult; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AdministratorListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdministratorListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"administratorType\":\"ActiveDirectory\",\"login\":\"dznrbtcqq\",\"sid\":\"qglhq\",\"tenantId\":\"ufo\",\"identityResourceId\":\"jywif\"},\"id\":\"esaagdfm\",\"name\":\"lzl\",\"type\":\"j\"}],\"nextLink\":\"ifkwmrvktsizntoc\"}") - .toObject(AdministratorListResult.class); - Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, model.value().get(0).administratorType()); - Assertions.assertEquals("dznrbtcqq", model.value().get(0).login()); - Assertions.assertEquals("qglhq", model.value().get(0).sid()); - Assertions.assertEquals("ufo", model.value().get(0).tenantId()); - Assertions.assertEquals("jywif", model.value().get(0).identityResourceId()); - Assertions.assertEquals("ifkwmrvktsizntoc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdministratorListResult model = new AdministratorListResult().withValue( - Arrays.asList(new AzureADAdministratorInner().withAdministratorType(AdministratorType.ACTIVE_DIRECTORY) - .withLogin("dznrbtcqq") - .withSid("qglhq") - .withTenantId("ufo") - .withIdentityResourceId("jywif"))) - .withNextLink("ifkwmrvktsizntoc"); - model = BinaryData.fromObject(model).toObject(AdministratorListResult.class); - Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, model.value().get(0).administratorType()); - Assertions.assertEquals("dznrbtcqq", model.value().get(0).login()); - Assertions.assertEquals("qglhq", model.value().get(0).sid()); - Assertions.assertEquals("ufo", model.value().get(0).tenantId()); - Assertions.assertEquals("jywif", model.value().get(0).identityResourceId()); - Assertions.assertEquals("ifkwmrvktsizntoc", model.nextLink()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdministratorPropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdministratorPropertiesTests.java deleted file mode 100644 index f1cb2725ad95..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdministratorPropertiesTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdministratorProperties; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorType; -import org.junit.jupiter.api.Assertions; - -public final class AdministratorPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdministratorProperties model = BinaryData.fromString( - "{\"administratorType\":\"ActiveDirectory\",\"login\":\"muf\",\"sid\":\"wnoi\",\"tenantId\":\"wlrxyb\",\"identityResourceId\":\"oqijgkdmbpaz\"}") - .toObject(AdministratorProperties.class); - Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, model.administratorType()); - Assertions.assertEquals("muf", model.login()); - Assertions.assertEquals("wnoi", model.sid()); - Assertions.assertEquals("wlrxyb", model.tenantId()); - Assertions.assertEquals("oqijgkdmbpaz", model.identityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdministratorProperties model - = new AdministratorProperties().withAdministratorType(AdministratorType.ACTIVE_DIRECTORY) - .withLogin("muf") - .withSid("wnoi") - .withTenantId("wlrxyb") - .withIdentityResourceId("oqijgkdmbpaz"); - model = BinaryData.fromObject(model).toObject(AdministratorProperties.class); - Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, model.administratorType()); - Assertions.assertEquals("muf", model.login()); - Assertions.assertEquals("wnoi", model.sid()); - Assertions.assertEquals("wlrxyb", model.tenantId()); - Assertions.assertEquals("oqijgkdmbpaz", model.identityResourceId()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionForUpdateTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionForUpdateTests.java deleted file mode 100644 index 42f6b4ec1ee0..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionForUpdateTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionForUpdate; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState; -import org.junit.jupiter.api.Assertions; - -public final class AdvancedThreatProtectionForUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdvancedThreatProtectionForUpdate model = BinaryData.fromString("{\"properties\":{\"state\":\"Enabled\"}}") - .toObject(AdvancedThreatProtectionForUpdate.class); - Assertions.assertEquals(AdvancedThreatProtectionState.ENABLED, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdvancedThreatProtectionForUpdate model - = new AdvancedThreatProtectionForUpdate().withState(AdvancedThreatProtectionState.ENABLED); - model = BinaryData.fromObject(model).toObject(AdvancedThreatProtectionForUpdate.class); - Assertions.assertEquals(AdvancedThreatProtectionState.ENABLED, model.state()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionInnerTests.java deleted file mode 100644 index 329577495d1d..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState; -import org.junit.jupiter.api.Assertions; - -public final class AdvancedThreatProtectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdvancedThreatProtectionInner model = BinaryData.fromString( - "{\"properties\":{\"creationTime\":\"2021-01-11T01:27:45Z\",\"state\":\"Disabled\",\"provisioningState\":\"Updating\"},\"id\":\"uugidyjrrfby\",\"name\":\"osvexcsonpclhoc\",\"type\":\"hslkevleggzf\"}") - .toObject(AdvancedThreatProtectionInner.class); - Assertions.assertEquals(AdvancedThreatProtectionState.DISABLED, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdvancedThreatProtectionInner model - = new AdvancedThreatProtectionInner().withState(AdvancedThreatProtectionState.DISABLED); - model = BinaryData.fromObject(model).toObject(AdvancedThreatProtectionInner.class); - Assertions.assertEquals(AdvancedThreatProtectionState.DISABLED, model.state()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionListResultTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionListResultTests.java deleted file mode 100644 index 615ffbf286ce..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionListResultTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionListResult; - -public final class AdvancedThreatProtectionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdvancedThreatProtectionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"creationTime\":\"2021-04-21T05:15:54Z\",\"state\":\"Enabled\",\"provisioningState\":\"Updating\"},\"id\":\"ez\",\"name\":\"v\",\"type\":\"hxmzsbbzoggig\"},{\"properties\":{\"creationTime\":\"2021-05-16T13:08:42Z\",\"state\":\"Enabled\",\"provisioningState\":\"Succeeded\"},\"id\":\"xjnspy\",\"name\":\"ptkoenkoukn\",\"type\":\"udwtiukbl\"},{\"properties\":{\"creationTime\":\"2021-09-16T17:03:50Z\",\"state\":\"Disabled\",\"provisioningState\":\"Failed\"},\"id\":\"azyxoegukg\",\"name\":\"npiucgygevqznty\",\"type\":\"mrbpizcdrqj\"}],\"nextLink\":\"pyd\"}") - .toObject(AdvancedThreatProtectionListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdvancedThreatProtectionListResult model = new AdvancedThreatProtectionListResult(); - model = BinaryData.fromObject(model).toObject(AdvancedThreatProtectionListResult.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionPropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionPropertiesTests.java deleted file mode 100644 index 38f2e50e379f..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionPropertiesTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionProperties; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState; -import org.junit.jupiter.api.Assertions; - -public final class AdvancedThreatProtectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdvancedThreatProtectionProperties model = BinaryData - .fromString( - "{\"creationTime\":\"2021-03-12T21:42:40Z\",\"state\":\"Disabled\",\"provisioningState\":\"Canceled\"}") - .toObject(AdvancedThreatProtectionProperties.class); - Assertions.assertEquals(AdvancedThreatProtectionState.DISABLED, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdvancedThreatProtectionProperties model - = new AdvancedThreatProtectionProperties().withState(AdvancedThreatProtectionState.DISABLED); - model = BinaryData.fromObject(model).toObject(AdvancedThreatProtectionProperties.class); - Assertions.assertEquals(AdvancedThreatProtectionState.DISABLED, model.state()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetWithResponseMockTests.java deleted file mode 100644 index 8fd68cbb278f..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsGetWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtection; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionName; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AdvancedThreatProtectionSettingsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"creationTime\":\"2021-07-23T04:24:07Z\",\"state\":\"Disabled\",\"provisioningState\":\"Canceled\"},\"id\":\"k\",\"name\":\"reljeamur\",\"type\":\"zmlovuanash\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AdvancedThreatProtection response = manager.advancedThreatProtectionSettings() - .getWithResponse("lrpiqywnc", "jtszcof", AdvancedThreatProtectionName.DEFAULT, - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(AdvancedThreatProtectionState.DISABLED, response.state()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsListMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsListMockTests.java deleted file mode 100644 index 4aa0bbb63bdc..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsListMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtection; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AdvancedThreatProtectionSettingsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"creationTime\":\"2021-05-02T07:59:23Z\",\"state\":\"Enabled\",\"provisioningState\":\"Canceled\"},\"id\":\"lwexxwl\",\"name\":\"lniexz\",\"type\":\"rzpgep\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.advancedThreatProtectionSettings().list("wyh", "hnomdrkywuh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(AdvancedThreatProtectionState.ENABLED, response.iterator().next().state()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsUpdateMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsUpdateMockTests.java deleted file mode 100644 index 674cd106b7d9..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsUpdateMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtection; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionForUpdate; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionName; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AdvancedThreatProtectionSettingsUpdateMockTests { - @Test - public void testUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"creationTime\":\"2021-12-03T21:14:10Z\",\"state\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"id\":\"ccxjm\",\"name\":\"nfdgn\",\"type\":\"n\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AdvancedThreatProtection response = manager.advancedThreatProtectionSettings() - .update("xlpm", "erbdk", AdvancedThreatProtectionName.DEFAULT, - new AdvancedThreatProtectionForUpdate().withState(AdvancedThreatProtectionState.DISABLED), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals(AdvancedThreatProtectionState.DISABLED, response.state()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsUpdatePutMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsUpdatePutMockTests.java deleted file mode 100644 index 2d6c0da9ff0e..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionSettingsUpdatePutMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtection; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionName; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AdvancedThreatProtectionSettingsUpdatePutMockTests { - @Test - public void testUpdatePut() throws Exception { - String responseStr - = "{\"properties\":{\"creationTime\":\"2021-10-05T14:09:35Z\",\"state\":\"Enabled\",\"provisioningState\":\"Succeeded\"},\"id\":\"zab\",\"name\":\"elawumu\",\"type\":\"slzkwrrwoycqu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AdvancedThreatProtection response = manager.advancedThreatProtectionSettings() - .updatePut("ypuuwwltvuqjctze", "keifzzhmkdasv", AdvancedThreatProtectionName.DEFAULT, - new AdvancedThreatProtectionInner().withState(AdvancedThreatProtectionState.ENABLED), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals(AdvancedThreatProtectionState.ENABLED, response.state()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionUpdatePropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionUpdatePropertiesTests.java deleted file mode 100644 index e084764290dc..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AdvancedThreatProtectionUpdatePropertiesTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionUpdateProperties; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState; -import org.junit.jupiter.api.Assertions; - -public final class AdvancedThreatProtectionUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdvancedThreatProtectionUpdateProperties model - = BinaryData.fromString("{\"state\":\"Enabled\"}").toObject(AdvancedThreatProtectionUpdateProperties.class); - Assertions.assertEquals(AdvancedThreatProtectionState.ENABLED, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdvancedThreatProtectionUpdateProperties model - = new AdvancedThreatProtectionUpdateProperties().withState(AdvancedThreatProtectionState.ENABLED); - model = BinaryData.fromObject(model).toObject(AdvancedThreatProtectionUpdateProperties.class); - Assertions.assertEquals(AdvancedThreatProtectionState.ENABLED, model.state()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorInnerTests.java deleted file mode 100644 index a1398f051763..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AzureADAdministratorInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorType; -import org.junit.jupiter.api.Assertions; - -public final class AzureADAdministratorInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureADAdministratorInner model = BinaryData.fromString( - "{\"properties\":{\"administratorType\":\"ActiveDirectory\",\"login\":\"uv\",\"sid\":\"xpyb\",\"tenantId\":\"m\",\"identityResourceId\":\"mtz\"},\"id\":\"bsphrupidgsybbe\",\"name\":\"hphoycm\",\"type\":\"xaobhdxbmtqioqjz\"}") - .toObject(AzureADAdministratorInner.class); - Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, model.administratorType()); - Assertions.assertEquals("uv", model.login()); - Assertions.assertEquals("xpyb", model.sid()); - Assertions.assertEquals("m", model.tenantId()); - Assertions.assertEquals("mtz", model.identityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureADAdministratorInner model - = new AzureADAdministratorInner().withAdministratorType(AdministratorType.ACTIVE_DIRECTORY) - .withLogin("uv") - .withSid("xpyb") - .withTenantId("m") - .withIdentityResourceId("mtz"); - model = BinaryData.fromObject(model).toObject(AzureADAdministratorInner.class); - Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, model.administratorType()); - Assertions.assertEquals("uv", model.login()); - Assertions.assertEquals("xpyb", model.sid()); - Assertions.assertEquals("m", model.tenantId()); - Assertions.assertEquals("mtz", model.identityResourceId()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsCreateOrUpdateMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsCreateOrUpdateMockTests.java deleted file mode 100644 index 9593fadb7ffa..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsCreateOrUpdateMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorName; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorType; -import com.azure.resourcemanager.mysqlflexibleserver.models.AzureADAdministrator; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AzureADAdministratorsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"administratorType\":\"ActiveDirectory\",\"login\":\"dlwwqfbumlkxt\",\"sid\":\"jfsmlmbtxhwgfwsr\",\"tenantId\":\"wcoezbrhub\",\"identityResourceId\":\"hud\"},\"id\":\"oookkqfq\",\"name\":\"bvleorfmluiqtqzf\",\"type\":\"vyvnqqyb\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AzureADAdministrator response = manager.azureADAdministrators() - .define(AdministratorName.ACTIVE_DIRECTORY) - .withExistingFlexibleServer("vpkjpr", "kwcf") - .withAdministratorType(AdministratorType.ACTIVE_DIRECTORY) - .withLogin("gtczheydb") - .withSid("shmkxmaehvbbxur") - .withTenantId("ltfnhtbaxkgx") - .withIdentityResourceId("rc") - .create(); - - Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, response.administratorType()); - Assertions.assertEquals("dlwwqfbumlkxt", response.login()); - Assertions.assertEquals("jfsmlmbtxhwgfwsr", response.sid()); - Assertions.assertEquals("wcoezbrhub", response.tenantId()); - Assertions.assertEquals("hud", response.identityResourceId()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsDeleteMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsDeleteMockTests.java deleted file mode 100644 index ca17d9c5bf30..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsDeleteMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorName; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AzureADAdministratorsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.azureADAdministrators() - .delete("sutrgjup", "uutpwoqhih", AdministratorName.ACTIVE_DIRECTORY, com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsGetWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsGetWithResponseMockTests.java deleted file mode 100644 index 614efdcd359b..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsGetWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorName; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorType; -import com.azure.resourcemanager.mysqlflexibleserver.models.AzureADAdministrator; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AzureADAdministratorsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"administratorType\":\"ActiveDirectory\",\"login\":\"kslircizjxvydfc\",\"sid\":\"cvlhv\",\"tenantId\":\"dyftumrtwna\",\"identityResourceId\":\"slbi\"},\"id\":\"ojgcyzt\",\"name\":\"fmznba\",\"type\":\"qphchqnrnrpxehuw\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AzureADAdministrator response = manager.azureADAdministrators() - .getWithResponse("qg", "zpnfqntcypsxj", AdministratorName.ACTIVE_DIRECTORY, - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, response.administratorType()); - Assertions.assertEquals("kslircizjxvydfc", response.login()); - Assertions.assertEquals("cvlhv", response.sid()); - Assertions.assertEquals("dyftumrtwna", response.tenantId()); - Assertions.assertEquals("slbi", response.identityResourceId()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsListByServerMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsListByServerMockTests.java deleted file mode 100644 index 19be3b8c1e57..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/AzureADAdministratorsListByServerMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorType; -import com.azure.resourcemanager.mysqlflexibleserver.models.AzureADAdministrator; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AzureADAdministratorsListByServerMockTests { - @Test - public void testListByServer() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"administratorType\":\"ActiveDirectory\",\"login\":\"srhnjivo\",\"sid\":\"tnovqfzgemjdftul\",\"tenantId\":\"tduceamt\",\"identityResourceId\":\"zuo\"},\"id\":\"jw\",\"name\":\"w\",\"type\":\"qioknssxmojm\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.azureADAdministrators() - .listByServer("ykqgaifmvik", "bydvkhbejdz", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(AdministratorType.ACTIVE_DIRECTORY, response.iterator().next().administratorType()); - Assertions.assertEquals("srhnjivo", response.iterator().next().login()); - Assertions.assertEquals("tnovqfzgemjdftul", response.iterator().next().sid()); - Assertions.assertEquals("tduceamt", response.iterator().next().tenantId()); - Assertions.assertEquals("zuo", response.iterator().next().identityResourceId()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportRequestTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportRequestTests.java deleted file mode 100644 index c324ccfed6eb..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportRequestTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExportRequest; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupFormat; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupSettings; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupStoreDetails; -import org.junit.jupiter.api.Assertions; - -public final class BackupAndExportRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupAndExportRequest model = BinaryData.fromString( - "{\"targetDetails\":{\"objectType\":\"BackupStoreDetails\"},\"backupSettings\":{\"backupName\":\"ixjsprozvcputeg\",\"backupFormat\":\"Raw\"}}") - .toObject(BackupAndExportRequest.class); - Assertions.assertEquals("ixjsprozvcputeg", model.backupSettings().backupName()); - Assertions.assertEquals(BackupFormat.RAW, model.backupSettings().backupFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupAndExportRequest model = new BackupAndExportRequest() - .withBackupSettings( - new BackupSettings().withBackupName("ixjsprozvcputeg").withBackupFormat(BackupFormat.RAW)) - .withTargetDetails(new BackupStoreDetails()); - model = BinaryData.fromObject(model).toObject(BackupAndExportRequest.class); - Assertions.assertEquals("ixjsprozvcputeg", model.backupSettings().backupName()); - Assertions.assertEquals(BackupFormat.RAW, model.backupSettings().backupFormat()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportResponseInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportResponseInnerTests.java deleted file mode 100644 index 9bdea271a92a..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportResponseInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.BackupAndExportResponseInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatus; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class BackupAndExportResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupAndExportResponseInner model = BinaryData.fromString( - "{\"status\":\"CancelInProgress\",\"startTime\":\"2021-01-15T00:39:28Z\",\"endTime\":\"2021-04-04T07:45:50Z\",\"percentComplete\":13.198921536177277,\"properties\":{\"datasourceSizeInBytes\":8699509419424523906,\"dataTransferredInBytes\":7670793912698215607,\"backupMetadata\":\"jdpvwryo\"},\"id\":\"oacctaza\",\"name\":\"ljlahbcryf\",\"type\":\"dfdosygexp\"}") - .toObject(BackupAndExportResponseInner.class); - Assertions.assertEquals(OperationStatus.CANCEL_IN_PROGRESS, model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-15T00:39:28Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-04T07:45:50Z"), model.endTime()); - Assertions.assertEquals(13.198921536177277D, model.percentComplete()); - Assertions.assertEquals(8699509419424523906L, model.datasourceSizeInBytes()); - Assertions.assertEquals(7670793912698215607L, model.dataTransferredInBytes()); - Assertions.assertEquals("jdpvwryo", model.backupMetadata()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupAndExportResponseInner model - = new BackupAndExportResponseInner().withStatus(OperationStatus.CANCEL_IN_PROGRESS) - .withStartTime(OffsetDateTime.parse("2021-01-15T00:39:28Z")) - .withEndTime(OffsetDateTime.parse("2021-04-04T07:45:50Z")) - .withPercentComplete(13.198921536177277D) - .withDatasourceSizeInBytes(8699509419424523906L) - .withDataTransferredInBytes(7670793912698215607L) - .withBackupMetadata("jdpvwryo"); - model = BinaryData.fromObject(model).toObject(BackupAndExportResponseInner.class); - Assertions.assertEquals(OperationStatus.CANCEL_IN_PROGRESS, model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-15T00:39:28Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-04T07:45:50Z"), model.endTime()); - Assertions.assertEquals(13.198921536177277D, model.percentComplete()); - Assertions.assertEquals(8699509419424523906L, model.datasourceSizeInBytes()); - Assertions.assertEquals(7670793912698215607L, model.dataTransferredInBytes()); - Assertions.assertEquals("jdpvwryo", model.backupMetadata()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportResponsePropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportResponsePropertiesTests.java deleted file mode 100644 index 3f05837223af..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportResponsePropertiesTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.BackupAndExportResponseProperties; -import org.junit.jupiter.api.Assertions; - -public final class BackupAndExportResponsePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupAndExportResponseProperties model = BinaryData.fromString( - "{\"datasourceSizeInBytes\":1611067142281819203,\"dataTransferredInBytes\":6882855101699701523,\"backupMetadata\":\"bzjhcrzevdp\"}") - .toObject(BackupAndExportResponseProperties.class); - Assertions.assertEquals(1611067142281819203L, model.datasourceSizeInBytes()); - Assertions.assertEquals(6882855101699701523L, model.dataTransferredInBytes()); - Assertions.assertEquals("bzjhcrzevdp", model.backupMetadata()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupAndExportResponseProperties model - = new BackupAndExportResponseProperties().withDatasourceSizeInBytes(1611067142281819203L) - .withDataTransferredInBytes(6882855101699701523L) - .withBackupMetadata("bzjhcrzevdp"); - model = BinaryData.fromObject(model).toObject(BackupAndExportResponseProperties.class); - Assertions.assertEquals(1611067142281819203L, model.datasourceSizeInBytes()); - Assertions.assertEquals(6882855101699701523L, model.dataTransferredInBytes()); - Assertions.assertEquals("bzjhcrzevdp", model.backupMetadata()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportResponseTypeTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportResponseTypeTests.java deleted file mode 100644 index ce2bb1d86e06..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportResponseTypeTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExportResponseType; -import org.junit.jupiter.api.Assertions; - -public final class BackupAndExportResponseTypeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupAndExportResponseType model = BinaryData.fromString( - "{\"objectType\":\"BackupAndExportResponse\",\"datasourceSizeInBytes\":5028173088217913035,\"dataTransferredInBytes\":2004834361163016327,\"backupMetadata\":\"lw\"}") - .toObject(BackupAndExportResponseType.class); - Assertions.assertEquals(5028173088217913035L, model.datasourceSizeInBytes()); - Assertions.assertEquals(2004834361163016327L, model.dataTransferredInBytes()); - Assertions.assertEquals("lw", model.backupMetadata()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupAndExportResponseType model - = new BackupAndExportResponseType().withDatasourceSizeInBytes(5028173088217913035L) - .withDataTransferredInBytes(2004834361163016327L) - .withBackupMetadata("lw"); - model = BinaryData.fromObject(model).toObject(BackupAndExportResponseType.class); - Assertions.assertEquals(5028173088217913035L, model.datasourceSizeInBytes()); - Assertions.assertEquals(2004834361163016327L, model.dataTransferredInBytes()); - Assertions.assertEquals("lw", model.backupMetadata()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportsCreateMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportsCreateMockTests.java deleted file mode 100644 index c80dc4b7454d..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportsCreateMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExportRequest; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExportResponse; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupFormat; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupSettings; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupStoreDetails; -import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupAndExportsCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"status\":\"Succeeded\",\"startTime\":\"2021-03-25T23:54:59Z\",\"endTime\":\"2021-08-09T20:51:46Z\",\"percentComplete\":80.53391473097852,\"properties\":{\"datasourceSizeInBytes\":7194165159471944548,\"dataTransferredInBytes\":6966224071626794024,\"backupMetadata\":\"jeknizshq\"},\"id\":\"m\",\"name\":\"ev\",\"type\":\"gmblrri\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BackupAndExportResponse response = manager.backupAndExports() - .create("xmsivfomiloxggdu", "iqndieuzaofj", - new BackupAndExportRequest() - .withBackupSettings( - new BackupSettings().withBackupName("hvcyyysfg").withBackupFormat(BackupFormat.RAW)) - .withTargetDetails(new BackupStoreDetails()), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals(OperationStatus.SUCCEEDED, response.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-25T23:54:59Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-09T20:51:46Z"), response.endTime()); - Assertions.assertEquals(80.53391473097852D, response.percentComplete()); - Assertions.assertEquals(7194165159471944548L, response.datasourceSizeInBytes()); - Assertions.assertEquals(6966224071626794024L, response.dataTransferredInBytes()); - Assertions.assertEquals("jeknizshq", response.backupMetadata()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportsValidateBackupWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportsValidateBackupWithResponseMockTests.java deleted file mode 100644 index 3df7a0fa5a4e..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupAndExportsValidateBackupWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.ValidateBackupResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupAndExportsValidateBackupWithResponseMockTests { - @Test - public void testValidateBackupWithResponse() throws Exception { - String responseStr = "{\"properties\":{\"numberOfContainers\":1296747978}}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ValidateBackupResponse response = manager.backupAndExports() - .validateBackupWithResponse("bywdxsmicc", "rwfscjfnynszquj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(1296747978, response.numberOfContainers()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupRequestBaseTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupRequestBaseTests.java deleted file mode 100644 index 9d4402068254..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupRequestBaseTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupFormat; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupRequestBase; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupSettings; -import org.junit.jupiter.api.Assertions; - -public final class BackupRequestBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupRequestBase model - = BinaryData.fromString("{\"backupSettings\":{\"backupName\":\"mfdatscmdvpj\",\"backupFormat\":\"Raw\"}}") - .toObject(BackupRequestBase.class); - Assertions.assertEquals("mfdatscmdvpj", model.backupSettings().backupName()); - Assertions.assertEquals(BackupFormat.RAW, model.backupSettings().backupFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupRequestBase model = new BackupRequestBase() - .withBackupSettings(new BackupSettings().withBackupName("mfdatscmdvpj").withBackupFormat(BackupFormat.RAW)); - model = BinaryData.fromObject(model).toObject(BackupRequestBase.class); - Assertions.assertEquals("mfdatscmdvpj", model.backupSettings().backupName()); - Assertions.assertEquals(BackupFormat.RAW, model.backupSettings().backupFormat()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupSettingsTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupSettingsTests.java deleted file mode 100644 index dc90d09ba0a9..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupSettingsTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupFormat; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupSettings; -import org.junit.jupiter.api.Assertions; - -public final class BackupSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupSettings model = BinaryData.fromString("{\"backupName\":\"suuv\",\"backupFormat\":\"Raw\"}") - .toObject(BackupSettings.class); - Assertions.assertEquals("suuv", model.backupName()); - Assertions.assertEquals(BackupFormat.RAW, model.backupFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupSettings model = new BackupSettings().withBackupName("suuv").withBackupFormat(BackupFormat.RAW); - model = BinaryData.fromObject(model).toObject(BackupSettings.class); - Assertions.assertEquals("suuv", model.backupName()); - Assertions.assertEquals(BackupFormat.RAW, model.backupFormat()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupStoreDetailsTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupStoreDetailsTests.java deleted file mode 100644 index 730d5eb543ac..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupStoreDetailsTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupStoreDetails; - -public final class BackupStoreDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupStoreDetails model - = BinaryData.fromString("{\"objectType\":\"BackupStoreDetails\"}").toObject(BackupStoreDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupStoreDetails model = new BackupStoreDetails(); - model = BinaryData.fromObject(model).toObject(BackupStoreDetails.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupTests.java deleted file mode 100644 index 49d95a1d085d..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.Backup; -import com.azure.resourcemanager.mysqlflexibleserver.models.EnableStatusEnum; -import org.junit.jupiter.api.Assertions; - -public final class BackupTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Backup model = BinaryData.fromString( - "{\"backupRetentionDays\":979245449,\"backupIntervalHours\":932144959,\"geoRedundantBackup\":\"Enabled\",\"earliestRestoreDate\":\"2021-07-23T14:25:25Z\"}") - .toObject(Backup.class); - Assertions.assertEquals(979245449, model.backupRetentionDays()); - Assertions.assertEquals(932144959, model.backupIntervalHours()); - Assertions.assertEquals(EnableStatusEnum.ENABLED, model.geoRedundantBackup()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Backup model = new Backup().withBackupRetentionDays(979245449) - .withBackupIntervalHours(932144959) - .withGeoRedundantBackup(EnableStatusEnum.ENABLED); - model = BinaryData.fromObject(model).toObject(Backup.class); - Assertions.assertEquals(979245449, model.backupRetentionDays()); - Assertions.assertEquals(932144959, model.backupIntervalHours()); - Assertions.assertEquals(EnableStatusEnum.ENABLED, model.geoRedundantBackup()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsGetWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsGetWithResponseMockTests.java deleted file mode 100644 index e02ac2c592b6..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsGetWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerBackup; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"backupType\":\"rds\",\"completedTime\":\"2021-11-25T19:54:22Z\",\"source\":\"a\"},\"id\":\"juohminyflnorw\",\"name\":\"duvwpklvxwmygd\",\"type\":\"pgpqchiszepnnb\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ServerBackup response = manager.backups() - .getWithResponse("v", "jjziuxxpsh", "eekulfgslqubkwd", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rds", response.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-25T19:54:22Z"), response.completedTime()); - Assertions.assertEquals("a", response.source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsListByServerMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsListByServerMockTests.java deleted file mode 100644 index 320f3bdb246e..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsListByServerMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerBackup; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupsListByServerMockTests { - @Test - public void testListByServer() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"backupType\":\"kokwbqplhlvnu\",\"completedTime\":\"2021-08-29T14:02:44Z\",\"source\":\"lrphwzsoldw\"},\"id\":\"uqdunvmnnrwrbi\",\"name\":\"rk\",\"type\":\"alywjhhgdn\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.backups().listByServer("crxgibb", "axconfozauo", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kokwbqplhlvnu", response.iterator().next().backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-29T14:02:44Z"), - response.iterator().next().completedTime()); - Assertions.assertEquals("lrphwzsoldw", response.iterator().next().source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsPutWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsPutWithResponseMockTests.java deleted file mode 100644 index 68593d273129..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/BackupsPutWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerBackup; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupsPutWithResponseMockTests { - @Test - public void testPutWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"backupType\":\"hwagohbuffkmrqe\",\"completedTime\":\"2021-08-30T07:57:15Z\",\"source\":\"mxtd\"},\"id\":\"futacoebjvewzc\",\"name\":\"znmwcp\",\"type\":\"guaadraufactkahz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ServerBackup response = manager.backups() - .putWithResponse("ryeu", "yjkqabqgzslesjcb", "ernntiewdjcvbquw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hwagohbuffkmrqe", response.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-30T07:57:15Z"), response.completedTime()); - Assertions.assertEquals("mxtd", response.source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilitiesListResultTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilitiesListResultTests.java deleted file mode 100644 index fb2dec7f7e69..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilitiesListResultTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.CapabilitiesListResult; - -public final class CapabilitiesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CapabilitiesListResult model = BinaryData.fromString( - "{\"value\":[{\"zone\":\"htxfvgxbfsmxnehm\",\"supportedHAMode\":[\"cxgod\"],\"supportedGeoBackupRegions\":[\"qkkrb\",\"pukgriwflzlfb\"],\"supportedFlexibleServerEditions\":[{\"name\":\"zycispn\",\"supportedStorageEditions\":[{},{}],\"supportedServerVersions\":[{},{},{},{}]}]},{\"zone\":\"kbrpyydhibnuq\",\"supportedHAMode\":[\"ik\",\"drgvtqagn\"],\"supportedGeoBackupRegions\":[\"nhijggmebfsi\",\"rbu\",\"rcvpnazzmhjrunmp\"],\"supportedFlexibleServerEditions\":[{\"name\":\"bh\",\"supportedStorageEditions\":[{},{},{}],\"supportedServerVersions\":[{},{},{},{}]},{\"name\":\"kx\",\"supportedStorageEditions\":[{},{},{},{}],\"supportedServerVersions\":[{}]},{\"name\":\"henbtkcxywnytn\",\"supportedStorageEditions\":[{}],\"supportedServerVersions\":[{},{}]}]}],\"nextLink\":\"idybyxczf\"}") - .toObject(CapabilitiesListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapabilitiesListResult model = new CapabilitiesListResult(); - model = BinaryData.fromObject(model).toObject(CapabilitiesListResult.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilityInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilityInnerTests.java deleted file mode 100644 index 478afca567af..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilityInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.CapabilityInner; - -public final class CapabilityInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CapabilityInner model = BinaryData.fromString( - "{\"properties\":{\"supportedGeoBackupRegions\":[\"nvdfznuda\",\"dvxzbncblylpst\"],\"supportedFlexibleServerEditions\":[{\"name\":\"xsrz\",\"defaultSku\":\"ucerscdntnevfi\",\"defaultStorageSize\":263424871,\"supportedStorageEditions\":[{\"name\":\"dsslswt\",\"minStorageSize\":2056289881259732229,\"maxStorageSize\":3002295961372287593,\"minBackupRetentionDays\":3838355662332369134,\"maxBackupRetentionDays\":278602062181043692,\"minBackupIntervalHours\":3031189045317713904,\"maxBackupIntervalHours\":1043705890130605382},{\"name\":\"shhszhedplvwiw\",\"minStorageSize\":5954256470924053465,\"maxStorageSize\":8861670198511757019,\"minBackupRetentionDays\":3960362302200557270,\"maxBackupRetentionDays\":474639564568269897,\"minBackupIntervalHours\":9162330639147377970,\"maxBackupIntervalHours\":6996015407661494971},{\"name\":\"cxogaokonzm\",\"minStorageSize\":2991398819380628456,\"maxStorageSize\":8469142941370576820,\"minBackupRetentionDays\":2221156921299108498,\"maxBackupRetentionDays\":6982212660039446401,\"minBackupIntervalHours\":224635698093358655,\"maxBackupIntervalHours\":983283652300546434}],\"supportedSkus\":[{\"name\":\"v\",\"vCores\":1361117454482820932,\"supportedIops\":7509689601441927537,\"supportedMemoryPerVCoreMB\":5348764871527965692,\"supportedZones\":[\"agxti\",\"qdxbxwa\",\"bogqxndlkzgxhu\"],\"supportedHAMode\":[\"lbpodxunk\",\"ebxmubyynt\",\"lrb\"]}]}],\"supportedServerVersions\":[{\"name\":\"ievseotgqrllt\"},{\"name\":\"wlauwzizxbmpg\"}]},\"id\":\"efuzmuvpbttd\",\"name\":\"morppxebmnzbtbh\",\"type\":\"pglkf\"}") - .toObject(CapabilityInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapabilityInner model = new CapabilityInner(); - model = BinaryData.fromObject(model).toObject(CapabilityInner.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilityPropertiesInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilityPropertiesInnerTests.java deleted file mode 100644 index 0c3a63271637..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilityPropertiesInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.CapabilityPropertiesInner; - -public final class CapabilityPropertiesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CapabilityPropertiesInner model = BinaryData.fromString( - "{\"zone\":\"haaxdbabphl\",\"supportedHAMode\":[\"lfktsths\",\"cocmnyyaztt\",\"twwrqp\"],\"supportedGeoBackupRegions\":[\"ckzywbiexzfeyue\",\"xibxujwbhqwalm\",\"zyoxaepdkzjan\"],\"supportedFlexibleServerEditions\":[{\"name\":\"hdwbavxbniwdjs\",\"supportedStorageEditions\":[{\"name\":\"dbpgnxytxhp\",\"minStorageSize\":6965353138700786103,\"maxStorageSize\":4599278762686577783,\"minBackupRetentionDays\":1128579127863386058,\"maxBackupRetentionDays\":2954127494551014521,\"minBackupIntervalHours\":8884342571785633710,\"maxBackupIntervalHours\":6725346619350246793},{\"name\":\"qik\",\"minStorageSize\":4686720275139209939,\"maxStorageSize\":4066990735502965774,\"minBackupRetentionDays\":4482552076983589302,\"maxBackupRetentionDays\":9033085087546122027,\"minBackupIntervalHours\":151235075959718301,\"maxBackupIntervalHours\":4627558794387697712}],\"supportedServerVersions\":[{\"name\":\"fssxqukkfplg\",\"supportedSkus\":[{},{},{},{}]},{\"name\":\"nkjzkdeslpvlop\",\"supportedSkus\":[{},{}]},{\"name\":\"ghxpkdw\",\"supportedSkus\":[{},{},{},{}]},{\"name\":\"uebbaumnyqup\",\"supportedSkus\":[{},{}]}]},{\"name\":\"jn\",\"supportedStorageEditions\":[{\"name\":\"hsmtxpsiebtfhvp\",\"minStorageSize\":8197357733931810453,\"maxStorageSize\":6828337730937778205,\"minBackupRetentionDays\":1416784168319255792,\"maxBackupRetentionDays\":7005227375358827798,\"minBackupIntervalHours\":6206046747227637327,\"maxBackupIntervalHours\":8940546233492359275},{\"name\":\"yzxuutkncw\",\"minStorageSize\":8510740878740325389,\"maxStorageSize\":3553868760097746067,\"minBackupRetentionDays\":3730268985212494326,\"maxBackupRetentionDays\":3059942577979459990,\"minBackupIntervalHours\":5623641553510482328,\"maxBackupIntervalHours\":1377433518907384393},{\"name\":\"nmic\",\"minStorageSize\":2405613311223281971,\"maxStorageSize\":1106790726186797280,\"minBackupRetentionDays\":7472475859775012929,\"maxBackupRetentionDays\":2774525009575125279,\"minBackupIntervalHours\":9162698080324973367,\"maxBackupIntervalHours\":4609095733155720227}],\"supportedServerVersions\":[{\"name\":\"bkc\",\"supportedSkus\":[{}]},{\"name\":\"bttk\",\"supportedSkus\":[{},{}]},{\"name\":\"pnvjtoqnermclf\",\"supportedSkus\":[{},{}]},{\"name\":\"oxuscrpabgyepsbj\",\"supportedSkus\":[{}]}]},{\"name\":\"ugxywpmueef\",\"supportedStorageEditions\":[{\"name\":\"qkqujidsu\",\"minStorageSize\":722648832186407891,\"maxStorageSize\":5846205401797666469,\"minBackupRetentionDays\":255129733690814288,\"maxBackupRetentionDays\":6109729315906421159,\"minBackupIntervalHours\":6790686105962724617,\"maxBackupIntervalHours\":2268947559228407869},{\"name\":\"xy\",\"minStorageSize\":5579898580342682580,\"maxStorageSize\":2820167512194411958,\"minBackupRetentionDays\":7703197767912555921,\"maxBackupRetentionDays\":1731749490804613022,\"minBackupIntervalHours\":7047535531175801519,\"maxBackupIntervalHours\":6478150774243714531}],\"supportedServerVersions\":[{\"name\":\"lrqjbhckfr\",\"supportedSkus\":[{},{}]},{\"name\":\"sbkyvpycanuzbp\",\"supportedSkus\":[{},{}]}]},{\"name\":\"kuwbcrnwb\",\"supportedStorageEditions\":[{\"name\":\"seyvj\",\"minStorageSize\":2840663437896188419,\"maxStorageSize\":9185471581407404902,\"minBackupRetentionDays\":8368050396519703227,\"maxBackupRetentionDays\":7977565137373702188,\"minBackupIntervalHours\":3488305487791082872,\"maxBackupIntervalHours\":1437950505829489017},{\"name\":\"gkvtmelmqkrhah\",\"minStorageSize\":9144697658006681867,\"maxStorageSize\":8641218324516083606,\"minBackupRetentionDays\":6531016586304771464,\"maxBackupRetentionDays\":6112562014909407139,\"minBackupIntervalHours\":4716171323603349027,\"maxBackupIntervalHours\":5990210580748230219}],\"supportedServerVersions\":[{\"name\":\"pvfadmwsrcr\",\"supportedSkus\":[{},{}]},{\"name\":\"vgomz\",\"supportedSkus\":[{},{}]},{\"name\":\"sgwbnbbeld\",\"supportedSkus\":[{}]}]}]}") - .toObject(CapabilityPropertiesInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapabilityPropertiesInner model = new CapabilityPropertiesInner(); - model = BinaryData.fromObject(model).toObject(CapabilityPropertiesInner.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilityPropertiesV2Tests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilityPropertiesV2Tests.java deleted file mode 100644 index ca634ad472e7..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilityPropertiesV2Tests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.CapabilityPropertiesV2; - -public final class CapabilityPropertiesV2Tests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CapabilityPropertiesV2 model = BinaryData.fromString( - "{\"supportedGeoBackupRegions\":[\"dneu\",\"lfphsdyhtozfikd\",\"wwquuvxzxclvithh\"],\"supportedFlexibleServerEditions\":[{\"name\":\"osggbhc\",\"defaultSku\":\"fwdsj\",\"defaultStorageSize\":677812040,\"supportedStorageEditions\":[{\"name\":\"tiiswacffg\",\"minStorageSize\":5578276694284546210,\"maxStorageSize\":4969874968491152156,\"minBackupRetentionDays\":9180032066247712595,\"maxBackupRetentionDays\":8914964886621768448,\"minBackupIntervalHours\":5873925145379718708,\"maxBackupIntervalHours\":7531360938997310338},{\"name\":\"pfuflrw\",\"minStorageSize\":7560134099351640834,\"maxStorageSize\":6203658775874976787,\"minBackupRetentionDays\":7850988880022269702,\"maxBackupRetentionDays\":5460739394049509501,\"minBackupIntervalHours\":8841790636704603719,\"maxBackupIntervalHours\":7153383253312728229},{\"name\":\"wqapnedgfbcvk\",\"minStorageSize\":648719772488925144,\"maxStorageSize\":6395460850482092633,\"minBackupRetentionDays\":4392400281438783051,\"maxBackupRetentionDays\":4200682603661238799,\"minBackupIntervalHours\":1691075680469925447,\"maxBackupIntervalHours\":261196844056993039}],\"supportedSkus\":[{\"name\":\"obzdopcjwvnhdl\",\"vCores\":1559560487458958136,\"supportedIops\":5739282275631592969,\"supportedMemoryPerVCoreMB\":521643942642292025,\"supportedZones\":[\"utwu\",\"egrpkhj\"],\"supportedHAMode\":[\"yqsluic\"]},{\"name\":\"ggkzzlvmbmpa\",\"vCores\":4083337903292731592,\"supportedIops\":7495067102833571715,\"supportedMemoryPerVCoreMB\":2005419174013372286,\"supportedZones\":[\"bpfvm\",\"yhrfouyftaakcpw\",\"yzvqt\"],\"supportedHAMode\":[\"bexkpzksmondj\"]}]}],\"supportedServerVersions\":[{\"name\":\"vypomgkopkwho\"},{\"name\":\"pajqgxysm\"},{\"name\":\"mbqfqvmk\"},{\"name\":\"oz\"}]}") - .toObject(CapabilityPropertiesV2.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapabilityPropertiesV2 model = new CapabilityPropertiesV2(); - model = BinaryData.fromObject(model).toObject(CapabilityPropertiesV2.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilitySetsListTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilitySetsListTests.java deleted file mode 100644 index 6b206e9a2ac3..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CapabilitySetsListTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.CapabilitySetsList; - -public final class CapabilitySetsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CapabilitySetsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"supportedGeoBackupRegions\":[\"nmefqsgzvahapj\"],\"supportedFlexibleServerEditions\":[{\"name\":\"vgqzcjrvxd\",\"defaultSku\":\"lmwlxkvugfhzo\",\"defaultStorageSize\":977455104,\"supportedStorageEditions\":[{},{},{},{}],\"supportedSkus\":[{}]},{\"name\":\"luthn\",\"defaultSku\":\"rnxipei\",\"defaultStorageSize\":2136356878,\"supportedStorageEditions\":[{},{},{}],\"supportedSkus\":[{}]}],\"supportedServerVersions\":[{\"name\":\"ultskzbbtdz\"},{\"name\":\"veekgpwozuhkfp\"}]},\"id\":\"jyofdxluusdtto\",\"name\":\"waboe\",\"type\":\"qvkelnsm\"},{\"properties\":{\"supportedGeoBackupRegions\":[\"yjsflhhcaalnji\",\"isxyawjoyaqcslyj\",\"kiidzyex\",\"nelixhnrztfo\"],\"supportedFlexibleServerEditions\":[{\"name\":\"xknalaulppg\",\"defaultSku\":\"tpnapnyiropuhpig\",\"defaultStorageSize\":2140009722,\"supportedStorageEditions\":[{}],\"supportedSkus\":[{},{}]},{\"name\":\"itxmedjvcslynqww\",\"defaultSku\":\"wzz\",\"defaultStorageSize\":1437797215,\"supportedStorageEditions\":[{},{},{}],\"supportedSkus\":[{},{}]},{\"name\":\"ucnapkteoellwp\",\"defaultSku\":\"d\",\"defaultStorageSize\":1046571541,\"supportedStorageEditions\":[{},{},{}],\"supportedSkus\":[{},{},{},{}]},{\"name\":\"ceopzfqrhhuaopp\",\"defaultSku\":\"qeqxo\",\"defaultStorageSize\":280761286,\"supportedStorageEditions\":[{},{}],\"supportedSkus\":[{}]}],\"supportedServerVersions\":[{\"name\":\"bgbkdmoizpost\"}]},\"id\":\"rcfbunrm\",\"name\":\"qjhhkxbpv\",\"type\":\"ymjhxxjyngudivkr\"},{\"properties\":{\"supportedGeoBackupRegions\":[\"xqzvszjfa\"],\"supportedFlexibleServerEditions\":[{\"name\":\"dxxiv\",\"defaultSku\":\"vtcqaqtdo\",\"defaultStorageSize\":1086916273,\"supportedStorageEditions\":[{}],\"supportedSkus\":[{},{}]}],\"supportedServerVersions\":[{\"name\":\"slqb\"},{\"name\":\"fxoblytkb\"}]},\"id\":\"pe\",\"name\":\"wwfbkrvrnsvshq\",\"type\":\"ohxcrsbfova\"},{\"properties\":{\"supportedGeoBackupRegions\":[\"v\",\"bhsqfsubcgjbirxb\",\"ybsrfbjfdtwss\"],\"supportedFlexibleServerEditions\":[{\"name\":\"pvjzbe\",\"defaultSku\":\"l\",\"defaultStorageSize\":1948356330,\"supportedStorageEditions\":[{},{}],\"supportedSkus\":[{},{},{},{}]},{\"name\":\"wpmqt\",\"defaultSku\":\"uoujmkcjhwqy\",\"defaultStorageSize\":75465955,\"supportedStorageEditions\":[{}],\"supportedSkus\":[{}]},{\"name\":\"ewgdrjervn\",\"defaultSku\":\"nqpeh\",\"defaultStorageSize\":681452902,\"supportedStorageEditions\":[{}],\"supportedSkus\":[{},{},{}]}],\"supportedServerVersions\":[{\"name\":\"hnzdndslgnayqi\"},{\"name\":\"nduhavhqlkthum\"}]},\"id\":\"olbgycduiertgccy\",\"name\":\"vaolpsslqlf\",\"type\":\"mdnbbglzpswiy\"}],\"nextLink\":\"cwyhzdxssa\"}") - .toObject(CapabilitySetsList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapabilitySetsList model = new CapabilitySetsList(); - model = BinaryData.fromObject(model).toObject(CapabilitySetsList.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java deleted file mode 100644 index 4674e5f01455..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.NameAvailability; -import com.azure.resourcemanager.mysqlflexibleserver.models.NameAvailabilityRequest; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CheckNameAvailabilitiesExecuteWithResponseMockTests { - @Test - public void testExecuteWithResponse() throws Exception { - String responseStr = "{\"message\":\"knsmjblmljhlnymz\",\"nameAvailable\":true,\"reason\":\"ryuzcbmqqv\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NameAvailability response = manager.checkNameAvailabilities() - .executeWithResponse("s", new NameAvailabilityRequest().withName("sphaivmxyasflvg").withType("zwywako"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("knsmjblmljhlnymz", response.message()); - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals("ryuzcbmqqv", response.reason()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityWithoutLocationsExecuteWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityWithoutLocationsExecuteWithResponseMockTests.java deleted file mode 100644 index 31c288fc9c52..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckNameAvailabilityWithoutLocationsExecuteWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.NameAvailability; -import com.azure.resourcemanager.mysqlflexibleserver.models.NameAvailabilityRequest; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CheckNameAvailabilityWithoutLocationsExecuteWithResponseMockTests { - @Test - public void testExecuteWithResponse() throws Exception { - String responseStr = "{\"message\":\"hcvsqltnzoi\",\"nameAvailable\":false,\"reason\":\"gnxf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NameAvailability response = manager.checkNameAvailabilityWithoutLocations() - .executeWithResponse(new NameAvailabilityRequest().withName("mv").withType("gtayxonsupeujlz"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hcvsqltnzoi", response.message()); - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals("gnxf", response.reason()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckVirtualNetworkSubnetUsagesExecuteWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckVirtualNetworkSubnetUsagesExecuteWithResponseMockTests.java deleted file mode 100644 index 904c9965486a..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/CheckVirtualNetworkSubnetUsagesExecuteWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; -import com.azure.resourcemanager.mysqlflexibleserver.models.VirtualNetworkSubnetUsageResult; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CheckVirtualNetworkSubnetUsagesExecuteWithResponseMockTests { - @Test - public void testExecuteWithResponse() throws Exception { - String responseStr - = "{\"location\":\"ltyjedexxmlfmk\",\"subscriptionId\":\"cazuaw\",\"delegatedSubnetsUsage\":[{\"subnetName\":\"puamwabzxr\",\"usage\":3578038999561407028}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VirtualNetworkSubnetUsageResult response = manager.checkVirtualNetworkSubnetUsages() - .executeWithResponse("juj", - new VirtualNetworkSubnetUsageParameter().withVirtualNetworkResourceId("ckpzvcpopmxeln"), - com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationForBatchUpdatePropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationForBatchUpdatePropertiesTests.java deleted file mode 100644 index ea541fd2a4cf..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationForBatchUpdatePropertiesTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationForBatchUpdateProperties; -import org.junit.jupiter.api.Assertions; - -public final class ConfigurationForBatchUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfigurationForBatchUpdateProperties model - = BinaryData.fromString("{\"value\":\"vfqawrlyxwjkcpr\",\"source\":\"wbxgjvt\"}") - .toObject(ConfigurationForBatchUpdateProperties.class); - Assertions.assertEquals("vfqawrlyxwjkcpr", model.value()); - Assertions.assertEquals("wbxgjvt", model.source()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfigurationForBatchUpdateProperties model - = new ConfigurationForBatchUpdateProperties().withValue("vfqawrlyxwjkcpr").withSource("wbxgjvt"); - model = BinaryData.fromObject(model).toObject(ConfigurationForBatchUpdateProperties.class); - Assertions.assertEquals("vfqawrlyxwjkcpr", model.value()); - Assertions.assertEquals("wbxgjvt", model.source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationForBatchUpdateTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationForBatchUpdateTests.java deleted file mode 100644 index 02c54b3ba013..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationForBatchUpdateTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationForBatchUpdate; -import org.junit.jupiter.api.Assertions; - -public final class ConfigurationForBatchUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfigurationForBatchUpdate model = BinaryData - .fromString("{\"name\":\"uxig\",\"properties\":{\"value\":\"gzjaoyfhrtxilne\",\"source\":\"ujysvle\"}}") - .toObject(ConfigurationForBatchUpdate.class); - Assertions.assertEquals("uxig", model.name()); - Assertions.assertEquals("gzjaoyfhrtxilne", model.value()); - Assertions.assertEquals("ujysvle", model.source()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfigurationForBatchUpdate model - = new ConfigurationForBatchUpdate().withName("uxig").withValue("gzjaoyfhrtxilne").withSource("ujysvle"); - model = BinaryData.fromObject(model).toObject(ConfigurationForBatchUpdate.class); - Assertions.assertEquals("uxig", model.name()); - Assertions.assertEquals("gzjaoyfhrtxilne", model.value()); - Assertions.assertEquals("ujysvle", model.source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationInnerTests.java deleted file mode 100644 index cdcb3f6ed024..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource; -import org.junit.jupiter.api.Assertions; - -public final class ConfigurationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfigurationInner model = BinaryData.fromString( - "{\"properties\":{\"value\":\"mrldhu\",\"currentValue\":\"zzd\",\"description\":\"qxhocdgeablgphut\",\"documentationLink\":\"ndv\",\"defaultValue\":\"ozwyiftyhxhuro\",\"dataType\":\"tyxolniwpwc\",\"allowedValues\":\"jfkgiawxk\",\"source\":\"system-default\",\"isReadOnly\":\"False\",\"isConfigPendingRestart\":\"False\",\"isDynamicConfig\":\"True\"},\"id\":\"syyp\",\"name\":\"ddhsgcbacphe\",\"type\":\"koty\"}") - .toObject(ConfigurationInner.class); - Assertions.assertEquals("mrldhu", model.value()); - Assertions.assertEquals("zzd", model.currentValue()); - Assertions.assertEquals(ConfigurationSource.SYSTEM_DEFAULT, model.source()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfigurationInner model = new ConfigurationInner().withValue("mrldhu") - .withCurrentValue("zzd") - .withSource(ConfigurationSource.SYSTEM_DEFAULT); - model = BinaryData.fromObject(model).toObject(ConfigurationInner.class); - Assertions.assertEquals("mrldhu", model.value()); - Assertions.assertEquals("zzd", model.currentValue()); - Assertions.assertEquals(ConfigurationSource.SYSTEM_DEFAULT, model.source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationListForBatchUpdateTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationListForBatchUpdateTests.java deleted file mode 100644 index 129a3758f979..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationListForBatchUpdateTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationForBatchUpdate; -import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationListForBatchUpdate; -import com.azure.resourcemanager.mysqlflexibleserver.models.ResetAllToDefault; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ConfigurationListForBatchUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfigurationListForBatchUpdate model = BinaryData.fromString( - "{\"value\":[{\"name\":\"ktapspwgcuertu\",\"properties\":{\"value\":\"o\",\"source\":\"qw\"}},{\"name\":\"mdgbbjfdd\",\"properties\":{\"value\":\"mbe\",\"source\":\"pbhtqqrolfpfpsa\"}}],\"resetAllToDefault\":\"True\"}") - .toObject(ConfigurationListForBatchUpdate.class); - Assertions.assertEquals("ktapspwgcuertu", model.value().get(0).name()); - Assertions.assertEquals("o", model.value().get(0).value()); - Assertions.assertEquals("qw", model.value().get(0).source()); - Assertions.assertEquals(ResetAllToDefault.TRUE, model.resetAllToDefault()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfigurationListForBatchUpdate model = new ConfigurationListForBatchUpdate() - .withValue(Arrays.asList( - new ConfigurationForBatchUpdate().withName("ktapspwgcuertu").withValue("o").withSource("qw"), - new ConfigurationForBatchUpdate().withName("mdgbbjfdd").withValue("mbe").withSource("pbhtqqrolfpfpsa"))) - .withResetAllToDefault(ResetAllToDefault.TRUE); - model = BinaryData.fromObject(model).toObject(ConfigurationListForBatchUpdate.class); - Assertions.assertEquals("ktapspwgcuertu", model.value().get(0).name()); - Assertions.assertEquals("o", model.value().get(0).value()); - Assertions.assertEquals("qw", model.value().get(0).source()); - Assertions.assertEquals(ResetAllToDefault.TRUE, model.resetAllToDefault()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationListResultInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationListResultInnerTests.java deleted file mode 100644 index ed13b0c60a26..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationListResultInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationInner; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationListResultInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ConfigurationListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfigurationListResultInner model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"value\":\"szdnr\",\"currentValue\":\"qguhmuo\",\"description\":\"f\",\"documentationLink\":\"wzwbnguitn\",\"defaultValue\":\"izgazxu\",\"dataType\":\"zuckyfi\",\"allowedValues\":\"fidfvzw\",\"source\":\"system-default\",\"isReadOnly\":\"True\",\"isConfigPendingRestart\":\"False\",\"isDynamicConfig\":\"False\"},\"id\":\"dkfthwxmnt\",\"name\":\"i\",\"type\":\"aop\"}],\"nextLink\":\"mijcmmxdcufufs\"}") - .toObject(ConfigurationListResultInner.class); - Assertions.assertEquals("szdnr", model.value().get(0).value()); - Assertions.assertEquals("qguhmuo", model.value().get(0).currentValue()); - Assertions.assertEquals(ConfigurationSource.SYSTEM_DEFAULT, model.value().get(0).source()); - Assertions.assertEquals("mijcmmxdcufufs", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfigurationListResultInner model - = new ConfigurationListResultInner().withValue(Arrays.asList(new ConfigurationInner().withValue("szdnr") - .withCurrentValue("qguhmuo") - .withSource(ConfigurationSource.SYSTEM_DEFAULT))).withNextLink("mijcmmxdcufufs"); - model = BinaryData.fromObject(model).toObject(ConfigurationListResultInner.class); - Assertions.assertEquals("szdnr", model.value().get(0).value()); - Assertions.assertEquals("qguhmuo", model.value().get(0).currentValue()); - Assertions.assertEquals(ConfigurationSource.SYSTEM_DEFAULT, model.value().get(0).source()); - Assertions.assertEquals("mijcmmxdcufufs", model.nextLink()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationPropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationPropertiesTests.java deleted file mode 100644 index f4aaa4f1d36f..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationPropertiesTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationProperties; -import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource; -import org.junit.jupiter.api.Assertions; - -public final class ConfigurationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfigurationProperties model = BinaryData.fromString( - "{\"value\":\"gou\",\"currentValue\":\"ndlik\",\"description\":\"qkgfgibma\",\"documentationLink\":\"akeqs\",\"defaultValue\":\"yb\",\"dataType\":\"qedqytbciqfoufl\",\"allowedValues\":\"nkzsmodmglou\",\"source\":\"system-default\",\"isReadOnly\":\"True\",\"isConfigPendingRestart\":\"False\",\"isDynamicConfig\":\"False\"}") - .toObject(ConfigurationProperties.class); - Assertions.assertEquals("gou", model.value()); - Assertions.assertEquals("ndlik", model.currentValue()); - Assertions.assertEquals(ConfigurationSource.SYSTEM_DEFAULT, model.source()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfigurationProperties model = new ConfigurationProperties().withValue("gou") - .withCurrentValue("ndlik") - .withSource(ConfigurationSource.SYSTEM_DEFAULT); - model = BinaryData.fromObject(model).toObject(ConfigurationProperties.class); - Assertions.assertEquals("gou", model.value()); - Assertions.assertEquals("ndlik", model.currentValue()); - Assertions.assertEquals(ConfigurationSource.SYSTEM_DEFAULT, model.source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsBatchUpdateMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsBatchUpdateMockTests.java deleted file mode 100644 index 94c785c9ec2f..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsBatchUpdateMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationForBatchUpdate; -import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationListForBatchUpdate; -import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationListResult; -import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource; -import com.azure.resourcemanager.mysqlflexibleserver.models.ResetAllToDefault; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConfigurationsBatchUpdateMockTests { - @Test - public void testBatchUpdate() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"value\":\"vofqzhvfc\",\"currentValue\":\"yfm\",\"description\":\"uxrkjp\",\"documentationLink\":\"w\",\"defaultValue\":\"zwiivwzjbhyzs\",\"dataType\":\"rkambt\",\"allowedValues\":\"egv\",\"source\":\"user-override\",\"isReadOnly\":\"True\",\"isConfigPendingRestart\":\"False\",\"isDynamicConfig\":\"True\"},\"id\":\"spastjbkkdmf\",\"name\":\"vestmjl\",\"type\":\"rriloz\"},{\"properties\":{\"value\":\"ewchpxlktwku\",\"currentValue\":\"ycslevufuztcktyh\",\"description\":\"qedcgzulwm\",\"documentationLink\":\"qzz\",\"defaultValue\":\"jvpglydzgk\",\"dataType\":\"qeevt\",\"allowedValues\":\"pryu\",\"source\":\"user-override\",\"isReadOnly\":\"False\",\"isConfigPendingRestart\":\"True\",\"isDynamicConfig\":\"True\"},\"id\":\"vzvfvaawzqadfl\",\"name\":\"z\",\"type\":\"riglaec\"},{\"properties\":{\"value\":\"t\",\"currentValue\":\"okpvzm\",\"description\":\"t\",\"documentationLink\":\"dgxobfircl\",\"defaultValue\":\"kciayzri\",\"dataType\":\"hya\",\"allowedValues\":\"vjlboxqvk\",\"source\":\"system-default\",\"isReadOnly\":\"True\",\"isConfigPendingRestart\":\"True\",\"isDynamicConfig\":\"False\"},\"id\":\"hdwdi\",\"name\":\"umbnraauzzp\",\"type\":\"jazysdzhezwwvaiq\"},{\"properties\":{\"value\":\"vfonkphhqyikvyl\",\"currentValue\":\"yavluwmncstt\",\"description\":\"fybvpoek\",\"documentationLink\":\"gsgbdhuzq\",\"defaultValue\":\"j\",\"dataType\":\"kynscliqhzv\",\"allowedValues\":\"nk\",\"source\":\"user-override\",\"isReadOnly\":\"True\",\"isConfigPendingRestart\":\"True\",\"isDynamicConfig\":\"True\"},\"id\":\"nvdxzxhihfrbbc\",\"name\":\"vqagtltdhlf\",\"type\":\"qojpy\"}],\"nextLink\":\"gtrd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ConfigurationListResult response = manager.configurations() - .batchUpdate("xkzb", "msgeivsiykzk", - new ConfigurationListForBatchUpdate() - .withValue(Arrays.asList(new ConfigurationForBatchUpdate().withName("dxonbzoggculap") - .withValue("rpgogtqxep") - .withSource("lbfu"))) - .withResetAllToDefault(ResetAllToDefault.TRUE), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vofqzhvfc", response.value().get(0).value()); - Assertions.assertEquals("yfm", response.value().get(0).currentValue()); - Assertions.assertEquals(ConfigurationSource.USER_OVERRIDE, response.value().get(0).source()); - Assertions.assertEquals("gtrd", response.nextLink()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsCreateOrUpdateMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsCreateOrUpdateMockTests.java deleted file mode 100644 index 35083214c623..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsCreateOrUpdateMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.Configuration; -import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConfigurationsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"value\":\"xmwoteyowcluqo\",\"currentValue\":\"kqvgqouw\",\"description\":\"zmpjwyiv\",\"documentationLink\":\"kfxcvhrfs\",\"defaultValue\":\"uagrttikteusqc\",\"dataType\":\"vyklxuby\",\"allowedValues\":\"ff\",\"source\":\"system-default\",\"isReadOnly\":\"False\",\"isConfigPendingRestart\":\"False\",\"isDynamicConfig\":\"True\"},\"id\":\"bgq\",\"name\":\"brta\",\"type\":\"metttwgd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Configuration response = manager.configurations() - .define("wqfbylyrfgiagt") - .withExistingFlexibleServer("dggxdbeesmi", "knlrariaawiuagy") - .withValue("ocqwogfnzjvus") - .withCurrentValue("ld") - .withSource(ConfigurationSource.USER_OVERRIDE) - .create(); - - Assertions.assertEquals("xmwoteyowcluqo", response.value()); - Assertions.assertEquals("kqvgqouw", response.currentValue()); - Assertions.assertEquals(ConfigurationSource.SYSTEM_DEFAULT, response.source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.java deleted file mode 100644 index d6a7fe9f1017..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsGetWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.Configuration; -import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConfigurationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"value\":\"pmvmemfnczdwvv\",\"currentValue\":\"lxlllchpo\",\"description\":\"zevwrdnhfukuv\",\"documentationLink\":\"cswsmystul\",\"defaultValue\":\"ypfcvlerchpqbmf\",\"dataType\":\"babwidfcxss\",\"allowedValues\":\"unnoxyhk\",\"source\":\"user-override\",\"isReadOnly\":\"False\",\"isConfigPendingRestart\":\"True\",\"isDynamicConfig\":\"False\"},\"id\":\"hoqca\",\"name\":\"ewda\",\"type\":\"mdjvlpj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Configuration response = manager.configurations() - .getWithResponse("iogsjkmnwq", "nobaiyhddviacegf", "m", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("pmvmemfnczdwvv", response.value()); - Assertions.assertEquals("lxlllchpo", response.currentValue()); - Assertions.assertEquals(ConfigurationSource.USER_OVERRIDE, response.source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsListByServerMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsListByServerMockTests.java deleted file mode 100644 index 6a7cd6319936..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ConfigurationsListByServerMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.Configuration; -import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConfigurationsListByServerMockTests { - @Test - public void testListByServer() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"value\":\"h\",\"currentValue\":\"vkbunzozudh\",\"description\":\"gkmoyxcdyuibhmfd\",\"documentationLink\":\"zydvfvf\",\"defaultValue\":\"naeo\",\"dataType\":\"rvhmgor\",\"allowedValues\":\"ukiscvwmzhw\",\"source\":\"user-override\",\"isReadOnly\":\"True\",\"isConfigPendingRestart\":\"True\",\"isDynamicConfig\":\"False\"},\"id\":\"cbtgnhnz\",\"name\":\"yqxtjjfzql\",\"type\":\"hycav\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.configurations() - .listByServer("nifmzzsdymbrnysu", "m", "rafwgckhocxvdf", "fwafqrouda", 1715905241, 1222177326, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("h", response.iterator().next().value()); - Assertions.assertEquals("vkbunzozudh", response.iterator().next().currentValue()); - Assertions.assertEquals(ConfigurationSource.USER_OVERRIDE, response.iterator().next().source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabaseInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabaseInnerTests.java deleted file mode 100644 index 0c2b03d8bad1..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabaseInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.DatabaseInner; -import org.junit.jupiter.api.Assertions; - -public final class DatabaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabaseInner model = BinaryData.fromString( - "{\"properties\":{\"charset\":\"mzidnsezcxtb\",\"collation\":\"gfycc\"},\"id\":\"ewmdw\",\"name\":\"jeiachboosfl\",\"type\":\"ro\"}") - .toObject(DatabaseInner.class); - Assertions.assertEquals("mzidnsezcxtb", model.charset()); - Assertions.assertEquals("gfycc", model.collation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabaseInner model = new DatabaseInner().withCharset("mzidnsezcxtb").withCollation("gfycc"); - model = BinaryData.fromObject(model).toObject(DatabaseInner.class); - Assertions.assertEquals("mzidnsezcxtb", model.charset()); - Assertions.assertEquals("gfycc", model.collation()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabaseListResultTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabaseListResultTests.java deleted file mode 100644 index 14720d87c16c..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabaseListResultTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.DatabaseInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.DatabaseListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DatabaseListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabaseListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"charset\":\"irsoodqxhcrmnohj\",\"collation\":\"kwh\"},\"id\":\"oifiyipjxsqwpgr\",\"name\":\"bznorcjxvsnby\",\"type\":\"qabnmoc\"},{\"properties\":{\"charset\":\"shurzafbljjgpbto\",\"collation\":\"jmkljavbqidtqajz\"},\"id\":\"l\",\"name\":\"kudjkrlkhb\",\"type\":\"hfepgzgqex\"},{\"properties\":{\"charset\":\"c\",\"collation\":\"c\"},\"id\":\"ierhhbcsglummaj\",\"name\":\"j\",\"type\":\"odxobnbdxkqpxok\"}],\"nextLink\":\"ionpimexg\"}") - .toObject(DatabaseListResult.class); - Assertions.assertEquals("irsoodqxhcrmnohj", model.value().get(0).charset()); - Assertions.assertEquals("kwh", model.value().get(0).collation()); - Assertions.assertEquals("ionpimexg", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabaseListResult model = new DatabaseListResult() - .withValue(Arrays.asList(new DatabaseInner().withCharset("irsoodqxhcrmnohj").withCollation("kwh"), - new DatabaseInner().withCharset("shurzafbljjgpbto").withCollation("jmkljavbqidtqajz"), - new DatabaseInner().withCharset("c").withCollation("c"))) - .withNextLink("ionpimexg"); - model = BinaryData.fromObject(model).toObject(DatabaseListResult.class); - Assertions.assertEquals("irsoodqxhcrmnohj", model.value().get(0).charset()); - Assertions.assertEquals("kwh", model.value().get(0).collation()); - Assertions.assertEquals("ionpimexg", model.nextLink()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasePropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasePropertiesTests.java deleted file mode 100644 index af8f09570c73..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasePropertiesTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.DatabaseProperties; -import org.junit.jupiter.api.Assertions; - -public final class DatabasePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabaseProperties model = BinaryData.fromString("{\"charset\":\"qpteeh\",\"collation\":\"vypyqrimzinpv\"}") - .toObject(DatabaseProperties.class); - Assertions.assertEquals("qpteeh", model.charset()); - Assertions.assertEquals("vypyqrimzinpv", model.collation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabaseProperties model = new DatabaseProperties().withCharset("qpteeh").withCollation("vypyqrimzinpv"); - model = BinaryData.fromObject(model).toObject(DatabaseProperties.class); - Assertions.assertEquals("qpteeh", model.charset()); - Assertions.assertEquals("vypyqrimzinpv", model.collation()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesCreateOrUpdateMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesCreateOrUpdateMockTests.java deleted file mode 100644 index b76ff9feda0f..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesCreateOrUpdateMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.Database; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DatabasesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"charset\":\"tgqscjavftjuh\",\"collation\":\"azkmtgguwp\"},\"id\":\"r\",\"name\":\"jcivmmg\",\"type\":\"f\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Database response = manager.databases() - .define("zswpchwa") - .withExistingFlexibleServer("ulcsethwwnpj", "l") - .withCharset("ousnfepgfewe") - .withCollation("l") - .create(); - - Assertions.assertEquals("tgqscjavftjuh", response.charset()); - Assertions.assertEquals("azkmtgguwp", response.collation()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesDeleteMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesDeleteMockTests.java deleted file mode 100644 index bf794cb63c84..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesDeleteMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DatabasesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.databases().delete("lqxihhrmooiz", "seypxiutcxapz", "y", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesGetWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesGetWithResponseMockTests.java deleted file mode 100644 index 438f06fa96bf..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesGetWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.Database; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DatabasesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"charset\":\"zjcjbtr\",\"collation\":\"ehvvib\"},\"id\":\"jj\",\"name\":\"toqbeitpkxztmoob\",\"type\":\"lftidgfcwqmpim\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Database response = manager.databases() - .getWithResponse("petogebjox", "lhvnhlab", "q", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("zjcjbtr", response.charset()); - Assertions.assertEquals("ehvvib", response.collation()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesListByServerMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesListByServerMockTests.java deleted file mode 100644 index d792d49dc4cb..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DatabasesListByServerMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.Database; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DatabasesListByServerMockTests { - @Test - public void testListByServer() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"charset\":\"bawpfajnjwltlwt\",\"collation\":\"guk\"},\"id\":\"lhsnvkcdmx\",\"name\":\"rpoaimlnwi\",\"type\":\"aomylwea\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.databases().listByServer("qxzhem", "yhohujswtwkozzwc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bawpfajnjwltlwt", response.iterator().next().charset()); - Assertions.assertEquals("guk", response.iterator().next().collation()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DelegatedSubnetUsageTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DelegatedSubnetUsageTests.java deleted file mode 100644 index 8d76a7bb8faf..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/DelegatedSubnetUsageTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.DelegatedSubnetUsage; - -public final class DelegatedSubnetUsageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DelegatedSubnetUsage model - = BinaryData.fromString("{\"subnetName\":\"lkdmtncvokotllxd\",\"usage\":8614672168967170032}") - .toObject(DelegatedSubnetUsage.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DelegatedSubnetUsage model = new DelegatedSubnetUsage(); - model = BinaryData.fromObject(model).toObject(DelegatedSubnetUsage.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRuleInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRuleInnerTests.java deleted file mode 100644 index 63a6353bbf19..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRuleInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.FirewallRuleInner; -import org.junit.jupiter.api.Assertions; - -public final class FirewallRuleInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FirewallRuleInner model = BinaryData.fromString( - "{\"properties\":{\"startIpAddress\":\"txgcpodgmaajr\",\"endIpAddress\":\"vdjwzrlovm\"},\"id\":\"whijcoejctbza\",\"name\":\"s\",\"type\":\"sycbkbfk\"}") - .toObject(FirewallRuleInner.class); - Assertions.assertEquals("txgcpodgmaajr", model.startIpAddress()); - Assertions.assertEquals("vdjwzrlovm", model.endIpAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FirewallRuleInner model - = new FirewallRuleInner().withStartIpAddress("txgcpodgmaajr").withEndIpAddress("vdjwzrlovm"); - model = BinaryData.fromObject(model).toObject(FirewallRuleInner.class); - Assertions.assertEquals("txgcpodgmaajr", model.startIpAddress()); - Assertions.assertEquals("vdjwzrlovm", model.endIpAddress()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRuleListResultTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRuleListResultTests.java deleted file mode 100644 index d518cd6dd613..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRuleListResultTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.FirewallRuleInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.FirewallRuleListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FirewallRuleListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FirewallRuleListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"startIpAddress\":\"gddtocj\",\"endIpAddress\":\"xhvpmoue\"},\"id\":\"dzxibqeojnxqbzvd\",\"name\":\"ntwndeicbtwnpzao\",\"type\":\"vuhrhcffcyddgl\"}],\"nextLink\":\"t\"}") - .toObject(FirewallRuleListResult.class); - Assertions.assertEquals("gddtocj", model.value().get(0).startIpAddress()); - Assertions.assertEquals("xhvpmoue", model.value().get(0).endIpAddress()); - Assertions.assertEquals("t", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FirewallRuleListResult model = new FirewallRuleListResult() - .withValue( - Arrays.asList(new FirewallRuleInner().withStartIpAddress("gddtocj").withEndIpAddress("xhvpmoue"))) - .withNextLink("t"); - model = BinaryData.fromObject(model).toObject(FirewallRuleListResult.class); - Assertions.assertEquals("gddtocj", model.value().get(0).startIpAddress()); - Assertions.assertEquals("xhvpmoue", model.value().get(0).endIpAddress()); - Assertions.assertEquals("t", model.nextLink()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulePropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulePropertiesTests.java deleted file mode 100644 index 1a1622ea234d..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulePropertiesTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.FirewallRuleProperties; -import org.junit.jupiter.api.Assertions; - -public final class FirewallRulePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FirewallRuleProperties model - = BinaryData.fromString("{\"startIpAddress\":\"ukdkexxppofmxa\",\"endIpAddress\":\"c\"}") - .toObject(FirewallRuleProperties.class); - Assertions.assertEquals("ukdkexxppofmxa", model.startIpAddress()); - Assertions.assertEquals("c", model.endIpAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FirewallRuleProperties model - = new FirewallRuleProperties().withStartIpAddress("ukdkexxppofmxa").withEndIpAddress("c"); - model = BinaryData.fromObject(model).toObject(FirewallRuleProperties.class); - Assertions.assertEquals("ukdkexxppofmxa", model.startIpAddress()); - Assertions.assertEquals("c", model.endIpAddress()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesCreateOrUpdateMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesCreateOrUpdateMockTests.java deleted file mode 100644 index 2af35b631cc7..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesCreateOrUpdateMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.FirewallRule; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FirewallRulesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"startIpAddress\":\"qdrfegcealzxwhc\",\"endIpAddress\":\"nsymoyqhlwigd\"},\"id\":\"bkbxgomfa\",\"name\":\"uwasqvd\",\"type\":\"e\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FirewallRule response = manager.firewallRules() - .define("oxfrkenxpmyyefr") - .withExistingFlexibleServer("xxrtikvc", "wpgclrcivt") - .withStartIpAddress("mpdnqqskawa") - .withEndIpAddress("qvmmbn") - .create(); - - Assertions.assertEquals("qdrfegcealzxwhc", response.startIpAddress()); - Assertions.assertEquals("nsymoyqhlwigd", response.endIpAddress()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesDeleteMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesDeleteMockTests.java deleted file mode 100644 index f628ded42f3e..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesDeleteMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FirewallRulesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.firewallRules() - .delete("fiwrxgkn", "uvyinzqodfvpgs", "oxgsgbpfgzdjtx", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesGetWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesGetWithResponseMockTests.java deleted file mode 100644 index 7572f2917801..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesGetWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.FirewallRule; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FirewallRulesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"startIpAddress\":\"uzhyrmewipmvekdx\",\"endIpAddress\":\"kuqgsjjxundxgket\"},\"id\":\"hhzjhfj\",\"name\":\"hvvmuvgpmun\",\"type\":\"qsxvmhf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FirewallRule response = manager.firewallRules() - .getWithResponse("zflbqvg", "qvlgafcqusrdvetn", "sdtutnwlduyc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("uzhyrmewipmvekdx", response.startIpAddress()); - Assertions.assertEquals("kuqgsjjxundxgket", response.endIpAddress()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesListByServerMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesListByServerMockTests.java deleted file mode 100644 index e07a485e2a83..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesListByServerMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.FirewallRule; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FirewallRulesListByServerMockTests { - @Test - public void testListByServer() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"startIpAddress\":\"slynsqyrpfoo\",\"endIpAddress\":\"rlttymsjnygqdnfw\"},\"id\":\"dzgtil\",\"name\":\"xhnfhqly\",\"type\":\"ijouwivkxoyzunb\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.firewallRules().listByServer("uzjyihsasbhudypo", "yue", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("slynsqyrpfoo", response.iterator().next().startIpAddress()); - Assertions.assertEquals("rlttymsjnygqdnfw", response.iterator().next().endIpAddress()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FullBackupStoreDetailsTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FullBackupStoreDetailsTests.java deleted file mode 100644 index f1eccc967d0e..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FullBackupStoreDetailsTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.FullBackupStoreDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FullBackupStoreDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FullBackupStoreDetails model = BinaryData.fromString( - "{\"objectType\":\"FullBackupStoreDetails\",\"sasUriList\":[\"kasdvlm\",\"wdgzxulucv\",\"amrsreuzv\",\"urisjnhnytxifqj\"]}") - .toObject(FullBackupStoreDetails.class); - Assertions.assertEquals("kasdvlm", model.sasUriList().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FullBackupStoreDetails model = new FullBackupStoreDetails() - .withSasUriList(Arrays.asList("kasdvlm", "wdgzxulucv", "amrsreuzv", "urisjnhnytxifqj")); - model = BinaryData.fromObject(model).toObject(FullBackupStoreDetails.class); - Assertions.assertEquals("kasdvlm", model.sasUriList().get(0)); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/GetPrivateDnsZoneSuffixResponseInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/GetPrivateDnsZoneSuffixResponseInnerTests.java deleted file mode 100644 index de22061b3b72..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/GetPrivateDnsZoneSuffixResponseInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.GetPrivateDnsZoneSuffixResponseInner; -import org.junit.jupiter.api.Assertions; - -public final class GetPrivateDnsZoneSuffixResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GetPrivateDnsZoneSuffixResponseInner model = BinaryData.fromString("{\"privateDnsZoneSuffix\":\"fbn\"}") - .toObject(GetPrivateDnsZoneSuffixResponseInner.class); - Assertions.assertEquals("fbn", model.privateDnsZoneSuffix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GetPrivateDnsZoneSuffixResponseInner model - = new GetPrivateDnsZoneSuffixResponseInner().withPrivateDnsZoneSuffix("fbn"); - model = BinaryData.fromObject(model).toObject(GetPrivateDnsZoneSuffixResponseInner.class); - Assertions.assertEquals("fbn", model.privateDnsZoneSuffix()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/GetPrivateDnsZoneSuffixesExecuteWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/GetPrivateDnsZoneSuffixesExecuteWithResponseMockTests.java deleted file mode 100644 index 0f9c9fba71c3..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/GetPrivateDnsZoneSuffixesExecuteWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.GetPrivateDnsZoneSuffixResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GetPrivateDnsZoneSuffixesExecuteWithResponseMockTests { - @Test - public void testExecuteWithResponse() throws Exception { - String responseStr = "{\"privateDnsZoneSuffix\":\"okmvkhlggd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - GetPrivateDnsZoneSuffixResponse response - = manager.getPrivateDnsZoneSuffixes().executeWithResponse(com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("okmvkhlggd", response.privateDnsZoneSuffix()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/HighAvailabilityTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/HighAvailabilityTests.java deleted file mode 100644 index 898958d8c3de..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/HighAvailabilityTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.HighAvailability; -import com.azure.resourcemanager.mysqlflexibleserver.models.HighAvailabilityMode; -import org.junit.jupiter.api.Assertions; - -public final class HighAvailabilityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HighAvailability model = BinaryData - .fromString( - "{\"mode\":\"ZoneRedundant\",\"state\":\"CreatingStandby\",\"standbyAvailabilityZone\":\"nzscxa\"}") - .toObject(HighAvailability.class); - Assertions.assertEquals(HighAvailabilityMode.ZONE_REDUNDANT, model.mode()); - Assertions.assertEquals("nzscxa", model.standbyAvailabilityZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HighAvailability model = new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT) - .withStandbyAvailabilityZone("nzscxa"); - model = BinaryData.fromObject(model).toObject(HighAvailability.class); - Assertions.assertEquals(HighAvailabilityMode.ZONE_REDUNDANT, model.mode()); - Assertions.assertEquals("nzscxa", model.standbyAvailabilityZone()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/HighAvailabilityValidationEstimationInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/HighAvailabilityValidationEstimationInnerTests.java deleted file mode 100644 index b636a515a93b..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/HighAvailabilityValidationEstimationInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.HighAvailabilityValidationEstimationInner; -import org.junit.jupiter.api.Assertions; - -public final class HighAvailabilityValidationEstimationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HighAvailabilityValidationEstimationInner model = BinaryData.fromString( - "{\"estimatedDowntime\":1044580515,\"scheduledStandbyAvailabilityZone\":\"cciw\",\"expectedStandbyAvailabilityZone\":\"juqk\"}") - .toObject(HighAvailabilityValidationEstimationInner.class); - Assertions.assertEquals("juqk", model.expectedStandbyAvailabilityZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HighAvailabilityValidationEstimationInner model - = new HighAvailabilityValidationEstimationInner().withExpectedStandbyAvailabilityZone("juqk"); - model = BinaryData.fromObject(model).toObject(HighAvailabilityValidationEstimationInner.class); - Assertions.assertEquals("juqk", model.expectedStandbyAvailabilityZone()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ImportFromStorageResponseTypeTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ImportFromStorageResponseTypeTests.java deleted file mode 100644 index 647df550b7b0..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ImportFromStorageResponseTypeTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.ImportFromStorageResponseType; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ImportFromStorageResponseTypeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImportFromStorageResponseType model = BinaryData - .fromString( - "{\"objectType\":\"ImportFromStorageResponse\",\"estimatedCompletionTime\":\"2021-07-03T12:52:54Z\"}") - .toObject(ImportFromStorageResponseType.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-03T12:52:54Z"), model.estimatedCompletionTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImportFromStorageResponseType model = new ImportFromStorageResponseType() - .withEstimatedCompletionTime(OffsetDateTime.parse("2021-07-03T12:52:54Z")); - model = BinaryData.fromObject(model).toObject(ImportFromStorageResponseType.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-03T12:52:54Z"), model.estimatedCompletionTime()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitiesListMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitiesListMockTests.java deleted file mode 100644 index c2c2fe2ab8db..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitiesListMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.CapabilityProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LocationBasedCapabilitiesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"zone\":\"pchrqbn\",\"supportedHAMode\":[\"cgegydcwbo\",\"jumvqqolihrraio\",\"aubrjtloq\",\"fuojrngif\"],\"supportedGeoBackupRegions\":[\"pasccbi\"],\"supportedFlexibleServerEditions\":[{\"name\":\"dlyjdf\",\"supportedStorageEditions\":[{\"name\":\"yoqufdvruz\",\"minStorageSize\":2600237364584230542,\"maxStorageSize\":2316867821838180775,\"minBackupRetentionDays\":6225539481081816034,\"maxBackupRetentionDays\":2583150434628365125,\"minBackupIntervalHours\":8115343484266818229,\"maxBackupIntervalHours\":1515180407492298673},{\"name\":\"gugey\",\"minStorageSize\":5337182634110247447,\"maxStorageSize\":5298190426321476453,\"minBackupRetentionDays\":1071033951175761885,\"maxBackupRetentionDays\":8501858796124170627,\"minBackupIntervalHours\":3001413149063858536,\"maxBackupIntervalHours\":1993582902542449094},{\"name\":\"jee\",\"minStorageSize\":3280820966134981534,\"maxStorageSize\":8257115146119139176,\"minBackupRetentionDays\":7698479884404425134,\"maxBackupRetentionDays\":1467661718533894522,\"minBackupIntervalHours\":3345098193027628401,\"maxBackupIntervalHours\":6180206974862965470},{\"name\":\"lqgleohibet\",\"minStorageSize\":4209998401256114116,\"maxStorageSize\":4672708132953979269,\"minBackupRetentionDays\":7813661747400439711,\"maxBackupRetentionDays\":2804942930724576693,\"minBackupIntervalHours\":4102985204616686159,\"maxBackupIntervalHours\":805696348509533279}],\"supportedServerVersions\":[{\"name\":\"mq\",\"supportedSkus\":[{},{}]},{\"name\":\"xl\",\"supportedSkus\":[{},{},{},{}]}]},{\"name\":\"wxacevehj\",\"supportedStorageEditions\":[{\"name\":\"oafgaoql\",\"minStorageSize\":7162692697812879561,\"maxStorageSize\":7771885144500029839,\"minBackupRetentionDays\":7322499256241128041,\"maxBackupRetentionDays\":3765841685495474303,\"minBackupIntervalHours\":235699248571174778,\"maxBackupIntervalHours\":6212930626984689307},{\"name\":\"ypoq\",\"minStorageSize\":2882536637469097723,\"maxStorageSize\":424407896028094311,\"minBackupRetentionDays\":5206156324264475119,\"maxBackupRetentionDays\":303682682740043347,\"minBackupIntervalHours\":5418923826666685582,\"maxBackupIntervalHours\":1668391382882186409}],\"supportedServerVersions\":[{\"name\":\"ex\",\"supportedSkus\":[{},{}]},{\"name\":\"fuxtyasiibmiybnn\",\"supportedSkus\":[{},{},{},{}]},{\"name\":\"nlj\",\"supportedSkus\":[{},{},{},{}]}]},{\"name\":\"ixhcmavmqfoudor\",\"supportedStorageEditions\":[{\"name\":\"yprotwyp\",\"minStorageSize\":632418466926418439,\"maxStorageSize\":6016947306008941575,\"minBackupRetentionDays\":9000547488418283781,\"maxBackupRetentionDays\":4750372007133576018,\"minBackupIntervalHours\":4453190151402917015,\"maxBackupIntervalHours\":2120941596738305720},{\"name\":\"mftpmdtz\",\"minStorageSize\":6562239674764125403,\"maxStorageSize\":8628108633019438318,\"minBackupRetentionDays\":1872475560881606725,\"maxBackupRetentionDays\":840747953367424454,\"minBackupIntervalHours\":343574870705821595,\"maxBackupIntervalHours\":8439082664009301787},{\"name\":\"bdb\",\"minStorageSize\":3940441182690359236,\"maxStorageSize\":4397077651740023584,\"minBackupRetentionDays\":6059165866604595135,\"maxBackupRetentionDays\":7204032751679115216,\"minBackupIntervalHours\":7606272604171191671,\"maxBackupIntervalHours\":5526633382348478789}],\"supportedServerVersions\":[{\"name\":\"sihsgqcwdhohsd\",\"supportedSkus\":[{},{}]},{\"name\":\"zsu\",\"supportedSkus\":[{},{},{}]}]},{\"name\":\"dxbzlmcmuap\",\"supportedStorageEditions\":[{\"name\":\"bevwqqxeys\",\"minStorageSize\":4160120838530826902,\"maxStorageSize\":328893230492625152,\"minBackupRetentionDays\":4259363860416490102,\"maxBackupRetentionDays\":1183436721296067733,\"minBackupIntervalHours\":4864080345534775106,\"maxBackupIntervalHours\":5579125360239999126},{\"name\":\"o\",\"minStorageSize\":6641902450143738474,\"maxStorageSize\":6112219280585883624,\"minBackupRetentionDays\":5480964169842909766,\"maxBackupRetentionDays\":7238686048723622110,\"minBackupIntervalHours\":6179637668412316681,\"maxBackupIntervalHours\":6018450273197530878},{\"name\":\"ezrxcczurtleipqx\",\"minStorageSize\":2834445186156751088,\"maxStorageSize\":5401595898507177425,\"minBackupRetentionDays\":219465156296514130,\"maxBackupRetentionDays\":8865201443625196451,\"minBackupIntervalHours\":2796904412967112909,\"maxBackupIntervalHours\":7791117034992992148},{\"name\":\"noda\",\"minStorageSize\":4300342895561175446,\"maxStorageSize\":8320087394217577004,\"minBackupRetentionDays\":7022680732951740114,\"maxBackupRetentionDays\":7812585541741451756,\"minBackupIntervalHours\":7587339093272860703,\"maxBackupIntervalHours\":857600244335587375}],\"supportedServerVersions\":[{\"name\":\"dlat\",\"supportedSkus\":[{},{},{},{}]}]}]}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.locationBasedCapabilities().list("dunqnd", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitySetsGetWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitySetsGetWithResponseMockTests.java deleted file mode 100644 index 35a9aef34003..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitySetsGetWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.Capability; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LocationBasedCapabilitySetsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"supportedGeoBackupRegions\":[\"xynqnz\",\"dpsovwxznptgo\"],\"supportedFlexibleServerEditions\":[{\"name\":\"b\",\"defaultSku\":\"pfhvfslk\",\"defaultStorageSize\":774606511,\"supportedStorageEditions\":[{},{},{}],\"supportedSkus\":[{},{},{}]},{\"name\":\"jkskyr\",\"defaultSku\":\"ovzidsx\",\"defaultStorageSize\":2100581785,\"supportedStorageEditions\":[{}],\"supportedSkus\":[{},{}]},{\"name\":\"rygznmmaxriz\",\"defaultSku\":\"obgop\",\"defaultStorageSize\":840646010,\"supportedStorageEditions\":[{},{},{}],\"supportedSkus\":[{},{},{},{}]}],\"supportedServerVersions\":[{\"name\":\"eixynllxecwcroj\"},{\"name\":\"slhcawjutifd\"},{\"name\":\"mvi\"}]},\"id\":\"rqjb\",\"name\":\"tzh\",\"type\":\"aglkafhon\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Capability response = manager.locationBasedCapabilitySets() - .getWithResponse("fh", "l", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitySetsListMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitySetsListMockTests.java deleted file mode 100644 index 1c210b4dd55f..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LocationBasedCapabilitySetsListMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.Capability; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LocationBasedCapabilitySetsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"supportedGeoBackupRegions\":[\"wwyyurmoch\",\"prprsnmokay\"],\"supportedFlexibleServerEditions\":[{\"name\":\"hlb\",\"defaultSku\":\"bzpcpiljhahzvec\",\"defaultStorageSize\":693211194,\"supportedStorageEditions\":[{},{},{}],\"supportedSkus\":[{},{},{}]},{\"name\":\"hol\",\"defaultSku\":\"jwiuubwefqsfapaq\",\"defaultStorageSize\":175578063,\"supportedStorageEditions\":[{},{},{},{}],\"supportedSkus\":[{},{},{},{}]},{\"name\":\"x\",\"defaultSku\":\"mfxapjwogqqno\",\"defaultStorageSize\":1623831151,\"supportedStorageEditions\":[{},{},{}],\"supportedSkus\":[{},{},{},{}]},{\"name\":\"tqwpwya\",\"defaultSku\":\"zasqbucljgkyexao\",\"defaultStorageSize\":241996681,\"supportedStorageEditions\":[{}],\"supportedSkus\":[{}]}],\"supportedServerVersions\":[{\"name\":\"ault\"},{\"name\":\"jjum\"},{\"name\":\"waz\"}]},\"id\":\"qnmcjngzqdqx\",\"name\":\"bjwgnyfus\",\"type\":\"zsvtuikzhajqgl\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.locationBasedCapabilitySets().list("zlbiojlvfhrbbpn", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LogFileInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LogFileInnerTests.java deleted file mode 100644 index 05e994a81a79..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LogFileInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.LogFileInner; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class LogFileInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogFileInner model = BinaryData.fromString( - "{\"properties\":{\"sizeInKB\":673767528755359604,\"createdTime\":\"2021-02-05T11:19:07Z\",\"type\":\"utttxfvjrbirp\",\"lastModifiedTime\":\"2020-12-31T13:56:03Z\",\"url\":\"c\"},\"id\":\"ahfn\",\"name\":\"jky\",\"type\":\"xjvuujqgidokg\"}") - .toObject(LogFileInner.class); - Assertions.assertEquals(673767528755359604L, model.sizeInKB()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-05T11:19:07Z"), model.createdTime()); - Assertions.assertEquals("utttxfvjrbirp", model.typePropertiesType()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-31T13:56:03Z"), model.lastModifiedTime()); - Assertions.assertEquals("c", model.url()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogFileInner model = new LogFileInner().withSizeInKB(673767528755359604L) - .withCreatedTime(OffsetDateTime.parse("2021-02-05T11:19:07Z")) - .withTypePropertiesType("utttxfvjrbirp") - .withLastModifiedTime(OffsetDateTime.parse("2020-12-31T13:56:03Z")) - .withUrl("c"); - model = BinaryData.fromObject(model).toObject(LogFileInner.class); - Assertions.assertEquals(673767528755359604L, model.sizeInKB()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-05T11:19:07Z"), model.createdTime()); - Assertions.assertEquals("utttxfvjrbirp", model.typePropertiesType()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-31T13:56:03Z"), model.lastModifiedTime()); - Assertions.assertEquals("c", model.url()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LogFileListResultTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LogFileListResultTests.java deleted file mode 100644 index 8c5792538584..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LogFileListResultTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.LogFileInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.LogFileListResult; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LogFileListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogFileListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"sizeInKB\":1872551140801925298,\"createdTime\":\"2021-10-13T17:50:52Z\",\"type\":\"zi\",\"lastModifiedTime\":\"2021-10-16T23:09:14Z\",\"url\":\"sjttgzfbish\"},\"id\":\"khaj\",\"name\":\"eyeam\",\"type\":\"p\"},{\"properties\":{\"sizeInKB\":6597386735220363785,\"createdTime\":\"2021-07-25T22:27:33Z\",\"type\":\"xw\",\"lastModifiedTime\":\"2021-01-08T17:30:08Z\",\"url\":\"honowkgshwank\"},\"id\":\"zbinjeputtm\",\"name\":\"ywnuzoq\",\"type\":\"tiyqzrnkcqv\"},{\"properties\":{\"sizeInKB\":3429279847863801881,\"createdTime\":\"2021-01-23T07:25:21Z\",\"type\":\"icohoqqnwvl\",\"lastModifiedTime\":\"2021-02-08T19:31:14Z\",\"url\":\"w\"},\"id\":\"eun\",\"name\":\"mqhgyxzkonocuk\",\"type\":\"klyaxuconu\"},{\"properties\":{\"sizeInKB\":5755576934787523343,\"createdTime\":\"2021-10-30T19:28:33Z\",\"type\":\"pewr\",\"lastModifiedTime\":\"2021-08-16T15:51:55Z\",\"url\":\"vvjektcxsenhwlrs\"},\"id\":\"rzpwvlqdqgbiq\",\"name\":\"lihkaetcktvfc\",\"type\":\"vf\"}],\"nextLink\":\"kymuctqhjfbebr\"}") - .toObject(LogFileListResult.class); - Assertions.assertEquals(1872551140801925298L, model.value().get(0).sizeInKB()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T17:50:52Z"), model.value().get(0).createdTime()); - Assertions.assertEquals("zi", model.value().get(0).typePropertiesType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-16T23:09:14Z"), model.value().get(0).lastModifiedTime()); - Assertions.assertEquals("sjttgzfbish", model.value().get(0).url()); - Assertions.assertEquals("kymuctqhjfbebr", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogFileListResult model = new LogFileListResult().withValue(Arrays.asList( - new LogFileInner().withSizeInKB(1872551140801925298L) - .withCreatedTime(OffsetDateTime.parse("2021-10-13T17:50:52Z")) - .withTypePropertiesType("zi") - .withLastModifiedTime(OffsetDateTime.parse("2021-10-16T23:09:14Z")) - .withUrl("sjttgzfbish"), - new LogFileInner().withSizeInKB(6597386735220363785L) - .withCreatedTime(OffsetDateTime.parse("2021-07-25T22:27:33Z")) - .withTypePropertiesType("xw") - .withLastModifiedTime(OffsetDateTime.parse("2021-01-08T17:30:08Z")) - .withUrl("honowkgshwank"), - new LogFileInner().withSizeInKB(3429279847863801881L) - .withCreatedTime(OffsetDateTime.parse("2021-01-23T07:25:21Z")) - .withTypePropertiesType("icohoqqnwvl") - .withLastModifiedTime(OffsetDateTime.parse("2021-02-08T19:31:14Z")) - .withUrl("w"), - new LogFileInner().withSizeInKB(5755576934787523343L) - .withCreatedTime(OffsetDateTime.parse("2021-10-30T19:28:33Z")) - .withTypePropertiesType("pewr") - .withLastModifiedTime(OffsetDateTime.parse("2021-08-16T15:51:55Z")) - .withUrl("vvjektcxsenhwlrs"))) - .withNextLink("kymuctqhjfbebr"); - model = BinaryData.fromObject(model).toObject(LogFileListResult.class); - Assertions.assertEquals(1872551140801925298L, model.value().get(0).sizeInKB()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-13T17:50:52Z"), model.value().get(0).createdTime()); - Assertions.assertEquals("zi", model.value().get(0).typePropertiesType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-16T23:09:14Z"), model.value().get(0).lastModifiedTime()); - Assertions.assertEquals("sjttgzfbish", model.value().get(0).url()); - Assertions.assertEquals("kymuctqhjfbebr", model.nextLink()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LogFilePropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LogFilePropertiesTests.java deleted file mode 100644 index e4550f49431c..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LogFilePropertiesTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.LogFileProperties; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class LogFilePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogFileProperties model = BinaryData.fromString( - "{\"sizeInKB\":43564363345027747,\"createdTime\":\"2021-04-07T01:42:24Z\",\"type\":\"vcltbgsncgh\",\"lastModifiedTime\":\"2021-03-20T11:41:23Z\",\"url\":\"zz\"}") - .toObject(LogFileProperties.class); - Assertions.assertEquals(43564363345027747L, model.sizeInKB()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-07T01:42:24Z"), model.createdTime()); - Assertions.assertEquals("vcltbgsncgh", model.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-20T11:41:23Z"), model.lastModifiedTime()); - Assertions.assertEquals("zz", model.url()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogFileProperties model = new LogFileProperties().withSizeInKB(43564363345027747L) - .withCreatedTime(OffsetDateTime.parse("2021-04-07T01:42:24Z")) - .withType("vcltbgsncgh") - .withLastModifiedTime(OffsetDateTime.parse("2021-03-20T11:41:23Z")) - .withUrl("zz"); - model = BinaryData.fromObject(model).toObject(LogFileProperties.class); - Assertions.assertEquals(43564363345027747L, model.sizeInKB()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-07T01:42:24Z"), model.createdTime()); - Assertions.assertEquals("vcltbgsncgh", model.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-20T11:41:23Z"), model.lastModifiedTime()); - Assertions.assertEquals("zz", model.url()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LogFilesListByServerMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LogFilesListByServerMockTests.java deleted file mode 100644 index bf52ccdd4522..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LogFilesListByServerMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.LogFile; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LogFilesListByServerMockTests { - @Test - public void testListByServer() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"sizeInKB\":848870221890738563,\"createdTime\":\"2021-07-13T16:54:43Z\",\"type\":\"mysu\",\"lastModifiedTime\":\"2021-04-28T09:40:52Z\",\"url\":\"rntvlwijp\"},\"id\":\"texoqqpwc\",\"name\":\"yufmhruncuwmq\",\"type\":\"pkcdqzhlct\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.logFiles().listByServer("tybbwwpgda", "chzyvlixqnrk", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(848870221890738563L, response.iterator().next().sizeInKB()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-13T16:54:43Z"), response.iterator().next().createdTime()); - Assertions.assertEquals("mysu", response.iterator().next().typePropertiesType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-28T09:40:52Z"), - response.iterator().next().lastModifiedTime()); - Assertions.assertEquals("rntvlwijp", response.iterator().next().url()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LongRunningBackupsCreateMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LongRunningBackupsCreateMockTests.java deleted file mode 100644 index f07a5d965933..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LongRunningBackupsCreateMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupType; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerBackupV2; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LongRunningBackupsCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"backupNameV2\":\"yhgk\",\"backupType\":\"FULL\",\"completedTime\":\"2021-07-25T09:50:13Z\",\"source\":\"owzfttsttkt\",\"provisioningState\":\"Succeeded\"},\"id\":\"qactxtgzukxitmmq\",\"name\":\"gqqqxh\",\"type\":\"n\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ServerBackupV2 response = manager.longRunningBackups() - .define("smsks") - .withExistingFlexibleServer("oqytibyowbblgy", "vutpthjoxo") - .withBackupNameV2("mlqoljx") - .withBackupType(BackupType.FULL) - .withCompletedTime(OffsetDateTime.parse("2021-09-22T22:00:27Z")) - .withSource("xsffgcviz") - .create(); - - Assertions.assertEquals("yhgk", response.backupNameV2()); - Assertions.assertEquals(BackupType.FULL, response.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-25T09:50:13Z"), response.completedTime()); - Assertions.assertEquals("owzfttsttkt", response.source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LongRunningBackupsOperationsGetWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LongRunningBackupsOperationsGetWithResponseMockTests.java deleted file mode 100644 index 0388a20c268a..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LongRunningBackupsOperationsGetWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupType; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerBackupV2; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LongRunningBackupsOperationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"backupNameV2\":\"opidkqqfkuv\",\"backupType\":\"FULL\",\"completedTime\":\"2021-01-30T21:59:46Z\",\"source\":\"ligovibrxkpm\",\"provisioningState\":\"Succeeded\"},\"id\":\"uruocbgo\",\"name\":\"rb\",\"type\":\"eoybfhjxakvvjgs\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ServerBackupV2 response = manager.longRunningBackupsOperations() - .getWithResponse("rxcpjuisavo", "qdzfvazivjlfrqtt", "ajlkatnw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("opidkqqfkuv", response.backupNameV2()); - Assertions.assertEquals(BackupType.FULL, response.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-30T21:59:46Z"), response.completedTime()); - Assertions.assertEquals("ligovibrxkpm", response.source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LongRunningBackupsOperationsListMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LongRunningBackupsOperationsListMockTests.java deleted file mode 100644 index 3786c6483000..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/LongRunningBackupsOperationsListMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupType; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerBackupV2; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LongRunningBackupsOperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"backupNameV2\":\"dtj\",\"backupType\":\"FULL\",\"completedTime\":\"2021-08-24T09:36:05Z\",\"source\":\"hxuuwhcjyxccybvp\",\"provisioningState\":\"Failed\"},\"id\":\"kudzpxgwj\",\"name\":\"lma\",\"type\":\"stcyohpfkyrkdbd\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.longRunningBackupsOperations().list("ordilmywwtkgkxny", "dabg", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dtj", response.iterator().next().backupNameV2()); - Assertions.assertEquals(BackupType.FULL, response.iterator().next().backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-24T09:36:05Z"), - response.iterator().next().completedTime()); - Assertions.assertEquals("hxuuwhcjyxccybvp", response.iterator().next().source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenanceInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenanceInnerTests.java deleted file mode 100644 index 8bfc2d35f152..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenanceInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.MaintenanceInner; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class MaintenanceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaintenanceInner model = BinaryData.fromString( - "{\"properties\":{\"maintenanceType\":\"RoutineMaintenance\",\"maintenanceState\":\"Scheduled\",\"maintenanceStartTime\":\"2021-01-11T17:56:17Z\",\"maintenanceEndTime\":\"2021-11-14T23:26:30Z\",\"maintenanceExecutionStartTime\":\"2021-12-04T11:44:33Z\",\"maintenanceExecutionEndTime\":\"2021-07-10T12:02:53Z\",\"maintenanceAvailableScheduleMinTime\":\"2020-12-27T04:23:31Z\",\"maintenanceAvailableScheduleMaxTime\":\"2021-11-09T11:24:19Z\",\"maintenanceTitle\":\"c\",\"maintenanceDescription\":\"tizzronasxif\",\"provisioningState\":\"Succeeded\"},\"id\":\"yzhftwesgogczh\",\"name\":\"nnxk\",\"type\":\"lgnyhmo\"}") - .toObject(MaintenanceInner.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-11T17:56:17Z"), model.maintenanceStartTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaintenanceInner model - = new MaintenanceInner().withMaintenanceStartTime(OffsetDateTime.parse("2021-01-11T17:56:17Z")); - model = BinaryData.fromObject(model).toObject(MaintenanceInner.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-11T17:56:17Z"), model.maintenanceStartTime()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenanceListResultTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenanceListResultTests.java deleted file mode 100644 index de70e916f23f..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenanceListResultTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.MaintenanceInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceListResult; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MaintenanceListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaintenanceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"maintenanceType\":\"MinorVersionUpgrade\",\"maintenanceState\":\"Completed\",\"maintenanceStartTime\":\"2021-08-13T04:34:19Z\",\"maintenanceEndTime\":\"2021-04-02T14:41:37Z\",\"maintenanceExecutionStartTime\":\"2021-01-10T15:25:32Z\",\"maintenanceExecutionEndTime\":\"2021-10-08T05:52:02Z\",\"maintenanceAvailableScheduleMinTime\":\"2021-03-11T23:46:52Z\",\"maintenanceAvailableScheduleMaxTime\":\"2021-10-13T21:08:10Z\",\"maintenanceTitle\":\"zirtxdyuxzejntps\",\"maintenanceDescription\":\"gioilqu\",\"provisioningState\":\"Creating\"},\"id\":\"xtqmieoxor\",\"name\":\"gufhyaomtbg\",\"type\":\"havgrvk\"},{\"properties\":{\"maintenanceType\":\"HotFixes\",\"maintenanceState\":\"Canceled\",\"maintenanceStartTime\":\"2021-09-28T04:32:09Z\",\"maintenanceEndTime\":\"2021-04-30T07:32:09Z\",\"maintenanceExecutionStartTime\":\"2021-10-06T16:12:23Z\",\"maintenanceExecutionEndTime\":\"2021-07-16T09:53:39Z\",\"maintenanceAvailableScheduleMinTime\":\"2021-06-20T08:58:19Z\",\"maintenanceAvailableScheduleMaxTime\":\"2021-02-15T17:49:17Z\",\"maintenanceTitle\":\"mv\",\"maintenanceDescription\":\"luyovwxnbkfezzx\",\"provisioningState\":\"Deleting\"},\"id\":\"wzdgirujbzbo\",\"name\":\"vzzbtdcq\",\"type\":\"pniyujviyl\"},{\"properties\":{\"maintenanceType\":\"SecurityPatches\",\"maintenanceState\":\"Canceled\",\"maintenanceStartTime\":\"2021-06-27T03:16:26Z\",\"maintenanceEndTime\":\"2021-10-02T20:28:41Z\",\"maintenanceExecutionStartTime\":\"2021-10-15T12:19:25Z\",\"maintenanceExecutionEndTime\":\"2021-08-09T21:16:26Z\",\"maintenanceAvailableScheduleMinTime\":\"2021-02-17T11:04:17Z\",\"maintenanceAvailableScheduleMaxTime\":\"2021-04-26T20:36:36Z\",\"maintenanceTitle\":\"gaojf\",\"maintenanceDescription\":\"nc\",\"provisioningState\":\"Deleting\"},\"id\":\"fhir\",\"name\":\"tymoxoftp\",\"type\":\"piwyczuhxacpqjl\"}],\"nextLink\":\"hyus\"}") - .toObject(MaintenanceListResult.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-13T04:34:19Z"), - model.value().get(0).maintenanceStartTime()); - Assertions.assertEquals("hyus", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaintenanceListResult model = new MaintenanceListResult() - .withValue(Arrays.asList( - new MaintenanceInner().withMaintenanceStartTime(OffsetDateTime.parse("2021-08-13T04:34:19Z")), - new MaintenanceInner().withMaintenanceStartTime(OffsetDateTime.parse("2021-09-28T04:32:09Z")), - new MaintenanceInner().withMaintenanceStartTime(OffsetDateTime.parse("2021-06-27T03:16:26Z")))) - .withNextLink("hyus"); - model = BinaryData.fromObject(model).toObject(MaintenanceListResult.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-13T04:34:19Z"), - model.value().get(0).maintenanceStartTime()); - Assertions.assertEquals("hyus", model.nextLink()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenancePropertiesForUpdateTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenancePropertiesForUpdateTests.java deleted file mode 100644 index dffeb78acf8f..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenancePropertiesForUpdateTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.MaintenancePropertiesForUpdate; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class MaintenancePropertiesForUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaintenancePropertiesForUpdate model - = BinaryData.fromString("{\"maintenanceStartTime\":\"2021-04-06T20:50:40Z\"}") - .toObject(MaintenancePropertiesForUpdate.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T20:50:40Z"), model.maintenanceStartTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaintenancePropertiesForUpdate model = new MaintenancePropertiesForUpdate() - .withMaintenanceStartTime(OffsetDateTime.parse("2021-04-06T20:50:40Z")); - model = BinaryData.fromObject(model).toObject(MaintenancePropertiesForUpdate.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-06T20:50:40Z"), model.maintenanceStartTime()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenancePropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenancePropertiesTests.java deleted file mode 100644 index eea21d0acef1..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenancePropertiesTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.MaintenanceProperties; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class MaintenancePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaintenanceProperties model = BinaryData.fromString( - "{\"maintenanceType\":\"RoutineMaintenance\",\"maintenanceState\":\"Scheduled\",\"maintenanceStartTime\":\"2021-01-10T00:28:10Z\",\"maintenanceEndTime\":\"2021-06-21T18:07:23Z\",\"maintenanceExecutionStartTime\":\"2021-10-07T20:30:06Z\",\"maintenanceExecutionEndTime\":\"2021-03-30T21:22:17Z\",\"maintenanceAvailableScheduleMinTime\":\"2021-10-28T02:40:53Z\",\"maintenanceAvailableScheduleMaxTime\":\"2021-11-20T05:13:49Z\",\"maintenanceTitle\":\"vcxgfrpdsofbshr\",\"maintenanceDescription\":\"vbuswd\",\"provisioningState\":\"Creating\"}") - .toObject(MaintenanceProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-10T00:28:10Z"), model.maintenanceStartTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaintenanceProperties model - = new MaintenanceProperties().withMaintenanceStartTime(OffsetDateTime.parse("2021-01-10T00:28:10Z")); - model = BinaryData.fromObject(model).toObject(MaintenanceProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-10T00:28:10Z"), model.maintenanceStartTime()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenanceUpdateTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenanceUpdateTests.java deleted file mode 100644 index f5a4637e796e..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenanceUpdateTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceUpdate; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class MaintenanceUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaintenanceUpdate model - = BinaryData.fromString("{\"properties\":{\"maintenanceStartTime\":\"2021-02-22T05:56:13Z\"}}") - .toObject(MaintenanceUpdate.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-22T05:56:13Z"), model.maintenanceStartTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaintenanceUpdate model - = new MaintenanceUpdate().withMaintenanceStartTime(OffsetDateTime.parse("2021-02-22T05:56:13Z")); - model = BinaryData.fromObject(model).toObject(MaintenanceUpdate.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-22T05:56:13Z"), model.maintenanceStartTime()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenanceWindowTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenanceWindowTests.java deleted file mode 100644 index 3ab1e94f7e05..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenanceWindowTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceWindow; -import org.junit.jupiter.api.Assertions; - -public final class MaintenanceWindowTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaintenanceWindow model = BinaryData.fromString( - "{\"customWindow\":\"ypvhezrkg\",\"startHour\":61185346,\"startMinute\":1889311419,\"dayOfWeek\":1843167961}") - .toObject(MaintenanceWindow.class); - Assertions.assertEquals("ypvhezrkg", model.customWindow()); - Assertions.assertEquals(61185346, model.startHour()); - Assertions.assertEquals(1889311419, model.startMinute()); - Assertions.assertEquals(1843167961, model.dayOfWeek()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaintenanceWindow model = new MaintenanceWindow().withCustomWindow("ypvhezrkg") - .withStartHour(61185346) - .withStartMinute(1889311419) - .withDayOfWeek(1843167961); - model = BinaryData.fromObject(model).toObject(MaintenanceWindow.class); - Assertions.assertEquals("ypvhezrkg", model.customWindow()); - Assertions.assertEquals(61185346, model.startHour()); - Assertions.assertEquals(1889311419, model.startMinute()); - Assertions.assertEquals(1843167961, model.dayOfWeek()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenancesListMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenancesListMockTests.java deleted file mode 100644 index 671e6dd7f1f1..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenancesListMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.Maintenance; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MaintenancesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"maintenanceType\":\"MinorVersionUpgrade\",\"maintenanceState\":\"Completed\",\"maintenanceStartTime\":\"2021-08-23T22:39:46Z\",\"maintenanceEndTime\":\"2021-07-13T06:42:28Z\",\"maintenanceExecutionStartTime\":\"2020-12-22T09:43:06Z\",\"maintenanceExecutionEndTime\":\"2021-12-03T08:12:33Z\",\"maintenanceAvailableScheduleMinTime\":\"2021-01-12T16:11:55Z\",\"maintenanceAvailableScheduleMaxTime\":\"2021-09-07T11:30:25Z\",\"maintenanceTitle\":\"amhsycxhxzgazt\",\"maintenanceDescription\":\"boi\",\"provisioningState\":\"Deleting\"},\"id\":\"qhppubowsepdfgk\",\"name\":\"tdherngbtcjuahok\",\"type\":\"tobkauxofshfph\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.maintenances().list("mnxhkxjqirwrweo", "xffi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(OffsetDateTime.parse("2021-08-23T22:39:46Z"), - response.iterator().next().maintenanceStartTime()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenancesReadWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenancesReadWithResponseMockTests.java deleted file mode 100644 index 8dfd228d273e..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenancesReadWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.Maintenance; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MaintenancesReadWithResponseMockTests { - @Test - public void testReadWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"maintenanceType\":\"MinorVersionUpgrade\",\"maintenanceState\":\"Completed\",\"maintenanceStartTime\":\"2021-08-29T15:14:45Z\",\"maintenanceEndTime\":\"2021-11-10T18:44:54Z\",\"maintenanceExecutionStartTime\":\"2021-02-15T04:02:17Z\",\"maintenanceExecutionEndTime\":\"2021-11-04T15:42:17Z\",\"maintenanceAvailableScheduleMinTime\":\"2021-09-04T03:19:32Z\",\"maintenanceAvailableScheduleMaxTime\":\"2021-12-06T18:26:45Z\",\"maintenanceTitle\":\"tozipqwj\",\"maintenanceDescription\":\"mur\",\"provisioningState\":\"Succeeded\"},\"id\":\"ewpktvqy\",\"name\":\"kmqp\",\"type\":\"o\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Maintenance response = manager.maintenances() - .readWithResponse("vtxnjmxmcuqud", "cvclxynpdk", "gfabuiyjibuzphdu", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(OffsetDateTime.parse("2021-08-29T15:14:45Z"), response.maintenanceStartTime()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenancesUpdateMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenancesUpdateMockTests.java deleted file mode 100644 index 7b7a694acab1..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MaintenancesUpdateMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.Maintenance; -import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceUpdate; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MaintenancesUpdateMockTests { - @Test - public void testUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"maintenanceType\":\"MinorVersionUpgrade\",\"maintenanceState\":\"Processing\",\"maintenanceStartTime\":\"2021-09-17T12:34:15Z\",\"maintenanceEndTime\":\"2021-01-27T18:27:01Z\",\"maintenanceExecutionStartTime\":\"2021-05-24T18:45:57Z\",\"maintenanceExecutionEndTime\":\"2021-09-03T01:26:59Z\",\"maintenanceAvailableScheduleMinTime\":\"2021-05-12T03:58:05Z\",\"maintenanceAvailableScheduleMaxTime\":\"2021-01-21T09:59:18Z\",\"maintenanceTitle\":\"w\",\"maintenanceDescription\":\"ilkmk\",\"provisioningState\":\"Succeeded\"},\"id\":\"vdndviauo\",\"name\":\"phuartv\",\"type\":\"iukyefchnmna\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Maintenance response = manager.maintenances() - .update("hlfbcgwgc", "oxoebqi", "jipnwj", - new MaintenanceUpdate().withMaintenanceStartTime(OffsetDateTime.parse("2021-07-15T16:39:33Z")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals(OffsetDateTime.parse("2021-09-17T12:34:15Z"), response.maintenanceStartTime()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MySqlServerIdentityTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MySqlServerIdentityTests.java deleted file mode 100644 index 68ac77ba138d..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MySqlServerIdentityTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.mysqlflexibleserver.models.MySqlServerIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MySqlServerIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MySqlServerIdentity model = BinaryData.fromString( - "{\"principalId\":\"mi\",\"tenantId\":\"thz\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ehoqfbowskan\":\"dataabhjybi\",\"ywgndrv\":\"dataktzlcuiywg\",\"ocpecfvmmco\":\"datanhzgpphrcgyn\"}}") - .toObject(MySqlServerIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MySqlServerIdentity model = new MySqlServerIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("ehoqfbowskan", "dataabhjybi", "ywgndrv", "dataktzlcuiywg", "ocpecfvmmco", "datanhzgpphrcgyn")); - model = BinaryData.fromObject(model).toObject(MySqlServerIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MySqlServerSkuTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MySqlServerSkuTests.java deleted file mode 100644 index 1c7dae8bab8b..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/MySqlServerSkuTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.MySqlServerSku; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerSkuTier; -import org.junit.jupiter.api.Assertions; - -public final class MySqlServerSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MySqlServerSku model = BinaryData.fromString("{\"name\":\"fsxlzevgbmqjqa\",\"tier\":\"MemoryOptimized\"}") - .toObject(MySqlServerSku.class); - Assertions.assertEquals("fsxlzevgbmqjqa", model.name()); - Assertions.assertEquals(ServerSkuTier.MEMORY_OPTIMIZED, model.tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MySqlServerSku model = new MySqlServerSku().withName("fsxlzevgbmqjqa").withTier(ServerSkuTier.MEMORY_OPTIMIZED); - model = BinaryData.fromObject(model).toObject(MySqlServerSku.class); - Assertions.assertEquals("fsxlzevgbmqjqa", model.name()); - Assertions.assertEquals(ServerSkuTier.MEMORY_OPTIMIZED, model.tier()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/NameAvailabilityInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/NameAvailabilityInnerTests.java deleted file mode 100644 index a90232e8c7f3..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/NameAvailabilityInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.NameAvailabilityInner; -import org.junit.jupiter.api.Assertions; - -public final class NameAvailabilityInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NameAvailabilityInner model - = BinaryData.fromString("{\"message\":\"crkvcikhnv\",\"nameAvailable\":false,\"reason\":\"gxqquezik\"}") - .toObject(NameAvailabilityInner.class); - Assertions.assertEquals("crkvcikhnv", model.message()); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals("gxqquezik", model.reason()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameAvailabilityInner model - = new NameAvailabilityInner().withMessage("crkvcikhnv").withNameAvailable(false).withReason("gxqquezik"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityInner.class); - Assertions.assertEquals("crkvcikhnv", model.message()); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals("gxqquezik", model.reason()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/NameAvailabilityRequestTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/NameAvailabilityRequestTests.java deleted file mode 100644 index b7b70c8f287c..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/NameAvailabilityRequestTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.NameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class NameAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NameAvailabilityRequest model = BinaryData.fromString("{\"name\":\"y\",\"type\":\"ogjltdtbnnhad\"}") - .toObject(NameAvailabilityRequest.class); - Assertions.assertEquals("y", model.name()); - Assertions.assertEquals("ogjltdtbnnhad", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameAvailabilityRequest model = new NameAvailabilityRequest().withName("y").withType("ogjltdtbnnhad"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityRequest.class); - Assertions.assertEquals("y", model.name()); - Assertions.assertEquals("ogjltdtbnnhad", model.type()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/NetworkTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/NetworkTests.java deleted file mode 100644 index 4722fcf1c6e5..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/NetworkTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.EnableStatusEnum; -import com.azure.resourcemanager.mysqlflexibleserver.models.Network; -import org.junit.jupiter.api.Assertions; - -public final class NetworkTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Network model = BinaryData.fromString( - "{\"publicNetworkAccess\":\"Enabled\",\"delegatedSubnetResourceId\":\"chcbonqvpkvlrxnj\",\"privateDnsZoneResourceId\":\"seiphe\"}") - .toObject(Network.class); - Assertions.assertEquals(EnableStatusEnum.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.delegatedSubnetResourceId()); - Assertions.assertEquals("seiphe", model.privateDnsZoneResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Network model = new Network().withPublicNetworkAccess(EnableStatusEnum.ENABLED) - .withDelegatedSubnetResourceId("chcbonqvpkvlrxnj") - .withPrivateDnsZoneResourceId("seiphe"); - model = BinaryData.fromObject(model).toObject(Network.class); - Assertions.assertEquals(EnableStatusEnum.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.delegatedSubnetResourceId()); - Assertions.assertEquals("seiphe", model.privateDnsZoneResourceId()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationDisplayTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationDisplayTests.java deleted file mode 100644 index 42a4d6a4702c..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationDisplayTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"ovvtgseinqfiu\",\"resource\":\"qknp\",\"operation\":\"gnepttwqmsni\",\"description\":\"cdm\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("ovvtgseinqfiu", model.provider()); - Assertions.assertEquals("qknp", model.resource()); - Assertions.assertEquals("gnepttwqmsni", model.operation()); - Assertions.assertEquals("cdm", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withProvider("ovvtgseinqfiu") - .withResource("qknp") - .withOperation("gnepttwqmsni") - .withDescription("cdm"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("ovvtgseinqfiu", model.provider()); - Assertions.assertEquals("qknp", model.resource()); - Assertions.assertEquals("gnepttwqmsni", model.operation()); - Assertions.assertEquals("cdm", model.description()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationInnerTests.java deleted file mode 100644 index 81cd1ae6d0ce..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationInnerTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.OperationInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.OperationDisplay; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = BinaryData.fromString( - "{\"name\":\"tpkiwkkbnujry\",\"display\":{\"provider\":\"y\",\"resource\":\"fpncurdo\",\"operation\":\"iithtywu\",\"description\":\"cbihwqk\"},\"origin\":\"dntwjchrdgo\",\"properties\":{\"luudfdlwggytsb\":\"dataumwctondz\"}}") - .toObject(OperationInner.class); - Assertions.assertEquals("tpkiwkkbnujry", model.name()); - Assertions.assertEquals("y", model.display().provider()); - Assertions.assertEquals("fpncurdo", model.display().resource()); - Assertions.assertEquals("iithtywu", model.display().operation()); - Assertions.assertEquals("cbihwqk", model.display().description()); - Assertions.assertEquals("dntwjchrdgo", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withName("tpkiwkkbnujry") - .withDisplay(new OperationDisplay().withProvider("y") - .withResource("fpncurdo") - .withOperation("iithtywu") - .withDescription("cbihwqk")) - .withOrigin("dntwjchrdgo") - .withProperties(mapOf("luudfdlwggytsb", "dataumwctondz")); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("tpkiwkkbnujry", model.name()); - Assertions.assertEquals("y", model.display().provider()); - Assertions.assertEquals("fpncurdo", model.display().resource()); - Assertions.assertEquals("iithtywu", model.display().operation()); - Assertions.assertEquals("cbihwqk", model.display().description()); - Assertions.assertEquals("dntwjchrdgo", model.origin()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationListResultTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationListResultTests.java deleted file mode 100644 index 7eb31af9a88b..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationListResultTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.OperationInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.OperationDisplay; -import com.azure.resourcemanager.mysqlflexibleserver.models.OperationListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"tlpdn\",\"display\":{\"provider\":\"vgbmhr\",\"resource\":\"kw\",\"operation\":\"ijejvegrhbpn\",\"description\":\"xexccbdreaxhcexd\"},\"origin\":\"vqahqkghtpwi\",\"properties\":{\"z\":\"datayjsvfyc\",\"rvmtgjq\":\"datafvoow\",\"nsxkmcwaekrrjr\":\"datapyostronzmyhgfi\"}},{\"name\":\"fxtsgum\",\"display\":{\"provider\":\"lik\",\"resource\":\"wslolbqp\",\"operation\":\"zlmvfelfktgp\",\"description\":\"rpw\"},\"origin\":\"eznoig\",\"properties\":{\"zejjoqk\":\"datajwmwkpnbs\",\"aa\":\"datagfhsxttaugzxn\",\"jlwuenvrkp\":\"datapxdtnkdmkq\",\"ibreb\":\"dataou\"}},{\"name\":\"aysjkixqtnqttez\",\"display\":{\"provider\":\"ffiakp\",\"resource\":\"qqmtedltmmji\",\"operation\":\"eozphv\",\"description\":\"uyqncygupkvipmd\"},\"origin\":\"wx\",\"properties\":{\"xhojuj\":\"dataevzhfsto\",\"hixbjxyfwnyl\":\"dataypelmcu\"}}],\"nextLink\":\"ool\"}") - .toObject(OperationListResult.class); - Assertions.assertEquals("tlpdn", model.value().get(0).name()); - Assertions.assertEquals("vgbmhr", model.value().get(0).display().provider()); - Assertions.assertEquals("kw", model.value().get(0).display().resource()); - Assertions.assertEquals("ijejvegrhbpn", model.value().get(0).display().operation()); - Assertions.assertEquals("xexccbdreaxhcexd", model.value().get(0).display().description()); - Assertions.assertEquals("vqahqkghtpwi", model.value().get(0).origin()); - Assertions.assertEquals("ool", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model - = new OperationListResult() - .withValue( - Arrays.asList( - new OperationInner().withName("tlpdn") - .withDisplay(new OperationDisplay().withProvider("vgbmhr") - .withResource("kw") - .withOperation("ijejvegrhbpn") - .withDescription("xexccbdreaxhcexd")) - .withOrigin("vqahqkghtpwi") - .withProperties(mapOf("z", "datayjsvfyc", "rvmtgjq", "datafvoow", "nsxkmcwaekrrjr", - "datapyostronzmyhgfi")), - new OperationInner().withName("fxtsgum") - .withDisplay(new OperationDisplay().withProvider("lik") - .withResource("wslolbqp") - .withOperation("zlmvfelfktgp") - .withDescription("rpw")) - .withOrigin("eznoig") - .withProperties(mapOf("zejjoqk", "datajwmwkpnbs", "aa", "datagfhsxttaugzxn", "jlwuenvrkp", - "datapxdtnkdmkq", "ibreb", "dataou")), - new OperationInner().withName("aysjkixqtnqttez") - .withDisplay(new OperationDisplay().withProvider("ffiakp") - .withResource("qqmtedltmmji") - .withOperation("eozphv") - .withDescription("uyqncygupkvipmd")) - .withOrigin("wx") - .withProperties(mapOf("xhojuj", "dataevzhfsto", "hixbjxyfwnyl", "dataypelmcu")))) - .withNextLink("ool"); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("tlpdn", model.value().get(0).name()); - Assertions.assertEquals("vgbmhr", model.value().get(0).display().provider()); - Assertions.assertEquals("kw", model.value().get(0).display().resource()); - Assertions.assertEquals("ijejvegrhbpn", model.value().get(0).display().operation()); - Assertions.assertEquals("xexccbdreaxhcexd", model.value().get(0).display().description()); - Assertions.assertEquals("vqahqkghtpwi", model.value().get(0).origin()); - Assertions.assertEquals("ool", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationProgressGetWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationProgressGetWithResponseMockTests.java deleted file mode 100644 index 7c50cce00514..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationProgressGetWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.OperationProgressResult; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationProgressGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"objectType\":\"OperationProgressResponseType\"},\"id\":\"i\",\"resourceId\":\"vumwmxqh\",\"name\":\"vnoamldseha\",\"status\":\"hdjhhflz\",\"percentComplete\":66.91231,\"startTime\":\"2021-01-13T01:47:16Z\",\"endTime\":\"2021-05-28T20:09:21Z\",\"operations\":[{\"id\":\"jetagltsxoatft\",\"resourceId\":\"pnpbswveflocc\",\"name\":\"mozi\",\"status\":\"m\",\"percentComplete\":5.020833,\"startTime\":\"2021-04-14T23:51:02Z\",\"endTime\":\"2021-11-19T09:15:01Z\",\"operations\":[{\"id\":\"y\",\"resourceId\":\"xcjxgrytfmpcy\",\"name\":\"lrmcaykg\",\"status\":\"noxuztrksx\",\"percentComplete\":37.622272,\"startTime\":\"2021-05-07T07:31:07Z\",\"endTime\":\"2021-01-21T22:39:06Z\",\"operations\":[{\"status\":\"znth\"},{\"status\":\"twk\"}]},{\"id\":\"srxuzvoam\",\"resourceId\":\"cqiosmgbza\",\"name\":\"xqdlyrtltlapr\",\"status\":\"tz\",\"percentComplete\":80.98418,\"startTime\":\"2021-10-09T19:13:43Z\",\"endTime\":\"2021-10-17T10:38:23Z\",\"operations\":[{\"status\":\"nbsoqeqalarv\"},{\"status\":\"agunbtgfebw\"},{\"status\":\"nbmhyree\"}]},{\"id\":\"qavbpdqmj\",\"resourceId\":\"yyzglgouwtlmjjy\",\"name\":\"j\",\"status\":\"tob\",\"percentComplete\":47.482197,\"startTime\":\"2021-05-24T14:07:59Z\",\"endTime\":\"2021-04-18T22:03:42Z\",\"operations\":[{\"status\":\"lbfjkwr\"}]},{\"id\":\"kqbh\",\"resourceId\":\"rqunjq\",\"name\":\"enx\",\"status\":\"ulkpakd\",\"percentComplete\":60.852154,\"startTime\":\"2021-10-26T11:32:42Z\",\"endTime\":\"2021-05-24T00:54:47Z\",\"operations\":[{\"status\":\"tqabpxuckpgg\"},{\"status\":\"oweyirdhlis\"},{\"status\":\"gwflq\"}]}]},{\"id\":\"zruwn\",\"resourceId\":\"xpxiwfcngjs\",\"name\":\"sii\",\"status\":\"tmkzjvkviirhgfgr\",\"percentComplete\":25.038736,\"startTime\":\"2021-05-20T10:14:07Z\",\"endTime\":\"2021-04-27T20:58:15Z\",\"operations\":[{\"id\":\"zb\",\"resourceId\":\"byvi\",\"name\":\"ctbrxkjzwrgxffm\",\"status\":\"hkwfbkgozxwop\",\"percentComplete\":12.357336,\"startTime\":\"2021-06-10T05:25:23Z\",\"endTime\":\"2021-04-25T08:18:32Z\",\"operations\":[{\"status\":\"clnapxbiygnugjkn\"},{\"status\":\"smfcttuxuuyilfl\"},{\"status\":\"oiquvrehmrnjhvs\"},{\"status\":\"jztczytqj\"}]},{\"id\":\"auunfprnjletlx\",\"resourceId\":\"rpddouifamo\",\"name\":\"z\",\"status\":\"yn\",\"percentComplete\":86.37498,\"startTime\":\"2021-09-09T09:30:34Z\",\"endTime\":\"2021-09-20T14:41:41Z\",\"operations\":[{\"status\":\"iwhxqszdtmaajq\"},{\"status\":\"huxy\"}]},{\"id\":\"vmtygj\",\"resourceId\":\"zyos\",\"name\":\"p\",\"status\":\"hckfkyjpmspbps\",\"percentComplete\":97.769455,\"startTime\":\"2021-10-10T20:16:17Z\",\"endTime\":\"2021-03-29T12:30:22Z\",\"operations\":[{\"status\":\"eyujtvczkcnyxrx\"},{\"status\":\"unjdx\"}]}]},{\"id\":\"kvxlxpa\",\"resourceId\":\"qivbgkcvkh\",\"name\":\"vuqd\",\"status\":\"lvoniy\",\"percentComplete\":89.86916,\"startTime\":\"2021-10-26T12:39:28Z\",\"endTime\":\"2021-01-27T05:34Z\",\"operations\":[{\"id\":\"xtiv\",\"resourceId\":\"knidib\",\"name\":\"jxgpnrhgovfg\",\"status\":\"ik\",\"percentComplete\":10.271984,\"startTime\":\"2021-03-05T20:29:17Z\",\"endTime\":\"2021-02-15T17:50:36Z\",\"operations\":[{\"status\":\"mzvupor\"},{\"status\":\"zdfuydzvkfvxcnqm\"}]}]}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OperationProgressResult response = manager.operationProgress() - .getWithResponse("hczznvf", "ycjsx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("i", response.id()); - Assertions.assertEquals("vnoamldseha", response.name()); - Assertions.assertEquals("hdjhhflz", response.status()); - Assertions.assertEquals(66.91231F, response.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-13T01:47:16Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-28T20:09:21Z"), response.endTime()); - Assertions.assertEquals("jetagltsxoatft", response.operations().get(0).id()); - Assertions.assertEquals("mozi", response.operations().get(0).name()); - Assertions.assertEquals("m", response.operations().get(0).status()); - Assertions.assertEquals(5.020833F, response.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-14T23:51:02Z"), response.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-19T09:15:01Z"), response.operations().get(0).endTime()); - Assertions.assertEquals("y", response.operations().get(0).operations().get(0).id()); - Assertions.assertEquals("lrmcaykg", response.operations().get(0).operations().get(0).name()); - Assertions.assertEquals("noxuztrksx", response.operations().get(0).operations().get(0).status()); - Assertions.assertEquals(37.622272F, response.operations().get(0).operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-07T07:31:07Z"), - response.operations().get(0).operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-21T22:39:06Z"), - response.operations().get(0).operations().get(0).endTime()); - Assertions.assertEquals("znth", response.operations().get(0).operations().get(0).operations().get(0).status()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationProgressResponseTypeTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationProgressResponseTypeTests.java deleted file mode 100644 index 0aea736933d9..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationProgressResponseTypeTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.OperationProgressResponseType; - -public final class OperationProgressResponseTypeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationProgressResponseType model - = BinaryData.fromString("{\"objectType\":\"OperationProgressResponseType\"}") - .toObject(OperationProgressResponseType.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationProgressResponseType model = new OperationProgressResponseType(); - model = BinaryData.fromObject(model).toObject(OperationProgressResponseType.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationProgressResultInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationProgressResultInnerTests.java deleted file mode 100644 index eb5e8ce81fe4..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationProgressResultInnerTests.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.OperationProgressResultInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.OperationProgressResponseType; -import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatusResult; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationProgressResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationProgressResultInner model = BinaryData.fromString( - "{\"properties\":{\"objectType\":\"OperationProgressResponseType\"},\"id\":\"iiojnal\",\"resourceId\":\"fk\",\"name\":\"vsexsowuelu\",\"status\":\"hhahhxvrhmzkwpjg\",\"percentComplete\":69.94035,\"startTime\":\"2021-02-08T16:54:53Z\",\"endTime\":\"2021-03-26T20:29:02Z\",\"operations\":[{\"id\":\"sxhqxujx\",\"resourceId\":\"ndxdigrjguufzdm\",\"name\":\"qtfihwhbotzinga\",\"status\":\"vppho\",\"percentComplete\":41.892742,\"startTime\":\"2021-10-18T15:07:25Z\",\"endTime\":\"2021-11-21T07:49:51Z\",\"operations\":[{\"id\":\"mvdk\",\"resourceId\":\"ynwcvtbv\",\"name\":\"yhmtnvyqiat\",\"status\":\"zwpcnpwzcjaesg\",\"percentComplete\":56.94007,\"startTime\":\"2021-07-14T16:40:38Z\",\"endTime\":\"2021-03-29T04:52:48Z\",\"operations\":[{\"status\":\"uq\"}]},{\"id\":\"ygz\",\"resourceId\":\"dnkfx\",\"name\":\"emdwzrmuhapfc\",\"status\":\"dpsqx\",\"percentComplete\":52.910114,\"startTime\":\"2021-06-15T01:28:22Z\",\"endTime\":\"2021-04-21T12:11:06Z\",\"operations\":[{\"status\":\"gc\"},{\"status\":\"elvezrypq\"},{\"status\":\"mfe\"},{\"status\":\"kerqwkyh\"}]},{\"id\":\"opgxedkowepb\",\"resourceId\":\"cr\",\"name\":\"bwccsnjvcdwxlpqe\",\"status\":\"ftnkhtj\",\"percentComplete\":1.9628167,\"startTime\":\"2021-09-20T22:34:13Z\",\"endTime\":\"2021-09-11T08:24:22Z\",\"operations\":[{\"status\":\"tmtdhtmdvypgik\"},{\"status\":\"gszywk\"},{\"status\":\"irryuzhlh\"}]},{\"id\":\"qrvqq\",\"resourceId\":\"t\",\"name\":\"nrvgoupmfiibfgg\",\"status\":\"ioolvrwxkvtkkgll\",\"percentComplete\":57.97699,\"startTime\":\"2021-10-01T00:49:04Z\",\"endTime\":\"2021-07-24T13:52:35Z\",\"operations\":[{\"status\":\"vblm\"},{\"status\":\"vkzuhbxvvyhgso\"},{\"status\":\"byrqufeg\"}]}]}]}") - .toObject(OperationProgressResultInner.class); - Assertions.assertEquals("iiojnal", model.id()); - Assertions.assertEquals("vsexsowuelu", model.name()); - Assertions.assertEquals("hhahhxvrhmzkwpjg", model.status()); - Assertions.assertEquals(69.94035F, model.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T16:54:53Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-26T20:29:02Z"), model.endTime()); - Assertions.assertEquals("sxhqxujx", model.operations().get(0).id()); - Assertions.assertEquals("qtfihwhbotzinga", model.operations().get(0).name()); - Assertions.assertEquals("vppho", model.operations().get(0).status()); - Assertions.assertEquals(41.892742F, model.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T15:07:25Z"), model.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-21T07:49:51Z"), model.operations().get(0).endTime()); - Assertions.assertEquals("mvdk", model.operations().get(0).operations().get(0).id()); - Assertions.assertEquals("yhmtnvyqiat", model.operations().get(0).operations().get(0).name()); - Assertions.assertEquals("zwpcnpwzcjaesg", model.operations().get(0).operations().get(0).status()); - Assertions.assertEquals(56.94007F, model.operations().get(0).operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-14T16:40:38Z"), - model.operations().get(0).operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-29T04:52:48Z"), - model.operations().get(0).operations().get(0).endTime()); - Assertions.assertEquals("uq", model.operations().get(0).operations().get(0).operations().get(0).status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationProgressResultInner model = new OperationProgressResultInner().withId("iiojnal") - .withName("vsexsowuelu") - .withStatus("hhahhxvrhmzkwpjg") - .withPercentComplete(69.94035F) - .withStartTime(OffsetDateTime.parse("2021-02-08T16:54:53Z")) - .withEndTime(OffsetDateTime.parse("2021-03-26T20:29:02Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withId("sxhqxujx") - .withName("qtfihwhbotzinga") - .withStatus("vppho") - .withPercentComplete(41.892742F) - .withStartTime(OffsetDateTime.parse("2021-10-18T15:07:25Z")) - .withEndTime(OffsetDateTime.parse("2021-11-21T07:49:51Z")) - .withOperations(Arrays.asList( - new OperationStatusResult().withId("mvdk") - .withName("yhmtnvyqiat") - .withStatus("zwpcnpwzcjaesg") - .withPercentComplete(56.94007F) - .withStartTime(OffsetDateTime.parse("2021-07-14T16:40:38Z")) - .withEndTime(OffsetDateTime.parse("2021-03-29T04:52:48Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("uq"))), - new OperationStatusResult().withId("ygz") - .withName("emdwzrmuhapfc") - .withStatus("dpsqx") - .withPercentComplete(52.910114F) - .withStartTime(OffsetDateTime.parse("2021-06-15T01:28:22Z")) - .withEndTime(OffsetDateTime.parse("2021-04-21T12:11:06Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("gc"), - new OperationStatusResult().withStatus("elvezrypq"), - new OperationStatusResult().withStatus("mfe"), - new OperationStatusResult().withStatus("kerqwkyh"))), - new OperationStatusResult().withId("opgxedkowepb") - .withName("bwccsnjvcdwxlpqe") - .withStatus("ftnkhtj") - .withPercentComplete(1.9628167F) - .withStartTime(OffsetDateTime.parse("2021-09-20T22:34:13Z")) - .withEndTime(OffsetDateTime.parse("2021-09-11T08:24:22Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("tmtdhtmdvypgik"), - new OperationStatusResult().withStatus("gszywk"), - new OperationStatusResult().withStatus("irryuzhlh"))), - new OperationStatusResult().withId("qrvqq") - .withName("nrvgoupmfiibfgg") - .withStatus("ioolvrwxkvtkkgll") - .withPercentComplete(57.97699F) - .withStartTime(OffsetDateTime.parse("2021-10-01T00:49:04Z")) - .withEndTime(OffsetDateTime.parse("2021-07-24T13:52:35Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("vblm"), - new OperationStatusResult().withStatus("vkzuhbxvvyhgso"), - new OperationStatusResult().withStatus("byrqufeg"))))))) - .withProperties(new OperationProgressResponseType()); - model = BinaryData.fromObject(model).toObject(OperationProgressResultInner.class); - Assertions.assertEquals("iiojnal", model.id()); - Assertions.assertEquals("vsexsowuelu", model.name()); - Assertions.assertEquals("hhahhxvrhmzkwpjg", model.status()); - Assertions.assertEquals(69.94035F, model.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T16:54:53Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-26T20:29:02Z"), model.endTime()); - Assertions.assertEquals("sxhqxujx", model.operations().get(0).id()); - Assertions.assertEquals("qtfihwhbotzinga", model.operations().get(0).name()); - Assertions.assertEquals("vppho", model.operations().get(0).status()); - Assertions.assertEquals(41.892742F, model.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T15:07:25Z"), model.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-21T07:49:51Z"), model.operations().get(0).endTime()); - Assertions.assertEquals("mvdk", model.operations().get(0).operations().get(0).id()); - Assertions.assertEquals("yhmtnvyqiat", model.operations().get(0).operations().get(0).name()); - Assertions.assertEquals("zwpcnpwzcjaesg", model.operations().get(0).operations().get(0).status()); - Assertions.assertEquals(56.94007F, model.operations().get(0).operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-14T16:40:38Z"), - model.operations().get(0).operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-29T04:52:48Z"), - model.operations().get(0).operations().get(0).endTime()); - Assertions.assertEquals("uq", model.operations().get(0).operations().get(0).operations().get(0).status()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationResultsGetWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationResultsGetWithResponseMockTests.java deleted file mode 100644 index 74fae68d2200..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationResultsGetWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatusExtendedResult; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationResultsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"qpofvwbc\":\"datainheh\",\"qihebw\":\"datalembnkbwvqvxkdi\",\"izvcjfe\":\"dataswbzuwfmdurage\"},\"id\":\"sdjubggbqigkxkbs\",\"resourceId\":\"gak\",\"name\":\"cyrcmjdmspo\",\"status\":\"apvu\",\"percentComplete\":27.490759,\"startTime\":\"2021-03-18T05:33:07Z\",\"endTime\":\"2021-07-24T11:45:08Z\",\"operations\":[{\"id\":\"gbzjedmstkv\",\"resourceId\":\"v\",\"name\":\"c\",\"status\":\"iiznktwfan\",\"percentComplete\":4.799801,\"startTime\":\"2021-10-26T06:08:35Z\",\"endTime\":\"2021-05-05T18:43:08Z\",\"operations\":[{\"id\":\"ostbzbkiwb\",\"resourceId\":\"n\",\"name\":\"phzfylsgcrp\",\"status\":\"bcunezzceze\",\"percentComplete\":5.057555,\"startTime\":\"2021-03-29T21:38:18Z\",\"endTime\":\"2021-08-20T21:06:50Z\",\"operations\":[{\"status\":\"jwetnpsihcla\"},{\"status\":\"zvaylptrsqqw\"}]},{\"id\":\"mwqkchcxwaxf\",\"resourceId\":\"zjkjexfdeqv\",\"name\":\"sylkks\",\"status\":\"kbffmbmx\",\"percentComplete\":35.081665,\"startTime\":\"2021-06-05T21:01:18Z\",\"endTime\":\"2021-08-22T08:07:52Z\",\"operations\":[{\"status\":\"jx\"},{\"status\":\"nptfujgi\"},{\"status\":\"gaao\"}]},{\"id\":\"taqutdewem\",\"resourceId\":\"wvruunzzj\",\"name\":\"hkfkimrtixokf\",\"status\":\"qyinl\",\"percentComplete\":22.83907,\"startTime\":\"2021-02-16T03:43:05Z\",\"endTime\":\"2021-06-20T19:43:14Z\",\"operations\":[{\"status\":\"monstshiyxgve\"},{\"status\":\"fclduccbirdsv\"},{\"status\":\"wcobie\"}]},{\"id\":\"mninwjizcilng\",\"resourceId\":\"shejjtbxqm\",\"name\":\"uxlxqzvners\",\"status\":\"ycucrwnamikzeb\",\"percentComplete\":58.452225,\"startTime\":\"2021-08-14T09:18:40Z\",\"endTime\":\"2021-01-21T14:33:26Z\",\"operations\":[{\"status\":\"qgfuhokzru\"}]}]}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OperationStatusExtendedResult response = manager.operationResults() - .getWithResponse("qonmpqoxwdof", "bxiqxeiiqbimht", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("sdjubggbqigkxkbs", response.id()); - Assertions.assertEquals("cyrcmjdmspo", response.name()); - Assertions.assertEquals("apvu", response.status()); - Assertions.assertEquals(27.490759F, response.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-18T05:33:07Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-24T11:45:08Z"), response.endTime()); - Assertions.assertEquals("gbzjedmstkv", response.operations().get(0).id()); - Assertions.assertEquals("c", response.operations().get(0).name()); - Assertions.assertEquals("iiznktwfan", response.operations().get(0).status()); - Assertions.assertEquals(4.799801F, response.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-26T06:08:35Z"), response.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-05T18:43:08Z"), response.operations().get(0).endTime()); - Assertions.assertEquals("ostbzbkiwb", response.operations().get(0).operations().get(0).id()); - Assertions.assertEquals("phzfylsgcrp", response.operations().get(0).operations().get(0).name()); - Assertions.assertEquals("bcunezzceze", response.operations().get(0).operations().get(0).status()); - Assertions.assertEquals(5.057555F, response.operations().get(0).operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-29T21:38:18Z"), - response.operations().get(0).operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-20T21:06:50Z"), - response.operations().get(0).operations().get(0).endTime()); - Assertions.assertEquals("jwetnpsihcla", - response.operations().get(0).operations().get(0).operations().get(0).status()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationStatusExtendedResultInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationStatusExtendedResultInnerTests.java deleted file mode 100644 index 22523e56c54a..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationStatusExtendedResultInnerTests.java +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.OperationStatusExtendedResultInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatusResult; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class OperationStatusExtendedResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationStatusExtendedResultInner model = BinaryData.fromString( - "{\"properties\":{\"lla\":\"datagxk\",\"z\":\"datamelwuipiccjz\",\"vvcnayr\":\"datav\",\"rdvstkwqqtch\":\"datayrnxxmueedn\"},\"id\":\"lmfmtdaay\",\"resourceId\":\"v\",\"name\":\"gpiohgwxrtfudxe\",\"status\":\"xg\",\"percentComplete\":65.89699,\"startTime\":\"2021-01-20T23:29:46Z\",\"endTime\":\"2021-07-18T03:12:47Z\",\"operations\":[{\"id\":\"k\",\"resourceId\":\"ghimdblx\",\"name\":\"imfnjhfjx\",\"status\":\"mszkkfo\",\"percentComplete\":56.352932,\"startTime\":\"2021-06-21T22:48:50Z\",\"endTime\":\"2021-05-31T03:25:20Z\",\"operations\":[{\"id\":\"jawneaiv\",\"resourceId\":\"czelpcirel\",\"name\":\"eae\",\"status\":\"wabfatkl\",\"percentComplete\":96.40516,\"startTime\":\"2021-11-23T10:06:03Z\",\"endTime\":\"2021-11-06T11:40:31Z\",\"operations\":[{\"status\":\"an\"},{\"status\":\"zjosp\"},{\"status\":\"youlp\"},{\"status\":\"rvxaglrvimjwosy\"}]}]},{\"id\":\"cskfcktqumiekk\",\"resourceId\":\"zikhl\",\"name\":\"jhdgqggebdunyga\",\"status\":\"qidbqfatpxllrxcy\",\"percentComplete\":47.30266,\"startTime\":\"2021-01-17T00:57:30Z\",\"endTime\":\"2021-02-02T22:23:44Z\",\"operations\":[{\"id\":\"m\",\"resourceId\":\"dmjsjqb\",\"name\":\"hyxxrwlycoduhpk\",\"status\":\"kgymareqnajxqug\",\"percentComplete\":10.06968,\"startTime\":\"2021-03-29T06:53:32Z\",\"endTime\":\"2020-12-25T16:19:20Z\",\"operations\":[{\"status\":\"dgssofwqmzqal\"}]}]},{\"id\":\"jijpxac\",\"resourceId\":\"udfnbyxba\",\"name\":\"bjyvay\",\"status\":\"fimrzrtuzqogse\",\"percentComplete\":55.08285,\"startTime\":\"2021-10-08T20:33:25Z\",\"endTime\":\"2021-12-03T20:54:07Z\",\"operations\":[{\"id\":\"mewzsyyc\",\"resourceId\":\"zsoibjudpfrxtr\",\"name\":\"zvaytdwkqbr\",\"status\":\"ubpaxhe\",\"percentComplete\":1.5196979,\"startTime\":\"2021-06-07T07:50:45Z\",\"endTime\":\"2021-10-29T07:32:45Z\",\"operations\":[{\"status\":\"iirqtd\"},{\"status\":\"oaxoruzfgsqu\"},{\"status\":\"fxrxxle\"}]}]},{\"id\":\"mxjezwlw\",\"resourceId\":\"xuqlcvydypat\",\"name\":\"oa\",\"status\":\"jkniodko\",\"percentComplete\":8.24799,\"startTime\":\"2021-08-25T09:30:56Z\",\"endTime\":\"2021-01-14T23:54:10Z\",\"operations\":[{\"id\":\"msbvdkcrodtjinf\",\"resourceId\":\"lfltka\",\"name\":\"vefkdlfoakggk\",\"status\":\"pagao\",\"percentComplete\":90.49998,\"startTime\":\"2021-11-09T20:51:35Z\",\"endTime\":\"2021-01-06T17:17:38Z\",\"operations\":[{\"status\":\"lsyxkqjnsjervt\"},{\"status\":\"agxsdszuemps\"},{\"status\":\"zkfzbeyv\"}]},{\"id\":\"icvi\",\"resourceId\":\"kjj\",\"name\":\"xrbuukzclew\",\"status\":\"hmlwpaztzpo\",\"percentComplete\":83.19924,\"startTime\":\"2021-07-07T15:20:18Z\",\"endTime\":\"2021-05-31T21:39:48Z\",\"operations\":[{\"status\":\"whxxbuyqax\"},{\"status\":\"feqztppriol\"},{\"status\":\"or\"},{\"status\":\"altol\"}]},{\"id\":\"wsobqwcsdbn\",\"resourceId\":\"cf\",\"name\":\"cqdpfuv\",\"status\":\"lsbjjcanvxbv\",\"percentComplete\":40.676033,\"startTime\":\"2021-04-07T04:06:35Z\",\"endTime\":\"2021-10-07T13:15:31Z\",\"operations\":[{\"status\":\"rmrlxqtvcof\"},{\"status\":\"dflvkg\"},{\"status\":\"u\"},{\"status\":\"gdknnqv\"}]}]}]}") - .toObject(OperationStatusExtendedResultInner.class); - Assertions.assertEquals("lmfmtdaay", model.id()); - Assertions.assertEquals("gpiohgwxrtfudxe", model.name()); - Assertions.assertEquals("xg", model.status()); - Assertions.assertEquals(65.89699F, model.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T23:29:46Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-18T03:12:47Z"), model.endTime()); - Assertions.assertEquals("k", model.operations().get(0).id()); - Assertions.assertEquals("imfnjhfjx", model.operations().get(0).name()); - Assertions.assertEquals("mszkkfo", model.operations().get(0).status()); - Assertions.assertEquals(56.352932F, model.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T22:48:50Z"), model.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-31T03:25:20Z"), model.operations().get(0).endTime()); - Assertions.assertEquals("jawneaiv", model.operations().get(0).operations().get(0).id()); - Assertions.assertEquals("eae", model.operations().get(0).operations().get(0).name()); - Assertions.assertEquals("wabfatkl", model.operations().get(0).operations().get(0).status()); - Assertions.assertEquals(96.40516F, model.operations().get(0).operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-23T10:06:03Z"), - model.operations().get(0).operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-06T11:40:31Z"), - model.operations().get(0).operations().get(0).endTime()); - Assertions.assertEquals("an", model.operations().get(0).operations().get(0).operations().get(0).status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationStatusExtendedResultInner model = new OperationStatusExtendedResultInner().withId("lmfmtdaay") - .withName("gpiohgwxrtfudxe") - .withStatus("xg") - .withPercentComplete(65.89699F) - .withStartTime(OffsetDateTime.parse("2021-01-20T23:29:46Z")) - .withEndTime(OffsetDateTime.parse("2021-07-18T03:12:47Z")) - .withOperations(Arrays.asList( - new OperationStatusResult().withId("k") - .withName("imfnjhfjx") - .withStatus("mszkkfo") - .withPercentComplete(56.352932F) - .withStartTime(OffsetDateTime.parse("2021-06-21T22:48:50Z")) - .withEndTime(OffsetDateTime.parse("2021-05-31T03:25:20Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withId("jawneaiv") - .withName("eae") - .withStatus("wabfatkl") - .withPercentComplete(96.40516F) - .withStartTime(OffsetDateTime.parse("2021-11-23T10:06:03Z")) - .withEndTime(OffsetDateTime.parse("2021-11-06T11:40:31Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("an"), - new OperationStatusResult().withStatus("zjosp"), - new OperationStatusResult().withStatus("youlp"), - new OperationStatusResult().withStatus("rvxaglrvimjwosy"))))), - new OperationStatusResult().withId("cskfcktqumiekk") - .withName("jhdgqggebdunyga") - .withStatus("qidbqfatpxllrxcy") - .withPercentComplete(47.30266F) - .withStartTime(OffsetDateTime.parse("2021-01-17T00:57:30Z")) - .withEndTime(OffsetDateTime.parse("2021-02-02T22:23:44Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withId("m") - .withName("hyxxrwlycoduhpk") - .withStatus("kgymareqnajxqug") - .withPercentComplete(10.06968F) - .withStartTime(OffsetDateTime.parse("2021-03-29T06:53:32Z")) - .withEndTime(OffsetDateTime.parse("2020-12-25T16:19:20Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("dgssofwqmzqal"))))), - new OperationStatusResult().withId("jijpxac") - .withName("bjyvay") - .withStatus("fimrzrtuzqogse") - .withPercentComplete(55.08285F) - .withStartTime(OffsetDateTime.parse("2021-10-08T20:33:25Z")) - .withEndTime(OffsetDateTime.parse("2021-12-03T20:54:07Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withId("mewzsyyc") - .withName("zvaytdwkqbr") - .withStatus("ubpaxhe") - .withPercentComplete(1.5196979F) - .withStartTime(OffsetDateTime.parse("2021-06-07T07:50:45Z")) - .withEndTime(OffsetDateTime.parse("2021-10-29T07:32:45Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("iirqtd"), - new OperationStatusResult().withStatus("oaxoruzfgsqu"), - new OperationStatusResult().withStatus("fxrxxle"))))), - new OperationStatusResult().withId("mxjezwlw") - .withName("oa") - .withStatus("jkniodko") - .withPercentComplete(8.24799F) - .withStartTime(OffsetDateTime.parse("2021-08-25T09:30:56Z")) - .withEndTime(OffsetDateTime.parse("2021-01-14T23:54:10Z")) - .withOperations(Arrays.asList( - new OperationStatusResult().withId("msbvdkcrodtjinf") - .withName("vefkdlfoakggk") - .withStatus("pagao") - .withPercentComplete(90.49998F) - .withStartTime(OffsetDateTime.parse("2021-11-09T20:51:35Z")) - .withEndTime(OffsetDateTime.parse("2021-01-06T17:17:38Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("lsyxkqjnsjervt"), - new OperationStatusResult().withStatus("agxsdszuemps"), - new OperationStatusResult().withStatus("zkfzbeyv"))), - new OperationStatusResult().withId("icvi") - .withName("xrbuukzclew") - .withStatus("hmlwpaztzpo") - .withPercentComplete(83.19924F) - .withStartTime(OffsetDateTime.parse("2021-07-07T15:20:18Z")) - .withEndTime(OffsetDateTime.parse("2021-05-31T21:39:48Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("whxxbuyqax"), - new OperationStatusResult().withStatus("feqztppriol"), - new OperationStatusResult().withStatus("or"), - new OperationStatusResult().withStatus("altol"))), - new OperationStatusResult().withId("wsobqwcsdbn") - .withName("cqdpfuv") - .withStatus("lsbjjcanvxbv") - .withPercentComplete(40.676033F) - .withStartTime(OffsetDateTime.parse("2021-04-07T04:06:35Z")) - .withEndTime(OffsetDateTime.parse("2021-10-07T13:15:31Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("rmrlxqtvcof"), - new OperationStatusResult().withStatus("dflvkg"), - new OperationStatusResult().withStatus("u"), - new OperationStatusResult().withStatus("gdknnqv"))))))) - .withProperties(mapOf("lla", "datagxk", "z", "datamelwuipiccjz", "vvcnayr", "datav", "rdvstkwqqtch", - "datayrnxxmueedn")); - model = BinaryData.fromObject(model).toObject(OperationStatusExtendedResultInner.class); - Assertions.assertEquals("lmfmtdaay", model.id()); - Assertions.assertEquals("gpiohgwxrtfudxe", model.name()); - Assertions.assertEquals("xg", model.status()); - Assertions.assertEquals(65.89699F, model.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T23:29:46Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-18T03:12:47Z"), model.endTime()); - Assertions.assertEquals("k", model.operations().get(0).id()); - Assertions.assertEquals("imfnjhfjx", model.operations().get(0).name()); - Assertions.assertEquals("mszkkfo", model.operations().get(0).status()); - Assertions.assertEquals(56.352932F, model.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T22:48:50Z"), model.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-31T03:25:20Z"), model.operations().get(0).endTime()); - Assertions.assertEquals("jawneaiv", model.operations().get(0).operations().get(0).id()); - Assertions.assertEquals("eae", model.operations().get(0).operations().get(0).name()); - Assertions.assertEquals("wabfatkl", model.operations().get(0).operations().get(0).status()); - Assertions.assertEquals(96.40516F, model.operations().get(0).operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-23T10:06:03Z"), - model.operations().get(0).operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-06T11:40:31Z"), - model.operations().get(0).operations().get(0).endTime()); - Assertions.assertEquals("an", model.operations().get(0).operations().get(0).operations().get(0).status()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationStatusResultTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationStatusResultTests.java deleted file mode 100644 index 7ea256c47688..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationStatusResultTests.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatusResult; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationStatusResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationStatusResult model = BinaryData.fromString( - "{\"id\":\"n\",\"resourceId\":\"rudsg\",\"name\":\"hmk\",\"status\":\"c\",\"percentComplete\":66.264,\"startTime\":\"2021-04-05T08:15:46Z\",\"endTime\":\"2021-11-09T05:24:27Z\",\"operations\":[{\"id\":\"eburu\",\"resourceId\":\"movsmzlxwabmqoe\",\"name\":\"ifrvtpu\",\"status\":\"ujmqlgkfbtndoa\",\"percentComplete\":83.54424,\"startTime\":\"2021-06-02T01:39:29Z\",\"endTime\":\"2021-10-15T06:38:02Z\",\"operations\":[{\"id\":\"i\",\"resourceId\":\"jed\",\"name\":\"wwa\",\"status\":\"zkoj\",\"percentComplete\":5.645263,\"startTime\":\"2021-03-02T02:07:21Z\",\"endTime\":\"2021-09-08T23:15:43Z\",\"operations\":[{\"status\":\"uicybxarzgszuf\"},{\"status\":\"x\"},{\"status\":\"iqopidoamciod\"},{\"status\":\"khazxkhnzbonlwn\"}]},{\"id\":\"gokdwbwhks\",\"resourceId\":\"cmrvexzt\",\"name\":\"t\",\"status\":\"gsfraoyzkoow\",\"percentComplete\":83.122345,\"startTime\":\"2021-11-23T22:05:35Z\",\"endTime\":\"2021-08-19T07:22:38Z\",\"operations\":[{\"status\":\"q\"},{\"status\":\"ldsyuuximerqfob\"}]},{\"id\":\"nkbykutwpfhp\",\"resourceId\":\"m\",\"name\":\"skdsnfdsdoakg\",\"status\":\"dlmkkzevdl\",\"percentComplete\":75.48527,\"startTime\":\"2021-08-20T19:20:49Z\",\"endTime\":\"2021-03-10T22:25:44Z\",\"operations\":[{\"status\":\"twvogvbbe\"},{\"status\":\"dcngqqmoakufgmj\"},{\"status\":\"rwr\"}]}]},{\"id\":\"wae\",\"resourceId\":\"uzkopbminrfd\",\"name\":\"yuhhziu\",\"status\":\"efozbhdms\",\"percentComplete\":85.65037,\"startTime\":\"2021-11-14T12:05:53Z\",\"endTime\":\"2021-03-06T06:09:51Z\",\"operations\":[{\"id\":\"maequiahxicslfa\",\"resourceId\":\"z\",\"name\":\"yylhalnswhccsp\",\"status\":\"kaivwit\",\"percentComplete\":56.156773,\"startTime\":\"2021-09-24T20:22:06Z\",\"endTime\":\"2021-11-24T11:26:12Z\",\"operations\":[{\"status\":\"oluhczbwemh\"},{\"status\":\"i\"},{\"status\":\"sbrgz\"},{\"status\":\"wmsweypqwd\"}]},{\"id\":\"icccn\",\"resourceId\":\"huexmk\",\"name\":\"lstvlzywe\",\"status\":\"hz\",\"percentComplete\":80.5275,\"startTime\":\"2021-12-02T07:00Z\",\"endTime\":\"2021-11-21T06:15:53Z\",\"operations\":[{\"status\":\"siypbs\"}]},{\"id\":\"tg\",\"resourceId\":\"lfeadcygq\",\"name\":\"yhejhzisxgfp\",\"status\":\"lolp\",\"percentComplete\":35.27798,\"startTime\":\"2021-08-28T21:31:04Z\",\"endTime\":\"2021-01-25T08:59:13Z\",\"operations\":[{\"status\":\"jzraehtwdwrf\"},{\"status\":\"swibyr\"}]},{\"id\":\"bhshfwpracstwity\",\"resourceId\":\"evxccedcp\",\"name\":\"dyodnwzxltj\",\"status\":\"vnhltiugcx\",\"percentComplete\":34.593796,\"startTime\":\"2021-05-31T21:54:01Z\",\"endTime\":\"2021-07-21T13:09:19Z\",\"operations\":[{\"status\":\"y\"},{\"status\":\"unyowxwl\"}]}]},{\"id\":\"kv\",\"resourceId\":\"bvfvpdbod\",\"name\":\"izsjqlhkrr\",\"status\":\"bdeibqipqk\",\"percentComplete\":28.736359,\"startTime\":\"2021-11-17T03:58:19Z\",\"endTime\":\"2021-03-25T16:52:17Z\",\"operations\":[{\"id\":\"refajpjorwkqnyh\",\"resourceId\":\"ij\",\"name\":\"ivfxzsjabibsyst\",\"status\":\"wfsdjpvkvpbj\",\"percentComplete\":91.798965,\"startTime\":\"2021-11-27T09:38:57Z\",\"endTime\":\"2021-05-24T23:12:37Z\",\"operations\":[{\"status\":\"ncj\"},{\"status\":\"budurgkakmo\"},{\"status\":\"zhjjklffhmouwq\"}]},{\"id\":\"rfzeey\",\"resourceId\":\"izikayuhq\",\"name\":\"jbsybbqw\",\"status\":\"vtldgmfpgvmpip\",\"percentComplete\":23.292154,\"startTime\":\"2021-03-17T23:54:57Z\",\"endTime\":\"2021-05-09T14:17:26Z\",\"operations\":[{\"status\":\"ss\"}]},{\"id\":\"twbdsrezpdrhn\",\"resourceId\":\"yowqkdwytisibir\",\"name\":\"pikpz\",\"status\":\"mejzanlfzxia\",\"percentComplete\":54.36735,\"startTime\":\"2021-09-16T17:22:47Z\",\"endTime\":\"2021-09-13T10:29:44Z\",\"operations\":[{\"status\":\"i\"},{\"status\":\"rjqc\"}]},{\"id\":\"zpfrla\",\"resourceId\":\"zrnw\",\"name\":\"indfpwpjyl\",\"status\":\"bt\",\"percentComplete\":27.504385,\"startTime\":\"2021-05-08T01:38:39Z\",\"endTime\":\"2021-05-21T08:31:31Z\",\"operations\":[{\"status\":\"szfjvfbgofelja\"},{\"status\":\"rqmq\"}]}]}]}") - .toObject(OperationStatusResult.class); - Assertions.assertEquals("n", model.id()); - Assertions.assertEquals("hmk", model.name()); - Assertions.assertEquals("c", model.status()); - Assertions.assertEquals(66.264F, model.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-05T08:15:46Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-09T05:24:27Z"), model.endTime()); - Assertions.assertEquals("eburu", model.operations().get(0).id()); - Assertions.assertEquals("ifrvtpu", model.operations().get(0).name()); - Assertions.assertEquals("ujmqlgkfbtndoa", model.operations().get(0).status()); - Assertions.assertEquals(83.54424F, model.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-02T01:39:29Z"), model.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-15T06:38:02Z"), model.operations().get(0).endTime()); - Assertions.assertEquals("i", model.operations().get(0).operations().get(0).id()); - Assertions.assertEquals("wwa", model.operations().get(0).operations().get(0).name()); - Assertions.assertEquals("zkoj", model.operations().get(0).operations().get(0).status()); - Assertions.assertEquals(5.645263F, model.operations().get(0).operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-02T02:07:21Z"), - model.operations().get(0).operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-08T23:15:43Z"), - model.operations().get(0).operations().get(0).endTime()); - Assertions.assertEquals("uicybxarzgszuf", - model.operations().get(0).operations().get(0).operations().get(0).status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationStatusResult model = new OperationStatusResult().withId("n") - .withName("hmk") - .withStatus("c") - .withPercentComplete(66.264F) - .withStartTime(OffsetDateTime.parse("2021-04-05T08:15:46Z")) - .withEndTime(OffsetDateTime.parse("2021-11-09T05:24:27Z")) - .withOperations(Arrays.asList( - new OperationStatusResult().withId("eburu") - .withName("ifrvtpu") - .withStatus("ujmqlgkfbtndoa") - .withPercentComplete(83.54424F) - .withStartTime(OffsetDateTime.parse("2021-06-02T01:39:29Z")) - .withEndTime(OffsetDateTime.parse("2021-10-15T06:38:02Z")) - .withOperations(Arrays.asList( - new OperationStatusResult().withId("i") - .withName("wwa") - .withStatus("zkoj") - .withPercentComplete(5.645263F) - .withStartTime(OffsetDateTime.parse("2021-03-02T02:07:21Z")) - .withEndTime(OffsetDateTime.parse("2021-09-08T23:15:43Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("uicybxarzgszuf"), - new OperationStatusResult().withStatus("x"), - new OperationStatusResult().withStatus("iqopidoamciod"), - new OperationStatusResult().withStatus("khazxkhnzbonlwn"))), - new OperationStatusResult().withId("gokdwbwhks") - .withName("t") - .withStatus("gsfraoyzkoow") - .withPercentComplete(83.122345F) - .withStartTime(OffsetDateTime.parse("2021-11-23T22:05:35Z")) - .withEndTime(OffsetDateTime.parse("2021-08-19T07:22:38Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("q"), - new OperationStatusResult().withStatus("ldsyuuximerqfob"))), - new OperationStatusResult().withId("nkbykutwpfhp") - .withName("skdsnfdsdoakg") - .withStatus("dlmkkzevdl") - .withPercentComplete(75.48527F) - .withStartTime(OffsetDateTime.parse("2021-08-20T19:20:49Z")) - .withEndTime(OffsetDateTime.parse("2021-03-10T22:25:44Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("twvogvbbe"), - new OperationStatusResult().withStatus("dcngqqmoakufgmj"), - new OperationStatusResult().withStatus("rwr"))))), - new OperationStatusResult().withId("wae") - .withName("yuhhziu") - .withStatus("efozbhdms") - .withPercentComplete(85.65037F) - .withStartTime(OffsetDateTime.parse("2021-11-14T12:05:53Z")) - .withEndTime(OffsetDateTime.parse("2021-03-06T06:09:51Z")) - .withOperations(Arrays.asList( - new OperationStatusResult().withId("maequiahxicslfa") - .withName("yylhalnswhccsp") - .withStatus("kaivwit") - .withPercentComplete(56.156773F) - .withStartTime(OffsetDateTime.parse("2021-09-24T20:22:06Z")) - .withEndTime(OffsetDateTime.parse("2021-11-24T11:26:12Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("oluhczbwemh"), - new OperationStatusResult().withStatus("i"), - new OperationStatusResult().withStatus("sbrgz"), - new OperationStatusResult().withStatus("wmsweypqwd"))), - new OperationStatusResult().withId("icccn") - .withName("lstvlzywe") - .withStatus("hz") - .withPercentComplete(80.5275F) - .withStartTime(OffsetDateTime.parse("2021-12-02T07:00Z")) - .withEndTime(OffsetDateTime.parse("2021-11-21T06:15:53Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("siypbs"))), - new OperationStatusResult().withId("tg") - .withName("yhejhzisxgfp") - .withStatus("lolp") - .withPercentComplete(35.27798F) - .withStartTime(OffsetDateTime.parse("2021-08-28T21:31:04Z")) - .withEndTime(OffsetDateTime.parse("2021-01-25T08:59:13Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("jzraehtwdwrf"), - new OperationStatusResult().withStatus("swibyr"))), - new OperationStatusResult().withId("bhshfwpracstwity") - .withName("dyodnwzxltj") - .withStatus("vnhltiugcx") - .withPercentComplete(34.593796F) - .withStartTime(OffsetDateTime.parse("2021-05-31T21:54:01Z")) - .withEndTime(OffsetDateTime.parse("2021-07-21T13:09:19Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("y"), - new OperationStatusResult().withStatus("unyowxwl"))))), - new OperationStatusResult().withId("kv") - .withName("izsjqlhkrr") - .withStatus("bdeibqipqk") - .withPercentComplete(28.736359F) - .withStartTime(OffsetDateTime.parse("2021-11-17T03:58:19Z")) - .withEndTime(OffsetDateTime.parse("2021-03-25T16:52:17Z")) - .withOperations(Arrays.asList( - new OperationStatusResult().withId("refajpjorwkqnyh") - .withName("ivfxzsjabibsyst") - .withStatus("wfsdjpvkvpbj") - .withPercentComplete(91.798965F) - .withStartTime(OffsetDateTime.parse("2021-11-27T09:38:57Z")) - .withEndTime(OffsetDateTime.parse("2021-05-24T23:12:37Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("ncj"), - new OperationStatusResult().withStatus("budurgkakmo"), - new OperationStatusResult().withStatus("zhjjklffhmouwq"))), - new OperationStatusResult().withId("rfzeey") - .withName("jbsybbqw") - .withStatus("vtldgmfpgvmpip") - .withPercentComplete(23.292154F) - .withStartTime(OffsetDateTime.parse("2021-03-17T23:54:57Z")) - .withEndTime(OffsetDateTime.parse("2021-05-09T14:17:26Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("ss"))), - new OperationStatusResult().withId("twbdsrezpdrhn") - .withName("pikpz") - .withStatus("mejzanlfzxia") - .withPercentComplete(54.36735F) - .withStartTime(OffsetDateTime.parse("2021-09-16T17:22:47Z")) - .withEndTime(OffsetDateTime.parse("2021-09-13T10:29:44Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("i"), - new OperationStatusResult().withStatus("rjqc"))), - new OperationStatusResult().withId("zpfrla") - .withName("indfpwpjyl") - .withStatus("bt") - .withPercentComplete(27.504385F) - .withStartTime(OffsetDateTime.parse("2021-05-08T01:38:39Z")) - .withEndTime(OffsetDateTime.parse("2021-05-21T08:31:31Z")) - .withOperations(Arrays.asList(new OperationStatusResult().withStatus("szfjvfbgofelja"), - new OperationStatusResult().withStatus("rqmq"))))))); - model = BinaryData.fromObject(model).toObject(OperationStatusResult.class); - Assertions.assertEquals("n", model.id()); - Assertions.assertEquals("hmk", model.name()); - Assertions.assertEquals("c", model.status()); - Assertions.assertEquals(66.264F, model.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-05T08:15:46Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-09T05:24:27Z"), model.endTime()); - Assertions.assertEquals("eburu", model.operations().get(0).id()); - Assertions.assertEquals("ifrvtpu", model.operations().get(0).name()); - Assertions.assertEquals("ujmqlgkfbtndoa", model.operations().get(0).status()); - Assertions.assertEquals(83.54424F, model.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-02T01:39:29Z"), model.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-15T06:38:02Z"), model.operations().get(0).endTime()); - Assertions.assertEquals("i", model.operations().get(0).operations().get(0).id()); - Assertions.assertEquals("wwa", model.operations().get(0).operations().get(0).name()); - Assertions.assertEquals("zkoj", model.operations().get(0).operations().get(0).status()); - Assertions.assertEquals(5.645263F, model.operations().get(0).operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-02T02:07:21Z"), - model.operations().get(0).operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-08T23:15:43Z"), - model.operations().get(0).operations().get(0).endTime()); - Assertions.assertEquals("uicybxarzgszuf", - model.operations().get(0).operations().get(0).operations().get(0).status()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationsListMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationsListMockTests.java deleted file mode 100644 index 14033a987c19..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/OperationsListMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.Operation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"em\",\"display\":{\"provider\":\"zszuwiwtglxx\",\"resource\":\"jfpgpicrmn\",\"operation\":\"rgmqgjs\",\"description\":\"pqcbfrmbodthsq\"},\"origin\":\"vriibakclacjfr\",\"properties\":{\"uzlwvsgmw\":\"datausx\",\"izvu\":\"datahqf\",\"vmribiat\":\"datammkjsvthnwpztek\",\"zcugswvxwlmzqw\":\"datagplucfotangcfhny\"}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("em", response.iterator().next().name()); - Assertions.assertEquals("zszuwiwtglxx", response.iterator().next().display().provider()); - Assertions.assertEquals("jfpgpicrmn", response.iterator().next().display().resource()); - Assertions.assertEquals("rgmqgjs", response.iterator().next().display().operation()); - Assertions.assertEquals("pqcbfrmbodthsq", response.iterator().next().display().description()); - Assertions.assertEquals("vriibakclacjfr", response.iterator().next().origin()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index 174fe779af14..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/PrivateEndpointConnectionPropertiesTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpoint; -import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"groupIds\":[\"dmoh\",\"tbqvudw\",\"dndnvow\"],\"privateEndpoint\":{\"id\":\"jugwdkcglhsl\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"yggdtjixh\",\"actionsRequired\":\"uofqwe\"},\"provisioningState\":\"Failed\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("yggdtjixh", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("uofqwe", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model - = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("yggdtjixh") - .withActionsRequired("uofqwe")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("yggdtjixh", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("uofqwe", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/PrivateEndpointConnectionTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/PrivateEndpointConnectionTests.java deleted file mode 100644 index ea9873d87747..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/PrivateEndpointConnectionTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpoint; -import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpointConnection; -import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnection model = BinaryData.fromString( - "{\"properties\":{\"groupIds\":[\"keyyi\",\"nj\",\"dlwtgrhpdj\"],\"privateEndpoint\":{\"id\":\"masxazjpqyegu\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"xxhejjzzvd\",\"actionsRequired\":\"gwdslfhotwm\"},\"provisioningState\":\"Deleting\"},\"id\":\"wlbjnpgacftade\",\"name\":\"xnltyfsoppu\",\"type\":\"uesnzwdejbavo\"}") - .toObject(PrivateEndpointConnection.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("xxhejjzzvd", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("gwdslfhotwm", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnection model = new PrivateEndpointConnection().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("xxhejjzzvd") - .withActionsRequired("gwdslfhotwm")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnection.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("xxhejjzzvd", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("gwdslfhotwm", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/PrivateEndpointTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/PrivateEndpointTests.java deleted file mode 100644 index a73016afe100..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/PrivateEndpointTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpoint; - -public final class PrivateEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"enevfyexfwhybci\"}").toObject(PrivateEndpoint.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint(); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/PrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index b934cec8a963..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/PrivateLinkServiceConnectionStateTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkServiceConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = BinaryData - .fromString("{\"status\":\"Rejected\",\"description\":\"dcsi\",\"actionsRequired\":\"nnaamdectehfiqsc\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.status()); - Assertions.assertEquals("dcsi", model.description()); - Assertions.assertEquals("nnaamdectehfiqsc", model.actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model - = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("dcsi") - .withActionsRequired("nnaamdectehfiqsc"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.status()); - Assertions.assertEquals("dcsi", model.description()); - Assertions.assertEquals("nnaamdectehfiqsc", model.actionsRequired()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupInnerTests.java deleted file mode 100644 index 1f94502176b2..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerBackupInner; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ServerBackupInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerBackupInner model = BinaryData.fromString( - "{\"properties\":{\"backupType\":\"ouajpsqucmpoyf\",\"completedTime\":\"2021-02-06T21:08:58Z\",\"source\":\"gknygjofjddeqs\"},\"id\":\"eupewnwreitjz\",\"name\":\"flusarhmof\",\"type\":\"qhsmyurkdtml\"}") - .toObject(ServerBackupInner.class); - Assertions.assertEquals("ouajpsqucmpoyf", model.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-06T21:08:58Z"), model.completedTime()); - Assertions.assertEquals("gknygjofjddeqs", model.source()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerBackupInner model = new ServerBackupInner().withBackupType("ouajpsqucmpoyf") - .withCompletedTime(OffsetDateTime.parse("2021-02-06T21:08:58Z")) - .withSource("gknygjofjddeqs"); - model = BinaryData.fromObject(model).toObject(ServerBackupInner.class); - Assertions.assertEquals("ouajpsqucmpoyf", model.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-06T21:08:58Z"), model.completedTime()); - Assertions.assertEquals("gknygjofjddeqs", model.source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupListResultTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupListResultTests.java deleted file mode 100644 index ace97346ede5..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupListResultTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerBackupInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerBackupListResult; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServerBackupListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerBackupListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"backupType\":\"t\",\"completedTime\":\"2021-02-24T11:34:50Z\",\"source\":\"hmwhfpmrqo\"},\"id\":\"tu\",\"name\":\"knryrtihfxtij\",\"type\":\"pzvgnwzsymglzufc\"},{\"properties\":{\"backupType\":\"ohdbihanufh\",\"completedTime\":\"2021-01-11T10:02:32Z\",\"source\":\"y\"},\"id\":\"git\",\"name\":\"xqhabi\",\"type\":\"pikxwczbyscnpqxu\"},{\"properties\":{\"backupType\":\"y\",\"completedTime\":\"2021-06-17T16:29:35Z\",\"source\":\"b\"},\"id\":\"rkxvdum\",\"name\":\"grtfwvu\",\"type\":\"xgaudccs\"},{\"properties\":{\"backupType\":\"jcny\",\"completedTime\":\"2021-04-04T05:13:51Z\",\"source\":\"ryhtnapczwlokjy\"},\"id\":\"kkvnipjox\",\"name\":\"jnchgej\",\"type\":\"podmailzydehojwy\"}],\"nextLink\":\"uxinpmqnjaq\"}") - .toObject(ServerBackupListResult.class); - Assertions.assertEquals("t", model.value().get(0).backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-24T11:34:50Z"), model.value().get(0).completedTime()); - Assertions.assertEquals("hmwhfpmrqo", model.value().get(0).source()); - Assertions.assertEquals("uxinpmqnjaq", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerBackupListResult model = new ServerBackupListResult().withValue(Arrays.asList( - new ServerBackupInner().withBackupType("t") - .withCompletedTime(OffsetDateTime.parse("2021-02-24T11:34:50Z")) - .withSource("hmwhfpmrqo"), - new ServerBackupInner().withBackupType("ohdbihanufh") - .withCompletedTime(OffsetDateTime.parse("2021-01-11T10:02:32Z")) - .withSource("y"), - new ServerBackupInner().withBackupType("y") - .withCompletedTime(OffsetDateTime.parse("2021-06-17T16:29:35Z")) - .withSource("b"), - new ServerBackupInner().withBackupType("jcny") - .withCompletedTime(OffsetDateTime.parse("2021-04-04T05:13:51Z")) - .withSource("ryhtnapczwlokjy"))) - .withNextLink("uxinpmqnjaq"); - model = BinaryData.fromObject(model).toObject(ServerBackupListResult.class); - Assertions.assertEquals("t", model.value().get(0).backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-24T11:34:50Z"), model.value().get(0).completedTime()); - Assertions.assertEquals("hmwhfpmrqo", model.value().get(0).source()); - Assertions.assertEquals("uxinpmqnjaq", model.nextLink()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupPropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupPropertiesTests.java deleted file mode 100644 index a38a1940c916..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupPropertiesTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerBackupProperties; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ServerBackupPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerBackupProperties model = BinaryData - .fromString( - "{\"backupType\":\"ekuksjtx\",\"completedTime\":\"2021-01-21T08:28Z\",\"source\":\"mparcryuanzw\"}") - .toObject(ServerBackupProperties.class); - Assertions.assertEquals("ekuksjtx", model.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-21T08:28Z"), model.completedTime()); - Assertions.assertEquals("mparcryuanzw", model.source()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerBackupProperties model = new ServerBackupProperties().withBackupType("ekuksjtx") - .withCompletedTime(OffsetDateTime.parse("2021-01-21T08:28Z")) - .withSource("mparcryuanzw"); - model = BinaryData.fromObject(model).toObject(ServerBackupProperties.class); - Assertions.assertEquals("ekuksjtx", model.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-21T08:28Z"), model.completedTime()); - Assertions.assertEquals("mparcryuanzw", model.source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupPropertiesV2Tests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupPropertiesV2Tests.java deleted file mode 100644 index 1993ee08ec46..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupPropertiesV2Tests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerBackupPropertiesV2; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupType; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ServerBackupPropertiesV2Tests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerBackupPropertiesV2 model = BinaryData.fromString( - "{\"backupNameV2\":\"odepoogin\",\"backupType\":\"FULL\",\"completedTime\":\"2021-11-03T11:27:22Z\",\"source\":\"eognarxzxtheotu\",\"provisioningState\":\"Deleting\"}") - .toObject(ServerBackupPropertiesV2.class); - Assertions.assertEquals("odepoogin", model.backupNameV2()); - Assertions.assertEquals(BackupType.FULL, model.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T11:27:22Z"), model.completedTime()); - Assertions.assertEquals("eognarxzxtheotu", model.source()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerBackupPropertiesV2 model = new ServerBackupPropertiesV2().withBackupNameV2("odepoogin") - .withBackupType(BackupType.FULL) - .withCompletedTime(OffsetDateTime.parse("2021-11-03T11:27:22Z")) - .withSource("eognarxzxtheotu"); - model = BinaryData.fromObject(model).toObject(ServerBackupPropertiesV2.class); - Assertions.assertEquals("odepoogin", model.backupNameV2()); - Assertions.assertEquals(BackupType.FULL, model.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T11:27:22Z"), model.completedTime()); - Assertions.assertEquals("eognarxzxtheotu", model.source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupV2InnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupV2InnerTests.java deleted file mode 100644 index 826a42d0178e..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupV2InnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerBackupV2Inner; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupType; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ServerBackupV2InnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerBackupV2Inner model = BinaryData.fromString( - "{\"properties\":{\"backupNameV2\":\"qtrgqjbpfzfsinzg\",\"backupType\":\"FULL\",\"completedTime\":\"2021-02-14T20:28:05Z\",\"source\":\"zoxxjtf\",\"provisioningState\":\"Deleting\"},\"id\":\"wfzitonpeqfpjk\",\"name\":\"lxofpdvhpfxxypin\",\"type\":\"nmayhuybb\"}") - .toObject(ServerBackupV2Inner.class); - Assertions.assertEquals("qtrgqjbpfzfsinzg", model.backupNameV2()); - Assertions.assertEquals(BackupType.FULL, model.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-14T20:28:05Z"), model.completedTime()); - Assertions.assertEquals("zoxxjtf", model.source()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerBackupV2Inner model = new ServerBackupV2Inner().withBackupNameV2("qtrgqjbpfzfsinzg") - .withBackupType(BackupType.FULL) - .withCompletedTime(OffsetDateTime.parse("2021-02-14T20:28:05Z")) - .withSource("zoxxjtf"); - model = BinaryData.fromObject(model).toObject(ServerBackupV2Inner.class); - Assertions.assertEquals("qtrgqjbpfzfsinzg", model.backupNameV2()); - Assertions.assertEquals(BackupType.FULL, model.backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-14T20:28:05Z"), model.completedTime()); - Assertions.assertEquals("zoxxjtf", model.source()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupV2ListResultTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupV2ListResultTests.java deleted file mode 100644 index 6be388e40111..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerBackupV2ListResultTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerBackupV2Inner; -import com.azure.resourcemanager.mysqlflexibleserver.models.BackupType; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerBackupV2ListResult; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServerBackupV2ListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerBackupV2ListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"backupNameV2\":\"ciqihnhung\",\"backupType\":\"FULL\",\"completedTime\":\"2021-01-11T23:09:53Z\",\"source\":\"fygxgispemvtzfk\",\"provisioningState\":\"Creating\"},\"id\":\"ljofxqeofjaeqjh\",\"name\":\"jbasvmsmjqulngs\",\"type\":\"tnb\"},{\"properties\":{\"backupNameV2\":\"zgcwrw\",\"backupType\":\"FULL\",\"completedTime\":\"2021-06-21T13:48:53Z\",\"source\":\"ljdousk\",\"provisioningState\":\"Deleting\"},\"id\":\"ocrcjdk\",\"name\":\"tnhxbn\",\"type\":\"biksq\"},{\"properties\":{\"backupNameV2\":\"ssainqpjwnzll\",\"backupType\":\"FULL\",\"completedTime\":\"2021-07-25T07:38:35Z\",\"source\":\"ebvmgxsabkyqd\",\"provisioningState\":\"Deleting\"},\"id\":\"tcj\",\"name\":\"zdzevndh\",\"type\":\"rwpdappdsbdkvwrw\"}],\"nextLink\":\"eusnhutj\"}") - .toObject(ServerBackupV2ListResult.class); - Assertions.assertEquals("ciqihnhung", model.value().get(0).backupNameV2()); - Assertions.assertEquals(BackupType.FULL, model.value().get(0).backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-11T23:09:53Z"), model.value().get(0).completedTime()); - Assertions.assertEquals("fygxgispemvtzfk", model.value().get(0).source()); - Assertions.assertEquals("eusnhutj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerBackupV2ListResult model = new ServerBackupV2ListResult().withValue(Arrays.asList( - new ServerBackupV2Inner().withBackupNameV2("ciqihnhung") - .withBackupType(BackupType.FULL) - .withCompletedTime(OffsetDateTime.parse("2021-01-11T23:09:53Z")) - .withSource("fygxgispemvtzfk"), - new ServerBackupV2Inner().withBackupNameV2("zgcwrw") - .withBackupType(BackupType.FULL) - .withCompletedTime(OffsetDateTime.parse("2021-06-21T13:48:53Z")) - .withSource("ljdousk"), - new ServerBackupV2Inner().withBackupNameV2("ssainqpjwnzll") - .withBackupType(BackupType.FULL) - .withCompletedTime(OffsetDateTime.parse("2021-07-25T07:38:35Z")) - .withSource("ebvmgxsabkyqd"))) - .withNextLink("eusnhutj"); - model = BinaryData.fromObject(model).toObject(ServerBackupV2ListResult.class); - Assertions.assertEquals("ciqihnhung", model.value().get(0).backupNameV2()); - Assertions.assertEquals(BackupType.FULL, model.value().get(0).backupType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-11T23:09:53Z"), model.value().get(0).completedTime()); - Assertions.assertEquals("fygxgispemvtzfk", model.value().get(0).source()); - Assertions.assertEquals("eusnhutj", model.nextLink()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerEditionCapabilityTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerEditionCapabilityTests.java deleted file mode 100644 index ed80e8af7856..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerEditionCapabilityTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerEditionCapability; - -public final class ServerEditionCapabilityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerEditionCapability model = BinaryData.fromString( - "{\"name\":\"baliourqhakauha\",\"supportedStorageEditions\":[{\"name\":\"wxosowzxcug\",\"minStorageSize\":985999643464514171,\"maxStorageSize\":3565067205793933255,\"minBackupRetentionDays\":2379655259774159781,\"maxBackupRetentionDays\":4998574770628766131,\"minBackupIntervalHours\":6142570419205418148,\"maxBackupIntervalHours\":1461614765638521990},{\"name\":\"bvmeuecivy\",\"minStorageSize\":1476770674117610313,\"maxStorageSize\":6992830987626410961,\"minBackupRetentionDays\":3201956032854301074,\"maxBackupRetentionDays\":5062126351477079238,\"minBackupIntervalHours\":6905862249105518012,\"maxBackupIntervalHours\":1711684439873490205},{\"name\":\"dytdxwitx\",\"minStorageSize\":7412584900785787675,\"maxStorageSize\":7022663417329031305,\"minBackupRetentionDays\":6962157826226813076,\"maxBackupRetentionDays\":1588366635739120038,\"minBackupIntervalHours\":7904939230383834932,\"maxBackupIntervalHours\":5666526648393096058}],\"supportedServerVersions\":[{\"name\":\"gklwn\",\"supportedSkus\":[{\"name\":\"dauwhvylwzbtd\",\"vCores\":4861537181982868149,\"supportedIops\":3747533921605268466,\"supportedMemoryPerVCoreMB\":3229287439431688526},{\"name\":\"uwprzql\",\"vCores\":420888328132627784,\"supportedIops\":4537087271165106173,\"supportedMemoryPerVCoreMB\":3450822474060366088},{\"name\":\"fxobbcsws\",\"vCores\":6987699562222584934,\"supportedIops\":4063358469478582470,\"supportedMemoryPerVCoreMB\":3299137544149658502}]}]}") - .toObject(ServerEditionCapability.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerEditionCapability model = new ServerEditionCapability(); - model = BinaryData.fromObject(model).toObject(ServerEditionCapability.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerEditionCapabilityV2Tests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerEditionCapabilityV2Tests.java deleted file mode 100644 index 2ae4cc73a520..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerEditionCapabilityV2Tests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerEditionCapabilityV2; - -public final class ServerEditionCapabilityV2Tests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerEditionCapabilityV2 model = BinaryData.fromString( - "{\"name\":\"vhelxprglyatdd\",\"defaultSku\":\"cbcuejrjxgciqi\",\"defaultStorageSize\":650289155,\"supportedStorageEditions\":[{\"name\":\"sdqrhzoymibmrq\",\"minStorageSize\":5977240495404401854,\"maxStorageSize\":8539790193753290872,\"minBackupRetentionDays\":3859662575119335920,\"maxBackupRetentionDays\":7176903777537856658,\"minBackupIntervalHours\":5665928384383195367,\"maxBackupIntervalHours\":7740523087334543020},{\"name\":\"yyv\",\"minStorageSize\":5748246004762300961,\"maxStorageSize\":3645438525729002905,\"minBackupRetentionDays\":3596857482537932759,\"maxBackupRetentionDays\":1477566052149971065,\"minBackupIntervalHours\":2878415356343371962,\"maxBackupIntervalHours\":6217672492639104016},{\"name\":\"ashrt\",\"minStorageSize\":1151592632214539496,\"maxStorageSize\":3530483379804377024,\"minBackupRetentionDays\":8989578588874797078,\"maxBackupRetentionDays\":3970058282735667200,\"minBackupIntervalHours\":2291924082393091786,\"maxBackupIntervalHours\":4256703090352932350},{\"name\":\"asipqiio\",\"minStorageSize\":2528125780140378024,\"maxStorageSize\":5255537493272573987,\"minBackupRetentionDays\":1160528699015239427,\"maxBackupRetentionDays\":3089233038709008061,\"minBackupIntervalHours\":3993941524407164456,\"maxBackupIntervalHours\":619543154946414488}],\"supportedSkus\":[{\"name\":\"t\",\"vCores\":8848933836219638082,\"supportedIops\":5608022375308788622,\"supportedMemoryPerVCoreMB\":2013096903051656692,\"supportedZones\":[\"hykojoxafnndlpic\",\"koymkcd\",\"h\",\"pkkpw\"],\"supportedHAMode\":[\"q\",\"ovvqfovljxywsu\",\"syrsndsytgadgvra\"]},{\"name\":\"en\",\"vCores\":4293634280481383135,\"supportedIops\":7415749586040440135,\"supportedMemoryPerVCoreMB\":7967069299600800730,\"supportedZones\":[\"ijfqkacewiipfp\",\"bjibwwiftohq\"],\"supportedHAMode\":[\"uvksgplsaknynfsy\",\"ljphuopxodl\"]}]}") - .toObject(ServerEditionCapabilityV2.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerEditionCapabilityV2 model = new ServerEditionCapabilityV2(); - model = BinaryData.fromObject(model).toObject(ServerEditionCapabilityV2.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerGtidSetParameterTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerGtidSetParameterTests.java deleted file mode 100644 index 9b05978cdcdc..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerGtidSetParameterTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerGtidSetParameter; -import org.junit.jupiter.api.Assertions; - -public final class ServerGtidSetParameterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerGtidSetParameter model - = BinaryData.fromString("{\"gtidSet\":\"wkuofoskghsauu\"}").toObject(ServerGtidSetParameter.class); - Assertions.assertEquals("wkuofoskghsauu", model.gtidSet()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerGtidSetParameter model = new ServerGtidSetParameter().withGtidSet("wkuofoskghsauu"); - model = BinaryData.fromObject(model).toObject(ServerGtidSetParameter.class); - Assertions.assertEquals("wkuofoskghsauu", model.gtidSet()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerRestartParameterTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerRestartParameterTests.java deleted file mode 100644 index 456abc158558..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerRestartParameterTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.EnableStatusEnum; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerRestartParameter; -import org.junit.jupiter.api.Assertions; - -public final class ServerRestartParameterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerRestartParameter model - = BinaryData.fromString("{\"restartWithFailover\":\"Enabled\",\"maxFailoverSeconds\":1877680716}") - .toObject(ServerRestartParameter.class); - Assertions.assertEquals(EnableStatusEnum.ENABLED, model.restartWithFailover()); - Assertions.assertEquals(1877680716, model.maxFailoverSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerRestartParameter model = new ServerRestartParameter().withRestartWithFailover(EnableStatusEnum.ENABLED) - .withMaxFailoverSeconds(1877680716); - model = BinaryData.fromObject(model).toObject(ServerRestartParameter.class); - Assertions.assertEquals(EnableStatusEnum.ENABLED, model.restartWithFailover()); - Assertions.assertEquals(1877680716, model.maxFailoverSeconds()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerVersionCapabilityTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerVersionCapabilityTests.java deleted file mode 100644 index dcf5a89e8207..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerVersionCapabilityTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerVersionCapability; - -public final class ServerVersionCapabilityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerVersionCapability model = BinaryData.fromString( - "{\"name\":\"bwwaloa\",\"supportedSkus\":[{\"name\":\"wrtz\",\"vCores\":1900837356777018235,\"supportedIops\":2493734222555395016,\"supportedMemoryPerVCoreMB\":5304844297296220991},{\"name\":\"ongmtsa\",\"vCores\":4946607856371446692,\"supportedIops\":7752304449285326809,\"supportedMemoryPerVCoreMB\":398412434287347439},{\"name\":\"knftguvriuh\",\"vCores\":2144176809632708140,\"supportedIops\":6220323322610788577,\"supportedMemoryPerVCoreMB\":6305214480301008748}]}") - .toObject(ServerVersionCapability.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerVersionCapability model = new ServerVersionCapability(); - model = BinaryData.fromObject(model).toObject(ServerVersionCapability.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerVersionCapabilityV2Tests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerVersionCapabilityV2Tests.java deleted file mode 100644 index 82168c0fb736..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServerVersionCapabilityV2Tests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerVersionCapabilityV2; - -public final class ServerVersionCapabilityV2Tests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerVersionCapabilityV2 model - = BinaryData.fromString("{\"name\":\"wyhqmibzyhwits\"}").toObject(ServerVersionCapabilityV2.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerVersionCapabilityV2 model = new ServerVersionCapabilityV2(); - model = BinaryData.fromObject(model).toObject(ServerVersionCapabilityV2.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersDeleteMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersDeleteMockTests.java deleted file mode 100644 index e13fdf8f3129..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersDeleteMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.servers().delete("y", "uxakjsqzhzbezk", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersFailoverMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersFailoverMockTests.java deleted file mode 100644 index 360f30a961ee..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersFailoverMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServersFailoverMockTests { - @Test - public void testFailover() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.servers().failover("qgukkjqnv", "roylaxxu", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersResetGtidMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersResetGtidMockTests.java deleted file mode 100644 index 5d9e251438ed..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersResetGtidMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerGtidSetParameter; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServersResetGtidMockTests { - @Test - public void testResetGtid() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.servers() - .resetGtid("qlgehg", "pipifh", new ServerGtidSetParameter().withGtidSet("e"), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersRestartMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersRestartMockTests.java deleted file mode 100644 index b4527938e86c..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersRestartMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.models.EnableStatusEnum; -import com.azure.resourcemanager.mysqlflexibleserver.models.ServerRestartParameter; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServersRestartMockTests { - @Test - public void testRestart() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.servers() - .restart("a", "fedxihchrphkm", - new ServerRestartParameter().withRestartWithFailover(EnableStatusEnum.DISABLED) - .withMaxFailoverSeconds(1151973506), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStartMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStartMockTests.java deleted file mode 100644 index fc392ac149d6..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStartMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServersStartMockTests { - @Test - public void testStart() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.servers().start("nsdfzpbgtgky", "kdghrjeuutlwx", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStopMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStopMockTests.java deleted file mode 100644 index f410aa757b3b..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersStopMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServersStopMockTests { - @Test - public void testStop() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.servers().stop("z", "zhokvbwnhh", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersValidateEstimateHighAvailabilityWithResponseMockTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersValidateEstimateHighAvailabilityWithResponseMockTests.java deleted file mode 100644 index 13733a5403cd..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ServersValidateEstimateHighAvailabilityWithResponseMockTests.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.mysqlflexibleserver.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.mysqlflexibleserver.MySqlManager; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.HighAvailabilityValidationEstimationInner; -import com.azure.resourcemanager.mysqlflexibleserver.models.HighAvailabilityValidationEstimation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServersValidateEstimateHighAvailabilityWithResponseMockTests { - @Test - public void testValidateEstimateHighAvailabilityWithResponse() throws Exception { - String responseStr - = "{\"estimatedDowntime\":101207087,\"scheduledStandbyAvailabilityZone\":\"xgccknfnw\",\"expectedStandbyAvailabilityZone\":\"tmvpdvjdhtt\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MySqlManager manager = MySqlManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - HighAvailabilityValidationEstimation response = manager.servers() - .validateEstimateHighAvailabilityWithResponse("cdisd", "sfjbjsvg", - new HighAvailabilityValidationEstimationInner().withExpectedStandbyAvailabilityZone("ycy"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("tmvpdvjdhtt", response.expectedStandbyAvailabilityZone()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/SkuCapabilityTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/SkuCapabilityTests.java deleted file mode 100644 index 53a6487b1f39..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/SkuCapabilityTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.SkuCapability; - -public final class SkuCapabilityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuCapability model = BinaryData.fromString( - "{\"name\":\"yriwwroyqb\",\"vCores\":7374483885335506534,\"supportedIops\":4599306021496141232,\"supportedMemoryPerVCoreMB\":6144174767385086572}") - .toObject(SkuCapability.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCapability model = new SkuCapability(); - model = BinaryData.fromObject(model).toObject(SkuCapability.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/SkuCapabilityV2Tests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/SkuCapabilityV2Tests.java deleted file mode 100644 index 87d2c3fb3f32..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/SkuCapabilityV2Tests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.SkuCapabilityV2; - -public final class SkuCapabilityV2Tests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuCapabilityV2 model = BinaryData.fromString( - "{\"name\":\"ynt\",\"vCores\":3707050213775351931,\"supportedIops\":2854193743711542243,\"supportedMemoryPerVCoreMB\":9128276167784679496,\"supportedZones\":[\"srmslyzr\"],\"supportedHAMode\":[\"c\",\"ckqqzqioxiysui\",\"zynkedya\"]}") - .toObject(SkuCapabilityV2.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCapabilityV2 model = new SkuCapabilityV2(); - model = BinaryData.fromObject(model).toObject(SkuCapabilityV2.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/StorageEditionCapabilityTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/StorageEditionCapabilityTests.java deleted file mode 100644 index 2d37a5bd7060..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/StorageEditionCapabilityTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.StorageEditionCapability; - -public final class StorageEditionCapabilityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageEditionCapability model = BinaryData.fromString( - "{\"name\":\"ewtghfgblcgw\",\"minStorageSize\":3213319652160072199,\"maxStorageSize\":4005325125133020177,\"minBackupRetentionDays\":8001499345997326001,\"maxBackupRetentionDays\":6151134788443047817,\"minBackupIntervalHours\":1014195087102039367,\"maxBackupIntervalHours\":6405045167335506374}") - .toObject(StorageEditionCapability.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageEditionCapability model = new StorageEditionCapability(); - model = BinaryData.fromObject(model).toObject(StorageEditionCapability.class); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/StorageTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/StorageTests.java deleted file mode 100644 index 39c66b21045c..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/StorageTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.EnableStatusEnum; -import com.azure.resourcemanager.mysqlflexibleserver.models.Storage; -import org.junit.jupiter.api.Assertions; - -public final class StorageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Storage model = BinaryData.fromString( - "{\"storageSizeGB\":847580815,\"iops\":1376492737,\"autoGrow\":\"Disabled\",\"logOnDisk\":\"Disabled\",\"storageSku\":\"al\",\"autoIoScaling\":\"Disabled\"}") - .toObject(Storage.class); - Assertions.assertEquals(847580815, model.storageSizeGB()); - Assertions.assertEquals(1376492737, model.iops()); - Assertions.assertEquals(EnableStatusEnum.DISABLED, model.autoGrow()); - Assertions.assertEquals(EnableStatusEnum.DISABLED, model.logOnDisk()); - Assertions.assertEquals(EnableStatusEnum.DISABLED, model.autoIoScaling()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Storage model = new Storage().withStorageSizeGB(847580815) - .withIops(1376492737) - .withAutoGrow(EnableStatusEnum.DISABLED) - .withLogOnDisk(EnableStatusEnum.DISABLED) - .withAutoIoScaling(EnableStatusEnum.DISABLED); - model = BinaryData.fromObject(model).toObject(Storage.class); - Assertions.assertEquals(847580815, model.storageSizeGB()); - Assertions.assertEquals(1376492737, model.iops()); - Assertions.assertEquals(EnableStatusEnum.DISABLED, model.autoGrow()); - Assertions.assertEquals(EnableStatusEnum.DISABLED, model.logOnDisk()); - Assertions.assertEquals(EnableStatusEnum.DISABLED, model.autoIoScaling()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ValidateBackupResponseInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ValidateBackupResponseInnerTests.java deleted file mode 100644 index 20ef018eb1c9..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ValidateBackupResponseInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ValidateBackupResponseInner; -import org.junit.jupiter.api.Assertions; - -public final class ValidateBackupResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ValidateBackupResponseInner model = BinaryData.fromString("{\"properties\":{\"numberOfContainers\":148902907}}") - .toObject(ValidateBackupResponseInner.class); - Assertions.assertEquals(148902907, model.numberOfContainers()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ValidateBackupResponseInner model = new ValidateBackupResponseInner().withNumberOfContainers(148902907); - model = BinaryData.fromObject(model).toObject(ValidateBackupResponseInner.class); - Assertions.assertEquals(148902907, model.numberOfContainers()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ValidateBackupResponsePropertiesTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ValidateBackupResponsePropertiesTests.java deleted file mode 100644 index 2077aa0ea35b..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/ValidateBackupResponsePropertiesTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ValidateBackupResponseProperties; -import org.junit.jupiter.api.Assertions; - -public final class ValidateBackupResponsePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ValidateBackupResponseProperties model = BinaryData.fromString("{\"numberOfContainers\":757345112}") - .toObject(ValidateBackupResponseProperties.class); - Assertions.assertEquals(757345112, model.numberOfContainers()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ValidateBackupResponseProperties model - = new ValidateBackupResponseProperties().withNumberOfContainers(757345112); - model = BinaryData.fromObject(model).toObject(ValidateBackupResponseProperties.class); - Assertions.assertEquals(757345112, model.numberOfContainers()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/VirtualNetworkSubnetUsageParameterTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/VirtualNetworkSubnetUsageParameterTests.java deleted file mode 100644 index 3dbc88e0605c..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/VirtualNetworkSubnetUsageParameterTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.models.VirtualNetworkSubnetUsageParameter; -import org.junit.jupiter.api.Assertions; - -public final class VirtualNetworkSubnetUsageParameterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualNetworkSubnetUsageParameter model = BinaryData.fromString("{\"virtualNetworkResourceId\":\"pyy\"}") - .toObject(VirtualNetworkSubnetUsageParameter.class); - Assertions.assertEquals("pyy", model.virtualNetworkResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualNetworkSubnetUsageParameter model - = new VirtualNetworkSubnetUsageParameter().withVirtualNetworkResourceId("pyy"); - model = BinaryData.fromObject(model).toObject(VirtualNetworkSubnetUsageParameter.class); - Assertions.assertEquals("pyy", model.virtualNetworkResourceId()); - } -} diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/VirtualNetworkSubnetUsageResultInnerTests.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/VirtualNetworkSubnetUsageResultInnerTests.java deleted file mode 100644 index 36d25b47f325..000000000000 --- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/test/java/com/azure/resourcemanager/mysqlflexibleserver/generated/VirtualNetworkSubnetUsageResultInnerTests.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.mysqlflexibleserver.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner; - -public final class VirtualNetworkSubnetUsageResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualNetworkSubnetUsageResultInner model = BinaryData.fromString( - "{\"location\":\"cdpu\",\"subscriptionId\":\"zgmwznmabikns\",\"delegatedSubnetsUsage\":[{\"subnetName\":\"hxbld\",\"usage\":3033706853935881392}]}") - .toObject(VirtualNetworkSubnetUsageResultInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualNetworkSubnetUsageResultInner model = new VirtualNetworkSubnetUsageResultInner(); - model = BinaryData.fromObject(model).toObject(VirtualNetworkSubnetUsageResultInner.class); - } -}