diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 0cd0416d1ceb..869ad5c0b9b3 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -385,7 +385,7 @@ com.azure.resourcemanager:azure-resourcemanager-security;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-azurearcdata;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-hybridnetwork;1.1.0;1.2.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-purview;1.0.0;1.1.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-mysqlflexibleserver;1.0.0;1.1.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-mysqlflexibleserver;1.0.0;1.1.0
com.azure.resourcemanager:azure-resourcemanager-baremetalinfrastructure;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-quota;2.0.0;2.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-extendedlocation;1.0.0;1.1.0-beta.1
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/CHANGELOG.md b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/CHANGELOG.md
index 6f93fb1ba75c..a62519ad268d 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/CHANGELOG.md
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/CHANGELOG.md
@@ -1,14 +1,408 @@
# Release History
-## 1.1.0-beta.1 (Unreleased)
+## 1.1.0 (2025-10-13)
-### Features Added
+- 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 api-version 2024-12-30. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Breaking Changes
-### Bugs Fixed
+#### `models.CapabilitiesListResult` was removed
-### Other Changes
+#### `models.FirewallRuleListResult` was removed
+
+#### `models.OperationListResult` was removed
+
+#### `models.DatabaseListResult` was removed
+
+#### `models.ServerBackupListResult` was removed
+
+#### `models.ServerListResult` was removed
+
+#### `models.OperationDisplay` was modified
+
+* `withProvider(java.lang.String)` was removed
+* `withOperation(java.lang.String)` was removed
+* `withDescription(java.lang.String)` was removed
+* `validate()` was removed
+* `withResource(java.lang.String)` was removed
+
+#### `models.VirtualNetworkSubnetUsageParameter` was modified
+
+* `validate()` was removed
+
+#### `models.SkuCapability` was modified
+
+* `validate()` was removed
+
+#### `models.ConfigurationListForBatchUpdate` was modified
+
+* `validate()` was removed
+
+#### `models.NameAvailabilityRequest` was modified
+
+* `validate()` was removed
+
+#### `models.ManagedServiceIdentityType` was modified
+
+* `valueOf(java.lang.String)` was removed
+* `models.ManagedServiceIdentityType[] values()` -> `java.util.Collection values()`
+* `toString()` was removed
+
+#### `models.ServerRestartParameter` was modified
+
+* `validate()` was removed
+
+#### `models.Identity` was modified
+
+* `validate()` was removed
+
+#### `models.HighAvailability` was modified
+
+* `validate()` was removed
+
+#### `models.ServerVersionCapability` was modified
+
+* `validate()` was removed
+
+#### `models.ServerForUpdate` was modified
+
+* `validate()` was removed
+
+#### `models.MaintenanceWindow` was modified
+
+* `validate()` was removed
+
+#### `models.Network` was modified
+
+* `validate()` was removed
+
+#### `models.StorageEditionCapability` was modified
+
+* `validate()` was removed
+
+#### `models.Storage` was modified
+
+* `validate()` was removed
+
+#### `models.Configurations` was modified
+
+* `update(java.lang.String,java.lang.String,java.lang.String,fluent.models.ConfigurationInner)` was removed
+* `update(java.lang.String,java.lang.String,java.lang.String,fluent.models.ConfigurationInner,com.azure.core.util.Context)` was removed
+* `listByServer(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed
+
+#### `models.DelegatedSubnetUsage` was modified
+
+* `validate()` was removed
+
+#### `models.ServerEditionCapability` was modified
+
+* `validate()` was removed
+
+#### `models.Operation` was modified
+
+* `java.lang.String origin()` -> `models.Origin origin()`
+
+#### `models.DataEncryption` was modified
+
+* `validate()` was removed
+
+#### `models.Sku` was modified
+
+* `validate()` was removed
+
+#### `models.ConfigurationForBatchUpdate` was modified
+
+* `validate()` was removed
+
+#### `models.Backup` was modified
+
+* `validate()` was removed
+
+### Features Added
+
+* `models.Configuration$Update` was added
+
+* `models.BackupAndExportResponseType` was added
+
+* `models.ServerEditionCapabilityV2` was added
+
+* `models.AdvancedThreatProtectionState` was added
+
+* `models.SkuCapabilityV2` was added
+
+* `models.BackupRequestBase` was added
+
+* `models.PrivateEndpointConnection$Update` was added
+
+* `models.AdvancedThreatProtectionProvisioningState` was added
+
+* `models.FullBackupStoreDetails` was added
+
+* `models.ImportFromStorageResponseType` was added
+
+* `models.AzureADAdministrator` was added
+
+* `models.HighAvailabilityValidationEstimation` was added
+
+* `models.ValidateBackupResponse` was added
+
+* `models.AdministratorType` was added
+
+* `models.OperationProgressResponseType` was added
+
+* `models.ServerDetachVNetParameter` was added
+
+* `models.Configuration$Definition` was added
+
+* `models.PrivateEndpoint` was added
+
+* `models.BackupStoreDetails` was added
+
+* `models.AzureADAdministrator$UpdateStages` was added
+
+* `models.ResetAllToDefault` was added
+
+* `models.LogFiles` was added
+
+* `models.PrivateEndpointConnection$Definition` was added
+
+* `models.OperationResults` was added
+
+* `models.ServerBackupV2$DefinitionStages` was added
+
+* `models.BackupAndExportResponse` was added
+
+* `models.ServerBackupV2$Definition` was added
+
+* `models.BatchOfMaintenance` was added
+
+* `models.PrivateEndpointConnection$UpdateStages` was added
+
+* `models.OperationStatusResult` was added
+
+* `models.MaintenanceUpdate` was added
+
+* `models.OperationStatusExtendedResult` was added
+
+* `models.PrivateLinkResources` was added
+
+* `models.PrivateEndpointConnectionListResult` was added
+
+* `models.ServersMigrations` was added
+
+* `models.AzureADAdministrator$Update` was added
+
+* `models.AdvancedThreatProtectionSettings` was added
+
+* `models.UserAssignedIdentity` was added
+
+* `models.LocationBasedCapabilitySets` was added
+
+* `models.ProvisioningState` was added
+
+* `models.MaintenancePolicy` was added
+
+* `models.BackupAndExports` was added
+
+* `models.PrivateEndpointConnections` was added
+
+* `models.ImportSourceStorageType` was added
+
+* `models.ServerGtidSetParameter` was added
+
+* `models.FeatureProperty` was added
+
+* `models.PrivateLinkResource` was added
+
+* `models.BackupAndExportRequest` was added
+
+* `models.MaintenanceProvisioningState` was added
+
+* `models.ServerVersionCapabilityV2` was added
+
+* `models.OperationStatus` was added
+
+* `models.Configuration$UpdateStages` was added
+
+* `models.Configuration$DefinitionStages` was added
+
+* `models.PrivateLinkResourceProperties` was added
+
+* `models.AdvancedThreatProtectionName` was added
+
+* `models.PatchStrategy` was added
+
+* `models.ImportSourceProperties` was added
+
+* `models.BackupSettings` was added
+
+* `models.StorageRedundancyEnum` was added
+
+* `models.OperationProgressResult` was added
+
+* `models.PrivateEndpointConnection` was added
+
+* `models.Origin` was added
+
+* `models.PrivateLinkServiceConnectionState` was added
+
+* `models.ServerBackupV2` was added
+
+* `models.LongRunningBackupOperations` was added
+
+* `models.LongRunningBackups` was added
+
+* `models.ObjectType` was added
+
+* `models.Maintenances` was added
+
+* `models.MaintenanceType` was added
+
+* `models.BackupFormat` was added
+
+* `models.AzureADAdministrators` was added
+
+* `models.AzureADAdministrator$Definition` was added
+
+* `models.AdvancedThreatProtection` was added
+
+* `models.PrivateEndpointServiceConnectionStatus` was added
+
+* `models.AzureADAdministrator$DefinitionStages` was added
+
+* `models.AdvancedThreatProtectionForUpdate` was added
+
+* `models.MaintenanceState` was added
+
+* `models.AdministratorName` was added
+
+* `models.PrivateEndpointConnection$DefinitionStages` was added
+
+* `models.Capability` was added
+
+* `models.PrivateEndpointConnectionProvisioningState` was added
+
+* `models.Maintenance` was added
+
+* `models.BackupType` was added
+
+* `models.LogFile` was added
+
+* `models.OperationProgress` was added
+
+#### `models.ConfigurationListForBatchUpdate` was modified
+
+* `resetAllToDefault()` was added
+* `withResetAllToDefault(models.ResetAllToDefault)` was added
+
+#### `models.Server` was modified
+
+* `fullVersion()` was added
+* `validateEstimateHighAvailabilityWithResponse(fluent.models.HighAvailabilityValidationEstimationInner,com.azure.core.util.Context)` was added
+* `maintenancePolicy()` was added
+* `resetGtid(models.ServerGtidSetParameter)` was added
+* `detachVNet(models.ServerDetachVNetParameter,com.azure.core.util.Context)` was added
+* `privateEndpointConnections()` was added
+* `databasePort()` was added
+* `importSourceProperties()` was added
+* `resetGtid(models.ServerGtidSetParameter,com.azure.core.util.Context)` was added
+* `validateEstimateHighAvailability(fluent.models.HighAvailabilityValidationEstimationInner)` was added
+* `detachVNet(models.ServerDetachVNetParameter)` was added
+
+#### `models.ServerForUpdate` was modified
+
+* `withNetwork(models.Network)` was added
+* `withVersion(models.ServerVersion)` was added
+* `withMaintenancePolicy(models.MaintenancePolicy)` was added
+* `maintenancePolicy()` was added
+* `version()` was added
+* `network()` was added
+
+#### `models.MaintenanceWindow` was modified
+
+* `batchOfMaintenance()` was added
+* `withBatchOfMaintenance(models.BatchOfMaintenance)` was added
+
+#### `models.Network` was modified
+
+* `withPublicNetworkAccess(models.EnableStatusEnum)` was added
+
+#### `models.StorageEditionCapability` was modified
+
+* `maxBackupIntervalHours()` was added
+* `minBackupIntervalHours()` was added
+
+#### `MySqlManager` was modified
+
+* `operationProgress()` was added
+* `backupAndExports()` was added
+* `azureADAdministrators()` was added
+* `serversMigrations()` was added
+* `longRunningBackups()` was added
+* `maintenances()` was added
+* `privateLinkResources()` was added
+* `operationResults()` was added
+* `logFiles()` was added
+* `longRunningBackupOperations()` was added
+* `advancedThreatProtectionSettings()` was added
+* `locationBasedCapabilitySets()` was added
+* `privateEndpointConnections()` was added
+
+#### `models.Storage` was modified
+
+* `storageRedundancy()` was added
+* `withAutoIoScaling(models.EnableStatusEnum)` was added
+* `withLogOnDisk(models.EnableStatusEnum)` was added
+* `withStorageRedundancy(models.StorageRedundancyEnum)` was added
+* `autoIoScaling()` was added
+* `logOnDisk()` was added
+
+#### `models.Backups` was modified
+
+* `put(java.lang.String,java.lang.String,java.lang.String)` was added
+* `putWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+
+#### `models.Server$Definition` was modified
+
+* `withDatabasePort(java.lang.Integer)` was added
+* `withMaintenancePolicy(models.MaintenancePolicy)` was added
+* `withImportSourceProperties(models.ImportSourceProperties)` was added
+
+#### `models.Configurations` was modified
+
+* `listByServer(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Integer,java.lang.Integer,com.azure.core.util.Context)` was added
+* `getById(java.lang.String)` was added
+* `define(java.lang.String)` was added
+* `getByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was added
+
+#### `models.Servers` was modified
+
+* `resetGtid(java.lang.String,java.lang.String,models.ServerGtidSetParameter)` was added
+* `detachVNet(java.lang.String,java.lang.String,models.ServerDetachVNetParameter)` was added
+* `detachVNet(java.lang.String,java.lang.String,models.ServerDetachVNetParameter,com.azure.core.util.Context)` was added
+* `resetGtid(java.lang.String,java.lang.String,models.ServerGtidSetParameter,com.azure.core.util.Context)` was added
+* `validateEstimateHighAvailability(java.lang.String,java.lang.String,fluent.models.HighAvailabilityValidationEstimationInner)` was added
+* `validateEstimateHighAvailabilityWithResponse(java.lang.String,java.lang.String,fluent.models.HighAvailabilityValidationEstimationInner,com.azure.core.util.Context)` was added
+
+#### `models.Server$Update` was modified
+
+* `withNetwork(models.Network)` was added
+* `withVersion(models.ServerVersion)` was added
+* `withMaintenancePolicy(models.MaintenancePolicy)` was added
+
+#### `models.Backup` was modified
+
+* `backupIntervalHours()` was added
+* `withBackupIntervalHours(java.lang.Integer)` was added
+
+#### `models.Configuration` was modified
+
+* `update()` was added
+* `currentValue()` was added
+* `refresh()` was added
+* `resourceGroupName()` was added
+* `refresh(com.azure.core.util.Context)` was added
+* `documentationLink()` was added
## 1.0.0 (2024-12-20)
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/README.md b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/README.md
index 7a84c8f37c98..654759981854 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-2021-05-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for 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 api-version 2024-12-30. 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.1.0-beta.1
+ 1.1.0
```
[//]: # ({x-version-update-end})
@@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
```java
-AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
@@ -60,7 +60,7 @@ MySqlManager manager = MySqlManager
.authenticate(credential, profile);
```
-The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
See [Authentication][authenticate] for more options.
@@ -109,5 +109,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
-
-
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/SAMPLE.md b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/SAMPLE.md
index 560c855ac071..213885568a78 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/SAMPLE.md
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/SAMPLE.md
@@ -1,10 +1,30 @@
# Code snippets and samples
+## AdvancedThreatProtectionSettings
+
+- [Get](#advancedthreatprotectionsettings_get)
+- [List](#advancedthreatprotectionsettings_list)
+- [Update](#advancedthreatprotectionsettings_update)
+- [UpdatePut](#advancedthreatprotectionsettings_updateput)
+
+## AzureADAdministrators
+
+- [CreateOrUpdate](#azureadadministrators_createorupdate)
+- [Delete](#azureadadministrators_delete)
+- [Get](#azureadadministrators_get)
+- [ListByServer](#azureadadministrators_listbyserver)
+
+## BackupAndExport
+
+- [Create](#backupandexport_create)
+- [ValidateBackup](#backupandexport_validatebackup)
+
## Backups
- [Get](#backups_get)
- [ListByServer](#backups_listbyserver)
+- [Put](#backups_put)
## CheckNameAvailability
@@ -21,6 +41,7 @@
## Configurations
- [BatchUpdate](#configurations_batchupdate)
+- [CreateOrUpdate](#configurations_createorupdate)
- [Get](#configurations_get)
- [ListByServer](#configurations_listbyserver)
- [Update](#configurations_update)
@@ -47,10 +68,54 @@
- [List](#locationbasedcapabilities_list)
+## LocationBasedCapabilitySet
+
+- [Get](#locationbasedcapabilityset_get)
+- [List](#locationbasedcapabilityset_list)
+
+## LogFiles
+
+- [ListByServer](#logfiles_listbyserver)
+
+## LongRunningBackupOperation
+
+- [Create](#longrunningbackupoperation_create)
+
+## LongRunningBackups
+
+- [Get](#longrunningbackups_get)
+- [List](#longrunningbackups_list)
+
+## Maintenances
+
+- [List](#maintenances_list)
+- [Read](#maintenances_read)
+- [Update](#maintenances_update)
+
+## OperationProgress
+
+- [Get](#operationprogress_get)
+
+## OperationResults
+
+- [Get](#operationresults_get)
+
## Operations
- [List](#operations_list)
+## PrivateEndpointConnections
+
+- [CreateOrUpdate](#privateendpointconnections_createorupdate)
+- [Delete](#privateendpointconnections_delete)
+- [Get](#privateendpointconnections_get)
+- [ListByServer](#privateendpointconnections_listbyserver)
+
+## PrivateLinkResources
+
+- [Get](#privatelinkresources_get)
+- [ListByServer](#privatelinkresources_listbyserver)
+
## Replicas
- [ListByServer](#replicas_listbyserver)
@@ -59,14 +124,318 @@
- [Create](#servers_create)
- [Delete](#servers_delete)
+- [DetachVNet](#servers_detachvnet)
- [Failover](#servers_failover)
- [GetByResourceGroup](#servers_getbyresourcegroup)
- [List](#servers_list)
- [ListByResourceGroup](#servers_listbyresourcegroup)
+- [ResetGtid](#servers_resetgtid)
- [Restart](#servers_restart)
- [Start](#servers_start)
- [Stop](#servers_stop)
- [Update](#servers_update)
+- [ValidateEstimateHighAvailability](#servers_validateestimatehighavailability)
+
+## ServersMigration
+
+- [CutoverMigration](#serversmigration_cutovermigration)
+### AdvancedThreatProtectionSettings_Get
+
+```java
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionName;
+
+/**
+ * Samples for AdvancedThreatProtectionSettings Get.
+ */
+public final class AdvancedThreatProtectionSettingsGetSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/AdvancedThreatProtectionSettingsGet.json
+ */
+ /**
+ * Sample code: Get a server's Advanced Threat Protection settings.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void getAServerSAdvancedThreatProtectionSettings(
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.advancedThreatProtectionSettings()
+ .getWithResponse("threatprotection-6852", "threatprotection-2080", AdvancedThreatProtectionName.DEFAULT,
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### AdvancedThreatProtectionSettings_List
+
+```java
+/**
+ * Samples for AdvancedThreatProtectionSettings List.
+ */
+public final class AdvancedThreatProtectionSettingsListSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/AdvancedThreatProtectionSettingsList.json
+ */
+ /**
+ * Sample code: Get list of server's Advanced Threat Protection settings.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void getListOfServerSAdvancedThreatProtectionSettings(
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.advancedThreatProtectionSettings()
+ .list("threatprotection-6852", "threatprotection-2080", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### AdvancedThreatProtectionSettings_Update
+
+```java
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionForUpdate;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionName;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState;
+
+/**
+ * Samples for AdvancedThreatProtectionSettings Update.
+ */
+public final class AdvancedThreatProtectionSettingsUpdateSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/AdvancedThreatProtectionSettingsPatchDisabled.json
+ */
+ /**
+ * Sample code: Disable a server's Advanced Threat Protection settings with all parameters.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void disableAServerSAdvancedThreatProtectionSettingsWithAllParameters(
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.advancedThreatProtectionSettings()
+ .update("threatprotection-4799", "threatprotection-6440", AdvancedThreatProtectionName.DEFAULT,
+ new AdvancedThreatProtectionForUpdate().withState(AdvancedThreatProtectionState.DISABLED),
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2024-12-30/AdvancedThreatProtectionSettingsPatchEnabled.json
+ */
+ /**
+ * Sample code: Enable a server's Advanced Threat Protection settings.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void enableAServerSAdvancedThreatProtectionSettings(
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.advancedThreatProtectionSettings()
+ .update("threatprotection-4799", "threatprotection-6440", AdvancedThreatProtectionName.DEFAULT,
+ new AdvancedThreatProtectionForUpdate().withState(AdvancedThreatProtectionState.ENABLED),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### AdvancedThreatProtectionSettings_UpdatePut
+
+```java
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionName;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState;
+
+/**
+ * Samples for AdvancedThreatProtectionSettings UpdatePut.
+ */
+public final class AdvancedThreatProtectionSettingsUpdatePutSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/AdvancedThreatProtectionSettingsPutDisabled.json
+ */
+ /**
+ * Sample code: Disable a server's Advanced Threat Protection settings with all parameters using PUT.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void disableAServerSAdvancedThreatProtectionSettingsWithAllParametersUsingPUT(
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.advancedThreatProtectionSettings()
+ .updatePut("threatprotection-4799", "threatprotection-6440", AdvancedThreatProtectionName.DEFAULT,
+ new AdvancedThreatProtectionInner().withState(AdvancedThreatProtectionState.DISABLED),
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2024-12-30/AdvancedThreatProtectionSettingsPutEnabled.json
+ */
+ /**
+ * Sample code: Enable a server's Advanced Threat Protection settings using PUT.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void enableAServerSAdvancedThreatProtectionSettingsUsingPUT(
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.advancedThreatProtectionSettings()
+ .updatePut("threatprotection-4799", "threatprotection-6440", AdvancedThreatProtectionName.DEFAULT,
+ new AdvancedThreatProtectionInner().withState(AdvancedThreatProtectionState.ENABLED),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### AzureADAdministrators_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorName;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorType;
+
+/**
+ * Samples for AzureADAdministrators CreateOrUpdate.
+ */
+public final class AzureADAdministratorsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/AzureADAdministratorCreate.json
+ */
+ /**
+ * Sample code: Create an azure ad administrator.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void
+ createAnAzureAdAdministrator(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.azureADAdministrators()
+ .define(AdministratorName.ACTIVE_DIRECTORY)
+ .withExistingFlexibleServer("testrg", "mysqltestsvc4")
+ .withAdministratorType(AdministratorType.ACTIVE_DIRECTORY)
+ .withLogin("bob@contoso.com")
+ .withSid("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c")
+ .withTenantId("c12b7025-bfe2-46c1-b463-993b5e4cd467")
+ .withIdentityResourceId(
+ "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/test-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi")
+ .create();
+ }
+}
+```
+
+### AzureADAdministrators_Delete
+
+```java
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorName;
+
+/**
+ * Samples for AzureADAdministrators Delete.
+ */
+public final class AzureADAdministratorsDeleteSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/AzureADAdministratorDelete.json
+ */
+ /**
+ * Sample code: Delete an azure ad administrator.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void
+ deleteAnAzureAdAdministrator(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.azureADAdministrators()
+ .delete("testrg", "mysqltestsvc4", AdministratorName.ACTIVE_DIRECTORY, com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### AzureADAdministrators_Get
+
+```java
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorName;
+
+/**
+ * Samples for AzureADAdministrators Get.
+ */
+public final class AzureADAdministratorsGetSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/AzureADAdministratorGet.json
+ */
+ /**
+ * Sample code: Get an azure ad administrator.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void getAnAzureAdAdministrator(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.azureADAdministrators()
+ .getWithResponse("testrg", "mysqltestsvc4", AdministratorName.ACTIVE_DIRECTORY,
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### AzureADAdministrators_ListByServer
+
+```java
+/**
+ * Samples for AzureADAdministrators ListByServer.
+ */
+public final class AzureADAdministratorsListByServerSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/AzureADAdministratorsListByServer.json
+ */
+ /**
+ * Sample code: List Azure AD administrators in a server.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void
+ listAzureADAdministratorsInAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.azureADAdministrators().listByServer("testrg", "mysqltestsvc4", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### BackupAndExport_Create
+
+```java
+import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExportRequest;
+import com.azure.resourcemanager.mysqlflexibleserver.models.BackupSettings;
+import com.azure.resourcemanager.mysqlflexibleserver.models.FullBackupStoreDetails;
+import java.util.Arrays;
+
+/**
+ * Samples for BackupAndExport Create.
+ */
+public final class BackupAndExportCreateSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/BackupAndExport.json
+ */
+ /**
+ * Sample code: Create and Export Backup.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void createAndExportBackup(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.backupAndExports()
+ .create("TestGroup", "mysqltestserver", new BackupAndExportRequest()
+ .withBackupSettings(new BackupSettings().withBackupName("customer-backup-name"))
+ .withTargetDetails(new FullBackupStoreDetails().withSasUriList(Arrays.asList("sasuri1", "sasuri2"))),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### BackupAndExport_ValidateBackup
+
+```java
+/**
+ * Samples for BackupAndExport ValidateBackup.
+ */
+public final class BackupAndExportValidateBackupSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/ValidateBackup.json
+ */
+ /**
+ * Sample code: Validate Backup.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void validateBackup(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.backupAndExports()
+ .validateBackupWithResponse("TestGroup", "mysqltestserver", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Backups_Get
```java
@@ -75,8 +444,7 @@
*/
public final class BackupsGetSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/BackupGet.json
+ * x-ms-original-file: 2024-12-30/BackupGet.json
*/
/**
* Sample code: Get a backup for a server.
@@ -98,9 +466,7 @@ public final class BackupsGetSamples {
*/
public final class BackupsListByServerSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/BackupsListByServer.
- * json
+ * x-ms-original-file: 2024-12-30/BackupsListByServer.json
*/
/**
* Sample code: List backups for a server.
@@ -113,6 +479,27 @@ public final class BackupsListByServerSamples {
}
```
+### Backups_Put
+
+```java
+/**
+ * Samples for Backups Put.
+ */
+public final class BackupsPutSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/BackupPut.json
+ */
+ /**
+ * Sample code: Create backup for a server.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void createBackupForAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.backups().putWithResponse("TestGroup", "mysqltestserver", "mybackup", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### CheckNameAvailability_Execute
```java
@@ -123,9 +510,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.models.NameAvailabilityRequ
*/
public final class CheckNameAvailabilityExecuteSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/CheckNameAvailability
- * .json
+ * x-ms-original-file: 2024-12-30/CheckNameAvailability.json
*/
/**
* Sample code: Check name availability.
@@ -151,9 +536,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.models.NameAvailabilityRequ
*/
public final class CheckNameAvailabilityWithoutLocationExecuteSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/CheckNameAvailability
- * .json
+ * x-ms-original-file: 2024-12-30/CheckNameAvailabilityWithoutLocation.json
*/
/**
* Sample code: Check name availability.
@@ -179,8 +562,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.models.VirtualNetworkSubnet
*/
public final class CheckVirtualNetworkSubnetUsageExecuteSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/
- * CheckVirtualNetworkSubnetUsage.json
+ * x-ms-original-file: 2024-12-30/CheckVirtualNetworkSubnetUsage.json
*/
/**
* Sample code: CheckVirtualNetworkSubnetUsage.
@@ -200,361 +582,776 @@ public final class CheckVirtualNetworkSubnetUsageExecuteSamples {
### Configurations_BatchUpdate
```java
-import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationForBatchUpdate;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationListForBatchUpdate;
-import java.util.Arrays;
-
+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;
+
+/**
+ * Samples for Configurations BatchUpdate.
+ */
+public final class ConfigurationsBatchUpdateSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/ConfigurationsBatchUpdate.json
+ */
+ /**
+ * Sample code: ConfigurationList.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void configurationList(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.configurations()
+ .batchUpdate("testrg", "mysqltestserver", new ConfigurationListForBatchUpdate()
+ .withValue(Arrays.asList(new ConfigurationForBatchUpdate().withName("event_scheduler").withValue("OFF"),
+ new ConfigurationForBatchUpdate().withName("div_precision_increment").withValue("8")))
+ .withResetAllToDefault(ResetAllToDefault.FALSE), com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Configurations_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource;
+
+/**
+ * Samples for Configurations CreateOrUpdate.
+ */
+public final class ConfigurationsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/ConfigurationCreateOrUpdate.json
+ */
+ /**
+ * Sample code: ConfigurationCreateOrUpdate.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void configurationCreateOrUpdate(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.configurations()
+ .define("event_scheduler")
+ .withExistingFlexibleServer("TestGroup", "testserver")
+ .withValue("off")
+ .withSource(ConfigurationSource.USER_OVERRIDE)
+ .create();
+ }
+}
+```
+
+### Configurations_Get
+
+```java
+/**
+ * Samples for Configurations Get.
+ */
+public final class ConfigurationsGetSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/ConfigurationGet.json
+ */
+ /**
+ * Sample code: Get a configuration.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void getAConfiguration(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.configurations()
+ .getWithResponse("TestGroup", "testserver", "event_scheduler", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Configurations_ListByServer
+
+```java
+/**
+ * Samples for Configurations ListByServer.
+ */
+public final class ConfigurationsListByServerSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/ConfigurationsListByServer.json
+ */
+ /**
+ * Sample code: List all configurations for a server.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void
+ listAllConfigurationsForAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.configurations()
+ .listByServer("testrg", "mysqltestserver", null, null, 1, 8, com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Configurations_Update
+
+```java
+import com.azure.resourcemanager.mysqlflexibleserver.models.Configuration;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource;
+
+/**
+ * Samples for Configurations Update.
+ */
+public final class ConfigurationsUpdateSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/ConfigurationUpdate.json
+ */
+ /**
+ * Sample code: Update a user configuration.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void updateAUserConfiguration(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ Configuration resource = manager.configurations()
+ .getWithResponse("testrg", "testserver", "event_scheduler", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update().withValue("on").withSource(ConfigurationSource.USER_OVERRIDE).apply();
+ }
+}
+```
+
+### Databases_CreateOrUpdate
+
+```java
+/**
+ * Samples for Databases CreateOrUpdate.
+ */
+public final class DatabasesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/DatabaseCreate.json
+ */
+ /**
+ * Sample code: Create a database.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void createADatabase(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.databases()
+ .define("db1")
+ .withExistingFlexibleServer("TestGroup", "testserver")
+ .withCharset("utf8")
+ .withCollation("utf8_general_ci")
+ .create();
+ }
+}
+```
+
+### Databases_Delete
+
+```java
+/**
+ * Samples for Databases Delete.
+ */
+public final class DatabasesDeleteSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/DatabaseDelete.json
+ */
+ /**
+ * Sample code: Delete a database.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void deleteADatabase(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.databases().delete("TestGroup", "testserver", "db1", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Databases_Get
+
+```java
+/**
+ * Samples for Databases Get.
+ */
+public final class DatabasesGetSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/DatabaseGet.json
+ */
+ /**
+ * Sample code: Get a database.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void getADatabase(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.databases().getWithResponse("TestGroup", "testserver", "db1", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Databases_ListByServer
+
+```java
+/**
+ * Samples for Databases ListByServer.
+ */
+public final class DatabasesListByServerSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/DatabasesListByServer.json
+ */
+ /**
+ * Sample code: List databases in a server.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void listDatabasesInAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.databases().listByServer("TestGroup", "testserver", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### FirewallRules_CreateOrUpdate
+
+```java
+/**
+ * Samples for FirewallRules CreateOrUpdate.
+ */
+public final class FirewallRulesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/FirewallRuleCreate.json
+ */
+ /**
+ * Sample code: Create a firewall rule.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void createAFirewallRule(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.firewallRules()
+ .define("rule1")
+ .withExistingFlexibleServer("TestGroup", "testserver")
+ .withStartIpAddress("0.0.0.0")
+ .withEndIpAddress("255.255.255.255")
+ .create();
+ }
+}
+```
+
+### FirewallRules_Delete
+
+```java
+/**
+ * Samples for FirewallRules Delete.
+ */
+public final class FirewallRulesDeleteSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/FirewallRuleDelete.json
+ */
+ /**
+ * Sample code: Delete a firewall rule.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void deleteAFirewallRule(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.firewallRules().delete("TestGroup", "testserver", "rule1", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### FirewallRules_Get
+
+```java
+/**
+ * Samples for FirewallRules Get.
+ */
+public final class FirewallRulesGetSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/FirewallRuleGet.json
+ */
+ /**
+ * Sample code: Get a firewall rule.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void getAFirewallRule(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.firewallRules().getWithResponse("TestGroup", "testserver", "rule1", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### FirewallRules_ListByServer
+
+```java
+/**
+ * Samples for FirewallRules ListByServer.
+ */
+public final class FirewallRulesListByServerSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/FirewallRulesListByServer.json
+ */
+ /**
+ * Sample code: List all firewall rules in a server.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void
+ listAllFirewallRulesInAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.firewallRules().listByServer("TestGroup", "testserver", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### GetPrivateDnsZoneSuffix_Execute
+
+```java
+/**
+ * Samples for GetPrivateDnsZoneSuffix Execute.
+ */
+public final class GetPrivateDnsZoneSuffixExecuteSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/GetPrivateDnsZoneSuffix.json
+ */
+ /**
+ * Sample code: GetPrivateDnsZoneSuffix.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void getPrivateDnsZoneSuffix(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.getPrivateDnsZoneSuffixes().executeWithResponse(com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### LocationBasedCapabilities_List
+
+```java
+/**
+ * Samples for LocationBasedCapabilities List.
+ */
+public final class LocationBasedCapabilitiesListSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/CapabilitiesByLocationList.json
+ */
+ /**
+ * Sample code: CapabilitiesList.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void capabilitiesList(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.locationBasedCapabilities().list("WestUS", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### LocationBasedCapabilitySet_Get
+
+```java
+/**
+ * Samples for LocationBasedCapabilitySet Get.
+ */
+public final class LocationBasedCapabilitySetGetSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/CapabilitySetByLocation.json
+ */
+ /**
+ * Sample code: CapabilityResult.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void capabilityResult(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.locationBasedCapabilitySets().getWithResponse("WestUS", "default", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### LocationBasedCapabilitySet_List
+
+```java
+/**
+ * Samples for LocationBasedCapabilitySet List.
+ */
+public final class LocationBasedCapabilitySetListSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/CapabilitySetListByLocation.json
+ */
+ /**
+ * Sample code: CapabilitySetsResult.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void capabilitySetsResult(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.locationBasedCapabilitySets().list("WestUS", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### LogFiles_ListByServer
+
+```java
+/**
+ * Samples for LogFiles ListByServer.
+ */
+public final class LogFilesListByServerSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/LogFilesListByServer.json
+ */
+ /**
+ * Sample code: List all server log files for a server.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void
+ listAllServerLogFilesForAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.logFiles().listByServer("testrg", "mysqltestsvc1", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### LongRunningBackupOperation_Create
+
+```java
/**
- * Samples for Configurations BatchUpdate.
+ * Samples for LongRunningBackupOperation Create.
*/
-public final class ConfigurationsBatchUpdateSamples {
+public final class LongRunningBackupOperationCreateSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/
- * ConfigurationsBatchUpdate.json
+ * x-ms-original-file: 2024-12-30/LongRunningBackup.json
*/
/**
- * Sample code: ConfigurationList.
+ * Sample code: Create backup for a server.
*
* @param manager Entry point to MySqlManager.
*/
- public static void configurationList(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
- manager.configurations()
- .batchUpdate("testrg", "mysqltestserver",
- new ConfigurationListForBatchUpdate().withValue(
- Arrays.asList(new ConfigurationForBatchUpdate().withName("event_scheduler").withValue("OFF"),
- new ConfigurationForBatchUpdate().withName("div_precision_increment").withValue("8"))),
- com.azure.core.util.Context.NONE);
+ public static void createBackupForAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.longRunningBackupOperations()
+ .define("testback")
+ .withExistingFlexibleServer("TestGroup", "mysqltestserver")
+ .create();
}
}
```
-### Configurations_Get
+### LongRunningBackups_Get
```java
/**
- * Samples for Configurations Get.
+ * Samples for LongRunningBackups Get.
*/
-public final class ConfigurationsGetSamples {
+public final class LongRunningBackupsGetSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/ConfigurationGet.json
+ * x-ms-original-file: 2024-12-30/LongRunningBackupGet.json
*/
/**
- * Sample code: Get a configuration.
+ * Sample code: Get a backup for a server.
*
* @param manager Entry point to MySqlManager.
*/
- public static void getAConfiguration(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
- manager.configurations()
- .getWithResponse("TestGroup", "testserver", "event_scheduler", com.azure.core.util.Context.NONE);
+ public static void getABackupForAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.longRunningBackups()
+ .getWithResponse("TestGroup", "mysqltestserver", "daily_20210615T160516", com.azure.core.util.Context.NONE);
}
}
```
-### Configurations_ListByServer
+### LongRunningBackups_List
```java
/**
- * Samples for Configurations ListByServer.
+ * Samples for LongRunningBackups List.
*/
-public final class ConfigurationsListByServerSamples {
+public final class LongRunningBackupsListSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/
- * ConfigurationsListByServer.json
+ * x-ms-original-file: 2024-12-30/LongRunningBackupsListByServer.json
*/
/**
- * Sample code: List all configurations for a server.
+ * Sample code: List backups for a server.
*
* @param manager Entry point to MySqlManager.
*/
- public static void
- listAllConfigurationsForAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
- manager.configurations().listByServer("testrg", "mysqltestserver", com.azure.core.util.Context.NONE);
+ public static void listBackupsForAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.longRunningBackups().list("TestGroup", "mysqltestserver", com.azure.core.util.Context.NONE);
}
}
```
-### Configurations_Update
+### Maintenances_List
```java
-import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationInner;
-import com.azure.resourcemanager.mysqlflexibleserver.models.ConfigurationSource;
-
/**
- * Samples for Configurations Update.
+ * Samples for Maintenances List.
*/
-public final class ConfigurationsUpdateSamples {
+public final class MaintenancesListSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/ConfigurationUpdate.
- * json
+ * x-ms-original-file: 2024-12-30/MaintenancesListByServer.json
*/
/**
- * Sample code: Update a user configuration.
+ * Sample code: List maintenances on a server.
*
* @param manager Entry point to MySqlManager.
*/
- public static void updateAUserConfiguration(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
- manager.configurations()
- .update("testrg", "testserver", "event_scheduler",
- new ConfigurationInner().withValue("on").withSource(ConfigurationSource.USER_OVERRIDE),
- com.azure.core.util.Context.NONE);
+ public static void listMaintenancesOnAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.maintenances().list("TestGroup", "testserver", com.azure.core.util.Context.NONE);
}
}
```
-### Databases_CreateOrUpdate
+### Maintenances_Read
```java
/**
- * Samples for Databases CreateOrUpdate.
+ * Samples for Maintenances Read.
*/
-public final class DatabasesCreateOrUpdateSamples {
+public final class MaintenancesReadSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/DatabaseCreate.json
+ * x-ms-original-file: 2024-12-30/MaintenanceRead.json
*/
/**
- * Sample code: Create a database.
+ * Sample code: Read a maintenance.
*
* @param manager Entry point to MySqlManager.
*/
- public static void createADatabase(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
- manager.databases()
- .define("db1")
- .withExistingFlexibleServer("TestGroup", "testserver")
- .withCharset("utf8")
- .withCollation("utf8_general_ci")
- .create();
+ public static void readAMaintenance(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.maintenances()
+ .readWithResponse("TestGroup", "testserver", "_T9Q-TS8", com.azure.core.util.Context.NONE);
}
}
```
-### Databases_Delete
+### Maintenances_Update
```java
+import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceUpdate;
+import java.time.OffsetDateTime;
+
/**
- * Samples for Databases Delete.
+ * Samples for Maintenances Update.
*/
-public final class DatabasesDeleteSamples {
+public final class MaintenancesUpdateSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/DatabaseDelete.json
+ * x-ms-original-file: 2024-12-30/MaintenanceUpdate.json
*/
/**
- * Sample code: Delete a database.
+ * Sample code: Update maintenance on a server.
*
* @param manager Entry point to MySqlManager.
*/
- public static void deleteADatabase(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
- manager.databases().delete("TestGroup", "testserver", "db1", com.azure.core.util.Context.NONE);
+ public static void updateMaintenanceOnAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.maintenances()
+ .update("TestGroup", "testserver", "_T9Q-TS8",
+ new MaintenanceUpdate().withMaintenanceStartTime(OffsetDateTime.parse("2024-01-20T00:00:00")),
+ com.azure.core.util.Context.NONE);
}
}
```
-### Databases_Get
+### OperationProgress_Get
```java
/**
- * Samples for Databases Get.
+ * Samples for OperationProgress Get.
*/
-public final class DatabasesGetSamples {
+public final class OperationProgressGetSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/DatabaseGet.json
+ * x-ms-original-file: 2024-12-30/OperationProgress_Get_BackupAndExport.json
*/
/**
- * Sample code: Get a database.
+ * Sample code: OperationProgress_Get BackupAndExport.
*
* @param manager Entry point to MySqlManager.
*/
- public static void getADatabase(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
- manager.databases().getWithResponse("TestGroup", "testserver", "db1", com.azure.core.util.Context.NONE);
+ public static void
+ operationProgressGetBackupAndExport(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.operationProgress()
+ .getWithResponse("westus", "00000000-0000-0000-0000-000000000000", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2024-12-30/OperationProgress_Get_ImportFromStorage.json
+ */
+ /**
+ * Sample code: OperationProgress_Get ImportFromStorage.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void
+ operationProgressGetImportFromStorage(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.operationProgress()
+ .getWithResponse("westus", "00000000-0000-0000-0000-000000000000", com.azure.core.util.Context.NONE);
}
}
```
-### Databases_ListByServer
+### OperationResults_Get
```java
/**
- * Samples for Databases ListByServer.
+ * Samples for OperationResults Get.
*/
-public final class DatabasesListByServerSamples {
+public final class OperationResultsGetSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/DatabasesListByServer
- * .json
+ * x-ms-original-file: 2024-12-30/OperationResults_Get.json
*/
/**
- * Sample code: List databases in a server.
+ * Sample code: OperationResults_Get.
*
* @param manager Entry point to MySqlManager.
*/
- public static void listDatabasesInAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
- manager.databases().listByServer("TestGroup", "testserver", com.azure.core.util.Context.NONE);
+ public static void operationResultsGet(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.operationResults()
+ .getWithResponse("westus", "00000000-0000-0000-0000-000000000000", com.azure.core.util.Context.NONE);
}
}
```
-### FirewallRules_CreateOrUpdate
+### Operations_List
```java
/**
- * Samples for FirewallRules CreateOrUpdate.
+ * Samples for Operations List.
*/
-public final class FirewallRulesCreateOrUpdateSamples {
+public final class OperationsListSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/FirewallRuleCreate.
- * json
+ * x-ms-original-file: 2024-12-30/OperationsList.json
*/
/**
- * Sample code: Create a firewall rule.
+ * Sample code: OperationList.
*
* @param manager Entry point to MySqlManager.
*/
- public static void createAFirewallRule(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
- manager.firewallRules()
- .define("rule1")
- .withExistingFlexibleServer("TestGroup", "testserver")
- .withStartIpAddress("0.0.0.0")
- .withEndIpAddress("255.255.255.255")
- .create();
+ public static void operationList(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.operations().list(com.azure.core.util.Context.NONE);
}
}
```
-### FirewallRules_Delete
+### PrivateEndpointConnections_CreateOrUpdate
```java
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpointServiceConnectionStatus;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateLinkServiceConnectionState;
+
/**
- * Samples for FirewallRules Delete.
+ * Samples for PrivateEndpointConnections CreateOrUpdate.
*/
-public final class FirewallRulesDeleteSamples {
+public final class PrivateEndpointConnectionsCreateOrUpdateSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/FirewallRuleDelete.
- * json
+ * x-ms-original-file: 2024-12-30/PrivateEndpointConnectionUpdate.json
*/
/**
- * Sample code: Delete a firewall rule.
+ * Sample code: Approve or reject a private endpoint connection with a given name.
*
* @param manager Entry point to MySqlManager.
*/
- public static void deleteAFirewallRule(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
- manager.firewallRules().delete("TestGroup", "testserver", "rule1", com.azure.core.util.Context.NONE);
+ public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName(
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.privateEndpointConnections()
+ .define("private-endpoint-connection-name")
+ .withExistingFlexibleServer("Default", "test-svr")
+ .withPrivateLinkServiceConnectionState(
+ new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)
+ .withDescription("Approved by johndoe@contoso.com"))
+ .create();
}
}
```
-### FirewallRules_Get
+### PrivateEndpointConnections_Delete
```java
/**
- * Samples for FirewallRules Get.
+ * Samples for PrivateEndpointConnections Delete.
*/
-public final class FirewallRulesGetSamples {
+public final class PrivateEndpointConnectionsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/FirewallRuleGet.json
+ * x-ms-original-file: 2024-12-30/PrivateEndpointConnectionDelete.json
*/
/**
- * Sample code: Get a firewall rule.
+ * Sample code: Deletes a private endpoint connection with a given name.
*
* @param manager Entry point to MySqlManager.
*/
- public static void getAFirewallRule(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
- manager.firewallRules().getWithResponse("TestGroup", "testserver", "rule1", com.azure.core.util.Context.NONE);
+ public static void deletesAPrivateEndpointConnectionWithAGivenName(
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.privateEndpointConnections()
+ .delete("Default", "test-svr", "private-endpoint-connection-name", com.azure.core.util.Context.NONE);
}
}
```
-### FirewallRules_ListByServer
+### PrivateEndpointConnections_Get
```java
/**
- * Samples for FirewallRules ListByServer.
+ * Samples for PrivateEndpointConnections Get.
*/
-public final class FirewallRulesListByServerSamples {
+public final class PrivateEndpointConnectionsGetSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/
- * FirewallRulesListByServer.json
+ * x-ms-original-file: 2024-12-30/PrivateEndpointConnectionGet.json
*/
/**
- * Sample code: List all firewall rules in a server.
+ * Sample code: Gets private endpoint connection.
*
* @param manager Entry point to MySqlManager.
*/
public static void
- listAllFirewallRulesInAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
- manager.firewallRules().listByServer("TestGroup", "testserver", com.azure.core.util.Context.NONE);
+ getsPrivateEndpointConnection(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.privateEndpointConnections()
+ .getWithResponse("Default", "test-svr", "private-endpoint-connection-name",
+ com.azure.core.util.Context.NONE);
}
}
```
-### GetPrivateDnsZoneSuffix_Execute
+### PrivateEndpointConnections_ListByServer
```java
/**
- * Samples for GetPrivateDnsZoneSuffix Execute.
+ * Samples for PrivateEndpointConnections ListByServer.
*/
-public final class GetPrivateDnsZoneSuffixExecuteSamples {
+public final class PrivateEndpointConnectionsListByServerSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/
- * GetPrivateDnsZoneSuffix.json
+ * x-ms-original-file: 2024-12-30/PrivateEndpointConnectionList.json
*/
/**
- * Sample code: GetPrivateDnsZoneSuffix.
+ * Sample code: Gets list of private endpoint connections on a server.
*
* @param manager Entry point to MySqlManager.
*/
- public static void getPrivateDnsZoneSuffix(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
- manager.getPrivateDnsZoneSuffixes().executeWithResponse(com.azure.core.util.Context.NONE);
+ public static void getsListOfPrivateEndpointConnectionsOnAServer(
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.privateEndpointConnections()
+ .listByServerWithResponse("Default", "test-svr", com.azure.core.util.Context.NONE);
}
}
```
-### LocationBasedCapabilities_List
+### PrivateLinkResources_Get
```java
/**
- * Samples for LocationBasedCapabilities List.
+ * Samples for PrivateLinkResources Get.
*/
-public final class LocationBasedCapabilitiesListSamples {
+public final class PrivateLinkResourcesGetSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/
- * CapabilitiesByLocationList.json
+ * x-ms-original-file: 2024-12-30/PrivateLinkResourcesGet.json
*/
/**
- * Sample code: CapabilitiesList.
+ * Sample code: Gets a private link resource for MySQL.
*
* @param manager Entry point to MySqlManager.
*/
- public static void capabilitiesList(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
- manager.locationBasedCapabilities().list("WestUS", com.azure.core.util.Context.NONE);
+ public static void
+ getsAPrivateLinkResourceForMySQL(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.privateLinkResources().getWithResponse("Default", "test-svr", "plr", com.azure.core.util.Context.NONE);
}
}
```
-### Operations_List
+### PrivateLinkResources_ListByServer
```java
/**
- * Samples for Operations List.
+ * Samples for PrivateLinkResources ListByServer.
*/
-public final class OperationsListSamples {
+public final class PrivateLinkResourcesListByServerSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/OperationsList.json
+ * x-ms-original-file: 2024-12-30/PrivateLinkResourcesList.json
*/
/**
- * Sample code: OperationList.
+ * Sample code: Gets private link resources for MySQL.
*
* @param manager Entry point to MySqlManager.
*/
- public static void operationList(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
- manager.operations().list(com.azure.core.util.Context.NONE);
+ public static void
+ getsPrivateLinkResourcesForMySQL(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.privateLinkResources().listByServer("Default", "test-svr", com.azure.core.util.Context.NONE);
}
}
```
@@ -567,9 +1364,7 @@ public final class OperationsListSamples {
*/
public final class ReplicasListByServerSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/ReplicasListByServer.
- * json
+ * x-ms-original-file: 2024-12-30/ReplicasListByServer.json
*/
/**
* Sample code: List replicas for a server.
@@ -585,8 +1380,6 @@ public final class ReplicasListByServerSamples {
### Servers_Create
```java
-import com.azure.core.management.serializer.SerializerFactory;
-import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.mysqlflexibleserver.models.Backup;
import com.azure.resourcemanager.mysqlflexibleserver.models.CreateMode;
import com.azure.resourcemanager.mysqlflexibleserver.models.DataEncryption;
@@ -600,7 +1393,8 @@ import com.azure.resourcemanager.mysqlflexibleserver.models.ServerVersion;
import com.azure.resourcemanager.mysqlflexibleserver.models.Sku;
import com.azure.resourcemanager.mysqlflexibleserver.models.SkuTier;
import com.azure.resourcemanager.mysqlflexibleserver.models.Storage;
-import java.io.IOException;
+import com.azure.resourcemanager.mysqlflexibleserver.models.StorageRedundancyEnum;
+import com.azure.resourcemanager.mysqlflexibleserver.models.UserAssignedIdentity;
import java.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;
@@ -610,9 +1404,7 @@ import java.util.Map;
*/
public final class ServersCreateSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/ServerCreateReplica.
- * json
+ * x-ms-original-file: 2024-12-30/ServerCreateReplica.json
*/
/**
* Sample code: Create a replica server.
@@ -631,8 +1423,41 @@ public final class ServersCreateSamples {
}
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/ServerCreate.json
+ * x-ms-original-file: 2024-12-30/ServerCreateWithDatabasePort.json
+ */
+ /**
+ * Sample code: Create a server with non-default database port.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void
+ createAServerWithNonDefaultDatabasePort(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.servers()
+ .define("mysqltestserver")
+ .withRegion("southeastasia")
+ .withExistingResourceGroup("testrg")
+ .withTags(mapOf("num", "1"))
+ .withSku(new Sku().withName("Standard_D2ds_v4").withTier(SkuTier.GENERAL_PURPOSE))
+ .withAdministratorLogin("cloudsa")
+ .withAdministratorLoginPassword("your_password")
+ .withVersion(ServerVersion.FIVE_SEVEN)
+ .withAvailabilityZone("1")
+ .withCreateMode(CreateMode.DEFAULT)
+ .withDatabasePort(8888)
+ .withStorage(new Storage().withStorageSizeGB(100)
+ .withIops(600)
+ .withAutoGrow(EnableStatusEnum.DISABLED)
+ .withStorageRedundancy(StorageRedundancyEnum.LOCAL_REDUNDANCY))
+ .withBackup(new Backup().withBackupRetentionDays(7)
+ .withBackupIntervalHours(24)
+ .withGeoRedundantBackup(EnableStatusEnum.DISABLED))
+ .withHighAvailability(
+ new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT).withStandbyAvailabilityZone("3"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: 2024-12-30/ServerCreate.json
*/
/**
* Sample code: Create a new server.
@@ -651,25 +1476,27 @@ public final class ServersCreateSamples {
.withVersion(ServerVersion.FIVE_SEVEN)
.withAvailabilityZone("1")
.withCreateMode(CreateMode.DEFAULT)
- .withStorage(new Storage().withStorageSizeGB(100).withIops(600).withAutoGrow(EnableStatusEnum.DISABLED))
- .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(EnableStatusEnum.DISABLED))
+ .withStorage(new Storage().withStorageSizeGB(100)
+ .withIops(600)
+ .withAutoGrow(EnableStatusEnum.DISABLED)
+ .withStorageRedundancy(StorageRedundancyEnum.ZONE_REDUNDANCY))
+ .withBackup(new Backup().withBackupRetentionDays(7)
+ .withBackupIntervalHours(24)
+ .withGeoRedundantBackup(EnableStatusEnum.DISABLED))
.withHighAvailability(
new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT).withStandbyAvailabilityZone("3"))
.create();
}
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/ServerCreateWithBYOK.
- * json
+ * x-ms-original-file: 2024-12-30/ServerCreateWithBYOK.json
*/
/**
* Sample code: Create a server with byok.
*
* @param manager Entry point to MySqlManager.
*/
- public static void createAServerWithByok(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager)
- throws IOException {
+ public static void createAServerWithByok(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
manager.servers()
.define("mysqltestserver")
.withRegion("southeastasia")
@@ -678,8 +1505,7 @@ public final class ServersCreateSamples {
.withIdentity(new Identity().withType(ManagedServiceIdentityType.USER_ASSIGNED)
.withUserAssignedIdentities(mapOf(
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity",
- SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{}", Object.class, SerializerEncoding.JSON))))
+ new UserAssignedIdentity())))
.withSku(new Sku().withName("Standard_D2ds_v4").withTier(SkuTier.GENERAL_PURPOSE))
.withAdministratorLogin("cloudsa")
.withAdministratorLoginPassword("your_password")
@@ -693,16 +1519,20 @@ 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))
- .withBackup(new Backup().withBackupRetentionDays(7).withGeoRedundantBackup(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))
.withHighAvailability(
new HighAvailability().withMode(HighAvailabilityMode.ZONE_REDUNDANT).withStandbyAvailabilityZone("3"))
.create();
}
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/
- * ServerCreateWithPointInTimeRestore.json
+ * x-ms-original-file: 2024-12-30/ServerCreateWithPointInTimeRestore.json
*/
/**
* Sample code: Create a server as a point in time restore.
@@ -746,8 +1576,7 @@ public final class ServersCreateSamples {
*/
public final class ServersDeleteSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/ServerDelete.json
+ * x-ms-original-file: 2024-12-30/ServerDelete.json
*/
/**
* Sample code: Delete a server.
@@ -760,6 +1589,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: 2024-12-30/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
@@ -768,8 +1624,7 @@ public final class ServersDeleteSamples {
*/
public final class ServersFailoverSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/ServerFailover.json
+ * x-ms-original-file: 2024-12-30/ServerFailover.json
*/
/**
* Sample code: Restart a server.
@@ -790,9 +1645,7 @@ public final class ServersFailoverSamples {
*/
public final class ServersGetByResourceGroupSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/ServerGetWithVnet.
- * json
+ * x-ms-original-file: 2024-12-30/ServerGetWithVnet.json
*/
/**
* Sample code: Get a server with vnet.
@@ -804,8 +1657,7 @@ public final class ServersGetByResourceGroupSamples {
}
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/ServerGet.json
+ * x-ms-original-file: 2024-12-30/ServerGet.json
*/
/**
* Sample code: Get a server.
@@ -826,8 +1678,7 @@ public final class ServersGetByResourceGroupSamples {
*/
public final class ServersListSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/ServersList.json
+ * x-ms-original-file: 2024-12-30/ServersList.json
*/
/**
* Sample code: List servers in a subscription.
@@ -848,8 +1699,7 @@ public final class ServersListSamples {
*/
public final class ServersListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/
- * ServersListByResourceGroup.json
+ * x-ms-original-file: 2024-12-30/ServersListByResourceGroup.json
*/
/**
* Sample code: List servers in a resource group.
@@ -862,6 +1712,32 @@ public final class ServersListByResourceGroupSamples {
}
```
+### Servers_ResetGtid
+
+```java
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServerGtidSetParameter;
+
+/**
+ * Samples for Servers ResetGtid.
+ */
+public final class ServersResetGtidSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/ServerResetGtid.json
+ */
+ /**
+ * Sample code: Reset GTID on a server.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void resetGTIDOnAServer(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.servers()
+ .resetGtid("TestGroup", "testserver",
+ new ServerGtidSetParameter().withGtidSet("4aff5b51-97ba-11ed-a955-002248036acc:1-16"),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Servers_Restart
```java
@@ -873,8 +1749,7 @@ import com.azure.resourcemanager.mysqlflexibleserver.models.ServerRestartParamet
*/
public final class ServersRestartSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/ServerRestart.json
+ * x-ms-original-file: 2024-12-30/ServerRestart.json
*/
/**
* Sample code: Restart a server.
@@ -899,8 +1774,7 @@ public final class ServersRestartSamples {
*/
public final class ServersStartSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/ServerStart.json
+ * x-ms-original-file: 2024-12-30/ServerStart.json
*/
/**
* Sample code: Start a server.
@@ -921,8 +1795,7 @@ public final class ServersStartSamples {
*/
public final class ServersStopSamples {
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/ServerStop.json
+ * x-ms-original-file: 2024-12-30/ServerStop.json
*/
/**
* Sample code: Stop a server.
@@ -938,17 +1811,20 @@ public final class ServersStopSamples {
### Servers_Update
```java
-import com.azure.core.management.serializer.SerializerFactory;
-import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.mysqlflexibleserver.models.BatchOfMaintenance;
import com.azure.resourcemanager.mysqlflexibleserver.models.DataEncryption;
import com.azure.resourcemanager.mysqlflexibleserver.models.DataEncryptionType;
import com.azure.resourcemanager.mysqlflexibleserver.models.EnableStatusEnum;
import com.azure.resourcemanager.mysqlflexibleserver.models.Identity;
+import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenancePolicy;
import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceWindow;
import com.azure.resourcemanager.mysqlflexibleserver.models.ManagedServiceIdentityType;
+import com.azure.resourcemanager.mysqlflexibleserver.models.Network;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PatchStrategy;
import com.azure.resourcemanager.mysqlflexibleserver.models.Server;
import com.azure.resourcemanager.mysqlflexibleserver.models.Storage;
-import java.io.IOException;
+import com.azure.resourcemanager.mysqlflexibleserver.models.StorageRedundancyEnum;
+import com.azure.resourcemanager.mysqlflexibleserver.models.UserAssignedIdentity;
import java.util.HashMap;
import java.util.Map;
@@ -957,8 +1833,7 @@ import java.util.Map;
*/
public final class ServersUpdateSamples {
/*
- * x-ms-original-file: specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/
- * ServerUpdateWithCustomerMaintenanceWindow.json
+ * x-ms-original-file: 2024-12-30/ServerUpdateWithCustomerMaintenanceWindow.json
*/
/**
* Sample code: Update server customer maintenance window.
@@ -974,22 +1849,56 @@ public final class ServersUpdateSamples {
.withMaintenanceWindow(new MaintenanceWindow().withCustomWindow("Enabled")
.withStartHour(8)
.withStartMinute(0)
- .withDayOfWeek(1))
+ .withDayOfWeek(1)
+ .withBatchOfMaintenance(BatchOfMaintenance.BATCH1))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: 2024-12-30/MaintenancePolicyPatchOptInVirtualCanary.json
+ */
+ /**
+ * Sample code: Update server to opt in virtual canary.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void
+ updateServerToOptInVirtualCanary(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ Server resource = manager.servers()
+ .getByResourceGroupWithResponse("testrg", "mysqltestserver", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update()
+ .withMaintenancePolicy(new MaintenancePolicy().withPatchStrategy(PatchStrategy.VIRTUAL_CANARY))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: 2024-12-30/MaintenancePolicyPatchOptOutVirtualCanary.json
+ */
+ /**
+ * Sample code: Update server to opt out virtual canary.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void
+ updateServerToOptOutVirtualCanary(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ Server resource = manager.servers()
+ .getByResourceGroupWithResponse("testrg", "mysqltestserver", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update()
+ .withMaintenancePolicy(new MaintenancePolicy().withPatchStrategy(PatchStrategy.fromString("Default")))
.apply();
}
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/ServerUpdateWithBYOK.
- * json
+ * x-ms-original-file: 2024-12-30/ServerUpdateWithBYOK.json
*/
/**
* Sample code: Update server with byok.
*
* @param manager Entry point to MySqlManager.
*/
- public static void updateServerWithByok(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager)
- throws IOException {
+ public static void updateServerWithByok(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
Server resource = manager.servers()
.getByResourceGroupWithResponse("testrg", "mysqltestserver", com.azure.core.util.Context.NONE)
.getValue();
@@ -997,8 +1906,7 @@ public final class ServersUpdateSamples {
.withIdentity(new Identity().withType(ManagedServiceIdentityType.USER_ASSIGNED)
.withUserAssignedIdentities(mapOf(
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity",
- SerializerFactory.createDefaultManagementSerializerAdapter()
- .deserialize("{}", Object.class, SerializerEncoding.JSON))))
+ new UserAssignedIdentity())))
.withDataEncryption(new DataEncryption().withPrimaryUserAssignedIdentityId(
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-identity")
.withPrimaryKeyUri("fakeTokenPlaceholder")
@@ -1010,8 +1918,7 @@ public final class ServersUpdateSamples {
}
/*
- * x-ms-original-file:
- * specification/mysql/resource-manager/Microsoft.DBforMySQL/legacy/stable/2021-05-01/examples/ServerUpdate.json
+ * x-ms-original-file: 2024-12-30/ServerUpdate.json
*/
/**
* Sample code: Update a server.
@@ -1023,7 +1930,12 @@ public final class ServersUpdateSamples {
.getByResourceGroupWithResponse("testrg", "mysqltestserver", com.azure.core.util.Context.NONE)
.getValue();
resource.update()
- .withStorage(new Storage().withStorageSizeGB(30).withIops(200).withAutoGrow(EnableStatusEnum.DISABLED))
+ .withStorage(new Storage().withStorageSizeGB(30)
+ .withIops(200)
+ .withAutoGrow(EnableStatusEnum.DISABLED)
+ .withAutoIoScaling(EnableStatusEnum.DISABLED)
+ .withStorageRedundancy(StorageRedundancyEnum.LOCAL_REDUNDANCY))
+ .withNetwork(new Network().withPublicNetworkAccess(EnableStatusEnum.DISABLED))
.apply();
}
@@ -1041,3 +1953,52 @@ public final class ServersUpdateSamples {
}
```
+### Servers_ValidateEstimateHighAvailability
+
+```java
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.HighAvailabilityValidationEstimationInner;
+
+/**
+ * Samples for Servers ValidateEstimateHighAvailability.
+ */
+public final class ServersValidateEstimateHighAvailabilitySamples {
+ /*
+ * x-ms-original-file: 2024-12-30/ServerValidateEstimateHighAvailability.json
+ */
+ /**
+ * Sample code: Validate a validation and estimation of high availability.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void validateAValidationAndEstimationOfHighAvailability(
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.servers()
+ .validateEstimateHighAvailabilityWithResponse("TestGroup", "testserver",
+ new HighAvailabilityValidationEstimationInner().withExpectedStandbyAvailabilityZone("1"),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ServersMigration_CutoverMigration
+
+```java
+/**
+ * Samples for ServersMigration CutoverMigration.
+ */
+public final class ServersMigrationCutoverMigrationSamples {
+ /*
+ * x-ms-original-file: 2024-12-30/CutoverMigration.json
+ */
+ /**
+ * Sample code: Cutover migration for MySQL import.
+ *
+ * @param manager Entry point to MySqlManager.
+ */
+ public static void
+ cutoverMigrationForMySQLImport(com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
+ manager.serversMigrations().cutoverMigration("testrg", "mysqltestserver", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/pom.xml b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/pom.xml
index b693dff13c31..d3c87c0e15e2 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/pom.xml
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/pom.xml
@@ -1,7 +1,7 @@
4.0.0
@@ -14,11 +14,11 @@
com.azure.resourcemanager
azure-resourcemanager-mysqlflexibleserver
- 1.1.0-beta.1
+ 1.1.0
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-2021-05-01.
+ 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 api-version 2024-12-30.
https://github.com/Azure/azure-sdk-for-java
@@ -45,7 +45,6 @@
UTF-8
0
0
- false
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 40b537b0aa42..b72e7b592cc6 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver;
@@ -22,8 +22,12 @@
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.MySqlManagementClient;
+import com.azure.resourcemanager.mysqlflexibleserver.implementation.AdvancedThreatProtectionSettingsImpl;
+import com.azure.resourcemanager.mysqlflexibleserver.implementation.AzureADAdministratorsImpl;
+import com.azure.resourcemanager.mysqlflexibleserver.implementation.BackupAndExportsImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.BackupsImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.CheckNameAvailabilitiesImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.CheckNameAvailabilityWithoutLocationsImpl;
@@ -33,10 +37,23 @@
import com.azure.resourcemanager.mysqlflexibleserver.implementation.FirewallRulesImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.GetPrivateDnsZoneSuffixesImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.LocationBasedCapabilitiesImpl;
+import com.azure.resourcemanager.mysqlflexibleserver.implementation.LocationBasedCapabilitySetsImpl;
+import com.azure.resourcemanager.mysqlflexibleserver.implementation.LogFilesImpl;
+import com.azure.resourcemanager.mysqlflexibleserver.implementation.LongRunningBackupOperationsImpl;
+import com.azure.resourcemanager.mysqlflexibleserver.implementation.LongRunningBackupsImpl;
+import com.azure.resourcemanager.mysqlflexibleserver.implementation.MaintenancesImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.MySqlManagementClientBuilder;
+import com.azure.resourcemanager.mysqlflexibleserver.implementation.OperationProgressImpl;
+import com.azure.resourcemanager.mysqlflexibleserver.implementation.OperationResultsImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.OperationsImpl;
+import com.azure.resourcemanager.mysqlflexibleserver.implementation.PrivateEndpointConnectionsImpl;
+import com.azure.resourcemanager.mysqlflexibleserver.implementation.PrivateLinkResourcesImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.ReplicasImpl;
import com.azure.resourcemanager.mysqlflexibleserver.implementation.ServersImpl;
+import com.azure.resourcemanager.mysqlflexibleserver.implementation.ServersMigrationsImpl;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionSettings;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AzureADAdministrators;
+import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExports;
import com.azure.resourcemanager.mysqlflexibleserver.models.Backups;
import com.azure.resourcemanager.mysqlflexibleserver.models.CheckNameAvailabilities;
import com.azure.resourcemanager.mysqlflexibleserver.models.CheckNameAvailabilityWithoutLocations;
@@ -46,13 +63,24 @@
import com.azure.resourcemanager.mysqlflexibleserver.models.FirewallRules;
import com.azure.resourcemanager.mysqlflexibleserver.models.GetPrivateDnsZoneSuffixes;
import com.azure.resourcemanager.mysqlflexibleserver.models.LocationBasedCapabilities;
+import com.azure.resourcemanager.mysqlflexibleserver.models.LocationBasedCapabilitySets;
+import com.azure.resourcemanager.mysqlflexibleserver.models.LogFiles;
+import com.azure.resourcemanager.mysqlflexibleserver.models.LongRunningBackupOperations;
+import com.azure.resourcemanager.mysqlflexibleserver.models.LongRunningBackups;
+import com.azure.resourcemanager.mysqlflexibleserver.models.Maintenances;
+import com.azure.resourcemanager.mysqlflexibleserver.models.OperationProgress;
+import com.azure.resourcemanager.mysqlflexibleserver.models.OperationResults;
import com.azure.resourcemanager.mysqlflexibleserver.models.Operations;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpointConnections;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateLinkResources;
import com.azure.resourcemanager.mysqlflexibleserver.models.Replicas;
import com.azure.resourcemanager.mysqlflexibleserver.models.Servers;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServersMigrations;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
@@ -62,18 +90,40 @@
* including servers, databases, firewall rules, VNET rules, log files and configurations with new business model.
*/
public final class MySqlManager {
+ private Operations operations;
+
+ private AzureADAdministrators azureADAdministrators;
+
private Servers servers;
- private Replicas replicas;
+ private BackupAndExports backupAndExports;
+
+ private LogFiles logFiles;
+
+ private ServersMigrations serversMigrations;
private Backups backups;
- private FirewallRules firewallRules;
+ private LongRunningBackups longRunningBackups;
- private Databases databases;
+ private LongRunningBackupOperations longRunningBackupOperations;
private Configurations configurations;
+ private Databases databases;
+
+ private FirewallRules firewallRules;
+
+ private AdvancedThreatProtectionSettings advancedThreatProtectionSettings;
+
+ private LocationBasedCapabilitySets locationBasedCapabilitySets;
+
+ private Maintenances maintenances;
+
+ private PrivateEndpointConnections privateEndpointConnections;
+
+ private PrivateLinkResources privateLinkResources;
+
private LocationBasedCapabilities locationBasedCapabilities;
private CheckVirtualNetworkSubnetUsages checkVirtualNetworkSubnetUsages;
@@ -82,9 +132,13 @@ public final class MySqlManager {
private CheckNameAvailabilityWithoutLocations checkNameAvailabilityWithoutLocations;
+ private OperationResults operationResults;
+
+ private OperationProgress operationProgress;
+
private GetPrivateDnsZoneSuffixes getPrivateDnsZoneSuffixes;
- private Operations operations;
+ private Replicas replicas;
private final MySqlManagementClient clientObject;
@@ -138,6 +192,9 @@ public static Configurable configure() {
*/
public static final class Configurable {
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
+ private static final String SDK_VERSION = "version";
+ private static final Map PROPERTIES
+ = CoreUtils.getProperties("azure-resourcemanager-mysqlflexibleserver.properties");
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
@@ -245,12 +302,14 @@ public MySqlManager authenticate(TokenCredential credential, AzureProfile profil
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
+ String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+
StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.mysqlflexibleserver")
.append("/")
- .append("1.0.0");
+ .append(clientVersion);
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -296,6 +355,30 @@ public MySqlManager authenticate(TokenCredential credential, AzureProfile profil
}
}
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of AzureADAdministrators. It manages AzureADAdministrator.
+ *
+ * @return Resource collection API of AzureADAdministrators.
+ */
+ public AzureADAdministrators azureADAdministrators() {
+ if (this.azureADAdministrators == null) {
+ this.azureADAdministrators = new AzureADAdministratorsImpl(clientObject.getAzureADAdministrators(), this);
+ }
+ return azureADAdministrators;
+ }
+
/**
* Gets the resource collection API of Servers. It manages Server.
*
@@ -309,15 +392,39 @@ public Servers servers() {
}
/**
- * Gets the resource collection API of Replicas.
+ * Gets the resource collection API of BackupAndExports.
*
- * @return Resource collection API of Replicas.
+ * @return Resource collection API of BackupAndExports.
*/
- public Replicas replicas() {
- if (this.replicas == null) {
- this.replicas = new ReplicasImpl(clientObject.getReplicas(), this);
+ public BackupAndExports backupAndExports() {
+ if (this.backupAndExports == null) {
+ this.backupAndExports = new BackupAndExportsImpl(clientObject.getBackupAndExports(), this);
}
- return replicas;
+ return backupAndExports;
+ }
+
+ /**
+ * Gets the resource collection API of LogFiles.
+ *
+ * @return Resource collection API of LogFiles.
+ */
+ public LogFiles logFiles() {
+ if (this.logFiles == null) {
+ this.logFiles = new LogFilesImpl(clientObject.getLogFiles(), this);
+ }
+ return logFiles;
+ }
+
+ /**
+ * Gets the resource collection API of ServersMigrations.
+ *
+ * @return Resource collection API of ServersMigrations.
+ */
+ public ServersMigrations serversMigrations() {
+ if (this.serversMigrations == null) {
+ this.serversMigrations = new ServersMigrationsImpl(clientObject.getServersMigrations(), this);
+ }
+ return serversMigrations;
}
/**
@@ -333,15 +440,40 @@ public Backups backups() {
}
/**
- * Gets the resource collection API of FirewallRules. It manages FirewallRule.
+ * Gets the resource collection API of LongRunningBackups.
*
- * @return Resource collection API of FirewallRules.
+ * @return Resource collection API of LongRunningBackups.
*/
- public FirewallRules firewallRules() {
- if (this.firewallRules == null) {
- this.firewallRules = new FirewallRulesImpl(clientObject.getFirewallRules(), this);
+ public LongRunningBackups longRunningBackups() {
+ if (this.longRunningBackups == null) {
+ this.longRunningBackups = new LongRunningBackupsImpl(clientObject.getLongRunningBackups(), this);
}
- return firewallRules;
+ return longRunningBackups;
+ }
+
+ /**
+ * Gets the resource collection API of LongRunningBackupOperations. It manages ServerBackupV2.
+ *
+ * @return Resource collection API of LongRunningBackupOperations.
+ */
+ public LongRunningBackupOperations longRunningBackupOperations() {
+ if (this.longRunningBackupOperations == null) {
+ this.longRunningBackupOperations
+ = new LongRunningBackupOperationsImpl(clientObject.getLongRunningBackupOperations(), this);
+ }
+ return longRunningBackupOperations;
+ }
+
+ /**
+ * Gets the resource collection API of Configurations. It manages Configuration.
+ *
+ * @return Resource collection API of Configurations.
+ */
+ public Configurations configurations() {
+ if (this.configurations == null) {
+ this.configurations = new ConfigurationsImpl(clientObject.getConfigurations(), this);
+ }
+ return configurations;
}
/**
@@ -357,15 +489,78 @@ public Databases databases() {
}
/**
- * Gets the resource collection API of Configurations.
+ * Gets the resource collection API of FirewallRules. It manages FirewallRule.
*
- * @return Resource collection API of Configurations.
+ * @return Resource collection API of FirewallRules.
*/
- public Configurations configurations() {
- if (this.configurations == null) {
- this.configurations = new ConfigurationsImpl(clientObject.getConfigurations(), this);
+ public FirewallRules firewallRules() {
+ if (this.firewallRules == null) {
+ this.firewallRules = new FirewallRulesImpl(clientObject.getFirewallRules(), this);
}
- return configurations;
+ return firewallRules;
+ }
+
+ /**
+ * Gets the resource collection API of AdvancedThreatProtectionSettings.
+ *
+ * @return Resource collection API of AdvancedThreatProtectionSettings.
+ */
+ public AdvancedThreatProtectionSettings advancedThreatProtectionSettings() {
+ if (this.advancedThreatProtectionSettings == null) {
+ this.advancedThreatProtectionSettings
+ = new AdvancedThreatProtectionSettingsImpl(clientObject.getAdvancedThreatProtectionSettings(), this);
+ }
+ return advancedThreatProtectionSettings;
+ }
+
+ /**
+ * Gets the resource collection API of LocationBasedCapabilitySets.
+ *
+ * @return Resource collection API of LocationBasedCapabilitySets.
+ */
+ public LocationBasedCapabilitySets locationBasedCapabilitySets() {
+ if (this.locationBasedCapabilitySets == null) {
+ this.locationBasedCapabilitySets
+ = new LocationBasedCapabilitySetsImpl(clientObject.getLocationBasedCapabilitySets(), this);
+ }
+ return locationBasedCapabilitySets;
+ }
+
+ /**
+ * Gets the resource collection API of Maintenances.
+ *
+ * @return Resource collection API of Maintenances.
+ */
+ public Maintenances maintenances() {
+ if (this.maintenances == null) {
+ this.maintenances = new MaintenancesImpl(clientObject.getMaintenances(), this);
+ }
+ return maintenances;
+ }
+
+ /**
+ * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection.
+ *
+ * @return Resource collection API of PrivateEndpointConnections.
+ */
+ public PrivateEndpointConnections privateEndpointConnections() {
+ if (this.privateEndpointConnections == null) {
+ this.privateEndpointConnections
+ = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
+ }
+ return privateEndpointConnections;
+ }
+
+ /**
+ * Gets the resource collection API of PrivateLinkResources.
+ *
+ * @return Resource collection API of PrivateLinkResources.
+ */
+ public PrivateLinkResources privateLinkResources() {
+ if (this.privateLinkResources == null) {
+ this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
+ }
+ return privateLinkResources;
}
/**
@@ -420,6 +615,30 @@ public CheckNameAvailabilityWithoutLocations checkNameAvailabilityWithoutLocatio
return checkNameAvailabilityWithoutLocations;
}
+ /**
+ * Gets the resource collection API of OperationResults.
+ *
+ * @return Resource collection API of OperationResults.
+ */
+ public OperationResults operationResults() {
+ if (this.operationResults == null) {
+ this.operationResults = new OperationResultsImpl(clientObject.getOperationResults(), this);
+ }
+ return operationResults;
+ }
+
+ /**
+ * Gets the resource collection API of OperationProgress.
+ *
+ * @return Resource collection API of OperationProgress.
+ */
+ public OperationProgress operationProgress() {
+ if (this.operationProgress == null) {
+ this.operationProgress = new OperationProgressImpl(clientObject.getOperationProgress(), this);
+ }
+ return operationProgress;
+ }
+
/**
* Gets the resource collection API of GetPrivateDnsZoneSuffixes.
*
@@ -434,15 +653,15 @@ public GetPrivateDnsZoneSuffixes getPrivateDnsZoneSuffixes() {
}
/**
- * Gets the resource collection API of Operations.
+ * Gets the resource collection API of Replicas.
*
- * @return Resource collection API of Operations.
+ * @return Resource collection API of Replicas.
*/
- public Operations operations() {
- if (this.operations == null) {
- this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ public Replicas replicas() {
+ if (this.replicas == null) {
+ this.replicas = new ReplicasImpl(clientObject.getReplicas(), this);
}
- return operations;
+ return replicas;
}
/**
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/AdvancedThreatProtectionSettingsClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/AdvancedThreatProtectionSettingsClient.java
new file mode 100644
index 000000000000..dd710edc33ed
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/AdvancedThreatProtectionSettingsClient.java
@@ -0,0 +1,217 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionForUpdate;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionName;
+
+/**
+ * An instance of this class provides access to all the operations defined in AdvancedThreatProtectionSettingsClient.
+ */
+public interface AdvancedThreatProtectionSettingsClient {
+ /**
+ * Get a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection state along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, Context context);
+
+ /**
+ * Get a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection state.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AdvancedThreatProtectionInner get(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName);
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @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 a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, AdvancedThreatProtectionInner> beginUpdatePut(
+ String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionInner parameters);
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @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 a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, AdvancedThreatProtectionInner> beginUpdatePut(
+ String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionInner parameters, Context context);
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AdvancedThreatProtectionInner updatePut(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionInner parameters);
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AdvancedThreatProtectionInner updatePut(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionInner parameters,
+ Context context);
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @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 a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, AdvancedThreatProtectionInner> beginUpdate(
+ String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters);
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @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 a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, AdvancedThreatProtectionInner> beginUpdate(
+ String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters, Context context);
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AdvancedThreatProtectionInner update(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionForUpdate parameters);
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AdvancedThreatProtectionInner update(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionForUpdate parameters,
+ Context context);
+
+ /**
+ * Gets a list of server's Advanced Threat Protection states.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 a list of server's Advanced Threat Protection states as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName);
+
+ /**
+ * Gets a list of server's Advanced Threat Protection states.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 a list of server's Advanced Threat Protection states as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/AzureADAdministratorsClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/AzureADAdministratorsClient.java
new file mode 100644
index 000000000000..c5ea4b0e8640
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/AzureADAdministratorsClient.java
@@ -0,0 +1,203 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AzureADAdministratorInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorName;
+
+/**
+ * An instance of this class provides access to all the operations defined in AzureADAdministratorsClient.
+ */
+public interface AzureADAdministratorsClient {
+ /**
+ * Gets information about an azure ad administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @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 information about an azure ad administrator along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String serverName,
+ AdministratorName administratorName, Context context);
+
+ /**
+ * Gets information about an azure ad administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @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 information about an azure ad administrator.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AzureADAdministratorInner get(String resourceGroupName, String serverName, AdministratorName administratorName);
+
+ /**
+ * Creates or updates an existing Azure Active Directory administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @param parameters The required parameters for creating or updating an aad administrator.
+ * @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 Administrator.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, AzureADAdministratorInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, AdministratorName administratorName,
+ AzureADAdministratorInner parameters);
+
+ /**
+ * Creates or updates an existing Azure Active Directory administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @param parameters The required parameters for creating or updating an aad administrator.
+ * @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 Administrator.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, AzureADAdministratorInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, AdministratorName administratorName,
+ AzureADAdministratorInner parameters, Context context);
+
+ /**
+ * Creates or updates an existing Azure Active Directory administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @param parameters The required parameters for creating or updating an aad administrator.
+ * @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 Administrator.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AzureADAdministratorInner createOrUpdate(String resourceGroupName, String serverName,
+ AdministratorName administratorName, AzureADAdministratorInner parameters);
+
+ /**
+ * Creates or updates an existing Azure Active Directory administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @param parameters The required parameters for creating or updating an aad administrator.
+ * @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 Administrator.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AzureADAdministratorInner createOrUpdate(String resourceGroupName, String serverName,
+ AdministratorName administratorName, AzureADAdministratorInner parameters, Context context);
+
+ /**
+ * Deletes an Azure AD Administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName,
+ AdministratorName administratorName);
+
+ /**
+ * Deletes an Azure AD Administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName,
+ AdministratorName administratorName, Context context);
+
+ /**
+ * Deletes an Azure AD Administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, AdministratorName administratorName);
+
+ /**
+ * Deletes an Azure AD Administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, AdministratorName administratorName, Context context);
+
+ /**
+ * List all the AAD administrators in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 a List of azure ad administrators as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * List all the AAD administrators in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 a List of azure ad administrators as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/BackupAndExportsClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/BackupAndExportsClient.java
new file mode 100644
index 000000000000..fb460ab6bb73
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/BackupAndExportsClient.java
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.BackupAndExportResponseInner;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ValidateBackupResponseInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.BackupAndExportRequest;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupAndExportsClient.
+ */
+public interface BackupAndExportsClient {
+ /**
+ * Exports the backup of the given server by creating a backup if not existing.
+ *
+ * @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 creating and exporting backup of the given 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BackupAndExportResponseInner>
+ beginCreate(String resourceGroupName, String serverName, BackupAndExportRequest parameters);
+
+ /**
+ * Exports the backup of the given server by creating a backup if not existing.
+ *
+ * @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 creating and exporting backup of the given 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, BackupAndExportResponseInner>
+ beginCreate(String resourceGroupName, String serverName, BackupAndExportRequest parameters, Context context);
+
+ /**
+ * Exports the backup of the given server by creating a backup if not existing.
+ *
+ * @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 creating and exporting backup of the given 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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupAndExportResponseInner create(String resourceGroupName, String serverName, BackupAndExportRequest parameters);
+
+ /**
+ * Exports the backup of the given server by creating a backup if not existing.
+ *
+ * @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 creating and exporting backup of the given 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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupAndExportResponseInner create(String resourceGroupName, String serverName, BackupAndExportRequest parameters,
+ Context context);
+
+ /**
+ * Validates if backup can be performed for given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 ValidateBackup API Response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response validateBackupWithResponse(String resourceGroupName, String serverName,
+ Context context);
+
+ /**
+ * Validates if backup can be performed for given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 ValidateBackup API Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ValidateBackupResponseInner validateBackup(String resourceGroupName, String serverName);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/BackupsClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/BackupsClient.java
index e6a21fde6914..730efd090a0a 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/BackupsClient.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/BackupsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent;
@@ -45,6 +45,36 @@ Response getWithResponse(String resourceGroupName, String ser
@ServiceMethod(returns = ReturnType.SINGLE)
ServerBackupInner get(String resourceGroupName, String serverName, String backupName);
+ /**
+ * Create backup for a given server with specified backup name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @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 server backup properties along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response putWithResponse(String resourceGroupName, String serverName, String backupName,
+ Context context);
+
+ /**
+ * Create backup for a given server with specified backup name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @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 server backup properties.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerBackupInner put(String resourceGroupName, String serverName, String backupName);
+
/**
* List all the backups for a given server.
*
@@ -53,7 +83,7 @@ Response getWithResponse(String resourceGroupName, String ser
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of server backups as paginated response with {@link PagedIterable}.
+ * @return the response of a ServerBackup list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByServer(String resourceGroupName, String serverName);
@@ -67,7 +97,7 @@ Response getWithResponse(String resourceGroupName, String ser
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of server backups as paginated response with {@link PagedIterable}.
+ * @return the response of a ServerBackup list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java
index bc8676a2f9a6..3f6b59421315 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/CheckNameAvailabilitiesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent;
@@ -19,7 +19,7 @@ public interface CheckNameAvailabilitiesClient {
* Check the availability of name for server.
*
* @param locationName The name of the location.
- * @param nameAvailabilityRequest The required parameters for checking if server name is available.
+ * @param nameAvailabilityRequest The request body.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -34,7 +34,7 @@ Response executeWithResponse(String locationName,
* Check the availability of name for server.
*
* @param locationName The name of the location.
- * @param nameAvailabilityRequest The required parameters for checking if server name is available.
+ * @param nameAvailabilityRequest The request body.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/CheckNameAvailabilityWithoutLocationsClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/CheckNameAvailabilityWithoutLocationsClient.java
index db8d36165b22..ee6e99f67751 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/CheckNameAvailabilityWithoutLocationsClient.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/CheckNameAvailabilityWithoutLocationsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent;
@@ -19,7 +19,7 @@ public interface CheckNameAvailabilityWithoutLocationsClient {
/**
* Check the availability of name for server.
*
- * @param nameAvailabilityRequest The required parameters for checking if server name is available.
+ * @param nameAvailabilityRequest The request body.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -33,7 +33,7 @@ Response executeWithResponse(NameAvailabilityRequest name
/**
* Check the availability of name for server.
*
- * @param nameAvailabilityRequest The required parameters for checking if server name is available.
+ * @param nameAvailabilityRequest The request body.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/CheckVirtualNetworkSubnetUsagesClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/CheckVirtualNetworkSubnetUsagesClient.java
index 1f2a6eb140be..52352028321c 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/CheckVirtualNetworkSubnetUsagesClient.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/CheckVirtualNetworkSubnetUsagesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent;
@@ -19,7 +19,7 @@ public interface CheckVirtualNetworkSubnetUsagesClient {
* Get virtual network subnet usage for a given vNet resource id.
*
* @param locationName The name of the location.
- * @param parameters The required parameters for creating or updating a server.
+ * @param parameters The request body.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -34,7 +34,7 @@ Response executeWithResponse(String locati
* Get virtual network subnet usage for a given vNet resource id.
*
* @param locationName The name of the location.
- * @param parameters The required parameters for creating or updating a server.
+ * @param parameters The request body.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/ConfigurationsClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/ConfigurationsClient.java
index 63b2c4ec5048..220c6b693ffb 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/ConfigurationsClient.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/ConfigurationsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent;
@@ -19,6 +19,36 @@
* An instance of this class provides access to all the operations defined in ConfigurationsClient.
*/
public interface ConfigurationsClient {
+ /**
+ * Gets information about a configuration of server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @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 information about a configuration of server along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String serverName, String configurationName,
+ Context context);
+
+ /**
+ * Gets information about a configuration of server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @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 information about a configuration of server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationInner get(String resourceGroupName, String serverName, String configurationName);
+
/**
* Updates a configuration of a server.
*
@@ -32,7 +62,7 @@ public interface ConfigurationsClient {
* @return the {@link SyncPoller} for polling of represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName,
+ SyncPoller, ConfigurationInner> beginCreateOrUpdate(String resourceGroupName,
String serverName, String configurationName, ConfigurationInner parameters);
/**
@@ -49,7 +79,7 @@ SyncPoller, ConfigurationInner> beginUpdate(Strin
* @return the {@link SyncPoller} for polling of represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName,
+ SyncPoller, ConfigurationInner> beginCreateOrUpdate(String resourceGroupName,
String serverName, String configurationName, ConfigurationInner parameters, Context context);
/**
@@ -65,7 +95,7 @@ SyncPoller, ConfigurationInner> beginUpdate(Strin
* @return represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ConfigurationInner update(String resourceGroupName, String serverName, String configurationName,
+ ConfigurationInner createOrUpdate(String resourceGroupName, String serverName, String configurationName,
ConfigurationInner parameters);
/**
@@ -82,69 +112,106 @@ ConfigurationInner update(String resourceGroupName, String serverName, String co
* @return represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ConfigurationInner update(String resourceGroupName, String serverName, String configurationName,
+ ConfigurationInner createOrUpdate(String resourceGroupName, String serverName, String configurationName,
ConfigurationInner parameters, Context context);
/**
- * Gets information about a configuration of server.
+ * Updates a configuration of a server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @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 Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName,
+ String serverName, String configurationName, ConfigurationInner parameters);
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
* @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 information about a configuration of server along with {@link Response}.
+ * @return the {@link SyncPoller} for polling of represents a Configuration.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ConfigurationInner> beginUpdate(String resourceGroupName,
+ String serverName, String configurationName, ConfigurationInner parameters, Context context);
+
+ /**
+ * Updates a configuration of a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @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 Configuration.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String resourceGroupName, String serverName, String configurationName,
- Context context);
+ ConfigurationInner update(String resourceGroupName, String serverName, String configurationName,
+ ConfigurationInner parameters);
/**
- * Gets information about a configuration of server.
+ * Updates a configuration of a server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param configurationName The name of the server configuration.
+ * @param parameters The required parameters for updating a server configuration.
+ * @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 information about a configuration of server.
+ * @return represents a Configuration.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ConfigurationInner get(String resourceGroupName, String serverName, String configurationName);
+ ConfigurationInner update(String resourceGroupName, String serverName, String configurationName,
+ ConfigurationInner parameters, Context context);
/**
- * Update a list of configurations in a given server.
+ * List all the configurations in a given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
- * @param parameters The parameters for updating a list of server configuration.
* @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 a list of server configurations.
+ * @return the response of a Configuration list operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, ConfigurationListResultInner>
- beginBatchUpdate(String resourceGroupName, String serverName, ConfigurationListForBatchUpdate parameters);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
/**
- * Update a list of configurations in a given server.
+ * List all the configurations in a given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
- * @param parameters The parameters for updating a list of server configuration.
+ * @param tags The tags of the server configuration.
+ * @param keyword The keyword of the server configuration.
+ * @param page The page of the server configuration.
+ * @param pageSize The pageSize of the server configuration.
* @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 a list of server configurations.
+ * @return the response of a Configuration list operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, ConfigurationListResultInner> beginBatchUpdate(
- String resourceGroupName, String serverName, ConfigurationListForBatchUpdate parameters, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, String tags,
+ String keyword, Integer page, Integer pageSize, Context context);
/**
* Update a list of configurations in a given server.
@@ -155,11 +222,11 @@ SyncPoller, ConfigurationListResultInne
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of server configurations.
+ * @return the {@link SyncPoller} for polling of the response of a Configuration list operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- ConfigurationListResultInner batchUpdate(String resourceGroupName, String serverName,
- ConfigurationListForBatchUpdate parameters);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ConfigurationListResultInner>
+ beginBatchUpdate(String resourceGroupName, String serverName, ConfigurationListForBatchUpdate parameters);
/**
* Update a list of configurations in a given server.
@@ -171,36 +238,40 @@ ConfigurationListResultInner batchUpdate(String resourceGroupName, String 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 a list of server configurations.
+ * @return the {@link SyncPoller} for polling of the response of a Configuration list operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- ConfigurationListResultInner batchUpdate(String resourceGroupName, String serverName,
- ConfigurationListForBatchUpdate parameters, Context context);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ConfigurationListResultInner> beginBatchUpdate(
+ String resourceGroupName, String serverName, ConfigurationListForBatchUpdate parameters, Context context);
/**
- * List all the configurations in a given server.
+ * Update a list of configurations in a given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
+ * @param parameters The parameters for updating a list of server configuration.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of server configurations as paginated response with {@link PagedIterable}.
+ * @return the response of a Configuration list operation.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByServer(String resourceGroupName, String serverName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationListResultInner batchUpdate(String resourceGroupName, String serverName,
+ ConfigurationListForBatchUpdate parameters);
/**
- * List all the configurations in a given server.
+ * Update a list of configurations in a given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
+ * @param parameters The parameters for updating a list of server configuration.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of server configurations as paginated response with {@link PagedIterable}.
+ * @return the response of a Configuration list operation.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConfigurationListResultInner batchUpdate(String resourceGroupName, String serverName,
+ ConfigurationListForBatchUpdate parameters, Context context);
}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/DatabasesClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/DatabasesClient.java
index b76b455ee0b6..0019f3bff9ee 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/DatabasesClient.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/DatabasesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent;
@@ -17,6 +17,36 @@
* An instance of this class provides access to all the operations defined in DatabasesClient.
*/
public interface DatabasesClient {
+ /**
+ * Gets information about a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @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 information about a database along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String serverName, String databaseName,
+ Context context);
+
+ /**
+ * Gets information about a database.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @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 information about a database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseInner get(String resourceGroupName, String serverName, String databaseName);
+
/**
* Creates a new database or updates an existing database.
*
@@ -140,36 +170,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String serverName, String databaseName, Context context);
- /**
- * Gets information about a database.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param databaseName The name of the database.
- * @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 information about a database along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String resourceGroupName, String serverName, String databaseName,
- Context context);
-
- /**
- * Gets information about a database.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param databaseName The name of the database.
- * @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 information about a database.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- DatabaseInner get(String resourceGroupName, String serverName, String databaseName);
-
/**
* List all the databases in a given server.
*
@@ -178,7 +178,7 @@ Response getWithResponse(String resourceGroupName, String serverN
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a List of databases as paginated response with {@link PagedIterable}.
+ * @return the response of a Database list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByServer(String resourceGroupName, String serverName);
@@ -192,7 +192,7 @@ Response getWithResponse(String resourceGroupName, String serverN
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a List of databases as paginated response with {@link PagedIterable}.
+ * @return the response of a Database list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/FirewallRulesClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/FirewallRulesClient.java
index 4f98e6415488..8d1d9a0ddfcf 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/FirewallRulesClient.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/FirewallRulesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent;
@@ -17,6 +17,36 @@
* An instance of this class provides access to all the operations defined in FirewallRulesClient.
*/
public interface FirewallRulesClient {
+ /**
+ * Gets information about a server firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @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 information about a server firewall rule along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String serverName, String firewallRuleName,
+ Context context);
+
+ /**
+ * Gets information about a server firewall rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param firewallRuleName The name of the server firewall rule.
+ * @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 information about a server firewall rule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName);
+
/**
* Creates a new firewall rule or updates an existing firewall rule.
*
@@ -141,36 +171,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String serverName, String firewallRuleName, Context context);
- /**
- * Gets information about a server firewall rule.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param firewallRuleName The name of the server firewall rule.
- * @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 information about a server firewall rule along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(String resourceGroupName, String serverName, String firewallRuleName,
- Context context);
-
- /**
- * Gets information about a server firewall rule.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the server.
- * @param firewallRuleName The name of the server firewall rule.
- * @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 information about a server firewall rule.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- FirewallRuleInner get(String resourceGroupName, String serverName, String firewallRuleName);
-
/**
* List all the firewall rules in a given server.
*
@@ -179,7 +179,7 @@ Response getWithResponse(String resourceGroupName, String ser
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of firewall rules as paginated response with {@link PagedIterable}.
+ * @return the response of a FirewallRule list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByServer(String resourceGroupName, String serverName);
@@ -193,7 +193,7 @@ Response getWithResponse(String resourceGroupName, String ser
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of firewall rules as paginated response with {@link PagedIterable}.
+ * @return the response of a FirewallRule list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java
index 1f37cbb17073..b38d71b742b5 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/GetPrivateDnsZoneSuffixesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent;
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/LocationBasedCapabilitiesClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/LocationBasedCapabilitiesClient.java
index ab0aeb9595dd..a75949f5caac 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/LocationBasedCapabilitiesClient.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/LocationBasedCapabilitiesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent;
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/LocationBasedCapabilitySetsClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/LocationBasedCapabilitySetsClient.java
new file mode 100644
index 000000000000..823caeb49cec
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/LocationBasedCapabilitySetsClient.java
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.CapabilityInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in LocationBasedCapabilitySetsClient.
+ */
+public interface LocationBasedCapabilitySetsClient {
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @param capabilitySetName Name of capability set.
+ * @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 capabilities at specified location in a given subscription along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String locationName, String capabilitySetName, Context context);
+
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @param capabilitySetName Name of capability set.
+ * @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 capabilities at specified location in a given subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CapabilityInner get(String locationName, String capabilitySetName);
+
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @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 capabilities at specified location in a given subscription as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String locationName);
+
+ /**
+ * Get capabilities at specified location in a given subscription.
+ *
+ * @param locationName The name of the location.
+ * @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 capabilities at specified location in a given subscription as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String locationName, Context context);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/LogFilesClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/LogFilesClient.java
new file mode 100644
index 000000000000..2356e00000df
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/LogFilesClient.java
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.LogFileInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in LogFilesClient.
+ */
+public interface LogFilesClient {
+ /**
+ * List all the server log files in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 response of a LogFile list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * List all the server log files in a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 response of a LogFile list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/LongRunningBackupOperationsClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/LongRunningBackupOperationsClient.java
new file mode 100644
index 000000000000..6659b27d4824
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/LongRunningBackupOperationsClient.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerBackupV2Inner;
+
+/**
+ * An instance of this class provides access to all the operations defined in LongRunningBackupOperationsClient.
+ */
+public interface LongRunningBackupOperationsClient {
+ /**
+ * Create backup for a given server with specified backup name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @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 server backup properties.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ServerBackupV2Inner> beginCreate(String resourceGroupName,
+ String serverName, String backupName);
+
+ /**
+ * Create backup for a given server with specified backup name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param parameters The required parameters for creating and exporting backup of the given 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 server backup properties.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ServerBackupV2Inner> beginCreate(String resourceGroupName,
+ String serverName, String backupName, ServerBackupV2Inner parameters, Context context);
+
+ /**
+ * Create backup for a given server with specified backup name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @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 server backup properties.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerBackupV2Inner create(String resourceGroupName, String serverName, String backupName);
+
+ /**
+ * Create backup for a given server with specified backup name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @param parameters The required parameters for creating and exporting backup of the given 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 server backup properties.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerBackupV2Inner create(String resourceGroupName, String serverName, String backupName,
+ ServerBackupV2Inner parameters, Context context);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/LongRunningBackupsClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/LongRunningBackupsClient.java
new file mode 100644
index 000000000000..479f32ddd90b
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/LongRunningBackupsClient.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerBackupV2Inner;
+
+/**
+ * An instance of this class provides access to all the operations defined in LongRunningBackupsClient.
+ */
+public interface LongRunningBackupsClient {
+ /**
+ * Get backup for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @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 backup for a given server along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String serverName, String backupName,
+ Context context);
+
+ /**
+ * Get backup for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param backupName The name of the backup.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backup for a given server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerBackupV2Inner get(String resourceGroupName, String serverName, String backupName);
+
+ /**
+ * List all the backups for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 response of a ServerBackupV2 list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName);
+
+ /**
+ * List all the backups for a given server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 response of a ServerBackupV2 list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/MaintenancesClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/MaintenancesClient.java
new file mode 100644
index 000000000000..59f045014a72
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/MaintenancesClient.java
@@ -0,0 +1,140 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.MaintenanceInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceUpdate;
+
+/**
+ * An instance of this class provides access to all the operations defined in MaintenancesClient.
+ */
+public interface MaintenancesClient {
+ /**
+ * Read maintenance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param maintenanceName The name of the maintenance.
+ * @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 maintenance along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response readWithResponse(String resourceGroupName, String serverName, String maintenanceName,
+ Context context);
+
+ /**
+ * Read maintenance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param maintenanceName The name of the maintenance.
+ * @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 maintenance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MaintenanceInner read(String resourceGroupName, String serverName, String maintenanceName);
+
+ /**
+ * Update maintenances.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param maintenanceName The name of the maintenance.
+ * @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 maintenance.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, MaintenanceInner> beginUpdate(String resourceGroupName, String serverName,
+ String maintenanceName);
+
+ /**
+ * Update maintenances.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param maintenanceName The name of the maintenance.
+ * @param parameters The required parameters for update maintenance 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 maintenance.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, MaintenanceInner> beginUpdate(String resourceGroupName, String serverName,
+ String maintenanceName, MaintenanceUpdate parameters, Context context);
+
+ /**
+ * Update maintenances.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param maintenanceName The name of the maintenance.
+ * @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 maintenance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MaintenanceInner update(String resourceGroupName, String serverName, String maintenanceName);
+
+ /**
+ * Update maintenances.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param maintenanceName The name of the maintenance.
+ * @param parameters The required parameters for update maintenance 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 maintenance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MaintenanceInner update(String resourceGroupName, String serverName, String maintenanceName,
+ MaintenanceUpdate parameters, Context context);
+
+ /**
+ * List maintenances.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 response of a Maintenance list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName);
+
+ /**
+ * List maintenances.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 response of a Maintenance list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/MySqlManagementClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/MySqlManagementClient.java
index 727614c73126..0af8b59fa8e9 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/MySqlManagementClient.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/MySqlManagementClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent;
@@ -12,26 +12,26 @@
*/
public interface MySqlManagementClient {
/**
- * Gets The ID of the target subscription.
- *
- * @return the subscriptionId value.
- */
- String getSubscriptionId();
-
- /**
- * Gets server parameter.
+ * Gets Service host.
*
* @return the endpoint value.
*/
String getEndpoint();
/**
- * Gets Api Version.
+ * Gets Version parameter.
*
* @return the apiVersion value.
*/
String getApiVersion();
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
/**
* Gets The HTTP pipeline to send requests through.
*
@@ -46,6 +46,20 @@ public interface MySqlManagementClient {
*/
Duration getDefaultPollInterval();
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the AzureADAdministratorsClient object to access its operations.
+ *
+ * @return the AzureADAdministratorsClient object.
+ */
+ AzureADAdministratorsClient getAzureADAdministrators();
+
/**
* Gets the ServersClient object to access its operations.
*
@@ -54,11 +68,25 @@ public interface MySqlManagementClient {
ServersClient getServers();
/**
- * Gets the ReplicasClient object to access its operations.
+ * Gets the BackupAndExportsClient object to access its operations.
*
- * @return the ReplicasClient object.
+ * @return the BackupAndExportsClient object.
*/
- ReplicasClient getReplicas();
+ BackupAndExportsClient getBackupAndExports();
+
+ /**
+ * Gets the LogFilesClient object to access its operations.
+ *
+ * @return the LogFilesClient object.
+ */
+ LogFilesClient getLogFiles();
+
+ /**
+ * Gets the ServersMigrationsClient object to access its operations.
+ *
+ * @return the ServersMigrationsClient object.
+ */
+ ServersMigrationsClient getServersMigrations();
/**
* Gets the BackupsClient object to access its operations.
@@ -68,18 +96,18 @@ public interface MySqlManagementClient {
BackupsClient getBackups();
/**
- * Gets the FirewallRulesClient object to access its operations.
+ * Gets the LongRunningBackupsClient object to access its operations.
*
- * @return the FirewallRulesClient object.
+ * @return the LongRunningBackupsClient object.
*/
- FirewallRulesClient getFirewallRules();
+ LongRunningBackupsClient getLongRunningBackups();
/**
- * Gets the DatabasesClient object to access its operations.
+ * Gets the LongRunningBackupOperationsClient object to access its operations.
*
- * @return the DatabasesClient object.
+ * @return the LongRunningBackupOperationsClient object.
*/
- DatabasesClient getDatabases();
+ LongRunningBackupOperationsClient getLongRunningBackupOperations();
/**
* Gets the ConfigurationsClient object to access its operations.
@@ -88,6 +116,55 @@ public interface MySqlManagementClient {
*/
ConfigurationsClient getConfigurations();
+ /**
+ * Gets the DatabasesClient object to access its operations.
+ *
+ * @return the DatabasesClient object.
+ */
+ DatabasesClient getDatabases();
+
+ /**
+ * Gets the FirewallRulesClient object to access its operations.
+ *
+ * @return the FirewallRulesClient object.
+ */
+ FirewallRulesClient getFirewallRules();
+
+ /**
+ * Gets the AdvancedThreatProtectionSettingsClient object to access its operations.
+ *
+ * @return the AdvancedThreatProtectionSettingsClient object.
+ */
+ AdvancedThreatProtectionSettingsClient getAdvancedThreatProtectionSettings();
+
+ /**
+ * Gets the LocationBasedCapabilitySetsClient object to access its operations.
+ *
+ * @return the LocationBasedCapabilitySetsClient object.
+ */
+ LocationBasedCapabilitySetsClient getLocationBasedCapabilitySets();
+
+ /**
+ * Gets the MaintenancesClient object to access its operations.
+ *
+ * @return the MaintenancesClient object.
+ */
+ MaintenancesClient getMaintenances();
+
+ /**
+ * Gets the PrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the PrivateEndpointConnectionsClient object.
+ */
+ PrivateEndpointConnectionsClient getPrivateEndpointConnections();
+
+ /**
+ * Gets the PrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the PrivateLinkResourcesClient object.
+ */
+ PrivateLinkResourcesClient getPrivateLinkResources();
+
/**
* Gets the LocationBasedCapabilitiesClient object to access its operations.
*
@@ -116,6 +193,20 @@ public interface MySqlManagementClient {
*/
CheckNameAvailabilityWithoutLocationsClient getCheckNameAvailabilityWithoutLocations();
+ /**
+ * Gets the OperationResultsClient object to access its operations.
+ *
+ * @return the OperationResultsClient object.
+ */
+ OperationResultsClient getOperationResults();
+
+ /**
+ * Gets the OperationProgressClient object to access its operations.
+ *
+ * @return the OperationProgressClient object.
+ */
+ OperationProgressClient getOperationProgress();
+
/**
* Gets the GetPrivateDnsZoneSuffixesClient object to access its operations.
*
@@ -124,9 +215,9 @@ public interface MySqlManagementClient {
GetPrivateDnsZoneSuffixesClient getGetPrivateDnsZoneSuffixes();
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the ReplicasClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the ReplicasClient object.
*/
- OperationsClient getOperations();
+ ReplicasClient getReplicas();
}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/OperationProgressClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/OperationProgressClient.java
new file mode 100644
index 000000000000..9544c0ed856b
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/OperationProgressClient.java
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.OperationProgressResultInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperationProgressClient.
+ */
+public interface OperationProgressClient {
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param locationName The name of the location.
+ * @param operationId The ID of an ongoing async operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation result for a long running operation along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String locationName, String operationId, Context context);
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param locationName The name of the location.
+ * @param operationId The ID of an ongoing async 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 operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationProgressResultInner get(String locationName, String operationId);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/OperationResultsClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/OperationResultsClient.java
new file mode 100644
index 000000000000..c771ed3da5d5
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/OperationResultsClient.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.OperationStatusExtendedResultInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperationResultsClient.
+ */
+public interface OperationResultsClient {
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param locationName The name of the location.
+ * @param operationId The ID of an ongoing async operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the operation result for a long running operation along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String locationName, String operationId,
+ Context context);
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param locationName The name of the location.
+ * @param operationId The ID of an ongoing async 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 operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusExtendedResultInner get(String locationName, String operationId);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/OperationsClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/OperationsClient.java
index 5a6a60a28ac1..5d7201a004f9 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/OperationsClient.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/OperationsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent;
@@ -15,23 +15,25 @@
*/
public interface OperationsClient {
/**
- * Lists all of the available REST API operations.
+ * List the operations for the provider.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of resource provider operations as paginated response with {@link PagedIterable}.
+ * @return the static parameters for a resource group based resource as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
/**
- * Lists all of the available REST API operations.
+ * List the operations for the provider.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of resource provider operations as paginated response with {@link PagedIterable}.
+ * @return the static parameters for a resource group based resource as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java
new file mode 100644
index 000000000000..b850990af1e9
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/PrivateEndpointConnectionsClient.java
@@ -0,0 +1,214 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.PrivateEndpointConnectionListResultInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient.
+ */
+public interface PrivateEndpointConnectionsClient {
+ /**
+ * Gets a private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String serverName,
+ String privateEndpointConnectionName, Context context);
+
+ /**
+ * Gets a private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner get(String resourceGroupName, String serverName,
+ String privateEndpointConnectionName);
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param parameters Resource create parameters.
+ * @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 a private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters);
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param parameters Resource create parameters.
+ * @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 a private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
+ String resourceGroupName, String serverName, String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters, Context context);
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param parameters Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String serverName,
+ String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters);
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param parameters Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private endpoint connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String serverName,
+ String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName,
+ String privateEndpointConnectionName);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String serverName,
+ String privateEndpointConnectionName, Context context);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Gets all private endpoint connections on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 all private endpoint connections on a server along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listByServerWithResponse(String resourceGroupName,
+ String serverName, Context context);
+
+ /**
+ * Gets all private endpoint connections on a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 all private endpoint connections on a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionListResultInner listByServer(String resourceGroupName, String serverName);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/PrivateLinkResourcesClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/PrivateLinkResourcesClient.java
new file mode 100644
index 000000000000..a331cc11278f
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/PrivateLinkResourcesClient.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.PrivateLinkResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient.
+ */
+public interface PrivateLinkResourcesClient {
+ /**
+ * Gets a private link resource for MySQL server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param groupName The name of the private link resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private link resource for MySQL server along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String serverName, String groupName,
+ Context context);
+
+ /**
+ * Gets a private link resource for MySQL server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param groupName The name of the private link resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a private link resource for MySQL server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateLinkResourceInner get(String resourceGroupName, String serverName, String groupName);
+
+ /**
+ * Lists the private link resources for MySQL server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 a list of private link resources for versions before v6.
+ *
+ * This model represents the standard `PrivateLinkResourceListResult` envelope for versions v3, v4, and v5 as
+ * paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName);
+
+ /**
+ * Lists the private link resources for MySQL server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 a list of private link resources for versions before v6.
+ *
+ * This model represents the standard `PrivateLinkResourceListResult` envelope for versions v3, v4, and v5 as
+ * paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/ReplicasClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/ReplicasClient.java
index 4ce61a9dfa24..fd427b13f1f9 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/ReplicasClient.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/ReplicasClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent;
@@ -22,7 +22,7 @@ public interface ReplicasClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of servers as paginated response with {@link PagedIterable}.
+ * @return the response of a Server list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByServer(String resourceGroupName, String serverName);
@@ -36,7 +36,7 @@ public interface ReplicasClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of servers as paginated response with {@link PagedIterable}.
+ * @return the response of a Server list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByServer(String resourceGroupName, String serverName, Context context);
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 ba7ffac6c34b..8f7b0af1a3e6 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent;
@@ -11,14 +11,44 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
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;
/**
* An instance of this class provides access to all the operations defined in ServersClient.
*/
public interface ServersClient {
+ /**
+ * Gets information about a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 information about a server along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Gets information about a server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 information about a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerInner getByResourceGroup(String resourceGroupName, String serverName);
+
/**
* Creates a new server or updates an existing server. The update action will overwrite the existing server.
*
@@ -195,33 +225,6 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String serverName, Context context);
- /**
- * Gets information about a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the 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 information about a server along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context);
-
- /**
- * Gets information about a server.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param serverName The name of the 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 information about a server.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- ServerInner getByResourceGroup(String resourceGroupName, String serverName);
-
/**
* List all the servers in a given resource group.
*
@@ -229,7 +232,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of servers as paginated response with {@link PagedIterable}.
+ * @return the response of a Server list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -242,7 +245,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of servers as paginated response with {@link PagedIterable}.
+ * @return the response of a Server list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -252,7 +255,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of servers as paginated response with {@link PagedIterable}.
+ * @return the response of a Server list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -264,7 +267,7 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of servers as paginated response with {@link PagedIterable}.
+ * @return the response of a Server list operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -321,6 +324,38 @@ SyncPoller, ServerInner> beginUpdate(String resourceGrou
@ServiceMethod(returns = ReturnType.SINGLE)
void failover(String resourceGroupName, String serverName, Context context);
+ /**
+ * Validate a deployment of high availability.
+ *
+ * @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 validation of high availability deployment.
+ * @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 high availability validation properties of a server along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response validateEstimateHighAvailabilityWithResponse(
+ String resourceGroupName, String serverName, HighAvailabilityValidationEstimationInner parameters,
+ Context context);
+
+ /**
+ * Validate a deployment of high availability.
+ *
+ * @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 validation of high availability deployment.
+ * @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 high availability validation properties of a server.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ HighAvailabilityValidationEstimationInner validateEstimateHighAvailability(String resourceGroupName,
+ String serverName, HighAvailabilityValidationEstimationInner parameters);
+
/**
* Restarts a server.
*
@@ -482,4 +517,123 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void stop(String resourceGroupName, String serverName, Context context);
+
+ /**
+ * Resets GTID 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 resetting GTID 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginResetGtid(String resourceGroupName, String serverName,
+ ServerGtidSetParameter parameters);
+
+ /**
+ * Resets GTID 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 resetting GTID 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginResetGtid(String resourceGroupName, String serverName,
+ ServerGtidSetParameter parameters, Context context);
+
+ /**
+ * Resets GTID 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 resetting GTID 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void resetGtid(String resourceGroupName, String serverName, ServerGtidSetParameter parameters);
+
+ /**
+ * Resets GTID 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 resetting GTID 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.
+ */
+ @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 long-running operation.
+ */
+ @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 long-running operation.
+ */
+ @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 the response.
+ */
+ @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 the response.
+ */
+ @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/fluent/ServersMigrationsClient.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/ServersMigrationsClient.java
new file mode 100644
index 000000000000..2629b53aea99
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/ServersMigrationsClient.java
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ServerInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in ServersMigrationsClient.
+ */
+public interface ServersMigrationsClient {
+ /**
+ * Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ServerInner> beginCutoverMigration(String resourceGroupName, String serverName);
+
+ /**
+ * Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ServerInner> beginCutoverMigration(String resourceGroupName, String serverName,
+ Context context);
+
+ /**
+ * Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerInner cutoverMigration(String resourceGroupName, String serverName);
+
+ /**
+ * Cutover migration for MySQL import, it will switch source elastic server DNS to flexible server.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ServerInner cutoverMigration(String resourceGroupName, String serverName, Context context);
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdministratorProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdministratorProperties.java
new file mode 100644
index 000000000000..9aee283ac50b
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdministratorProperties.java
@@ -0,0 +1,200 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorType;
+import java.io.IOException;
+
+/**
+ * The properties of an administrator.
+ */
+@Fluent
+public final class AdministratorProperties implements JsonSerializable {
+ /*
+ * Type of the sever administrator.
+ */
+ private AdministratorType administratorType;
+
+ /*
+ * Login name of the server administrator.
+ */
+ private String login;
+
+ /*
+ * SID (object ID) of the server administrator.
+ */
+ private String sid;
+
+ /*
+ * Tenant ID of the administrator.
+ */
+ private String tenantId;
+
+ /*
+ * The resource id of the identity used for AAD Authentication.
+ */
+ private String identityResourceId;
+
+ /**
+ * Creates an instance of AdministratorProperties class.
+ */
+ public AdministratorProperties() {
+ }
+
+ /**
+ * Get the administratorType property: Type of the sever administrator.
+ *
+ * @return the administratorType value.
+ */
+ public AdministratorType administratorType() {
+ return this.administratorType;
+ }
+
+ /**
+ * Set the administratorType property: Type of the sever administrator.
+ *
+ * @param administratorType the administratorType value to set.
+ * @return the AdministratorProperties object itself.
+ */
+ public AdministratorProperties withAdministratorType(AdministratorType administratorType) {
+ this.administratorType = administratorType;
+ return this;
+ }
+
+ /**
+ * Get the login property: Login name of the server administrator.
+ *
+ * @return the login value.
+ */
+ public String login() {
+ return this.login;
+ }
+
+ /**
+ * Set the login property: Login name of the server administrator.
+ *
+ * @param login the login value to set.
+ * @return the AdministratorProperties object itself.
+ */
+ public AdministratorProperties withLogin(String login) {
+ this.login = login;
+ return this;
+ }
+
+ /**
+ * Get the sid property: SID (object ID) of the server administrator.
+ *
+ * @return the sid value.
+ */
+ public String sid() {
+ return this.sid;
+ }
+
+ /**
+ * Set the sid property: SID (object ID) of the server administrator.
+ *
+ * @param sid the sid value to set.
+ * @return the AdministratorProperties object itself.
+ */
+ public AdministratorProperties withSid(String sid) {
+ this.sid = sid;
+ return this;
+ }
+
+ /**
+ * Get the tenantId property: Tenant ID of the administrator.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Set the tenantId property: Tenant ID of the administrator.
+ *
+ * @param tenantId the tenantId value to set.
+ * @return the AdministratorProperties object itself.
+ */
+ public AdministratorProperties withTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ return this;
+ }
+
+ /**
+ * Get the identityResourceId property: The resource id of the identity used for AAD Authentication.
+ *
+ * @return the identityResourceId value.
+ */
+ public String identityResourceId() {
+ return this.identityResourceId;
+ }
+
+ /**
+ * Set the identityResourceId property: The resource id of the identity used for AAD Authentication.
+ *
+ * @param identityResourceId the identityResourceId value to set.
+ * @return the AdministratorProperties object itself.
+ */
+ public AdministratorProperties withIdentityResourceId(String identityResourceId) {
+ this.identityResourceId = identityResourceId;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("administratorType",
+ this.administratorType == null ? null : this.administratorType.toString());
+ jsonWriter.writeStringField("login", this.login);
+ jsonWriter.writeStringField("sid", this.sid);
+ jsonWriter.writeStringField("tenantId", this.tenantId);
+ jsonWriter.writeStringField("identityResourceId", this.identityResourceId);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AdministratorProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AdministratorProperties if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the AdministratorProperties.
+ */
+ public static AdministratorProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AdministratorProperties deserializedAdministratorProperties = new AdministratorProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("administratorType".equals(fieldName)) {
+ deserializedAdministratorProperties.administratorType
+ = AdministratorType.fromString(reader.getString());
+ } else if ("login".equals(fieldName)) {
+ deserializedAdministratorProperties.login = reader.getString();
+ } else if ("sid".equals(fieldName)) {
+ deserializedAdministratorProperties.sid = reader.getString();
+ } else if ("tenantId".equals(fieldName)) {
+ deserializedAdministratorProperties.tenantId = reader.getString();
+ } else if ("identityResourceId".equals(fieldName)) {
+ deserializedAdministratorProperties.identityResourceId = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAdministratorProperties;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionInner.java
new file mode 100644
index 000000000000..b8a8223e4432
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionInner.java
@@ -0,0 +1,191 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionProvisioningState;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+
+/**
+ * A server's Advanced Threat Protection.
+ */
+@Fluent
+public final class AdvancedThreatProtectionInner extends ProxyResource {
+ /*
+ * Resource properties.
+ */
+ private AdvancedThreatProtectionProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of AdvancedThreatProtectionInner class.
+ */
+ public AdvancedThreatProtectionInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private AdvancedThreatProtectionProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the creationTime property: Specifies the UTC creation time of the policy.
+ *
+ * @return the creationTime value.
+ */
+ public OffsetDateTime creationTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().creationTime();
+ }
+
+ /**
+ * Get the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled
+ * or a state has not been applied yet on the specific database or server.
+ *
+ * @return the state value.
+ */
+ public AdvancedThreatProtectionState state() {
+ return this.innerProperties() == null ? null : this.innerProperties().state();
+ }
+
+ /**
+ * Set the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled
+ * or a state has not been applied yet on the specific database or server.
+ *
+ * @param state the state value to set.
+ * @return the AdvancedThreatProtectionInner object itself.
+ */
+ public AdvancedThreatProtectionInner withState(AdvancedThreatProtectionState state) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AdvancedThreatProtectionProperties();
+ }
+ this.innerProperties().withState(state);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the Threat Protection.
+ *
+ * @return the provisioningState value.
+ */
+ public AdvancedThreatProtectionProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AdvancedThreatProtectionInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AdvancedThreatProtectionInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the AdvancedThreatProtectionInner.
+ */
+ public static AdvancedThreatProtectionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AdvancedThreatProtectionInner deserializedAdvancedThreatProtectionInner
+ = new AdvancedThreatProtectionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedAdvancedThreatProtectionInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedAdvancedThreatProtectionInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedAdvancedThreatProtectionInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedAdvancedThreatProtectionInner.innerProperties
+ = AdvancedThreatProtectionProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedAdvancedThreatProtectionInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAdvancedThreatProtectionInner;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionProperties.java
new file mode 100644
index 000000000000..72b33efa1a82
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionProperties.java
@@ -0,0 +1,128 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionProvisioningState;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+
+/**
+ * Properties of an Advanced Threat Protection setting.
+ */
+@Fluent
+public final class AdvancedThreatProtectionProperties implements JsonSerializable {
+ /*
+ * Specifies the UTC creation time of the policy.
+ */
+ private OffsetDateTime creationTime;
+
+ /*
+ * Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been
+ * applied yet on the specific database or server.
+ */
+ private AdvancedThreatProtectionState state;
+
+ /*
+ * Provisioning state of the Threat Protection.
+ */
+ private AdvancedThreatProtectionProvisioningState provisioningState;
+
+ /**
+ * Creates an instance of AdvancedThreatProtectionProperties class.
+ */
+ public AdvancedThreatProtectionProperties() {
+ }
+
+ /**
+ * Get the creationTime property: Specifies the UTC creation time of the policy.
+ *
+ * @return the creationTime value.
+ */
+ public OffsetDateTime creationTime() {
+ return this.creationTime;
+ }
+
+ /**
+ * Get the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled
+ * or a state has not been applied yet on the specific database or server.
+ *
+ * @return the state value.
+ */
+ public AdvancedThreatProtectionState state() {
+ return this.state;
+ }
+
+ /**
+ * Set the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled
+ * or a state has not been applied yet on the specific database or server.
+ *
+ * @param state the state value to set.
+ * @return the AdvancedThreatProtectionProperties object itself.
+ */
+ public AdvancedThreatProtectionProperties withState(AdvancedThreatProtectionState state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the Threat Protection.
+ *
+ * @return the provisioningState value.
+ */
+ public AdvancedThreatProtectionProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AdvancedThreatProtectionProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AdvancedThreatProtectionProperties if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the AdvancedThreatProtectionProperties.
+ */
+ public static AdvancedThreatProtectionProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AdvancedThreatProtectionProperties deserializedAdvancedThreatProtectionProperties
+ = new AdvancedThreatProtectionProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("creationTime".equals(fieldName)) {
+ deserializedAdvancedThreatProtectionProperties.creationTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("state".equals(fieldName)) {
+ deserializedAdvancedThreatProtectionProperties.state
+ = AdvancedThreatProtectionState.fromString(reader.getString());
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedAdvancedThreatProtectionProperties.provisioningState
+ = AdvancedThreatProtectionProvisioningState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAdvancedThreatProtectionProperties;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionUpdateProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionUpdateProperties.java
new file mode 100644
index 000000000000..7de99e927bdb
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AdvancedThreatProtectionUpdateProperties.java
@@ -0,0 +1,93 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState;
+import java.io.IOException;
+
+/**
+ * Properties of Advanced Threat Protection that can be updated.
+ */
+@Fluent
+public final class AdvancedThreatProtectionUpdateProperties
+ implements JsonSerializable {
+ /*
+ * Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been
+ * applied yet on the specific database or server.
+ */
+ private AdvancedThreatProtectionState state;
+
+ /**
+ * Creates an instance of AdvancedThreatProtectionUpdateProperties class.
+ */
+ public AdvancedThreatProtectionUpdateProperties() {
+ }
+
+ /**
+ * Get the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled
+ * or a state has not been applied yet on the specific database or server.
+ *
+ * @return the state value.
+ */
+ public AdvancedThreatProtectionState state() {
+ return this.state;
+ }
+
+ /**
+ * Set the state property: Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled
+ * or a state has not been applied yet on the specific database or server.
+ *
+ * @param state the state value to set.
+ * @return the AdvancedThreatProtectionUpdateProperties object itself.
+ */
+ public AdvancedThreatProtectionUpdateProperties withState(AdvancedThreatProtectionState state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AdvancedThreatProtectionUpdateProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AdvancedThreatProtectionUpdateProperties if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the AdvancedThreatProtectionUpdateProperties.
+ */
+ public static AdvancedThreatProtectionUpdateProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AdvancedThreatProtectionUpdateProperties deserializedAdvancedThreatProtectionUpdateProperties
+ = new AdvancedThreatProtectionUpdateProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("state".equals(fieldName)) {
+ deserializedAdvancedThreatProtectionUpdateProperties.state
+ = AdvancedThreatProtectionState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAdvancedThreatProtectionUpdateProperties;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AzureADAdministratorInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AzureADAdministratorInner.java
new file mode 100644
index 000000000000..9e6af00c1e46
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/AzureADAdministratorInner.java
@@ -0,0 +1,259 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorType;
+import java.io.IOException;
+
+/**
+ * Represents a Administrator.
+ */
+@Fluent
+public final class AzureADAdministratorInner extends ProxyResource {
+ /*
+ * The properties of an administrator.
+ */
+ private AdministratorProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of AzureADAdministratorInner class.
+ */
+ public AzureADAdministratorInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of an administrator.
+ *
+ * @return the innerProperties value.
+ */
+ private AdministratorProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the administratorType property: Type of the sever administrator.
+ *
+ * @return the administratorType value.
+ */
+ public AdministratorType administratorType() {
+ return this.innerProperties() == null ? null : this.innerProperties().administratorType();
+ }
+
+ /**
+ * Set the administratorType property: Type of the sever administrator.
+ *
+ * @param administratorType the administratorType value to set.
+ * @return the AzureADAdministratorInner object itself.
+ */
+ public AzureADAdministratorInner withAdministratorType(AdministratorType administratorType) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AdministratorProperties();
+ }
+ this.innerProperties().withAdministratorType(administratorType);
+ return this;
+ }
+
+ /**
+ * Get the login property: Login name of the server administrator.
+ *
+ * @return the login value.
+ */
+ public String login() {
+ return this.innerProperties() == null ? null : this.innerProperties().login();
+ }
+
+ /**
+ * Set the login property: Login name of the server administrator.
+ *
+ * @param login the login value to set.
+ * @return the AzureADAdministratorInner object itself.
+ */
+ public AzureADAdministratorInner withLogin(String login) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AdministratorProperties();
+ }
+ this.innerProperties().withLogin(login);
+ return this;
+ }
+
+ /**
+ * Get the sid property: SID (object ID) of the server administrator.
+ *
+ * @return the sid value.
+ */
+ public String sid() {
+ return this.innerProperties() == null ? null : this.innerProperties().sid();
+ }
+
+ /**
+ * Set the sid property: SID (object ID) of the server administrator.
+ *
+ * @param sid the sid value to set.
+ * @return the AzureADAdministratorInner object itself.
+ */
+ public AzureADAdministratorInner withSid(String sid) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AdministratorProperties();
+ }
+ this.innerProperties().withSid(sid);
+ return this;
+ }
+
+ /**
+ * Get the tenantId property: Tenant ID of the administrator.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.innerProperties() == null ? null : this.innerProperties().tenantId();
+ }
+
+ /**
+ * Set the tenantId property: Tenant ID of the administrator.
+ *
+ * @param tenantId the tenantId value to set.
+ * @return the AzureADAdministratorInner object itself.
+ */
+ public AzureADAdministratorInner withTenantId(String tenantId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AdministratorProperties();
+ }
+ this.innerProperties().withTenantId(tenantId);
+ return this;
+ }
+
+ /**
+ * Get the identityResourceId property: The resource id of the identity used for AAD Authentication.
+ *
+ * @return the identityResourceId value.
+ */
+ public String identityResourceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().identityResourceId();
+ }
+
+ /**
+ * Set the identityResourceId property: The resource id of the identity used for AAD Authentication.
+ *
+ * @param identityResourceId the identityResourceId value to set.
+ * @return the AzureADAdministratorInner object itself.
+ */
+ public AzureADAdministratorInner withIdentityResourceId(String identityResourceId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AdministratorProperties();
+ }
+ this.innerProperties().withIdentityResourceId(identityResourceId);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AzureADAdministratorInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AzureADAdministratorInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the AzureADAdministratorInner.
+ */
+ public static AzureADAdministratorInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AzureADAdministratorInner deserializedAzureADAdministratorInner = new AzureADAdministratorInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedAzureADAdministratorInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedAzureADAdministratorInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedAzureADAdministratorInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedAzureADAdministratorInner.innerProperties = AdministratorProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedAzureADAdministratorInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAzureADAdministratorInner;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/BackupAndExportResponseInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/BackupAndExportResponseInner.java
new file mode 100644
index 000000000000..12aa20211506
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/BackupAndExportResponseInner.java
@@ -0,0 +1,267 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatus;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * Represents BackupAndExportAPI Response.
+ */
+@Immutable
+public final class BackupAndExportResponseInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private BackupAndExportResponseProperties innerProperties;
+
+ /*
+ * The error object.
+ */
+ private ManagementError error;
+
+ /*
+ * The name of the backup and export response.
+ */
+ private String name;
+
+ /*
+ * The operation status
+ */
+ private OperationStatus status;
+
+ /*
+ * Start time
+ */
+ private OffsetDateTime startTime;
+
+ /*
+ * End time
+ */
+ private OffsetDateTime endTime;
+
+ /*
+ * Operation progress (0-100).
+ */
+ private Double percentComplete;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of BackupAndExportResponseInner class.
+ */
+ private BackupAndExportResponseInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private BackupAndExportResponseProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the error property: The error object.
+ *
+ * @return the error value.
+ */
+ public ManagementError error() {
+ return this.error;
+ }
+
+ /**
+ * Get the name property: The name of the backup and export response.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the status property: The operation status.
+ *
+ * @return the status value.
+ */
+ public OperationStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Get the startTime property: Start time.
+ *
+ * @return the startTime value.
+ */
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Get the endTime property: End time.
+ *
+ * @return the endTime value.
+ */
+ public OffsetDateTime endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Get the percentComplete property: Operation progress (0-100).
+ *
+ * @return the percentComplete value.
+ */
+ public Double percentComplete() {
+ return this.percentComplete;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the datasourceSizeInBytes property: Size of datasource in bytes.
+ *
+ * @return the datasourceSizeInBytes value.
+ */
+ public Long datasourceSizeInBytes() {
+ return this.innerProperties() == null ? null : this.innerProperties().datasourceSizeInBytes();
+ }
+
+ /**
+ * Get the dataTransferredInBytes property: Data transferred in bytes.
+ *
+ * @return the dataTransferredInBytes value.
+ */
+ public Long dataTransferredInBytes() {
+ return this.innerProperties() == null ? null : this.innerProperties().dataTransferredInBytes();
+ }
+
+ /**
+ * Get the backupMetadata property: Metadata related to backup to be stored for restoring resource in key-value
+ * pairs.
+ *
+ * @return the backupMetadata value.
+ */
+ public String backupMetadata() {
+ return this.innerProperties() == null ? null : this.innerProperties().backupMetadata();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ jsonWriter.writeJsonField("error", this.error);
+ jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString());
+ jsonWriter.writeStringField("startTime",
+ this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime));
+ jsonWriter.writeStringField("endTime",
+ this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime));
+ jsonWriter.writeNumberField("percentComplete", this.percentComplete);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of BackupAndExportResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of BackupAndExportResponseInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the BackupAndExportResponseInner.
+ */
+ public static BackupAndExportResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ BackupAndExportResponseInner deserializedBackupAndExportResponseInner = new BackupAndExportResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedBackupAndExportResponseInner.id = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedBackupAndExportResponseInner.type = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedBackupAndExportResponseInner.name = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedBackupAndExportResponseInner.innerProperties
+ = BackupAndExportResponseProperties.fromJson(reader);
+ } else if ("error".equals(fieldName)) {
+ deserializedBackupAndExportResponseInner.error = ManagementError.fromJson(reader);
+ } else if ("status".equals(fieldName)) {
+ deserializedBackupAndExportResponseInner.status = OperationStatus.fromString(reader.getString());
+ } else if ("startTime".equals(fieldName)) {
+ deserializedBackupAndExportResponseInner.startTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("endTime".equals(fieldName)) {
+ deserializedBackupAndExportResponseInner.endTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("percentComplete".equals(fieldName)) {
+ deserializedBackupAndExportResponseInner.percentComplete
+ = reader.getNullable(JsonReader::getDouble);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedBackupAndExportResponseInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedBackupAndExportResponseInner;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/BackupAndExportResponseProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/BackupAndExportResponseProperties.java
new file mode 100644
index 000000000000..118ffc87d9de
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/BackupAndExportResponseProperties.java
@@ -0,0 +1,112 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * BackupAndExport Response Properties.
+ */
+@Immutable
+public final class BackupAndExportResponseProperties implements JsonSerializable {
+ /*
+ * Size of datasource in bytes
+ */
+ private Long datasourceSizeInBytes;
+
+ /*
+ * Data transferred in bytes
+ */
+ private Long dataTransferredInBytes;
+
+ /*
+ * Metadata related to backup to be stored for restoring resource in key-value pairs.
+ */
+ private String backupMetadata;
+
+ /**
+ * Creates an instance of BackupAndExportResponseProperties class.
+ */
+ private BackupAndExportResponseProperties() {
+ }
+
+ /**
+ * Get the datasourceSizeInBytes property: Size of datasource in bytes.
+ *
+ * @return the datasourceSizeInBytes value.
+ */
+ public Long datasourceSizeInBytes() {
+ return this.datasourceSizeInBytes;
+ }
+
+ /**
+ * Get the dataTransferredInBytes property: Data transferred in bytes.
+ *
+ * @return the dataTransferredInBytes value.
+ */
+ public Long dataTransferredInBytes() {
+ return this.dataTransferredInBytes;
+ }
+
+ /**
+ * Get the backupMetadata property: Metadata related to backup to be stored for restoring resource in key-value
+ * pairs.
+ *
+ * @return the backupMetadata value.
+ */
+ public String backupMetadata() {
+ return this.backupMetadata;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeNumberField("datasourceSizeInBytes", this.datasourceSizeInBytes);
+ jsonWriter.writeNumberField("dataTransferredInBytes", this.dataTransferredInBytes);
+ jsonWriter.writeStringField("backupMetadata", this.backupMetadata);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of BackupAndExportResponseProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of BackupAndExportResponseProperties if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the BackupAndExportResponseProperties.
+ */
+ public static BackupAndExportResponseProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ BackupAndExportResponseProperties deserializedBackupAndExportResponseProperties
+ = new BackupAndExportResponseProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("datasourceSizeInBytes".equals(fieldName)) {
+ deserializedBackupAndExportResponseProperties.datasourceSizeInBytes
+ = reader.getNullable(JsonReader::getLong);
+ } else if ("dataTransferredInBytes".equals(fieldName)) {
+ deserializedBackupAndExportResponseProperties.dataTransferredInBytes
+ = reader.getNullable(JsonReader::getLong);
+ } else if ("backupMetadata".equals(fieldName)) {
+ deserializedBackupAndExportResponseProperties.backupMetadata = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedBackupAndExportResponseProperties;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityInner.java
new file mode 100644
index 000000000000..6c93c89f417a
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityInner.java
@@ -0,0 +1,183 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.mysqlflexibleserver.models.FeatureProperty;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServerEditionCapabilityV2;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServerVersionCapabilityV2;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Represents a location capability set.
+ */
+@Immutable
+public final class CapabilityInner extends ProxyResource {
+ /*
+ * The properties of a location capability set.
+ */
+ private CapabilityPropertiesV2 innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of CapabilityInner class.
+ */
+ private CapabilityInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of a location capability set.
+ *
+ * @return the innerProperties value.
+ */
+ private CapabilityPropertiesV2 innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the supportedGeoBackupRegions property: supported geo backup regions.
+ *
+ * @return the supportedGeoBackupRegions value.
+ */
+ public List supportedGeoBackupRegions() {
+ return this.innerProperties() == null ? null : this.innerProperties().supportedGeoBackupRegions();
+ }
+
+ /**
+ * Get the supportedFlexibleServerEditions property: A list of supported flexible server editions.
+ *
+ * @return the supportedFlexibleServerEditions value.
+ */
+ public List supportedFlexibleServerEditions() {
+ return this.innerProperties() == null ? null : this.innerProperties().supportedFlexibleServerEditions();
+ }
+
+ /**
+ * Get the supportedServerVersions property: A list of supported server versions.
+ *
+ * @return the supportedServerVersions value.
+ */
+ public List supportedServerVersions() {
+ return this.innerProperties() == null ? null : this.innerProperties().supportedServerVersions();
+ }
+
+ /**
+ * Get the supportedFeatures property: A list of supported features.
+ *
+ * @return the supportedFeatures value.
+ */
+ public List supportedFeatures() {
+ return this.innerProperties() == null ? null : this.innerProperties().supportedFeatures();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CapabilityInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CapabilityInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the CapabilityInner.
+ */
+ public static CapabilityInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CapabilityInner deserializedCapabilityInner = new CapabilityInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedCapabilityInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedCapabilityInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedCapabilityInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedCapabilityInner.innerProperties = CapabilityPropertiesV2.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedCapabilityInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCapabilityInner;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityPropertiesInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityPropertiesInner.java
index 45ca9dcce86e..f7f2d50852a6 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityPropertiesInner.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityPropertiesInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
@@ -41,7 +41,7 @@ public final class CapabilityPropertiesInner implements JsonSerializable supportedFlexibleServerEditions() {
return this.supportedFlexibleServerEditions;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (supportedFlexibleServerEditions() != null) {
- supportedFlexibleServerEditions().forEach(e -> e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityPropertiesV2.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityPropertiesV2.java
new file mode 100644
index 000000000000..c2caa4533da1
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/CapabilityPropertiesV2.java
@@ -0,0 +1,133 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.mysqlflexibleserver.models.FeatureProperty;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServerEditionCapabilityV2;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServerVersionCapabilityV2;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Location capability.
+ */
+@Immutable
+public final class CapabilityPropertiesV2 implements JsonSerializable {
+ /*
+ * supported geo backup regions
+ */
+ private List supportedGeoBackupRegions;
+
+ /*
+ * A list of supported flexible server editions.
+ */
+ private List supportedFlexibleServerEditions;
+
+ /*
+ * A list of supported server versions.
+ */
+ private List supportedServerVersions;
+
+ /*
+ * A list of supported features.
+ */
+ private List supportedFeatures;
+
+ /**
+ * Creates an instance of CapabilityPropertiesV2 class.
+ */
+ private CapabilityPropertiesV2() {
+ }
+
+ /**
+ * Get the supportedGeoBackupRegions property: supported geo backup regions.
+ *
+ * @return the supportedGeoBackupRegions value.
+ */
+ public List supportedGeoBackupRegions() {
+ return this.supportedGeoBackupRegions;
+ }
+
+ /**
+ * Get the supportedFlexibleServerEditions property: A list of supported flexible server editions.
+ *
+ * @return the supportedFlexibleServerEditions value.
+ */
+ public List supportedFlexibleServerEditions() {
+ return this.supportedFlexibleServerEditions;
+ }
+
+ /**
+ * Get the supportedServerVersions property: A list of supported server versions.
+ *
+ * @return the supportedServerVersions value.
+ */
+ public List supportedServerVersions() {
+ return this.supportedServerVersions;
+ }
+
+ /**
+ * Get the supportedFeatures property: A list of supported features.
+ *
+ * @return the supportedFeatures value.
+ */
+ public List supportedFeatures() {
+ return this.supportedFeatures;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CapabilityPropertiesV2 from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CapabilityPropertiesV2 if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CapabilityPropertiesV2.
+ */
+ public static CapabilityPropertiesV2 fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CapabilityPropertiesV2 deserializedCapabilityPropertiesV2 = new CapabilityPropertiesV2();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("supportedGeoBackupRegions".equals(fieldName)) {
+ List supportedGeoBackupRegions = reader.readArray(reader1 -> reader1.getString());
+ deserializedCapabilityPropertiesV2.supportedGeoBackupRegions = supportedGeoBackupRegions;
+ } else if ("supportedFlexibleServerEditions".equals(fieldName)) {
+ List supportedFlexibleServerEditions
+ = reader.readArray(reader1 -> ServerEditionCapabilityV2.fromJson(reader1));
+ deserializedCapabilityPropertiesV2.supportedFlexibleServerEditions
+ = supportedFlexibleServerEditions;
+ } else if ("supportedServerVersions".equals(fieldName)) {
+ List supportedServerVersions
+ = reader.readArray(reader1 -> ServerVersionCapabilityV2.fromJson(reader1));
+ deserializedCapabilityPropertiesV2.supportedServerVersions = supportedServerVersions;
+ } else if ("supportedFeatures".equals(fieldName)) {
+ List supportedFeatures
+ = reader.readArray(reader1 -> FeatureProperty.fromJson(reader1));
+ deserializedCapabilityPropertiesV2.supportedFeatures = supportedFeatures;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCapabilityPropertiesV2;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationForBatchUpdateProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationForBatchUpdateProperties.java
index 720aeb6e3835..3045797604c2 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationForBatchUpdateProperties.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationForBatchUpdateProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
@@ -73,14 +73,6 @@ public ConfigurationForBatchUpdateProperties withSource(String source) {
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationInner.java
index abffbd42f30f..a31117734f3d 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationInner.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
@@ -27,7 +27,7 @@ public final class ConfigurationInner extends ProxyResource {
private ConfigurationProperties innerProperties;
/*
- * The system metadata relating to this resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
private SystemData systemData;
@@ -62,7 +62,7 @@ private ConfigurationProperties innerProperties() {
}
/**
- * Get the systemData property: The system metadata relating to this resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
@@ -123,6 +123,29 @@ public ConfigurationInner withValue(String value) {
return this;
}
+ /**
+ * Get the currentValue property: Current value of the configuration.
+ *
+ * @return the currentValue value.
+ */
+ public String currentValue() {
+ return this.innerProperties() == null ? null : this.innerProperties().currentValue();
+ }
+
+ /**
+ * Set the currentValue property: Current value of the configuration.
+ *
+ * @param currentValue the currentValue value to set.
+ * @return the ConfigurationInner object itself.
+ */
+ public ConfigurationInner withCurrentValue(String currentValue) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ConfigurationProperties();
+ }
+ this.innerProperties().withCurrentValue(currentValue);
+ return this;
+ }
+
/**
* Get the description property: Description of the configuration.
*
@@ -132,6 +155,15 @@ public String description() {
return this.innerProperties() == null ? null : this.innerProperties().description();
}
+ /**
+ * Get the documentationLink property: The link used to get the document from community or Azure site.
+ *
+ * @return the documentationLink value.
+ */
+ public String documentationLink() {
+ return this.innerProperties() == null ? null : this.innerProperties().documentationLink();
+ }
+
/**
* Get the defaultValue property: Default value of the configuration.
*
@@ -209,17 +241,6 @@ public IsDynamicConfig isDynamicConfig() {
return this.innerProperties() == null ? null : this.innerProperties().isDynamicConfig();
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationListResultInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationListResultInner.java
index d41f3bf2bfd1..6a41065cf6cb 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationListResultInner.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationListResultInner.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -13,28 +13,28 @@
import java.util.List;
/**
- * A list of server configurations.
+ * The response of a Configuration list operation.
*/
-@Fluent
+@Immutable
public final class ConfigurationListResultInner implements JsonSerializable {
/*
- * The list of server configurations.
+ * The Configuration items on this page
*/
private List value;
/*
- * The link used to get the next page of operations.
+ * The link to the next page of items
*/
private String nextLink;
/**
* Creates an instance of ConfigurationListResultInner class.
*/
- public ConfigurationListResultInner() {
+ private ConfigurationListResultInner() {
}
/**
- * Get the value property: The list of server configurations.
+ * Get the value property: The Configuration items on this page.
*
* @return the value value.
*/
@@ -43,18 +43,7 @@ public List value() {
}
/**
- * Set the value property: The list of server configurations.
- *
- * @param value the value value to set.
- * @return the ConfigurationListResultInner object itself.
- */
- public ConfigurationListResultInner withValue(List value) {
- this.value = value;
- return this;
- }
-
- /**
- * Get the nextLink property: The link used to get the next page of operations.
+ * Get the nextLink property: The link to the next page of items.
*
* @return the nextLink value.
*/
@@ -62,28 +51,6 @@ public String nextLink() {
return this.nextLink;
}
- /**
- * Set the nextLink property: The link used to get the next page of operations.
- *
- * @param nextLink the nextLink value to set.
- * @return the ConfigurationListResultInner object itself.
- */
- public ConfigurationListResultInner withNextLink(String nextLink) {
- this.nextLink = nextLink;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (value() != null) {
- value().forEach(e -> e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationProperties.java
index 8c29eaa6b186..86c2315e4257 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationProperties.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ConfigurationProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
@@ -25,11 +25,21 @@ public final class ConfigurationProperties implements JsonSerializable {
/*
@@ -25,7 +25,7 @@ public final class GetPrivateDnsZoneSuffixResponseInner
/**
* Creates an instance of GetPrivateDnsZoneSuffixResponseInner class.
*/
- public GetPrivateDnsZoneSuffixResponseInner() {
+ private GetPrivateDnsZoneSuffixResponseInner() {
}
/**
@@ -37,25 +37,6 @@ public String privateDnsZoneSuffix() {
return this.privateDnsZoneSuffix;
}
- /**
- * Set the privateDnsZoneSuffix property: Represents the private DNS zone suffix.
- *
- * @param privateDnsZoneSuffix the privateDnsZoneSuffix value to set.
- * @return the GetPrivateDnsZoneSuffixResponseInner object itself.
- */
- public GetPrivateDnsZoneSuffixResponseInner withPrivateDnsZoneSuffix(String privateDnsZoneSuffix) {
- this.privateDnsZoneSuffix = privateDnsZoneSuffix;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/HighAvailabilityValidationEstimationInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/HighAvailabilityValidationEstimationInner.java
new file mode 100644
index 000000000000..faf9a7c5da3a
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/HighAvailabilityValidationEstimationInner.java
@@ -0,0 +1,123 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * High availability validation properties of a server.
+ */
+@Fluent
+public final class HighAvailabilityValidationEstimationInner
+ implements JsonSerializable {
+ /*
+ * Estimated seconds of downtime for the deployment.
+ */
+ private Integer estimatedDowntime;
+
+ /*
+ * Scheduled Availability zone of the standby server.
+ */
+ private String scheduledStandbyAvailabilityZone;
+
+ /*
+ * Expected Availability zone of the standby server.
+ */
+ private String expectedStandbyAvailabilityZone;
+
+ /**
+ * Creates an instance of HighAvailabilityValidationEstimationInner class.
+ */
+ public HighAvailabilityValidationEstimationInner() {
+ }
+
+ /**
+ * Get the estimatedDowntime property: Estimated seconds of downtime for the deployment.
+ *
+ * @return the estimatedDowntime value.
+ */
+ public Integer estimatedDowntime() {
+ return this.estimatedDowntime;
+ }
+
+ /**
+ * Get the scheduledStandbyAvailabilityZone property: Scheduled Availability zone of the standby server.
+ *
+ * @return the scheduledStandbyAvailabilityZone value.
+ */
+ public String scheduledStandbyAvailabilityZone() {
+ return this.scheduledStandbyAvailabilityZone;
+ }
+
+ /**
+ * Get the expectedStandbyAvailabilityZone property: Expected Availability zone of the standby server.
+ *
+ * @return the expectedStandbyAvailabilityZone value.
+ */
+ public String expectedStandbyAvailabilityZone() {
+ return this.expectedStandbyAvailabilityZone;
+ }
+
+ /**
+ * Set the expectedStandbyAvailabilityZone property: Expected Availability zone of the standby server.
+ *
+ * @param expectedStandbyAvailabilityZone the expectedStandbyAvailabilityZone value to set.
+ * @return the HighAvailabilityValidationEstimationInner object itself.
+ */
+ public HighAvailabilityValidationEstimationInner
+ withExpectedStandbyAvailabilityZone(String expectedStandbyAvailabilityZone) {
+ this.expectedStandbyAvailabilityZone = expectedStandbyAvailabilityZone;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("expectedStandbyAvailabilityZone", this.expectedStandbyAvailabilityZone);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of HighAvailabilityValidationEstimationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of HighAvailabilityValidationEstimationInner if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the HighAvailabilityValidationEstimationInner.
+ */
+ public static HighAvailabilityValidationEstimationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ HighAvailabilityValidationEstimationInner deserializedHighAvailabilityValidationEstimationInner
+ = new HighAvailabilityValidationEstimationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("estimatedDowntime".equals(fieldName)) {
+ deserializedHighAvailabilityValidationEstimationInner.estimatedDowntime
+ = reader.getNullable(JsonReader::getInt);
+ } else if ("scheduledStandbyAvailabilityZone".equals(fieldName)) {
+ deserializedHighAvailabilityValidationEstimationInner.scheduledStandbyAvailabilityZone
+ = reader.getString();
+ } else if ("expectedStandbyAvailabilityZone".equals(fieldName)) {
+ deserializedHighAvailabilityValidationEstimationInner.expectedStandbyAvailabilityZone
+ = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedHighAvailabilityValidationEstimationInner;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/LogFileInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/LogFileInner.java
new file mode 100644
index 000000000000..bb4094ae8d57
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/LogFileInner.java
@@ -0,0 +1,189 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+
+/**
+ * Represents a logFile.
+ */
+@Immutable
+public final class LogFileInner extends ProxyResource {
+ /*
+ * The properties of a logFile.
+ */
+ private LogFileProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of LogFileInner class.
+ */
+ private LogFileInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of a logFile.
+ *
+ * @return the innerProperties value.
+ */
+ private LogFileProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the sizeInKB property: The size in kb of the logFile.
+ *
+ * @return the sizeInKB value.
+ */
+ public Long sizeInKB() {
+ return this.innerProperties() == null ? null : this.innerProperties().sizeInKB();
+ }
+
+ /**
+ * Get the createdTime property: Creation timestamp of the log file.
+ *
+ * @return the createdTime value.
+ */
+ public OffsetDateTime createdTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().createdTime();
+ }
+
+ /**
+ * Get the type property: Type of the log file.
+ *
+ * @return the type value.
+ */
+ public String typePropertiesType() {
+ return this.innerProperties() == null ? null : this.innerProperties().type();
+ }
+
+ /**
+ * Get the lastModifiedTime property: Last modified timestamp of the log file.
+ *
+ * @return the lastModifiedTime value.
+ */
+ public OffsetDateTime lastModifiedTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTime();
+ }
+
+ /**
+ * Get the url property: The url to download the log file from.
+ *
+ * @return the url value.
+ */
+ public String url() {
+ return this.innerProperties() == null ? null : this.innerProperties().url();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LogFileInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LogFileInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the LogFileInner.
+ */
+ public static LogFileInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LogFileInner deserializedLogFileInner = new LogFileInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedLogFileInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedLogFileInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedLogFileInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedLogFileInner.innerProperties = LogFileProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedLogFileInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLogFileInner;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/LogFileProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/LogFileProperties.java
new file mode 100644
index 000000000000..79821d3de4e3
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/LogFileProperties.java
@@ -0,0 +1,151 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * The properties of a logFile.
+ */
+@Immutable
+public final class LogFileProperties implements JsonSerializable {
+ /*
+ * The size in kb of the logFile.
+ */
+ private Long sizeInKB;
+
+ /*
+ * Creation timestamp of the log file.
+ */
+ private OffsetDateTime createdTime;
+
+ /*
+ * Type of the log file.
+ */
+ private String type;
+
+ /*
+ * Last modified timestamp of the log file.
+ */
+ private OffsetDateTime lastModifiedTime;
+
+ /*
+ * The url to download the log file from.
+ */
+ private String url;
+
+ /**
+ * Creates an instance of LogFileProperties class.
+ */
+ private LogFileProperties() {
+ }
+
+ /**
+ * Get the sizeInKB property: The size in kb of the logFile.
+ *
+ * @return the sizeInKB value.
+ */
+ public Long sizeInKB() {
+ return this.sizeInKB;
+ }
+
+ /**
+ * Get the createdTime property: Creation timestamp of the log file.
+ *
+ * @return the createdTime value.
+ */
+ public OffsetDateTime createdTime() {
+ return this.createdTime;
+ }
+
+ /**
+ * Get the type property: Type of the log file.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the lastModifiedTime property: Last modified timestamp of the log file.
+ *
+ * @return the lastModifiedTime value.
+ */
+ public OffsetDateTime lastModifiedTime() {
+ return this.lastModifiedTime;
+ }
+
+ /**
+ * Get the url property: The url to download the log file from.
+ *
+ * @return the url value.
+ */
+ public String url() {
+ return this.url;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeNumberField("sizeInKB", this.sizeInKB);
+ jsonWriter.writeStringField("createdTime",
+ this.createdTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.createdTime));
+ jsonWriter.writeStringField("type", this.type);
+ jsonWriter.writeStringField("lastModifiedTime",
+ this.lastModifiedTime == null
+ ? null
+ : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastModifiedTime));
+ jsonWriter.writeStringField("url", this.url);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LogFileProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LogFileProperties if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the LogFileProperties.
+ */
+ public static LogFileProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LogFileProperties deserializedLogFileProperties = new LogFileProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("sizeInKB".equals(fieldName)) {
+ deserializedLogFileProperties.sizeInKB = reader.getNullable(JsonReader::getLong);
+ } else if ("createdTime".equals(fieldName)) {
+ deserializedLogFileProperties.createdTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("type".equals(fieldName)) {
+ deserializedLogFileProperties.type = reader.getString();
+ } else if ("lastModifiedTime".equals(fieldName)) {
+ deserializedLogFileProperties.lastModifiedTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("url".equals(fieldName)) {
+ deserializedLogFileProperties.url = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLogFileProperties;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/MaintenanceInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/MaintenanceInner.java
new file mode 100644
index 000000000000..f3ede450eb27
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/MaintenanceInner.java
@@ -0,0 +1,246 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceProvisioningState;
+import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceState;
+import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceType;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+
+/**
+ * Represents a maintenance.
+ */
+@Immutable
+public final class MaintenanceInner extends ProxyResource {
+ /*
+ * The properties of a maintenance
+ */
+ private MaintenanceProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of MaintenanceInner class.
+ */
+ private MaintenanceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of a maintenance.
+ *
+ * @return the innerProperties value.
+ */
+ private MaintenanceProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the maintenanceType property: A string defines maintenance type.
+ *
+ * @return the maintenanceType value.
+ */
+ public MaintenanceType maintenanceType() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenanceType();
+ }
+
+ /**
+ * Get the maintenanceState property: A string describes the maintenance status.
+ *
+ * @return the maintenanceState value.
+ */
+ public MaintenanceState maintenanceState() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenanceState();
+ }
+
+ /**
+ * Get the maintenanceStartTime property: The start time for a maintenance.
+ *
+ * @return the maintenanceStartTime value.
+ */
+ public OffsetDateTime maintenanceStartTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenanceStartTime();
+ }
+
+ /**
+ * Get the maintenanceEndTime property: The end time for a maintenance.
+ *
+ * @return the maintenanceEndTime value.
+ */
+ public OffsetDateTime maintenanceEndTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenanceEndTime();
+ }
+
+ /**
+ * Get the maintenanceExecutionStartTime property: The start time for a maintenance execution.
+ *
+ * @return the maintenanceExecutionStartTime value.
+ */
+ public OffsetDateTime maintenanceExecutionStartTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenanceExecutionStartTime();
+ }
+
+ /**
+ * Get the maintenanceExecutionEndTime property: The end time for a maintenance execution.
+ *
+ * @return the maintenanceExecutionEndTime value.
+ */
+ public OffsetDateTime maintenanceExecutionEndTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenanceExecutionEndTime();
+ }
+
+ /**
+ * Get the maintenanceAvailableScheduleMinTime property: The min time the maintenance can be rescheduled.
+ *
+ * @return the maintenanceAvailableScheduleMinTime value.
+ */
+ public OffsetDateTime maintenanceAvailableScheduleMinTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenanceAvailableScheduleMinTime();
+ }
+
+ /**
+ * Get the maintenanceAvailableScheduleMaxTime property: The max time the maintenance can be rescheduled.
+ *
+ * @return the maintenanceAvailableScheduleMaxTime value.
+ */
+ public OffsetDateTime maintenanceAvailableScheduleMaxTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenanceAvailableScheduleMaxTime();
+ }
+
+ /**
+ * Get the maintenanceTitle property: The maintenance title.
+ *
+ * @return the maintenanceTitle value.
+ */
+ public String maintenanceTitle() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenanceTitle();
+ }
+
+ /**
+ * Get the maintenanceDescription property: The maintenance description.
+ *
+ * @return the maintenanceDescription value.
+ */
+ public String maintenanceDescription() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenanceDescription();
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the Maintenance.
+ *
+ * @return the provisioningState value.
+ */
+ public MaintenanceProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MaintenanceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MaintenanceInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the MaintenanceInner.
+ */
+ public static MaintenanceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MaintenanceInner deserializedMaintenanceInner = new MaintenanceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedMaintenanceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedMaintenanceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedMaintenanceInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedMaintenanceInner.innerProperties = MaintenanceProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedMaintenanceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMaintenanceInner;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/MaintenanceProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/MaintenanceProperties.java
new file mode 100644
index 000000000000..00e730286f81
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/MaintenanceProperties.java
@@ -0,0 +1,251 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceProvisioningState;
+import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceState;
+import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceType;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * The properties of a maintenance resource.
+ */
+@Immutable
+public final class MaintenanceProperties implements JsonSerializable {
+ /*
+ * A string defines maintenance type.
+ */
+ private MaintenanceType maintenanceType;
+
+ /*
+ * A string describes the maintenance status
+ */
+ private MaintenanceState maintenanceState;
+
+ /*
+ * The start time for a maintenance.
+ */
+ private OffsetDateTime maintenanceStartTime;
+
+ /*
+ * The end time for a maintenance.
+ */
+ private OffsetDateTime maintenanceEndTime;
+
+ /*
+ * The start time for a maintenance execution.
+ */
+ private OffsetDateTime maintenanceExecutionStartTime;
+
+ /*
+ * The end time for a maintenance execution.
+ */
+ private OffsetDateTime maintenanceExecutionEndTime;
+
+ /*
+ * The min time the maintenance can be rescheduled.
+ */
+ private OffsetDateTime maintenanceAvailableScheduleMinTime;
+
+ /*
+ * The max time the maintenance can be rescheduled.
+ */
+ private OffsetDateTime maintenanceAvailableScheduleMaxTime;
+
+ /*
+ * The maintenance title.
+ */
+ private String maintenanceTitle;
+
+ /*
+ * The maintenance description.
+ */
+ private String maintenanceDescription;
+
+ /*
+ * Provisioning state of the Maintenance.
+ */
+ private MaintenanceProvisioningState provisioningState;
+
+ /**
+ * Creates an instance of MaintenanceProperties class.
+ */
+ private MaintenanceProperties() {
+ }
+
+ /**
+ * Get the maintenanceType property: A string defines maintenance type.
+ *
+ * @return the maintenanceType value.
+ */
+ public MaintenanceType maintenanceType() {
+ return this.maintenanceType;
+ }
+
+ /**
+ * Get the maintenanceState property: A string describes the maintenance status.
+ *
+ * @return the maintenanceState value.
+ */
+ public MaintenanceState maintenanceState() {
+ return this.maintenanceState;
+ }
+
+ /**
+ * Get the maintenanceStartTime property: The start time for a maintenance.
+ *
+ * @return the maintenanceStartTime value.
+ */
+ public OffsetDateTime maintenanceStartTime() {
+ return this.maintenanceStartTime;
+ }
+
+ /**
+ * Get the maintenanceEndTime property: The end time for a maintenance.
+ *
+ * @return the maintenanceEndTime value.
+ */
+ public OffsetDateTime maintenanceEndTime() {
+ return this.maintenanceEndTime;
+ }
+
+ /**
+ * Get the maintenanceExecutionStartTime property: The start time for a maintenance execution.
+ *
+ * @return the maintenanceExecutionStartTime value.
+ */
+ public OffsetDateTime maintenanceExecutionStartTime() {
+ return this.maintenanceExecutionStartTime;
+ }
+
+ /**
+ * Get the maintenanceExecutionEndTime property: The end time for a maintenance execution.
+ *
+ * @return the maintenanceExecutionEndTime value.
+ */
+ public OffsetDateTime maintenanceExecutionEndTime() {
+ return this.maintenanceExecutionEndTime;
+ }
+
+ /**
+ * Get the maintenanceAvailableScheduleMinTime property: The min time the maintenance can be rescheduled.
+ *
+ * @return the maintenanceAvailableScheduleMinTime value.
+ */
+ public OffsetDateTime maintenanceAvailableScheduleMinTime() {
+ return this.maintenanceAvailableScheduleMinTime;
+ }
+
+ /**
+ * Get the maintenanceAvailableScheduleMaxTime property: The max time the maintenance can be rescheduled.
+ *
+ * @return the maintenanceAvailableScheduleMaxTime value.
+ */
+ public OffsetDateTime maintenanceAvailableScheduleMaxTime() {
+ return this.maintenanceAvailableScheduleMaxTime;
+ }
+
+ /**
+ * Get the maintenanceTitle property: The maintenance title.
+ *
+ * @return the maintenanceTitle value.
+ */
+ public String maintenanceTitle() {
+ return this.maintenanceTitle;
+ }
+
+ /**
+ * Get the maintenanceDescription property: The maintenance description.
+ *
+ * @return the maintenanceDescription value.
+ */
+ public String maintenanceDescription() {
+ return this.maintenanceDescription;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the Maintenance.
+ *
+ * @return the provisioningState value.
+ */
+ public MaintenanceProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("maintenanceStartTime",
+ this.maintenanceStartTime == null
+ ? null
+ : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.maintenanceStartTime));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MaintenanceProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MaintenanceProperties if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the MaintenanceProperties.
+ */
+ public static MaintenanceProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MaintenanceProperties deserializedMaintenanceProperties = new MaintenanceProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("maintenanceType".equals(fieldName)) {
+ deserializedMaintenanceProperties.maintenanceType = MaintenanceType.fromString(reader.getString());
+ } else if ("maintenanceState".equals(fieldName)) {
+ deserializedMaintenanceProperties.maintenanceState
+ = MaintenanceState.fromString(reader.getString());
+ } else if ("maintenanceStartTime".equals(fieldName)) {
+ deserializedMaintenanceProperties.maintenanceStartTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("maintenanceEndTime".equals(fieldName)) {
+ deserializedMaintenanceProperties.maintenanceEndTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("maintenanceExecutionStartTime".equals(fieldName)) {
+ deserializedMaintenanceProperties.maintenanceExecutionStartTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("maintenanceExecutionEndTime".equals(fieldName)) {
+ deserializedMaintenanceProperties.maintenanceExecutionEndTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("maintenanceAvailableScheduleMinTime".equals(fieldName)) {
+ deserializedMaintenanceProperties.maintenanceAvailableScheduleMinTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("maintenanceAvailableScheduleMaxTime".equals(fieldName)) {
+ deserializedMaintenanceProperties.maintenanceAvailableScheduleMaxTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("maintenanceTitle".equals(fieldName)) {
+ deserializedMaintenanceProperties.maintenanceTitle = reader.getString();
+ } else if ("maintenanceDescription".equals(fieldName)) {
+ deserializedMaintenanceProperties.maintenanceDescription = reader.getString();
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedMaintenanceProperties.provisioningState
+ = MaintenanceProvisioningState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMaintenanceProperties;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/MaintenancePropertiesForUpdate.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/MaintenancePropertiesForUpdate.java
new file mode 100644
index 000000000000..517c4d4247c5
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/MaintenancePropertiesForUpdate.java
@@ -0,0 +1,93 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * The properties of a maintenance update parameter.
+ */
+@Fluent
+public final class MaintenancePropertiesForUpdate implements JsonSerializable {
+ /*
+ * The start time for a maintenance.
+ */
+ private OffsetDateTime maintenanceStartTime;
+
+ /**
+ * Creates an instance of MaintenancePropertiesForUpdate class.
+ */
+ public MaintenancePropertiesForUpdate() {
+ }
+
+ /**
+ * Get the maintenanceStartTime property: The start time for a maintenance.
+ *
+ * @return the maintenanceStartTime value.
+ */
+ public OffsetDateTime maintenanceStartTime() {
+ return this.maintenanceStartTime;
+ }
+
+ /**
+ * Set the maintenanceStartTime property: The start time for a maintenance.
+ *
+ * @param maintenanceStartTime the maintenanceStartTime value to set.
+ * @return the MaintenancePropertiesForUpdate object itself.
+ */
+ public MaintenancePropertiesForUpdate withMaintenanceStartTime(OffsetDateTime maintenanceStartTime) {
+ this.maintenanceStartTime = maintenanceStartTime;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("maintenanceStartTime",
+ this.maintenanceStartTime == null
+ ? null
+ : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.maintenanceStartTime));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MaintenancePropertiesForUpdate from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MaintenancePropertiesForUpdate if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the MaintenancePropertiesForUpdate.
+ */
+ public static MaintenancePropertiesForUpdate fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MaintenancePropertiesForUpdate deserializedMaintenancePropertiesForUpdate
+ = new MaintenancePropertiesForUpdate();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("maintenanceStartTime".equals(fieldName)) {
+ deserializedMaintenancePropertiesForUpdate.maintenanceStartTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMaintenancePropertiesForUpdate;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/NameAvailabilityInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/NameAvailabilityInner.java
index 7ecbed0f8bd1..23ff99aa5fe0 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/NameAvailabilityInner.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/NameAvailabilityInner.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -14,7 +14,7 @@
/**
* Represents a resource name availability.
*/
-@Fluent
+@Immutable
public final class NameAvailabilityInner implements JsonSerializable {
/*
* Error Message.
@@ -34,7 +34,7 @@ public final class NameAvailabilityInner implements JsonSerializable {
/*
- * The name of the operation being performed on this particular object.
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
*/
private String name;
/*
- * The localized display information for this particular operation or action.
+ * Localized display information for this particular operation.
*/
private OperationDisplay display;
/*
- * The intended executor of the operation.
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
*/
- private String origin;
+ private Origin origin;
/*
* Additional descriptions for the operation.
@@ -41,11 +44,12 @@ public final class OperationInner implements JsonSerializable {
/**
* Creates an instance of OperationInner class.
*/
- public OperationInner() {
+ private OperationInner() {
}
/**
- * Get the name property: The name of the operation being performed on this particular object.
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
*
* @return the name value.
*/
@@ -54,18 +58,7 @@ public String name() {
}
/**
- * Set the name property: The name of the operation being performed on this particular object.
- *
- * @param name the name value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withName(String name) {
- this.name = name;
- return this;
- }
-
- /**
- * Get the display property: The localized display information for this particular operation or action.
+ * Get the display property: Localized display information for this particular operation.
*
* @return the display value.
*/
@@ -74,36 +67,15 @@ public OperationDisplay display() {
}
/**
- * Set the display property: The localized display information for this particular operation or action.
- *
- * @param display the display value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withDisplay(OperationDisplay display) {
- this.display = display;
- return this;
- }
-
- /**
- * Get the origin property: The intended executor of the operation.
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
*
* @return the origin value.
*/
- public String origin() {
+ public Origin origin() {
return this.origin;
}
- /**
- * Set the origin property: The intended executor of the operation.
- *
- * @param origin the origin value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withOrigin(String origin) {
- this.origin = origin;
- return this;
- }
-
/**
* Get the properties property: Additional descriptions for the operation.
*
@@ -113,37 +85,13 @@ public Map properties() {
return this.properties;
}
- /**
- * Set the properties property: Additional descriptions for the operation.
- *
- * @param properties the properties value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withProperties(Map properties) {
- this.properties = properties;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (display() != null) {
- display().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
- jsonWriter.writeStringField("name", this.name);
jsonWriter.writeJsonField("display", this.display);
- jsonWriter.writeStringField("origin", this.origin);
jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeUntyped(element));
return jsonWriter.writeEndObject();
}
@@ -168,7 +116,7 @@ public static OperationInner fromJson(JsonReader jsonReader) throws IOException
} else if ("display".equals(fieldName)) {
deserializedOperationInner.display = OperationDisplay.fromJson(reader);
} else if ("origin".equals(fieldName)) {
- deserializedOperationInner.origin = reader.getString();
+ deserializedOperationInner.origin = Origin.fromString(reader.getString());
} else if ("properties".equals(fieldName)) {
Map properties = reader.readMap(reader1 -> reader1.readUntyped());
deserializedOperationInner.properties = properties;
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/OperationProgressResultInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/OperationProgressResultInner.java
new file mode 100644
index 000000000000..3865fc743c37
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/OperationProgressResultInner.java
@@ -0,0 +1,251 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.mysqlflexibleserver.models.OperationProgressResponseType;
+import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatusResult;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.List;
+
+/**
+ * Represents Operation Results API Response.
+ */
+@Immutable
+public final class OperationProgressResultInner extends OperationStatusResult {
+ /*
+ * The response properties specific to the operation
+ */
+ private OperationProgressResponseType properties;
+
+ /*
+ * Fully qualified ID of the resource against which the original async operation was started.
+ */
+ private String resourceId;
+
+ /*
+ * If present, details of the operation error.
+ */
+ private ManagementError error;
+
+ /*
+ * The operations list.
+ */
+ private List operations;
+
+ /*
+ * The end time of the operation.
+ */
+ private OffsetDateTime endTime;
+
+ /*
+ * The start time of the operation.
+ */
+ private OffsetDateTime startTime;
+
+ /*
+ * Percent of the operation that is complete.
+ */
+ private Double percentComplete;
+
+ /*
+ * Operation status.
+ */
+ private String status;
+
+ /*
+ * Name of the async operation.
+ */
+ private String name;
+
+ /*
+ * Fully qualified ID for the async operation.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of OperationProgressResultInner class.
+ */
+ private OperationProgressResultInner() {
+ }
+
+ /**
+ * Get the properties property: The response properties specific to the operation.
+ *
+ * @return the properties value.
+ */
+ public OperationProgressResponseType properties() {
+ return this.properties;
+ }
+
+ /**
+ * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was
+ * started.
+ *
+ * @return the resourceId value.
+ */
+ @Override
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Get the error property: If present, details of the operation error.
+ *
+ * @return the error value.
+ */
+ @Override
+ public ManagementError error() {
+ return this.error;
+ }
+
+ /**
+ * Get the operations property: The operations list.
+ *
+ * @return the operations value.
+ */
+ @Override
+ public List operations() {
+ return this.operations;
+ }
+
+ /**
+ * Get the endTime property: The end time of the operation.
+ *
+ * @return the endTime value.
+ */
+ @Override
+ public OffsetDateTime endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Get the startTime property: The start time of the operation.
+ *
+ * @return the startTime value.
+ */
+ @Override
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Get the percentComplete property: Percent of the operation that is complete.
+ *
+ * @return the percentComplete value.
+ */
+ @Override
+ public Double percentComplete() {
+ return this.percentComplete;
+ }
+
+ /**
+ * Get the status property: Operation status.
+ *
+ * @return the status value.
+ */
+ @Override
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Get the name property: Name of the async operation.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified ID for the async operation.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("status", status());
+ jsonWriter.writeStringField("id", id());
+ jsonWriter.writeStringField("name", name());
+ jsonWriter.writeNumberField("percentComplete", percentComplete());
+ jsonWriter.writeStringField("startTime",
+ startTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(startTime()));
+ jsonWriter.writeStringField("endTime",
+ endTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(endTime()));
+ jsonWriter.writeArrayField("operations", operations(), (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeJsonField("error", error());
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationProgressResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationProgressResultInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the OperationProgressResultInner.
+ */
+ public static OperationProgressResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationProgressResultInner deserializedOperationProgressResultInner = new OperationProgressResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("status".equals(fieldName)) {
+ deserializedOperationProgressResultInner.status = reader.getString();
+ } else if ("id".equals(fieldName)) {
+ deserializedOperationProgressResultInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedOperationProgressResultInner.name = reader.getString();
+ } else if ("percentComplete".equals(fieldName)) {
+ deserializedOperationProgressResultInner.percentComplete
+ = reader.getNullable(JsonReader::getDouble);
+ } else if ("startTime".equals(fieldName)) {
+ deserializedOperationProgressResultInner.startTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("endTime".equals(fieldName)) {
+ deserializedOperationProgressResultInner.endTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("operations".equals(fieldName)) {
+ List operations
+ = reader.readArray(reader1 -> OperationStatusResult.fromJson(reader1));
+ deserializedOperationProgressResultInner.operations = operations;
+ } else if ("error".equals(fieldName)) {
+ deserializedOperationProgressResultInner.error = ManagementError.fromJson(reader);
+ } else if ("resourceId".equals(fieldName)) {
+ deserializedOperationProgressResultInner.resourceId = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedOperationProgressResultInner.properties
+ = OperationProgressResponseType.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationProgressResultInner;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/OperationStatusExtendedResultInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/OperationStatusExtendedResultInner.java
new file mode 100644
index 000000000000..58d24e141c80
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/OperationStatusExtendedResultInner.java
@@ -0,0 +1,252 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.mysqlflexibleserver.models.OperationStatusResult;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Represents Operation Results API Response.
+ */
+@Immutable
+public final class OperationStatusExtendedResultInner extends OperationStatusResult {
+ /*
+ * The extended properties of Operation Results
+ */
+ private Map properties;
+
+ /*
+ * Fully qualified ID of the resource against which the original async operation was started.
+ */
+ private String resourceId;
+
+ /*
+ * If present, details of the operation error.
+ */
+ private ManagementError error;
+
+ /*
+ * The operations list.
+ */
+ private List operations;
+
+ /*
+ * The end time of the operation.
+ */
+ private OffsetDateTime endTime;
+
+ /*
+ * The start time of the operation.
+ */
+ private OffsetDateTime startTime;
+
+ /*
+ * Percent of the operation that is complete.
+ */
+ private Double percentComplete;
+
+ /*
+ * Operation status.
+ */
+ private String status;
+
+ /*
+ * Name of the async operation.
+ */
+ private String name;
+
+ /*
+ * Fully qualified ID for the async operation.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of OperationStatusExtendedResultInner class.
+ */
+ private OperationStatusExtendedResultInner() {
+ }
+
+ /**
+ * Get the properties property: The extended properties of Operation Results.
+ *
+ * @return the properties value.
+ */
+ public Map properties() {
+ return this.properties;
+ }
+
+ /**
+ * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was
+ * started.
+ *
+ * @return the resourceId value.
+ */
+ @Override
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Get the error property: If present, details of the operation error.
+ *
+ * @return the error value.
+ */
+ @Override
+ public ManagementError error() {
+ return this.error;
+ }
+
+ /**
+ * Get the operations property: The operations list.
+ *
+ * @return the operations value.
+ */
+ @Override
+ public List operations() {
+ return this.operations;
+ }
+
+ /**
+ * Get the endTime property: The end time of the operation.
+ *
+ * @return the endTime value.
+ */
+ @Override
+ public OffsetDateTime endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Get the startTime property: The start time of the operation.
+ *
+ * @return the startTime value.
+ */
+ @Override
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Get the percentComplete property: Percent of the operation that is complete.
+ *
+ * @return the percentComplete value.
+ */
+ @Override
+ public Double percentComplete() {
+ return this.percentComplete;
+ }
+
+ /**
+ * Get the status property: Operation status.
+ *
+ * @return the status value.
+ */
+ @Override
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Get the name property: Name of the async operation.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified ID for the async operation.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("status", status());
+ jsonWriter.writeStringField("id", id());
+ jsonWriter.writeStringField("name", name());
+ jsonWriter.writeNumberField("percentComplete", percentComplete());
+ jsonWriter.writeStringField("startTime",
+ startTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(startTime()));
+ jsonWriter.writeStringField("endTime",
+ endTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(endTime()));
+ jsonWriter.writeArrayField("operations", operations(), (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeJsonField("error", error());
+ jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeUntyped(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationStatusExtendedResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationStatusExtendedResultInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the OperationStatusExtendedResultInner.
+ */
+ public static OperationStatusExtendedResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationStatusExtendedResultInner deserializedOperationStatusExtendedResultInner
+ = new OperationStatusExtendedResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("status".equals(fieldName)) {
+ deserializedOperationStatusExtendedResultInner.status = reader.getString();
+ } else if ("id".equals(fieldName)) {
+ deserializedOperationStatusExtendedResultInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedOperationStatusExtendedResultInner.name = reader.getString();
+ } else if ("percentComplete".equals(fieldName)) {
+ deserializedOperationStatusExtendedResultInner.percentComplete
+ = reader.getNullable(JsonReader::getDouble);
+ } else if ("startTime".equals(fieldName)) {
+ deserializedOperationStatusExtendedResultInner.startTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("endTime".equals(fieldName)) {
+ deserializedOperationStatusExtendedResultInner.endTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("operations".equals(fieldName)) {
+ List operations
+ = reader.readArray(reader1 -> OperationStatusResult.fromJson(reader1));
+ deserializedOperationStatusExtendedResultInner.operations = operations;
+ } else if ("error".equals(fieldName)) {
+ deserializedOperationStatusExtendedResultInner.error = ManagementError.fromJson(reader);
+ } else if ("resourceId".equals(fieldName)) {
+ deserializedOperationStatusExtendedResultInner.resourceId = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ Map properties = reader.readMap(reader1 -> reader1.readUntyped());
+ deserializedOperationStatusExtendedResultInner.properties = properties;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationStatusExtendedResultInner;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/PrivateEndpointConnectionInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/PrivateEndpointConnectionInner.java
new file mode 100644
index 000000000000..ef5be4d629bb
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/PrivateEndpointConnectionInner.java
@@ -0,0 +1,216 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpoint;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateLinkServiceConnectionState;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * A private endpoint connection resource.
+ */
+@Fluent
+public final class PrivateEndpointConnectionInner extends ProxyResource {
+ /*
+ * Resource properties.
+ */
+ private PrivateEndpointConnectionProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of PrivateEndpointConnectionInner class.
+ */
+ public PrivateEndpointConnectionInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private PrivateEndpointConnectionProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the groupIds property: The group ids for the private endpoint resource.
+ *
+ * @return the groupIds value.
+ */
+ public List groupIds() {
+ return this.innerProperties() == null ? null : this.innerProperties().groupIds();
+ }
+
+ /**
+ * Get the privateEndpoint property: The private endpoint resource.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint();
+ }
+
+ /**
+ * Set the privateEndpoint property: The private endpoint resource.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateEndpoint(privateEndpoint);
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState();
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner
+ withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the private endpoint connection resource.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateEndpointConnectionInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateEndpointConnectionInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the PrivateEndpointConnectionInner.
+ */
+ public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner
+ = new PrivateEndpointConnectionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.innerProperties
+ = PrivateEndpointConnectionProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateEndpointConnectionInner;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/PrivateEndpointConnectionListResultInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/PrivateEndpointConnectionListResultInner.java
new file mode 100644
index 000000000000..89a806573c23
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/PrivateEndpointConnectionListResultInner.java
@@ -0,0 +1,97 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The response of a PrivateEndpointConnection list operation.
+ */
+@Immutable
+public final class PrivateEndpointConnectionListResultInner
+ implements JsonSerializable {
+ /*
+ * The PrivateEndpointConnection items on this page
+ */
+ private List value;
+
+ /*
+ * The link to the next page of items
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of PrivateEndpointConnectionListResultInner class.
+ */
+ private PrivateEndpointConnectionListResultInner() {
+ }
+
+ /**
+ * Get the value property: The PrivateEndpointConnection items on this page.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: The link to the next page of items.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateEndpointConnectionListResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateEndpointConnectionListResultInner if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the PrivateEndpointConnectionListResultInner.
+ */
+ public static PrivateEndpointConnectionListResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateEndpointConnectionListResultInner deserializedPrivateEndpointConnectionListResultInner
+ = new PrivateEndpointConnectionListResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1));
+ deserializedPrivateEndpointConnectionListResultInner.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionListResultInner.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateEndpointConnectionListResultInner;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/PrivateEndpointConnectionProperties.java
new file mode 100644
index 000000000000..0f287d3d71b1
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/PrivateEndpointConnectionProperties.java
@@ -0,0 +1,158 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpoint;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateLinkServiceConnectionState;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Properties of the private endpoint connection.
+ */
+@Fluent
+public final class PrivateEndpointConnectionProperties
+ implements JsonSerializable {
+ /*
+ * The group ids for the private endpoint resource.
+ */
+ private List groupIds;
+
+ /*
+ * The private endpoint resource.
+ */
+ private PrivateEndpoint privateEndpoint;
+
+ /*
+ * A collection of information about the state of the connection between service consumer and provider.
+ */
+ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /*
+ * The provisioning state of the private endpoint connection resource.
+ */
+ private PrivateEndpointConnectionProvisioningState provisioningState;
+
+ /**
+ * Creates an instance of PrivateEndpointConnectionProperties class.
+ */
+ public PrivateEndpointConnectionProperties() {
+ }
+
+ /**
+ * Get the groupIds property: The group ids for the private endpoint resource.
+ *
+ * @return the groupIds value.
+ */
+ public List groupIds() {
+ return this.groupIds;
+ }
+
+ /**
+ * Get the privateEndpoint property: The private endpoint resource.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint property: The private endpoint resource.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties
+ withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the private endpoint connection resource.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState);
+ jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateEndpointConnectionProperties if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the PrivateEndpointConnectionProperties.
+ */
+ public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties
+ = new PrivateEndpointConnectionProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("privateLinkServiceConnectionState".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState
+ = PrivateLinkServiceConnectionState.fromJson(reader);
+ } else if ("groupIds".equals(fieldName)) {
+ List groupIds = reader.readArray(reader1 -> reader1.getString());
+ deserializedPrivateEndpointConnectionProperties.groupIds = groupIds;
+ } else if ("privateEndpoint".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader);
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionProperties.provisioningState
+ = PrivateEndpointConnectionProvisioningState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateEndpointConnectionProperties;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/PrivateLinkResourceInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/PrivateLinkResourceInner.java
new file mode 100644
index 000000000000..eb175c0d0590
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/PrivateLinkResourceInner.java
@@ -0,0 +1,144 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.mysqlflexibleserver.models.PrivateLinkResourceProperties;
+import java.io.IOException;
+
+/**
+ * A private link resource.
+ */
+@Immutable
+public final class PrivateLinkResourceInner extends ProxyResource {
+ /*
+ * Resource properties.
+ */
+ private PrivateLinkResourceProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of PrivateLinkResourceInner class.
+ */
+ private PrivateLinkResourceInner() {
+ }
+
+ /**
+ * Get the properties property: Resource properties.
+ *
+ * @return the properties value.
+ */
+ public PrivateLinkResourceProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateLinkResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateLinkResourceInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the PrivateLinkResourceInner.
+ */
+ public static PrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateLinkResourceInner deserializedPrivateLinkResourceInner = new PrivateLinkResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedPrivateLinkResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedPrivateLinkResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedPrivateLinkResourceInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedPrivateLinkResourceInner.properties = PrivateLinkResourceProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedPrivateLinkResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateLinkResourceInner;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerBackupInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerBackupInner.java
index fb2bcb081b03..64abdf5a6992 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerBackupInner.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerBackupInner.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
@@ -16,7 +16,7 @@
/**
* Server backup properties.
*/
-@Fluent
+@Immutable
public final class ServerBackupInner extends ProxyResource {
/*
* The properties of a server backup.
@@ -24,7 +24,7 @@ public final class ServerBackupInner extends ProxyResource {
private ServerBackupProperties innerProperties;
/*
- * The system metadata relating to this resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
private SystemData systemData;
@@ -46,7 +46,7 @@ public final class ServerBackupInner extends ProxyResource {
/**
* Creates an instance of ServerBackupInner class.
*/
- public ServerBackupInner() {
+ private ServerBackupInner() {
}
/**
@@ -59,7 +59,7 @@ private ServerBackupProperties innerProperties() {
}
/**
- * Get the systemData property: The system metadata relating to this resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
@@ -106,20 +106,6 @@ public String backupType() {
return this.innerProperties() == null ? null : this.innerProperties().backupType();
}
- /**
- * Set the backupType property: Backup type.
- *
- * @param backupType the backupType value to set.
- * @return the ServerBackupInner object itself.
- */
- public ServerBackupInner withBackupType(String backupType) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ServerBackupProperties();
- }
- this.innerProperties().withBackupType(backupType);
- return this;
- }
-
/**
* Get the completedTime property: Backup completed time (ISO8601 format).
*
@@ -129,20 +115,6 @@ public OffsetDateTime completedTime() {
return this.innerProperties() == null ? null : this.innerProperties().completedTime();
}
- /**
- * Set the completedTime property: Backup completed time (ISO8601 format).
- *
- * @param completedTime the completedTime value to set.
- * @return the ServerBackupInner object itself.
- */
- public ServerBackupInner withCompletedTime(OffsetDateTime completedTime) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ServerBackupProperties();
- }
- this.innerProperties().withCompletedTime(completedTime);
- return this;
- }
-
/**
* Get the source property: Backup source.
*
@@ -152,31 +124,6 @@ public String source() {
return this.innerProperties() == null ? null : this.innerProperties().source();
}
- /**
- * Set the source property: Backup source.
- *
- * @param source the source value to set.
- * @return the ServerBackupInner object itself.
- */
- public ServerBackupInner withSource(String source) {
- if (this.innerProperties() == null) {
- this.innerProperties = new ServerBackupProperties();
- }
- this.innerProperties().withSource(source);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerBackupProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerBackupProperties.java
index d853be9f7238..29ac757dcbae 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerBackupProperties.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerBackupProperties.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.util.CoreUtils;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
@@ -17,7 +17,7 @@
/**
* The properties of a server backup.
*/
-@Fluent
+@Immutable
public final class ServerBackupProperties implements JsonSerializable {
/*
* Backup type.
@@ -37,7 +37,7 @@ public final class ServerBackupProperties implements JsonSerializable {
+ /*
+ * Backup name
+ */
+ private String backupNameV2;
+
+ /*
+ * The backupType property.
+ */
+ private BackupType backupType;
+
+ /*
+ * Backup completed time (ISO8601 format).
+ */
+ private OffsetDateTime completedTime;
+
+ /*
+ * Backup source
+ */
+ private String source;
+
+ /*
+ * The provisioning state of backup resource.
+ */
+ private ProvisioningState provisioningState;
+
+ /**
+ * Creates an instance of ServerBackupPropertiesV2 class.
+ */
+ public ServerBackupPropertiesV2() {
+ }
+
+ /**
+ * Get the backupNameV2 property: Backup name.
+ *
+ * @return the backupNameV2 value.
+ */
+ public String backupNameV2() {
+ return this.backupNameV2;
+ }
+
+ /**
+ * Set the backupNameV2 property: Backup name.
+ *
+ * @param backupNameV2 the backupNameV2 value to set.
+ * @return the ServerBackupPropertiesV2 object itself.
+ */
+ public ServerBackupPropertiesV2 withBackupNameV2(String backupNameV2) {
+ this.backupNameV2 = backupNameV2;
+ return this;
+ }
+
+ /**
+ * Get the backupType property: The backupType property.
+ *
+ * @return the backupType value.
+ */
+ public BackupType backupType() {
+ return this.backupType;
+ }
+
+ /**
+ * Set the backupType property: The backupType property.
+ *
+ * @param backupType the backupType value to set.
+ * @return the ServerBackupPropertiesV2 object itself.
+ */
+ public ServerBackupPropertiesV2 withBackupType(BackupType backupType) {
+ this.backupType = backupType;
+ return this;
+ }
+
+ /**
+ * Get the completedTime property: Backup completed time (ISO8601 format).
+ *
+ * @return the completedTime value.
+ */
+ public OffsetDateTime completedTime() {
+ return this.completedTime;
+ }
+
+ /**
+ * Set the completedTime property: Backup completed time (ISO8601 format).
+ *
+ * @param completedTime the completedTime value to set.
+ * @return the ServerBackupPropertiesV2 object itself.
+ */
+ public ServerBackupPropertiesV2 withCompletedTime(OffsetDateTime completedTime) {
+ this.completedTime = completedTime;
+ return this;
+ }
+
+ /**
+ * Get the source property: Backup source.
+ *
+ * @return the source value.
+ */
+ public String source() {
+ return this.source;
+ }
+
+ /**
+ * Set the source property: Backup source.
+ *
+ * @param source the source value to set.
+ * @return the ServerBackupPropertiesV2 object itself.
+ */
+ public ServerBackupPropertiesV2 withSource(String source) {
+ this.source = source;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of backup resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("backupNameV2", this.backupNameV2);
+ jsonWriter.writeStringField("backupType", this.backupType == null ? null : this.backupType.toString());
+ jsonWriter.writeStringField("completedTime",
+ this.completedTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.completedTime));
+ jsonWriter.writeStringField("source", this.source);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ServerBackupPropertiesV2 from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ServerBackupPropertiesV2 if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ServerBackupPropertiesV2.
+ */
+ public static ServerBackupPropertiesV2 fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ServerBackupPropertiesV2 deserializedServerBackupPropertiesV2 = new ServerBackupPropertiesV2();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("backupNameV2".equals(fieldName)) {
+ deserializedServerBackupPropertiesV2.backupNameV2 = reader.getString();
+ } else if ("backupType".equals(fieldName)) {
+ deserializedServerBackupPropertiesV2.backupType = BackupType.fromString(reader.getString());
+ } else if ("completedTime".equals(fieldName)) {
+ deserializedServerBackupPropertiesV2.completedTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("source".equals(fieldName)) {
+ deserializedServerBackupPropertiesV2.source = reader.getString();
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedServerBackupPropertiesV2.provisioningState
+ = ProvisioningState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedServerBackupPropertiesV2;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerBackupV2Inner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerBackupV2Inner.java
new file mode 100644
index 000000000000..9def7fff7222
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerBackupV2Inner.java
@@ -0,0 +1,247 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.mysqlflexibleserver.models.BackupType;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ProvisioningState;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+
+/**
+ * Server backup properties.
+ */
+@Fluent
+public final class ServerBackupV2Inner extends ProxyResource {
+ /*
+ * The properties of a server backup.
+ */
+ private ServerBackupPropertiesV2 innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of ServerBackupV2Inner class.
+ */
+ public ServerBackupV2Inner() {
+ }
+
+ /**
+ * Get the innerProperties property: The properties of a server backup.
+ *
+ * @return the innerProperties value.
+ */
+ private ServerBackupPropertiesV2 innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the backupNameV2 property: Backup name.
+ *
+ * @return the backupNameV2 value.
+ */
+ public String backupNameV2() {
+ return this.innerProperties() == null ? null : this.innerProperties().backupNameV2();
+ }
+
+ /**
+ * Set the backupNameV2 property: Backup name.
+ *
+ * @param backupNameV2 the backupNameV2 value to set.
+ * @return the ServerBackupV2Inner object itself.
+ */
+ public ServerBackupV2Inner withBackupNameV2(String backupNameV2) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerBackupPropertiesV2();
+ }
+ this.innerProperties().withBackupNameV2(backupNameV2);
+ return this;
+ }
+
+ /**
+ * Get the backupType property: The backupType property.
+ *
+ * @return the backupType value.
+ */
+ public BackupType backupType() {
+ return this.innerProperties() == null ? null : this.innerProperties().backupType();
+ }
+
+ /**
+ * Set the backupType property: The backupType property.
+ *
+ * @param backupType the backupType value to set.
+ * @return the ServerBackupV2Inner object itself.
+ */
+ public ServerBackupV2Inner withBackupType(BackupType backupType) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerBackupPropertiesV2();
+ }
+ this.innerProperties().withBackupType(backupType);
+ return this;
+ }
+
+ /**
+ * Get the completedTime property: Backup completed time (ISO8601 format).
+ *
+ * @return the completedTime value.
+ */
+ public OffsetDateTime completedTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().completedTime();
+ }
+
+ /**
+ * Set the completedTime property: Backup completed time (ISO8601 format).
+ *
+ * @param completedTime the completedTime value to set.
+ * @return the ServerBackupV2Inner object itself.
+ */
+ public ServerBackupV2Inner withCompletedTime(OffsetDateTime completedTime) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerBackupPropertiesV2();
+ }
+ this.innerProperties().withCompletedTime(completedTime);
+ return this;
+ }
+
+ /**
+ * Get the source property: Backup source.
+ *
+ * @return the source value.
+ */
+ public String source() {
+ return this.innerProperties() == null ? null : this.innerProperties().source();
+ }
+
+ /**
+ * Set the source property: Backup source.
+ *
+ * @param source the source value to set.
+ * @return the ServerBackupV2Inner object itself.
+ */
+ public ServerBackupV2Inner withSource(String source) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerBackupPropertiesV2();
+ }
+ this.innerProperties().withSource(source);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of backup resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ServerBackupV2Inner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ServerBackupV2Inner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ServerBackupV2Inner.
+ */
+ public static ServerBackupV2Inner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ServerBackupV2Inner deserializedServerBackupV2Inner = new ServerBackupV2Inner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedServerBackupV2Inner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedServerBackupV2Inner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedServerBackupV2Inner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedServerBackupV2Inner.innerProperties = ServerBackupPropertiesV2.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedServerBackupV2Inner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedServerBackupV2Inner;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerInner.java
index 508feeccbf1a..4b1f9b0f0e60 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerInner.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
@@ -15,6 +15,8 @@
import com.azure.resourcemanager.mysqlflexibleserver.models.DataEncryption;
import com.azure.resourcemanager.mysqlflexibleserver.models.HighAvailability;
import com.azure.resourcemanager.mysqlflexibleserver.models.Identity;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ImportSourceProperties;
+import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenancePolicy;
import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceWindow;
import com.azure.resourcemanager.mysqlflexibleserver.models.Network;
import com.azure.resourcemanager.mysqlflexibleserver.models.ReplicationRole;
@@ -24,6 +26,7 @@
import com.azure.resourcemanager.mysqlflexibleserver.models.Storage;
import java.io.IOException;
import java.time.OffsetDateTime;
+import java.util.List;
import java.util.Map;
/**
@@ -31,6 +34,11 @@
*/
@Fluent
public final class ServerInner extends Resource {
+ /*
+ * Properties of the server.
+ */
+ private ServerProperties innerProperties;
+
/*
* The cmk identity for the server.
*/
@@ -42,12 +50,7 @@ public final class ServerInner extends Resource {
private Sku sku;
/*
- * Properties of the server.
- */
- private ServerProperties innerProperties;
-
- /*
- * The system metadata relating to this resource.
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
private SystemData systemData;
@@ -72,6 +75,15 @@ public final class ServerInner extends Resource {
public ServerInner() {
}
+ /**
+ * Get the innerProperties property: Properties of the server.
+ *
+ * @return the innerProperties value.
+ */
+ private ServerProperties innerProperties() {
+ return this.innerProperties;
+ }
+
/**
* Get the identity property: The cmk identity for the server.
*
@@ -113,16 +125,7 @@ public ServerInner withSku(Sku sku) {
}
/**
- * Get the innerProperties property: Properties of the server.
- *
- * @return the innerProperties value.
- */
- private ServerProperties innerProperties() {
- return this.innerProperties;
- }
-
- /**
- * Get the systemData property: The system metadata relating to this resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
@@ -229,7 +232,7 @@ public ServerInner withAdministratorLoginPassword(String administratorLoginPassw
}
/**
- * Get the version property: Server version.
+ * Get the version property: Major version of MySQL. 8.0.21 stands for MySQL 8.0, 5.7.44 stands for MySQL 5.7.
*
* @return the version value.
*/
@@ -238,7 +241,7 @@ public ServerVersion version() {
}
/**
- * Set the version property: Server version.
+ * Set the version property: Major version of MySQL. 8.0.21 stands for MySQL 8.0, 5.7.44 stands for MySQL 5.7.
*
* @param version the version value to set.
* @return the ServerInner object itself.
@@ -251,6 +254,15 @@ public ServerInner withVersion(ServerVersion version) {
return this;
}
+ /**
+ * Get the fullVersion property: Major version and actual engine version.
+ *
+ * @return the fullVersion value.
+ */
+ public String fullVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().fullVersion();
+ }
+
/**
* Get the availabilityZone property: availability Zone information of the server.
*
@@ -418,6 +430,29 @@ public String fullyQualifiedDomainName() {
return this.innerProperties() == null ? null : this.innerProperties().fullyQualifiedDomainName();
}
+ /**
+ * Get the databasePort property: The server database port. Can only be specified when the server is being created.
+ *
+ * @return the databasePort value.
+ */
+ public Integer databasePort() {
+ return this.innerProperties() == null ? null : this.innerProperties().databasePort();
+ }
+
+ /**
+ * Set the databasePort property: The server database port. Can only be specified when the server is being created.
+ *
+ * @param databasePort the databasePort value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withDatabasePort(Integer databasePort) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withDatabasePort(databasePort);
+ return this;
+ }
+
/**
* Get the storage property: Storage related properties of a server.
*
@@ -511,7 +546,40 @@ public ServerInner withNetwork(Network network) {
}
/**
- * Get the maintenanceWindow property: Maintenance window of a server.
+ * Get the privateEndpointConnections property: PrivateEndpointConnections related properties of a server.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections();
+ }
+
+ /**
+ * Get the maintenancePolicy property: Maintenance policy of a server.
+ *
+ * @return the maintenancePolicy value.
+ */
+ public MaintenancePolicy maintenancePolicy() {
+ return this.innerProperties() == null ? null : this.innerProperties().maintenancePolicy();
+ }
+
+ /**
+ * Set the maintenancePolicy property: Maintenance policy of a server.
+ *
+ * @param maintenancePolicy the maintenancePolicy value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withMaintenancePolicy(MaintenancePolicy maintenancePolicy) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
+ }
+ this.innerProperties().withMaintenancePolicy(maintenancePolicy);
+ return this;
+ }
+
+ /**
+ * Get the maintenanceWindow property: Maintenance window of a server. Known issue: cannot be set during server
+ * creation or updated with other properties during server update; must be updated separately.
*
* @return the maintenanceWindow value.
*/
@@ -520,7 +588,8 @@ public MaintenanceWindow maintenanceWindow() {
}
/**
- * Set the maintenanceWindow property: Maintenance window of a server.
+ * Set the maintenanceWindow property: Maintenance window of a server. Known issue: cannot be set during server
+ * creation or updated with other properties during server update; must be updated separately.
*
* @param maintenanceWindow the maintenanceWindow value to set.
* @return the ServerInner object itself.
@@ -534,20 +603,26 @@ public ServerInner withMaintenanceWindow(MaintenanceWindow maintenanceWindow) {
}
/**
- * Validates the instance.
+ * Get the importSourceProperties property: Source properties for import from storage.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
+ * @return the importSourceProperties value.
*/
- public void validate() {
- if (identity() != null) {
- identity().validate();
- }
- if (sku() != null) {
- sku().validate();
- }
- if (innerProperties() != null) {
- innerProperties().validate();
+ public ImportSourceProperties importSourceProperties() {
+ return this.innerProperties() == null ? null : this.innerProperties().importSourceProperties();
+ }
+
+ /**
+ * Set the importSourceProperties property: Source properties for import from storage.
+ *
+ * @param importSourceProperties the importSourceProperties value to set.
+ * @return the ServerInner object itself.
+ */
+ public ServerInner withImportSourceProperties(ImportSourceProperties importSourceProperties) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ServerProperties();
}
+ this.innerProperties().withImportSourceProperties(importSourceProperties);
+ return this;
}
/**
@@ -558,9 +633,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("location", location());
jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.innerProperties);
jsonWriter.writeJsonField("identity", this.identity);
jsonWriter.writeJsonField("sku", this.sku);
- jsonWriter.writeJsonField("properties", this.innerProperties);
return jsonWriter.writeEndObject();
}
@@ -591,12 +666,12 @@ public static ServerInner fromJson(JsonReader jsonReader) throws IOException {
} else if ("tags".equals(fieldName)) {
Map tags = reader.readMap(reader1 -> reader1.getString());
deserializedServerInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedServerInner.innerProperties = ServerProperties.fromJson(reader);
} else if ("identity".equals(fieldName)) {
deserializedServerInner.identity = Identity.fromJson(reader);
} else if ("sku".equals(fieldName)) {
deserializedServerInner.sku = Sku.fromJson(reader);
- } else if ("properties".equals(fieldName)) {
- deserializedServerInner.innerProperties = ServerProperties.fromJson(reader);
} else if ("systemData".equals(fieldName)) {
deserializedServerInner.systemData = SystemData.fromJson(reader);
} else {
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerProperties.java
index 6dd62aff6100..4c191fea0b82 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerProperties.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
@@ -14,6 +14,8 @@
import com.azure.resourcemanager.mysqlflexibleserver.models.CreateMode;
import com.azure.resourcemanager.mysqlflexibleserver.models.DataEncryption;
import com.azure.resourcemanager.mysqlflexibleserver.models.HighAvailability;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ImportSourceProperties;
+import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenancePolicy;
import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceWindow;
import com.azure.resourcemanager.mysqlflexibleserver.models.Network;
import com.azure.resourcemanager.mysqlflexibleserver.models.ReplicationRole;
@@ -23,6 +25,7 @@
import java.io.IOException;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
+import java.util.List;
/**
* The properties of a server.
@@ -41,10 +44,15 @@ public final class ServerProperties implements JsonSerializable privateEndpointConnections;
+
+ /*
+ * Maintenance policy of a server.
+ */
+ private MaintenancePolicy maintenancePolicy;
+
+ /*
+ * Maintenance window of a server. Known issue: cannot be set during server creation or updated with other
+ * properties during server update; must be updated separately.
*/
private MaintenanceWindow maintenanceWindow;
+ /*
+ * Source properties for import from storage.
+ */
+ private ImportSourceProperties importSourceProperties;
+
/**
* Creates an instance of ServerProperties class.
*/
@@ -166,7 +195,7 @@ public ServerProperties withAdministratorLoginPassword(String administratorLogin
}
/**
- * Get the version property: Server version.
+ * Get the version property: Major version of MySQL. 8.0.21 stands for MySQL 8.0, 5.7.44 stands for MySQL 5.7.
*
* @return the version value.
*/
@@ -175,7 +204,7 @@ public ServerVersion version() {
}
/**
- * Set the version property: Server version.
+ * Set the version property: Major version of MySQL. 8.0.21 stands for MySQL 8.0, 5.7.44 stands for MySQL 5.7.
*
* @param version the version value to set.
* @return the ServerProperties object itself.
@@ -185,6 +214,15 @@ public ServerProperties withVersion(ServerVersion version) {
return this;
}
+ /**
+ * Get the fullVersion property: Major version and actual engine version.
+ *
+ * @return the fullVersion value.
+ */
+ public String fullVersion() {
+ return this.fullVersion;
+ }
+
/**
* Get the availabilityZone property: availability Zone information of the server.
*
@@ -334,6 +372,26 @@ public String fullyQualifiedDomainName() {
return this.fullyQualifiedDomainName;
}
+ /**
+ * Get the databasePort property: The server database port. Can only be specified when the server is being created.
+ *
+ * @return the databasePort value.
+ */
+ public Integer databasePort() {
+ return this.databasePort;
+ }
+
+ /**
+ * Set the databasePort property: The server database port. Can only be specified when the server is being created.
+ *
+ * @param databasePort the databasePort value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withDatabasePort(Integer databasePort) {
+ this.databasePort = databasePort;
+ return this;
+ }
+
/**
* Get the storage property: Storage related properties of a server.
*
@@ -415,7 +473,37 @@ public ServerProperties withNetwork(Network network) {
}
/**
- * Get the maintenanceWindow property: Maintenance window of a server.
+ * Get the privateEndpointConnections property: PrivateEndpointConnections related properties of a server.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /**
+ * Get the maintenancePolicy property: Maintenance policy of a server.
+ *
+ * @return the maintenancePolicy value.
+ */
+ public MaintenancePolicy maintenancePolicy() {
+ return this.maintenancePolicy;
+ }
+
+ /**
+ * Set the maintenancePolicy property: Maintenance policy of a server.
+ *
+ * @param maintenancePolicy the maintenancePolicy value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withMaintenancePolicy(MaintenancePolicy maintenancePolicy) {
+ this.maintenancePolicy = maintenancePolicy;
+ return this;
+ }
+
+ /**
+ * Get the maintenanceWindow property: Maintenance window of a server. Known issue: cannot be set during server
+ * creation or updated with other properties during server update; must be updated separately.
*
* @return the maintenanceWindow value.
*/
@@ -424,7 +512,8 @@ public MaintenanceWindow maintenanceWindow() {
}
/**
- * Set the maintenanceWindow property: Maintenance window of a server.
+ * Set the maintenanceWindow property: Maintenance window of a server. Known issue: cannot be set during server
+ * creation or updated with other properties during server update; must be updated separately.
*
* @param maintenanceWindow the maintenanceWindow value to set.
* @return the ServerProperties object itself.
@@ -435,29 +524,23 @@ public ServerProperties withMaintenanceWindow(MaintenanceWindow maintenanceWindo
}
/**
- * Validates the instance.
+ * Get the importSourceProperties property: Source properties for import from storage.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
+ * @return the importSourceProperties value.
*/
- public void validate() {
- if (dataEncryption() != null) {
- dataEncryption().validate();
- }
- if (storage() != null) {
- storage().validate();
- }
- if (backup() != null) {
- backup().validate();
- }
- if (highAvailability() != null) {
- highAvailability().validate();
- }
- if (network() != null) {
- network().validate();
- }
- if (maintenanceWindow() != null) {
- maintenanceWindow().validate();
- }
+ public ImportSourceProperties importSourceProperties() {
+ return this.importSourceProperties;
+ }
+
+ /**
+ * Set the importSourceProperties property: Source properties for import from storage.
+ *
+ * @param importSourceProperties the importSourceProperties value to set.
+ * @return the ServerProperties object itself.
+ */
+ public ServerProperties withImportSourceProperties(ImportSourceProperties importSourceProperties) {
+ this.importSourceProperties = importSourceProperties;
+ return this;
}
/**
@@ -479,11 +562,14 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("replicationRole",
this.replicationRole == null ? null : this.replicationRole.toString());
jsonWriter.writeJsonField("dataEncryption", this.dataEncryption);
+ jsonWriter.writeNumberField("databasePort", this.databasePort);
jsonWriter.writeJsonField("storage", this.storage);
jsonWriter.writeJsonField("backup", this.backup);
jsonWriter.writeJsonField("highAvailability", this.highAvailability);
jsonWriter.writeJsonField("network", this.network);
+ jsonWriter.writeJsonField("maintenancePolicy", this.maintenancePolicy);
jsonWriter.writeJsonField("maintenanceWindow", this.maintenanceWindow);
+ jsonWriter.writeJsonField("importSourceProperties", this.importSourceProperties);
return jsonWriter.writeEndObject();
}
@@ -508,6 +594,8 @@ public static ServerProperties fromJson(JsonReader jsonReader) throws IOExceptio
deserializedServerProperties.administratorLoginPassword = reader.getString();
} else if ("version".equals(fieldName)) {
deserializedServerProperties.version = ServerVersion.fromString(reader.getString());
+ } else if ("fullVersion".equals(fieldName)) {
+ deserializedServerProperties.fullVersion = reader.getString();
} else if ("availabilityZone".equals(fieldName)) {
deserializedServerProperties.availabilityZone = reader.getString();
} else if ("createMode".equals(fieldName)) {
@@ -527,6 +615,8 @@ public static ServerProperties fromJson(JsonReader jsonReader) throws IOExceptio
deserializedServerProperties.state = ServerState.fromString(reader.getString());
} else if ("fullyQualifiedDomainName".equals(fieldName)) {
deserializedServerProperties.fullyQualifiedDomainName = reader.getString();
+ } else if ("databasePort".equals(fieldName)) {
+ deserializedServerProperties.databasePort = reader.getNullable(JsonReader::getInt);
} else if ("storage".equals(fieldName)) {
deserializedServerProperties.storage = Storage.fromJson(reader);
} else if ("backup".equals(fieldName)) {
@@ -535,8 +625,16 @@ public static ServerProperties fromJson(JsonReader jsonReader) throws IOExceptio
deserializedServerProperties.highAvailability = HighAvailability.fromJson(reader);
} else if ("network".equals(fieldName)) {
deserializedServerProperties.network = Network.fromJson(reader);
+ } else if ("privateEndpointConnections".equals(fieldName)) {
+ List privateEndpointConnections
+ = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1));
+ deserializedServerProperties.privateEndpointConnections = privateEndpointConnections;
+ } else if ("maintenancePolicy".equals(fieldName)) {
+ deserializedServerProperties.maintenancePolicy = MaintenancePolicy.fromJson(reader);
} else if ("maintenanceWindow".equals(fieldName)) {
deserializedServerProperties.maintenanceWindow = MaintenanceWindow.fromJson(reader);
+ } else if ("importSourceProperties".equals(fieldName)) {
+ deserializedServerProperties.importSourceProperties = ImportSourceProperties.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java
index e4db5bc6ca0e..d758dc051b1c 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ServerPropertiesForUpdate.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
@@ -12,8 +12,11 @@
import com.azure.resourcemanager.mysqlflexibleserver.models.Backup;
import com.azure.resourcemanager.mysqlflexibleserver.models.DataEncryption;
import com.azure.resourcemanager.mysqlflexibleserver.models.HighAvailability;
+import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenancePolicy;
import com.azure.resourcemanager.mysqlflexibleserver.models.MaintenanceWindow;
+import com.azure.resourcemanager.mysqlflexibleserver.models.Network;
import com.azure.resourcemanager.mysqlflexibleserver.models.ReplicationRole;
+import com.azure.resourcemanager.mysqlflexibleserver.models.ServerVersion;
import com.azure.resourcemanager.mysqlflexibleserver.models.Storage;
import java.io.IOException;
@@ -27,6 +30,11 @@ public final class ServerPropertiesForUpdate implements JsonSerializable {
+ /*
+ * The response properties of a pre backup operation.
+ */
+ private ValidateBackupResponseProperties innerProperties;
+
+ /**
+ * Creates an instance of ValidateBackupResponseInner class.
+ */
+ private ValidateBackupResponseInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The response properties of a pre backup operation.
+ *
+ * @return the innerProperties value.
+ */
+ private ValidateBackupResponseProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the numberOfContainers property: Estimated no of storage containers required for resource data to be backed
+ * up.
+ *
+ * @return the numberOfContainers value.
+ */
+ public Integer numberOfContainers() {
+ return this.innerProperties() == null ? null : this.innerProperties().numberOfContainers();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ValidateBackupResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ValidateBackupResponseInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ValidateBackupResponseInner.
+ */
+ public static ValidateBackupResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ValidateBackupResponseInner deserializedValidateBackupResponseInner = new ValidateBackupResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("properties".equals(fieldName)) {
+ deserializedValidateBackupResponseInner.innerProperties
+ = ValidateBackupResponseProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedValidateBackupResponseInner;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ValidateBackupResponseProperties.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ValidateBackupResponseProperties.java
new file mode 100644
index 000000000000..59206133a737
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/ValidateBackupResponseProperties.java
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * ValidateBackup Response Properties.
+ */
+@Immutable
+public final class ValidateBackupResponseProperties implements JsonSerializable {
+ /*
+ * Estimated no of storage containers required for resource data to be backed up.
+ */
+ private Integer numberOfContainers;
+
+ /**
+ * Creates an instance of ValidateBackupResponseProperties class.
+ */
+ private ValidateBackupResponseProperties() {
+ }
+
+ /**
+ * Get the numberOfContainers property: Estimated no of storage containers required for resource data to be backed
+ * up.
+ *
+ * @return the numberOfContainers value.
+ */
+ public Integer numberOfContainers() {
+ return this.numberOfContainers;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeNumberField("numberOfContainers", this.numberOfContainers);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ValidateBackupResponseProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ValidateBackupResponseProperties if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ValidateBackupResponseProperties.
+ */
+ public static ValidateBackupResponseProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ValidateBackupResponseProperties deserializedValidateBackupResponseProperties
+ = new ValidateBackupResponseProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("numberOfContainers".equals(fieldName)) {
+ deserializedValidateBackupResponseProperties.numberOfContainers
+ = reader.getNullable(JsonReader::getInt);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedValidateBackupResponseProperties;
+ });
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java
index 15164f2c1b6e..f7bcc4ac16f5 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/VirtualNetworkSubnetUsageResultInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.fluent.models;
@@ -37,7 +37,7 @@ public final class VirtualNetworkSubnetUsageResultInner
/**
* Creates an instance of VirtualNetworkSubnetUsageResultInner class.
*/
- public VirtualNetworkSubnetUsageResultInner() {
+ private VirtualNetworkSubnetUsageResultInner() {
}
/**
@@ -67,17 +67,6 @@ public List delegatedSubnetsUsage() {
return this.delegatedSubnetsUsage;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (delegatedSubnetsUsage() != null) {
- delegatedSubnetsUsage().forEach(e -> e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/package-info.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/package-info.java
index f1c5dccfe641..4818ead75d3b 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/package-info.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/models/package-info.java
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the inner data models for MySqlManagementClient.
+ * Package containing the inner data models for MySql.
* 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.
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/package-info.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/package-info.java
index 2509e87f564b..f41583c44033 100644
--- a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/package-info.java
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/fluent/package-info.java
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the service clients for MySqlManagementClient.
+ * Package containing the service clients for MySql.
* 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.
*/
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionImpl.java
new file mode 100644
index 000000000000..4373dddb74de
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionImpl.java
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtection;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionProvisioningState;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionState;
+import java.time.OffsetDateTime;
+
+public final class AdvancedThreatProtectionImpl implements AdvancedThreatProtection {
+ private AdvancedThreatProtectionInner innerObject;
+
+ private final com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager;
+
+ AdvancedThreatProtectionImpl(AdvancedThreatProtectionInner innerObject,
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public OffsetDateTime creationTime() {
+ return this.innerModel().creationTime();
+ }
+
+ public AdvancedThreatProtectionState state() {
+ return this.innerModel().state();
+ }
+
+ public AdvancedThreatProtectionProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public AdvancedThreatProtectionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager() {
+ return this.serviceManager;
+ }
+}
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
new file mode 100644
index 000000000000..1bbd4406a790
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionSettingsClientImpl.java
@@ -0,0 +1,813 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionInner;
+import com.azure.resourcemanager.mysqlflexibleserver.implementation.models.AdvancedThreatProtectionListResult;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionForUpdate;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdvancedThreatProtectionName;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in AdvancedThreatProtectionSettingsClient.
+ */
+public final class AdvancedThreatProtectionSettingsClientImpl implements AdvancedThreatProtectionSettingsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final AdvancedThreatProtectionSettingsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final MySqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of AdvancedThreatProtectionSettingsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AdvancedThreatProtectionSettingsClientImpl(MySqlManagementClientImpl client) {
+ this.service = RestProxy.create(AdvancedThreatProtectionSettingsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MySqlManagementClientAdvancedThreatProtectionSettings to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "MySqlManagementClientAdvancedThreatProtectionSettings")
+ public interface AdvancedThreatProtectionSettingsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}")
+ @ExpectedResponses({ 200, 201, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> updatePut(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AdvancedThreatProtectionInner parameters, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}")
+ @ExpectedResponses({ 200, 201, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updatePutSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AdvancedThreatProtectionInner parameters, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AdvancedThreatProtectionForUpdate parameters, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @PathParam("advancedThreatProtectionName") AdvancedThreatProtectionName advancedThreatProtectionName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AdvancedThreatProtectionForUpdate parameters, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/advancedThreatProtectionSettings")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection state along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName,
+ String serverName, AdvancedThreatProtectionName advancedThreatProtectionName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, serverName, advancedThreatProtectionName, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection state on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName) {
+ return getWithResponseAsync(resourceGroupName, serverName, advancedThreatProtectionName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection state along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, serverName, advancedThreatProtectionName, accept, context);
+ }
+
+ /**
+ * Get a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection state.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AdvancedThreatProtectionInner get(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName) {
+ return getWithResponse(resourceGroupName, serverName, advancedThreatProtectionName, Context.NONE).getValue();
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updatePutWithResponseAsync(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionInner parameters) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.updatePut(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, serverName, advancedThreatProtectionName,
+ contentType, accept, parameters, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updatePutWithResponse(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionInner parameters) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updatePutSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, serverName, advancedThreatProtectionName, contentType,
+ accept, parameters, Context.NONE);
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updatePutWithResponse(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionInner parameters,
+ Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updatePutSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, serverName, advancedThreatProtectionName, contentType,
+ accept, parameters, context);
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, AdvancedThreatProtectionInner> beginUpdatePutAsync(
+ String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionInner parameters) {
+ Mono>> mono
+ = updatePutWithResponseAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), AdvancedThreatProtectionInner.class, AdvancedThreatProtectionInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, AdvancedThreatProtectionInner> beginUpdatePut(
+ String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionInner parameters) {
+ Response response
+ = updatePutWithResponse(resourceGroupName, serverName, advancedThreatProtectionName, parameters);
+ return this.client.getLroResult(response,
+ AdvancedThreatProtectionInner.class, AdvancedThreatProtectionInner.class, Context.NONE);
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @param context The 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 a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, AdvancedThreatProtectionInner> beginUpdatePut(
+ String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionInner parameters, Context context) {
+ Response response
+ = updatePutWithResponse(resourceGroupName, serverName, advancedThreatProtectionName, parameters, context);
+ return this.client.getLroResult(response,
+ AdvancedThreatProtectionInner.class, AdvancedThreatProtectionInner.class, context);
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updatePutAsync(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionInner parameters) {
+ return beginUpdatePutAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AdvancedThreatProtectionInner updatePut(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionInner parameters) {
+ return beginUpdatePut(resourceGroupName, serverName, advancedThreatProtectionName, parameters).getFinalResult();
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AdvancedThreatProtectionInner updatePut(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionInner parameters,
+ Context context) {
+ return beginUpdatePut(resourceGroupName, serverName, advancedThreatProtectionName, parameters, context)
+ .getFinalResult();
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionForUpdate parameters) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, serverName, advancedThreatProtectionName,
+ contentType, accept, parameters, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updateWithResponse(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionForUpdate parameters) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, serverName, advancedThreatProtectionName, contentType,
+ accept, parameters, Context.NONE);
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updateWithResponse(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionForUpdate parameters,
+ Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, serverName, advancedThreatProtectionName, contentType,
+ accept, parameters, context);
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, AdvancedThreatProtectionInner> beginUpdateAsync(
+ String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters) {
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), AdvancedThreatProtectionInner.class, AdvancedThreatProtectionInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, AdvancedThreatProtectionInner> beginUpdate(
+ String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters) {
+ Response response
+ = updateWithResponse(resourceGroupName, serverName, advancedThreatProtectionName, parameters);
+ return this.client.getLroResult(response,
+ AdvancedThreatProtectionInner.class, AdvancedThreatProtectionInner.class, Context.NONE);
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @param context The 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 a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, AdvancedThreatProtectionInner> beginUpdate(
+ String resourceGroupName, String serverName, AdvancedThreatProtectionName advancedThreatProtectionName,
+ AdvancedThreatProtectionForUpdate parameters, Context context) {
+ Response response
+ = updateWithResponse(resourceGroupName, serverName, advancedThreatProtectionName, parameters, context);
+ return this.client.getLroResult(response,
+ AdvancedThreatProtectionInner.class, AdvancedThreatProtectionInner.class, context);
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionForUpdate parameters) {
+ return beginUpdateAsync(resourceGroupName, serverName, advancedThreatProtectionName, parameters).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AdvancedThreatProtectionInner update(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionForUpdate parameters) {
+ return beginUpdate(resourceGroupName, serverName, advancedThreatProtectionName, parameters).getFinalResult();
+ }
+
+ /**
+ * Updates a server's Advanced Threat Protection state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param advancedThreatProtectionName The name of the Advanced Threat Protection state.
+ * @param parameters The server's Advanced Threat Protection body to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a server's Advanced Threat Protection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AdvancedThreatProtectionInner update(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionForUpdate parameters,
+ Context context) {
+ return beginUpdate(resourceGroupName, serverName, advancedThreatProtectionName, parameters, context)
+ .getFinalResult();
+ }
+
+ /**
+ * Gets a list of server's Advanced Threat Protection states.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 a list of server's Advanced Threat Protection states along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName,
+ String serverName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, serverName, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a list of server's Advanced Threat Protection states.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 a list of server's Advanced Threat Protection states as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String serverName) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, serverName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets a list of server's Advanced Threat Protection states.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 a list of server's Advanced Threat Protection states along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String serverName) {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, serverName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Gets a list of server's Advanced Threat Protection states.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 a list of server's Advanced Threat Protection states along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String serverName,
+ Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, serverName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Gets a list of server's Advanced Threat Protection states.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 a list of server's Advanced Threat Protection states as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String serverName) {
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, serverName),
+ nextLink -> listNextSinglePage(nextLink));
+ }
+
+ /**
+ * Gets a list of server's Advanced Threat Protection states.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the 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 a list of server's Advanced Threat Protection states as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String serverName,
+ Context context) {
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, serverName, context),
+ nextLink -> listNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server's Advanced Threat Protection states along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server's Advanced Threat Protection states along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of server's Advanced Threat Protection states along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java
new file mode 100644
index 000000000000..884d6ccbad06
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AdvancedThreatProtectionSettingsImpl.java
@@ -0,0 +1,119 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.AdvancedThreatProtectionSettingsClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AdvancedThreatProtectionInner;
+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.AdvancedThreatProtectionSettings;
+
+public final class AdvancedThreatProtectionSettingsImpl implements AdvancedThreatProtectionSettings {
+ private static final ClientLogger LOGGER = new ClientLogger(AdvancedThreatProtectionSettingsImpl.class);
+
+ private final AdvancedThreatProtectionSettingsClient innerClient;
+
+ private final com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager;
+
+ public AdvancedThreatProtectionSettingsImpl(AdvancedThreatProtectionSettingsClient innerClient,
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, Context context) {
+ Response inner = this.serviceClient()
+ .getWithResponse(resourceGroupName, serverName, advancedThreatProtectionName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new AdvancedThreatProtectionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public AdvancedThreatProtection get(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName) {
+ AdvancedThreatProtectionInner inner
+ = this.serviceClient().get(resourceGroupName, serverName, advancedThreatProtectionName);
+ if (inner != null) {
+ return new AdvancedThreatProtectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public AdvancedThreatProtection updatePut(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionInner parameters) {
+ AdvancedThreatProtectionInner inner
+ = this.serviceClient().updatePut(resourceGroupName, serverName, advancedThreatProtectionName, parameters);
+ if (inner != null) {
+ return new AdvancedThreatProtectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public AdvancedThreatProtection updatePut(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionInner parameters,
+ Context context) {
+ AdvancedThreatProtectionInner inner = this.serviceClient()
+ .updatePut(resourceGroupName, serverName, advancedThreatProtectionName, parameters, context);
+ if (inner != null) {
+ return new AdvancedThreatProtectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public AdvancedThreatProtection update(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionForUpdate parameters) {
+ AdvancedThreatProtectionInner inner
+ = this.serviceClient().update(resourceGroupName, serverName, advancedThreatProtectionName, parameters);
+ if (inner != null) {
+ return new AdvancedThreatProtectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public AdvancedThreatProtection update(String resourceGroupName, String serverName,
+ AdvancedThreatProtectionName advancedThreatProtectionName, AdvancedThreatProtectionForUpdate parameters,
+ Context context) {
+ AdvancedThreatProtectionInner inner = this.serviceClient()
+ .update(resourceGroupName, serverName, advancedThreatProtectionName, parameters, context);
+ if (inner != null) {
+ return new AdvancedThreatProtectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable list(String resourceGroupName, String serverName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, serverName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AdvancedThreatProtectionImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String serverName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().list(resourceGroupName, serverName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AdvancedThreatProtectionImpl(inner1, this.manager()));
+ }
+
+ private AdvancedThreatProtectionSettingsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AzureADAdministratorImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AzureADAdministratorImpl.java
new file mode 100644
index 000000000000..71e542d201b1
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AzureADAdministratorImpl.java
@@ -0,0 +1,169 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AzureADAdministratorInner;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorName;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorType;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AzureADAdministrator;
+
+public final class AzureADAdministratorImpl
+ implements AzureADAdministrator, AzureADAdministrator.Definition, AzureADAdministrator.Update {
+ private AzureADAdministratorInner innerObject;
+
+ private final com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public AdministratorType administratorType() {
+ return this.innerModel().administratorType();
+ }
+
+ public String login() {
+ return this.innerModel().login();
+ }
+
+ public String sid() {
+ return this.innerModel().sid();
+ }
+
+ public String tenantId() {
+ return this.innerModel().tenantId();
+ }
+
+ public String identityResourceId() {
+ return this.innerModel().identityResourceId();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public AzureADAdministratorInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String serverName;
+
+ private AdministratorName administratorName;
+
+ public AzureADAdministratorImpl withExistingFlexibleServer(String resourceGroupName, String serverName) {
+ this.resourceGroupName = resourceGroupName;
+ this.serverName = serverName;
+ return this;
+ }
+
+ public AzureADAdministrator create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getAzureADAdministrators()
+ .createOrUpdate(resourceGroupName, serverName, administratorName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public AzureADAdministrator create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getAzureADAdministrators()
+ .createOrUpdate(resourceGroupName, serverName, administratorName, this.innerModel(), context);
+ return this;
+ }
+
+ AzureADAdministratorImpl(AdministratorName name,
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager) {
+ this.innerObject = new AzureADAdministratorInner();
+ this.serviceManager = serviceManager;
+ this.administratorName = name;
+ }
+
+ public AzureADAdministratorImpl update() {
+ return this;
+ }
+
+ public AzureADAdministrator apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getAzureADAdministrators()
+ .createOrUpdate(resourceGroupName, serverName, administratorName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public AzureADAdministrator apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getAzureADAdministrators()
+ .createOrUpdate(resourceGroupName, serverName, administratorName, this.innerModel(), context);
+ return this;
+ }
+
+ AzureADAdministratorImpl(AzureADAdministratorInner innerObject,
+ com.azure.resourcemanager.mysqlflexibleserver.MySqlManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.serverName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "flexibleServers");
+ this.administratorName = AdministratorName
+ .fromString(ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "administrators"));
+ }
+
+ public AzureADAdministrator refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getAzureADAdministrators()
+ .getWithResponse(resourceGroupName, serverName, administratorName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public AzureADAdministrator refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getAzureADAdministrators()
+ .getWithResponse(resourceGroupName, serverName, administratorName, context)
+ .getValue();
+ return this;
+ }
+
+ public AzureADAdministratorImpl withAdministratorType(AdministratorType administratorType) {
+ this.innerModel().withAdministratorType(administratorType);
+ return this;
+ }
+
+ public AzureADAdministratorImpl withLogin(String login) {
+ this.innerModel().withLogin(login);
+ return this;
+ }
+
+ public AzureADAdministratorImpl withSid(String sid) {
+ this.innerModel().withSid(sid);
+ return this;
+ }
+
+ public AzureADAdministratorImpl withTenantId(String tenantId) {
+ this.innerModel().withTenantId(tenantId);
+ return this;
+ }
+
+ public AzureADAdministratorImpl withIdentityResourceId(String identityResourceId) {
+ this.innerModel().withIdentityResourceId(identityResourceId);
+ return this;
+ }
+}
diff --git a/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AzureADAdministratorsClientImpl.java b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AzureADAdministratorsClientImpl.java
new file mode 100644
index 000000000000..7a57ba911907
--- /dev/null
+++ b/sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/AzureADAdministratorsClientImpl.java
@@ -0,0 +1,774 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.mysqlflexibleserver.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.AzureADAdministratorsClient;
+import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.AzureADAdministratorInner;
+import com.azure.resourcemanager.mysqlflexibleserver.implementation.models.AdministratorListResult;
+import com.azure.resourcemanager.mysqlflexibleserver.models.AdministratorName;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in AzureADAdministratorsClient.
+ */
+public final class AzureADAdministratorsClientImpl implements AzureADAdministratorsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final AzureADAdministratorsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final MySqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of AzureADAdministratorsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AzureADAdministratorsClientImpl(MySqlManagementClientImpl client) {
+ this.service = RestProxy.create(AzureADAdministratorsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MySqlManagementClientAzureADAdministrators to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "MySqlManagementClientAzureADAdministrators")
+ public interface AzureADAdministratorsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/administrators/{administratorName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @PathParam("administratorName") AdministratorName administratorName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/administrators/{administratorName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @PathParam("administratorName") AdministratorName administratorName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/administrators/{administratorName}")
+ @ExpectedResponses({ 200, 201, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @PathParam("administratorName") AdministratorName administratorName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AzureADAdministratorInner parameters, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/administrators/{administratorName}")
+ @ExpectedResponses({ 200, 201, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrUpdateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @PathParam("administratorName") AdministratorName administratorName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AzureADAdministratorInner parameters, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/administrators/{administratorName}")
+ @ExpectedResponses({ 200, 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @PathParam("administratorName") AdministratorName administratorName, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/administrators/{administratorName}")
+ @ExpectedResponses({ 200, 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @PathParam("administratorName") AdministratorName administratorName, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/administrators")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByServer(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/administrators")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByServerSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByServerNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByServerNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Gets information about an azure ad administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about an azure ad administrator along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String serverName,
+ AdministratorName administratorName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, serverName, administratorName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets information about an azure ad administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about an azure ad administrator on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String serverName,
+ AdministratorName administratorName) {
+ return getWithResponseAsync(resourceGroupName, serverName, administratorName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets information about an azure ad administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @param context The 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 information about an azure ad administrator along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String serverName,
+ AdministratorName administratorName, Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, serverName, administratorName, accept, context);
+ }
+
+ /**
+ * Gets information about an azure ad administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about an azure ad administrator.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AzureADAdministratorInner get(String resourceGroupName, String serverName,
+ AdministratorName administratorName) {
+ return getWithResponse(resourceGroupName, serverName, administratorName, Context.NONE).getValue();
+ }
+
+ /**
+ * Creates or updates an existing Azure Active Directory administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @param parameters The required parameters for creating or updating an aad administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Administrator along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String serverName, AdministratorName administratorName, AzureADAdministratorInner parameters) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, serverName, administratorName, contentType, accept,
+ parameters, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or updates an existing Azure Active Directory administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @param parameters The required parameters for creating or updating an aad administrator.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Administrator along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrUpdateWithResponse(String resourceGroupName, String serverName,
+ AdministratorName administratorName, AzureADAdministratorInner parameters) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, serverName, administratorName, contentType, accept,
+ parameters, Context.NONE);
+ }
+
+ /**
+ * Creates or updates an existing Azure Active Directory administrator.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param serverName The name of the server.
+ * @param administratorName The name of the Azure AD Administrator.
+ * @param parameters The required parameters for creating or updating an aad administrator.
+ * @param context The 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 Administrator along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response